Write A Game in 24 hours Contest!

Miscellaneous Forums/General Discussion/Write A Game in 24 hours Contest!

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.

Update: Now squad commands now do not "expire" when issued by the player. Also a misc. bug was fixed where AI speech was not properly displayed above the tank.




sampyxis: I think your problem can be fixed by using a equalization system. I use the delta-time technique, because it's quick and simple:
;Equalization
Global prevmillisecs, timestep#

Function EqualizeSpeeds()
	ms = MilliSecs()
	timestep# = (ms - prevmillisecs) * .01
	If timestep > 2 Then timestep = 0
	If timestep < 0 Then timestep = 0
	prevmillisecs = ms
End Function

Function Eq#(speed#)
	Return timestep * speed
End Function


Just call EqualizeSpeeds() every loop and use Eq() for every distance measure, like instead of this:
MoveEntity cam, 1, 0, 0
, do this:
MoveEntity cam, Eq(1), 0, 0

When you get the Eq() speeds the way you want them, your game will run almost exactly the same on any computer of any speed.

There are other more accurate (but slower) techniques like render tweening, but much more complex than simple delta-time technique.