Skip to content

About

Mini Javascipt library for gamedev.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

gameloop.js

Mini Javascipt library for gamedev.

Description

Just one simple function, which provides main game loop for your game.

Usage

gameloop(callback)

callback is a function, which takes one argument - time between two animation frames.

Simple example

gameloop(function (dt) {

//update logic, eg. move sprites
sprite.x += 100 * dt; //move sprite by 100 pixels per second

//draw everything
draw_game();

});

About

Mini Javascipt library for gamedev.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages