martinfaartoft / piston Goto Github PK
View Code? Open in Web Editor NEWA game engine for making 2D games using HTML5 Canvas
License: MIT License
A game engine for making 2D games using HTML5 Canvas
License: MIT License
use it instead of pos: number[]
d.ts should not contain 'any'
decouple engine from Date.now() and allow testing time sensitive behaviors
Sprite but without all the animation features
screen viewport (size)
game viewport (size, position)
scale/zoom
effects
initializes engine with good defaults, creates canvas if not done explicitly.
use it in place of number[] for speed and acceleration
default values for:
css: cursor:url(my_custom_cursor.png)
canvas.style.cursor = "none";
engine checks for pairs of ps.Collidable objects that collide
for each pair:
rewind time-delta (dt) until finding the time of collision (tc)
resolve collision at tc
simulate object behavior for the remaining time (dt-tc)
pray that the possible speed/direction change does not cause an object to collide with something new
coping mechanism in case of new collision:
re-check all objects for collisions at end of first collision detection
fix collisions AGAIN
NOW stop because we can do this all day.
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.