Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Loop FAil:S

Author
Message
FIGHTEX
15
Years of Service
User Offline
Joined: 30th Nov 2008
Location:
Posted: 5th Sep 2009 13:35
does an int not get "biger" if i have it outside of the loop with void or something



Game.Love
jezza
16
Years of Service
User Offline
Joined: 8th Mar 2008
Location: Bham, UK
Posted: 5th Sep 2009 17:49
Learn to indent properly. Seriously. That was the most horrid piece of code I've ever read.
Anyway, I don't think gIntro() is ever being called? It is called from Menu(), which as far as I can see is never called.

Oh, and what's wrong with:

instead of


FIGHTEX
15
Years of Service
User Offline
Joined: 30th Nov 2008
Location:
Posted: 5th Sep 2009 18:22
well how i ident dosent mathere, but the Menu is, in MainGame, which is in the loop

Game.Love
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 5th Sep 2009 18:28
Yes, your enumerations are being used to call the function, I assume in a precursor to an actual in-game menu... The problem is that your variable IMG is being inremented past 4 quite quickly(syncing at 60fps, it will take about 1.25 secs to be past 4) and it is never reset, so your sprites will not display, or they may, but it will be too quick to notice as they will all be hidden/shown almost instantly.

The other problem is the basic logic of your program im afraid, you are calling gintro() over and over in the main loop(via Menu() via your switches), reloading the images each time and recreating the sprites, consider moving alot of the loading code to specific, once only functions and only calling the hide show methodsin your loop. But I think you should add some more control to the timer, perhaps changing the IMG value based on keystrokes rather than incrementing it like you are... dbKeyState would be the best to use

Hope this helps

If it ain't broke.... DONT FIX IT !!!
FIGHTEX
15
Years of Service
User Offline
Joined: 30th Nov 2008
Location:
Posted: 5th Sep 2009 19:17
ty Mista wilson i fixed.



Game.Love

Login to post a reply

Server time is: 2024-10-01 12:30:30
Your offset time is: 2024-10-01 12:30:30