I learned my programming from the book Game Programming for Teens, by Maneesh Sethi. As a result, I tend to do things sort of the way he does things, and so I use the Delay function to keep my games from running at supersonic speeds. However, then, looking around this forum, I've heard things that sound like "WaitTimer is better for having it run the same on every computer!" "No, delta timing works better than timers!"
In short, I'm puzzled.
Delay has always worked fine for me; I've only used it on one computer, but when it's slowed down it's done it abruptly when a bunch of enemies show up. However, spurred on by rumors of WaitTimer being better, I decided to try it. When I tried running the program with
all it says is "Function 'waittimer' not found."
Question #1: How do you use 'secret' functions like WaitTimer? Or do you just not?
Next I tried using WaitEvent in place of WaitTimer. Well, that worked... sort of... but whenever my player tried something different (moving from a standing start, jumping, whatever) the whole thing drastically slowed down.
Question #2: Why did it slow down so drastically? It's never done that with a simple Delay.
And then I heard about this delta timing. I'm no expert, of course, and when I tried the link I found in a forum post to a tutorial on delta timing, I found it to be a link to the now-defunct Blitzcoder forums. No help there.
Question #3: What is delta timing?
Summary question: So, what are the differences between Delay, WaitTimer, WaitEvent, and delta timing, and when is each one better than the next?
Sorry about that long-winded explanation, but I wanted to be sure the problem was as clear as I thought it could be. Thank you for your time, and please respond if you can explain it to me.
In short, I'm puzzled.
Delay has always worked fine for me; I've only used it on one computer, but when it's slowed down it's done it abruptly when a bunch of enemies show up. However, spurred on by rumors of WaitTimer being better, I decided to try it. When I tried running the program with
frametimer = CreateTimer([insert number here]) ... WaitTimer(frametimer)
all it says is "Function 'waittimer' not found."
Question #1: How do you use 'secret' functions like WaitTimer? Or do you just not?
Next I tried using WaitEvent in place of WaitTimer. Well, that worked... sort of... but whenever my player tried something different (moving from a standing start, jumping, whatever) the whole thing drastically slowed down.
Question #2: Why did it slow down so drastically? It's never done that with a simple Delay.
And then I heard about this delta timing. I'm no expert, of course, and when I tried the link I found in a forum post to a tutorial on delta timing, I found it to be a link to the now-defunct Blitzcoder forums. No help there.
Question #3: What is delta timing?
Summary question: So, what are the differences between Delay, WaitTimer, WaitEvent, and delta timing, and when is each one better than the next?
Sorry about that long-winded explanation, but I wanted to be sure the problem was as clear as I thought it could be. Thank you for your time, and please respond if you can explain it to me.