1
0
mirror of https://github.com/rockam/xgamejs synced 2024-12-26 13:59:19 +01:00
xgamejs/README.md

25 lines
1.6 KiB
Markdown
Raw Permalink Normal View History

2015-11-22 10:30:09 +01:00
# XgameJS
------
2015-11-22 10:55:52 +01:00
JavaScript framework similar to XNA to develop simple 2D games on HTML5 through canvas.
2015-11-22 10:30:09 +01:00
2015-11-22 10:46:34 +01:00
## Motivation
XNA is a framework with a managed runtime environment provided by Microsoft that facilitates video game development, but was discontinued in 2013.
2015-11-22 10:53:26 +01:00
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.
2015-11-22 10:46:34 +01:00
## 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](https://github.com/Rockam/XgameJS/blob/master/execution_flow.jpg "Execution flow")
2015-11-22 10:30:09 +01:00
## How to use it
2015-11-22 11:05:28 +01:00
You can simply pick the [src/JS/XNA_Classes/Game.js](https://github.com/Rockam/XgameJS/blob/master/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.
2015-11-22 10:30:09 +01:00
2015-11-22 10:55:34 +01:00
The **simple way to know how to use it** is watching the demos already done (located at [_src/HTML_](https://github.com/Rockam/XgameJS/tree/master/src/HTML)) and inspecting them.
2015-11-22 10:45:32 +01:00
The main demo is a classic **_Rayman_** style level that I've made with XgameJS, hope you enjoy it :D
2015-11-22 10:30:09 +01:00
2015-11-22 10:42:08 +01:00
![alt text](https://github.com/Rockam/XgameJS/blob/master/Rayman_screenshot.png "Rayman demo")
2015-11-22 10:51:58 +01:00
##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.