Hi,
I've been fiddling with blitz for a couple of months on and off and decided to take apart one of the samples to see what made it tick.
I chose Celestial Rift and promptly broke it down into modules (e.g. attractMode, player, enemy, bullets, stars, etc.) and then chucked in some tweaks (which programmer can resist?). Aside from some niggly bugs (including breaking the hi-score counter) I've sat back and tried to list what I've learnt, and what I need to find out about.
One thing that does puzzle me is the WaitTimer command. I understand it's purpose (wait n units of time and then return control back to the program), what I don't understand is the way it's used in Celestial Rift :-
g_tmr is a timer set with g_tmr = CreateTimer(50)
What puzzles me is why you'd want to loop? Wouldn't this just execute the game loop multiple times, if so, why would you want to do that?
It's not a problem I'm stuck on, I'd just like to know the reasoning behind it so I can determine if it'll bite me in the ass in the future!
Thanks in advance
I've been fiddling with blitz for a couple of months on and off and decided to take apart one of the samples to see what made it tick.
I chose Celestial Rift and promptly broke it down into modules (e.g. attractMode, player, enemy, bullets, stars, etc.) and then chucked in some tweaks (which programmer can resist?). Aside from some niggly bugs (including breaking the hi-score counter) I've sat back and tried to list what I've learnt, and what I need to find out about.
One thing that does puzzle me is the WaitTimer command. I understand it's purpose (wait n units of time and then return control back to the program), what I don't understand is the way it's used in Celestial Rift :-
Local iFrames, i iFrames = WaitTimer(g_tmr) For i = 1 To iFrames ;do game stuff here, check keys, etc. Next
g_tmr is a timer set with g_tmr = CreateTimer(50)
What puzzles me is why you'd want to loop? Wouldn't this just execute the game loop multiple times, if so, why would you want to do that?
It's not a problem I'm stuck on, I'd just like to know the reasoning behind it so I can determine if it'll bite me in the ass in the future!
Thanks in advance