Jump to content
  • Advertisement
Sign in to follow this  
BloodLust666

2D Game Programming

This topic is 4777 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a 2D engine i've made, but for some reason, it freezes whenever i try to load a texture. I have 5 classes (so far): cGraphics cSprite cTexture cTextureSprite : cTexture cTextureAnimatedSprite : cTextureSprite I can send who ever wants to help my engine and they can see if they can et it to work. my contacts: AIM: o knuckles 666 o MSN: knuckles_666@msn.com yahoo: evilknuckles666

Share this post


Link to post
Share on other sites
Advertisement
I know this isn't exactly what you were asking for, but have you tried stepping through your code with the debugger to see what happens when you try to load a texture? In general, not many people are going to DL your engine to solve your problems (I learned that personally many years ago :) ), and if you haven't already, you definitely need to learn how to use a debugger. It only gets worse from here if you are going to develop an engine, game... . actually any software.

--Vic--

Share this post


Link to post
Share on other sites

Ensure you're using the right path when calling your texture filenames. If you're
launching your app from your Visual Studio debugger, then set the path within the IDE to properly pick up your resources..

Make sure there's no typos, etc.

Does the debug spew in the IDE reveal anything moments before the "freeze"??

Share this post


Link to post
Share on other sites
Depends on what IDE you are using. In Visual Studio 6, you start it by simply pressing F5.

If you are not using Visual Studio 6, tell us what you're using and I'm sure someone can help.

Matt Hughson

Share this post


Link to post
Share on other sites
Also I'd would like to know exactly what you mean by "it freezes". Is it an infinite loop kind of regular freeze or is it an access violation or other type of abrupt runtime termination? The nature of the error often tells a lot about where to look for it.

Share this post


Link to post
Share on other sites
Check out the forum FAQ. There are code blocks you can use to cut and paste the offending code onto this forum. It will be difficult to solve your problem unless people can see what is going on.

Also, I'm not sure how much experience you have coding, but you should probably take some time to get familiar with your IDE before starting any kind of large project. Games really aren't the most stable things to debug through an IDE.

If you want to do 2d, then I would suggest looking into a library such as Allegro or SDL. They will make things much easier for you.

Share this post


Link to post
Share on other sites
i have lots of experience coding with C++ but not really that much in the .NET framework. i don't really want to spend time learning that, not really that important... and i'm not looking for the "easier" way to do things, i want to learn it all the way so i can use it on my own and use different things with it and whatnot.

actually, i just looked at my code again and after i initiate my sprite class, it freezes in the black fullscreen and i have to restart my computer.... it would really be easier for me to send someone my engine and them look at it, it's really big so i can't just take little bigs of it and put it here (not TOO big though to look at and understand)

Share this post


Link to post
Share on other sites
When I run into problems that force me to restart my computer I change the backbuffer width and height to about 500 and set the windowed to true in the presentation parameters. Then run the program and when the error comes up it stops the program and brings up the just in time debugger.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!