Game Development Community

Ticks and repairRate

by Kevin La Barre · in Torque Game Engine · 07/20/2003 (11:10 pm) · 1 replies

I'm flipping through the FPS demo code and trying to figure out what a "tick" is. I know what it is in computer terms but can't find anything in the code where you can set the number of ticks per second.

I'm looking at the repairRate variable in player.cs. The player has a total life of 100 health points and with repairRate set to 0.10 he seems to heal at a rate of about 3 1/3 HP per second. Assuming repairRate, being set at 0.10, means heal 0.10 HP per tick I get 33 1/3 ticks per second. Am I even on the right track here? Any idea where the number of ticks per second can be set, if that's even something I want to do...

This of course all assumes the "ticks" spoken of in the code are the type of ticks I'm looking for. =/

Yeah, I haven't gotten much sleep... quick edit here... what I'm really looking for is a way to set the regeneration of HP per second. For instance, if I want to regen 1HP per second, what shall I set repairRate to?

Kevin

#1
07/21/2003 (10:34 am)
There are about 32 ticks/second, in the code.

So divide your per-second rate by 32, and you're golden. :)