Game stuff for Openlayers (ol), powered by HTML5, canvas, javascript and Openlayers.

ol-games uses ol-ext



The ol.Grame implement a game loop based on the postcompose event of a map.

game, gameloop

Frame rate control

The ol.control.Framerate is a control that show graphically the current framerate.

game, animation, framerate

Hexagon map

ol.source.HexMap is an image source that render an hexagonal grid on a map. The ol.Hexgrid object has function to convert from coordinate to hex or calculate lines beetween hexagons.

map, hexmap, hexagon, grid, hexgrid



ol.Sprite is a convenient class to handle features with a and usefull fuctions. It also can handle collisions beetween other sprites or a layer.

game, animation, sprite, collision

Sprite destination

ol.Sprite.setDestination() lets you move a sprite to a new destination along a straight line.

game, animation, sprite, move, destination

Sprite path

ol.Sprite.setPath() lets you move a sprite along a path.

game, animation, sprite, move, path

Sprite collision

Use the ol.Collision or the ol.Game.collide() function to detect pixel collisions beetween sprites or with an ol.Offscreen.

game, collision, sprite, pixel



An ol.feature.Animation to make explosions on the map.

game, animation, audio, explosion


Audio on a map

Usefull class to handle audio API.

game, audio, media, sound

Full games