dt

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2019 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultMaxTPS = 60
)

Variables

This section is empty.

Functions

func DeltaTime

func DeltaTime() float64

DeltaTime gets the fixed delta time based on the designed TPS divided by max TPS.

func DesignedTPS

func DesignedTPS() int

DesignedTPS() returns the ticks-per-second that the game was designed to run at.

Default is 60

func MaxTPS

func MaxTPS() int

MaxTPS returns the current maximum TPS.

func SetDesignedTPS

func SetDesignedTPS(tps int)

SetDesignedTPS is the ticks-per-second the game was initially designed to run at. ie. 30tps, 60tps, etc for example, if you're porting a Game Maker game that ran at 30 frames per second, you'd want this to be 30 so that translation of alarm logic works seamlessly.

func SetMaxTPS

func SetMaxTPS(tps int)

SetMaxTPS is the ticks-per-second the game is trying to run at. ie. 240tps, 480tps

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL