• What do you need help with? Version 5
    5,752 replies, posted
[QUOTE=Samuka97;36581170]Not too useful. I tried and it didn't so I assumed it was already borked. I downloaded a new installer from the MinGW site itself instead of using the one bundled with C::B and it worked. Thanks. [editline]1st July 2012[/editline] okay scratch that it isn't working. When I try to open the compiled file it crashes and the faulty module is libstdc++-6.dll, which was another DLL that was missing before I reinstalled MinGW. Debugging just sits at a console window and doesn't even open a real window. Uh...[/QUOTE] All these headaches can be avoided if you want to try Linux and its fantastic developer environment. :O You can try statically linking to libstc++-6.dll with -static-libstdc++. If that doesn't work it sounds like you have version mismatched source/libraries/compilers.
[QUOTE=Naelstrom;36582507]All these headaches can be avoided if you want to try Linux and its fantastic developer environment. :O You can try statically linking to libstc++-6.dll with -static-libstdc++. If that doesn't work it sounds like you have version mismatched source/libraries/compilers.[/QUOTE] I already am linking it statically. I'm just gonna format my programming HDD and do everything over then see what happens. This is exactly why I stopped trying 4~ months ago in the first place, magical errors that nobody else in the world seems to have that just happen without me even changing anything, even though I'm following a tutorial [I]exactly[/I]. [editline]1st July 2012[/editline] Okay. When trying to compile my project after [URL="http://www.ogre3d.org/tikiwiki/tiki-index.php?page=Setting+Up+An+Application+-+CodeBlocks#Setting_up_Code::Blocks_MinGW_for_OGRE_Development"]following this tutorial[/URL], the process goes smoothly on Debug, although the final executable file still crashes. However, when I try to compile under Release, I get this message repeated like five billion times on the build log: [quote]F:\Library\OgreSDK_v180\boost\boost\thread\win32\shared_mutex.hpp|50|warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]|[/quote] But it only ever mentions line 50 and 51, nothing else. What does that even mean? [editline]1st July 2012[/editline] Okay, I just tried opening the executables again after a reboot and now they both work. Welp, I guess that's that.
[QUOTE=cis.joshb;36582323]raw_input("prompt")?[/QUOTE] Yeah I got it to work, thank you. I just had to change the input to raw_input where I wanted a string!
Im trying to learn ruby because im interested in rails programming, to do this I have started messing with the exif reader library exifr the problem is there API doc is shit, it barelly tells of any attributes that you can read. Can someone give me a hand in how to view more things from this lbrary? I even downloaded the arcadia IDE in the hopes that its code completion would aid me but there was no luck with it. [editline]2nd July 2012[/editline] managed to get it working with [ruby] require 'exifr' i = EXIFR::JPEG.new('Exif.jpg'); i.to_hash.each do |k,v| puts "#{k} => #{v}"; end[/ruby] outputs: [code] ./exif.rb width => 800 height => 600 bits => 8 comment => image_description => make => NIKON model => E950 orientation => #<EXIFR::TIFF::Orientation:0x9a97b18> x_resolution => 300/1 y_resolution => 300/1 resolution_unit => 2 software => v981-79 date_time => 2001-04-06 11:51:40 +0100 ycb_cr_positioning => 2 exposure_time => 1/77 f_number => 11/2 exposure_program => 2 iso_speed_ratings => 80 date_time_original => 2001-04-06 11:51:40 +0100 date_time_digitized => 2001-04-06 11:51:40 +0100 compressed_bits_per_pixel => 4/1 exposure_bias_value => 0/1 max_aperture_value => 13/5 metering_mode => 5 light_source => 0 flash => 0 focal_length => 64/5 user_comment => color_space => 1 pixel_x_dimension => 1600 pixel_y_dimension => 1200[/code]
So, I've been attempting to make an... orbit simulator(?) in C++. Have a planet orbit around a sun and all that. Throw in some more planets at the click of the mouse and have those orbit too. I've got the code to calculate the pull and all that, I just can't figure out how to actually pull the planets. Here's the way I've been doing it which is probably not the best way. [CODE]void UpdatePlanet(Planet planets[], int size,Sun &sun,ALLEGRO_FONT* font24){ float dx,dy,math,dist; for(int i=0;i<size;i++){ if(planets[i].live){ float dx = sun.x - planets[i].x; float dy = sun.y - planets[i].y; float dist = sqrt((dx*dx) + (dy*dy)); dx /= dist; dy /= dist; planets[i].x += dx*3; planets[i].y += dy*3; } } }[/CODE] If anyone can help, I will love you forever. <3
Have you considered simulating forces and then calculating accelerations from the force vectors?
[QUOTE=esalaka;36591500]Have you considered simulating forces and then calculating accelerations from the force vectors?[/QUOTE] If I had any idea how to, I would. I've literally jumped from calculating the price of a sandwich in my C++ class, to this.
Ive been told to make a simple platform game on ActionScript 3.0 for college, i managed to get the player to move, the floors and platform colisions and all, but i have a problem figuring out the code for the wall colissions, if i use the same code i used for the floor, the player just clips them and falls out of the stage, any help?
Objective C, Cocoa application development I need to make a window with 2 text fields and a button when the button is pressed, the contents of the 2 text fields are dumped to the log help? I have a basic idea of Obj. C syntax, but I'm not entirely sure how IBActions and interface builder works.
Sorry to keep cluttering the thread but I managed to get Ogre3D working correctly, however I gave up on using OgreNewt because it was waay too complex. I decided just to use ODE and call for the position of my physics objects each frame and set their position with Ogre's scenenode, however I can't get ODE working. I tried compiling the exact code gave in the tutorial and doing it myself using Ogre3D as the rendering engine, but all of them just result in the app crashing with the message "Bad argument(s) in dSpaceCollide()". I could only [url=http://www.ode.org/old_list_archives/2006-June/019362.html]find this[/url] through Google and guess what, it's from 2006 and with no answer.
Whenever I try to use any sort of SFML 1.6 class or function in a Visual C++ 2008 Express program, the outputted application doesn't work. The prompt pops up and then absolutely nothing happens - no code I write in the int main() function is executed. The prompt also doesn't close when I go to shut it down. What the fuck is happening? I'm using the dynamic libraries and I have compiled them myself, as well as the preprocessor SFML_DYNAMIC; .
[QUOTE=MrBob1337;36593678]Whenever I try to use any sort of SFML 1.6 class or function in a Visual C++ 2008 Express program, the outputted application doesn't work. The prompt pops up and then absolutely nothing happens - no code I write in the int main() function is executed. The prompt also doesn't close when I go to shut it down. What the fuck is happening? I'm using the dynamic libraries and I have compiled them myself, as well as the preprocessor SFML_DYNAMIC; .[/QUOTE] Do you have an ATI graphics card?
Me again with something i just been told: I need to make it 3 levels long, so i was thinking in creating 3 frames on my timeline each one of them being a stage, and when player_mc hits goal_mc it goes to the next frame. Have a vague idea on how to do this, but nothing works, any help?
If I wanted to create a 2d OpenGL scene, without any perspective(as if the image is on a piece of paper), what projection would I use? And what is the frustum and how would that affect this? Edit: After thinking about this a bit, I seem to have come up with an explanation that makes sense to me. Basically the projection matrix is area which you can see, and the view matrix is the movement, rotation, and definition of up which is used with the conjunction of the frustrum(projection)? So basically the view matrix would be an eye that can move and rotate, and the projection would be how near/far it can see, as well as it's FoV? And to have a flat scene, both the projection and view matrix have to be orthogonal matrices?
[QUOTE=NovembrDobby;36593947]Do you have an ATI graphics card?[/QUOTE] Yes. Ah, researched it and fixed it by using the static libraries.
[QUOTE=WTF Nuke;36594060]If I wanted to create a 2d OpenGL scene, without any perspective(as if the image is on a piece of paper), what projection would I use? And what is the frustum and how would that affect this?[/QUOTE] You use an orthographic projection. If you're using the fixed pipeline, you accomplish this with the glOrtho function.
[QUOTE=trotskygrad;36592825]Objective C, Cocoa application development I need to make a window with 2 text fields and a button when the button is pressed, the contents of the 2 text fields are dumped to the log help? I have a basic idea of Obj. C syntax, but I'm not entirely sure how IBActions and interface builder works.[/QUOTE] [URL="http://developer.apple.com/library/mac/#documentation/General/Conceptual/Mac101/Articles/03_ConfiguringUI.html#//apple_ref/doc/uid/TP40010611-CH7-SW2"]Best example I could find using the new xcode 4[/URL] You want two IBOutlets for the text fields, and one IBAction for when the button is pressed.
[QUOTE=MrBob1337;36594072]Yes. Ah, researched it and fixed it by using the static libraries.[/QUOTE] ...except now I can't load any image, sound, or font files. No matter what format I use I get some sort of "Unable to open file" message. It's not a directory issue as I have tried using the full directory (C:\stuff\stuff...) and it gives me the same issue.
Ok so for my orthogonal matrix, I removed the view matrix and just have a projection matrix which is generated by orthoM. However, I am unsure how to combine this with the model matrix, as Matrix.multiplyMM(mMVPMatrix, 0, mModelMatrix, 0, mProjectionMatrix, 0) does not display anything. BTW this is using OpenGL ES 2.0.
[QUOTE=WTF Nuke;36595097]Ok so for my orthogonal matrix, I removed the view matrix and just have a projection matrix which is generated by orthoM. However, I am unsure how to combine this with the model matrix, as Matrix.multiplyMM(mMVPMatrix, 0, mModelMatrix, 0, mProjectionMatrix, 0) does not display anything. BTW this is using OpenGL ES 2.0.[/QUOTE] You have it backwards as far as I can tell. You are essentially tranforming the model matrix to the projection matrix's coordinate system. So in OpenGL its: projection * model. Not model * projection.
Even so, it still fails to display things.
Holy mother fuck. I fixed my problem with the planets not flying directly to the sun. Turns out all the problem was, was x and y needed to be floats... who knew.. [IMG]http://i.imgur.com/nu2Wc.png[/IMG] Now, if anyone knows how to have it orbit, help would be appreciated. <3
[QUOTE=DubsHelix;36597279]Holy mother fuck. I fixed my problem with the planets not flying directly to the sun. Turns out all the problem was, was x and y needed to be floats... who knew.. [url]http://i.imgur.com/nu2Wc.png[/url] Now, if anyone knows how to have it orbit, help would be appreciated. <3[/QUOTE] [url]http://en.wikipedia.org/wiki/Newton's_law_of_universal_gravitation[/url]
Anybody know how to send a simple string from an android device to a microcontroller using serial communication (wired)?
[QUOTE=MrBob1337;36594720]...except now I can't load any image, sound, or font files. No matter what format I use I get some sort of "Unable to open file" message. It's not a directory issue as I have tried using the full directory (C:\stuff\stuff...) and it gives me the same issue.[/QUOTE] Finally fixed it. If anyone is having the same problem I was using the wrong static libraries (sfml-whatever-s.lib) when I needed to be using the debug static libraries (sfml-whatever-s-d.lib).
Why must it be so fucking tedious to parse an XML document in .NET [editline]3rd July 2012[/editline] Suppose I have the following XML document: [code] <players> <player id="1" name="player1"/> <player id="2" name="player2"/> <player id="3" name="player3"/> <player id="4" name="player4"/> <player id="5" name="player6"/> </players [/code] In .NET (C#/VB.NET, doesn't matter to me), how would I find a player's ID from the XML document if I know their name? I [I]could[/I] have it go through the entire list, parse the entire chunk of data (there are 1000+ entries in the XML document I'll be using) to get each attribute of each entry, then use a split function to get players, search the array, use the index of the player in the other split array to find the ID, but that doesn't sound very efficient to me. Is there some fancy-ass method I can't figure out? Using System.XML (System.XML.Linq if necessary). Thanks!
use xpath player[@name = 'player1']
[QUOTE=WTF Nuke;36596240]Even so, it still fails to display things.[/QUOTE] Well then you'll have to be more specific and probably post code. It could be any number of things (not) happening.
[QUOTE=flayne;36607139]Well then you'll have to be more specific and probably post code. It could be any number of things (not) happening.[/QUOTE] It was my fault with the near/far in the ortho settings, but I've fixed it now. However, now I am trying to get VBOs to work, but have ran into trouble again. It just crashes the app right off the bat, here is how I declare the VBO: [cpp]GLES20.glGenBuffers(1, vertBuffer, 0); GLES20.glBindBuffer(GLES20.GL_ARRAY_BUFFER, vertBuffer[0]); GLES20.glBufferData(GLES20.GL_ARRAY_BUFFER, 3*3*4, mTriangle1Vertices, GLES20.GL_STATIC_DRAW); GLES20.glBindBuffer(GLES20.GL_ARRAY_BUFFER, 0);[/cpp] And here is how I attempt to draw it: [cpp]GLES20.glBindBuffer(GLES20.GL_ARRAY_BUFFER, vertBuffer[0]); GLES20.glEnableVertexAttribArray(mPositionHandle); GLES20.glVertexAttribPointer(mPositionHandle, 3*3, GLES20.GL_FLOAT, false, 0, 0); Matrix.multiplyMM(mMVPMatrix, 0, mProjectionMatrix, 0, mModelMatrix, 0); GLES20.glUniformMatrix4fv(mMVPMatrixHandle, 1, false, mMVPMatrix, 0); GLES20.glBindBuffer(GLES20.GL_ARRAY_BUFFER, 0); GLES20.glDrawArrays(GLES20.GL_TRIANGLES, 0, 3);[/cpp] I am just trying to draw a triangle, with float data, but am unsure how to debug on the Android. Also, am I able to use VAOs? The crash in question appears to be a seg fault.
ActionScript 3.0 any code that makes me repeat the same frame ? sorta like nextFrame but it makes it reload the same frame im on and not the next one
Sorry, you need to Log In to post a reply to this thread.