Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stanislawfortonski/sosengine
2D Game Engine based on HTML markup
https://github.com/stanislawfortonski/sosengine
2d-game-engine 2d-game-engine-js 2d-game-framework 2d-game-library collection collision-detection engine2d game-developement game-engine pixelart
Last synced: 6 days ago
JSON representation
2D Game Engine based on HTML markup
- Host: GitHub
- URL: https://github.com/stanislawfortonski/sosengine
- Owner: stanislawfortonski
- License: mit
- Created: 2020-04-24T17:10:23.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-05-16T13:38:59.000Z (over 4 years ago)
- Last Synced: 2025-01-08T17:59:00.685Z (7 days ago)
- Topics: 2d-game-engine, 2d-game-engine-js, 2d-game-framework, 2d-game-library, collection, collision-detection, engine2d, game-developement, game-engine, pixelart
- Language: JavaScript
- Size: 25.4 MB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SOSEngine
2D Game Engine based on HTML markup written for [MMORPG 2D Game](https://github.com/stanfortonski/sosgame)YouTube video: https://www.youtube.com/watch?v=DHoUlHN6YO0.
That is my old abandoned project of 2D engine. I had written it before I learned WebGL/OpenGL. JavaScript ES5 syntax.## Usage
1. Include source JS files and CSS file. Set your `.window` size in CSS file.
2. Add this snippet to your HTML file. You can use more this structure.```html
```3. In your JS file, you have to set scale and create `SOSEngine.Scene`, `SOSEngine.Window` and `SOSEngine.Camera`. You can set the scale only one time and before initialization. Remember: less scale == less performance!
```js
SOSEngine.scale = 12;
var engine = SOSEngine.make($('#SOSEngine'));
```
4. Add some static objects to scene. Data round and texture are optional. Static objects should be included in the collision calculation.
```html
```
5. Add standard object to your scene.
```js
var props = {height: 5, width: 5, posX: 30, posY: 30};
var myObject = new SOSEngine.Object(props.width, props.height, props.posX, props.posY);
engine.Scene.add(myObject);
```