patrick-w-mcmahon / jinx-engine Goto Github PK
View Code? Open in Web Editor NEWJavaScript Game Engine
License: MIT License
JavaScript Game Engine
License: MIT License
Ability to have a createTimer() and createTimeTrigger() that will give the programmer ability to keep track of real world time, game time, and game frame cycles.
ability to trigger event on timers so fire events.
When the engine is stopped and restarted. It fails to clean up any animation frames. this leaves orphan animation frames that are calling the frame loop at a faster rate then it should. This overlap has bad effects on the engine loop. This also could be having problems with the engine running for a prolong time.
Possible solution is to cancel the animation frames prior to calling a new one. also canceling on engine stop method.
The engine should have the active scene handled in the game loop and run the scene objects init() at time of switching to the scene. It will then have to run the scene objects update() and render() in the game loop.
To optimize this further I will need to add in a Canvas Buffer and have everything draw to the buffer and have the screen repaint to call the buffer when ready this should reduce cpu cycles and help with a smoother repaint.
now that ill be using camera objects to handle rendering to the canvas i need to decouple the rendering from the game engine loop in a way to still permit basic game engine objects to be able to render to the screen but also permit the camera object to have the ability to draw without being interfered with by the game engine object list.
In the Pong example if a key is pressed to move player one and a key to move player two are pressed at the same time only one key event is handled. Need to find out why.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.