Sign in to follow this  
ElementalVenom

XNA Game Choppyness

Recommended Posts

Hello guys! this is my first forum post so any help is appreciated! So i have made a game in XNA that is based on a zombie shooter kinda thing. All the things i want to work work just fine accept for one MAJOR bug. Around wave 3.5/4.5 the game suddenly DROPS to 2 fps making everything very very choppy. I have been trying to fix this to the best of my knowledge for days but as im just getting into the XNA ways im not to sure whats wrong. You can find the source code at: http://pastebin.com/QGvtT1xx

and you can find the ACTUAL game at: https://www.dropbox.com/s/dcf9192g73zrxti/ZombieLand.rar?dl=0

 

If you need anything else just ask and thanks for any help you can give me smile.png

 

PS: there is some extra code in there for future things i plan on adding like jumping and whatnot(i was having a collision error with jumpin so i skipped it).

Edited by ElementalVenom

Share this post


Link to post
Share on other sites

I don't remember if this applies to XNA, but when I get a sudden, massive drop in framerate it's because I did something wrong like lining up buffers wrong and I'm generating too many DX error messages for the system to handle. Check your debug output.

Share this post


Link to post
Share on other sites

checked it and only had a few "this variable is not used" warnings.

But i did fix the problem. I made bullets actually remove themselves when they exit the screen(forgot to do it) and i also made the collision detection a lot more efficient so the whole game went from using 25% CPU to using only 0-1% CPU. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this