O'Reilly logo

3D Game Programming for Teens, Second Edition by Eric Grebler, Maneesh Sethi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Timing

Remember that your game is like a movie, going by frame by frame as seconds go by. You can use this to your advantage, not only in creating collisions and explosions, but for all types of effects in your game. Basically, you can create a countdown timer and have events take place before, during, or after a specific time. To do this, we will use the Millisecs() command. Before I start describing this command, it’s important to know that 1000 milliseconds is equal to 1 second. Blitz3D is always counting the time, and the Millisecs() command will tell you what the current time is. You can use this command to create a timer and schedule events to happen based on that time. Let’s use this command to create a ticking time bomb!

Start by opening ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required