Skip to content
/ XgameJS Public

JavaScript framework similar to XNA to develop simple 2D games

License

Notifications You must be signed in to change notification settings

Rockam/XgameJS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XgameJS


JavaScript framework similar to XNA to develop simple 2D games on HTML5 through canvas.

Motivation

XNA is a framework with a managed runtime environment provided by Microsoft that facilitates video game development, but was discontinued in 2013. This little project tries to adapt a part of XNA to JavaScript, using some classes similar to XNA and extending the framework with other classes that help on the 2D game development, like Sprite, Camera, Circle, etc.

Execution flow

The main entry point is the Program class, which instances the Game class, in charge of running and maintaining the game loop.

alt text

How to use it

You can simply pick the src/JS/XNA_Classes/Game.js class, copy it wherever you want, and modify it in order to develop your own game. Then create an HTML file with a canvas and reference all the classes you use in there. To execute the game just open the html file on a web browser.

The simple way to know how to use it is watching the demos already done (located at src/HTML) and inspecting them. The main demo is a classic Rayman style level that I've made with XgameJS, hope you enjoy it :D

alt text

##Disclaimer I don't own the rights of any Rayman images or sounds used in this project. You are free to use XgameJS on your own projects and extend the functionality.

About

JavaScript framework similar to XNA to develop simple 2D games

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published