Headaches over getting started with rendering in a game loop |
Cosmic Kid
|
http://www.sdltutorials.com/sdl-coordinates-and-blitting
^The tutorial I'm using. I'm having some trouble with this tutorial where it says you should see your image appear in the top left hand corner of the screen. For some strange reason (even though I copied the code word for word) every time I run the application it opens a black window and immediately closes it. This is what it returns in the output window:
I don't understand what's giving me this issue, as I've gotten their code copied perfectly. The thing is, the game isn't looping and continuing to render it seems; it's just closing out after displaying the black screen(not even my picture). |
|||||||||||||
|
Naith
|
Have you followed the basics tutorial (http://www.sdltutorials.com/sdl-tutorial-basics) that is before the sdl-coordinates-and-blitting tutorial? If that's the case, there might be something wrong in the code you've from that. My guess is that it's some function that's returning -1, which causes the program to exit / shutdown. Re-check all your code and also check that all the textures and stuff (if you load assets during startup) exist in the same directory as the executable file. If you can't find anything wrong with your code and stuff, let me know and you can send me your whole projects (if you're using Visual Studio) and I can check everything and try to execute it on my computer.
|
|||||||||||
|