Skip to content

A phisics engine made with javascript (not for real world usage . its just for fun)

Notifications You must be signed in to change notification settings

PrashanthKumar0/PhiSicks2D.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PhiSicks2D.js φ

A very simple 2D physics engine written in JS xD

demo video here

Live Demo

For PC Users

use WASD keys to move blocks and Up and Down arrow keys to switch between them P spwans a polygon R spawns a rectangle C spwans a circle hit Z to pause/play simulation

a screenshot

CAUTION:
    This is just made for fun not a serious project. 
    " all my projects are for fun :) "
    and as the name suggests its a sick engine :P
    doesnt work very well  

 

Well first ever engine made by me.
and as its name suggests it a little buggy (not ment to be used in any practical game)

Although its quite buggy You may use its parts like SAT-collision detection

MAJOR BUGS FIXED

Finally fixed after a response from reddit guy on this question here

Also This helped me a lot

REFERENCE

you can use the book given in Reference directory for tring to make your own and there are also other reference material available that i used when i was stuck and it helped a lot.

My lil story

The most difficult part was to derive and understand the angular impulse (as mentioned earlier I still have no idea how to correctly implement angular impulse part but i believe that its collision information thats causing that weird artifact)

It was quite tedious work and took me more than a week to complete this book just because maybe i was lazy . I sometimes felt like giving up but i didn't and now i am glad that i didnt gave up and tried hard. Understanding and deriving the angular impulse formula took me 3 day alone. I was quite frustrated and helpless then i found Chris Hecker's "Behind The Screen" which was really helpful. Physics lab also does a really great job in explaining the formula and its derivation (i actually understood from physics lab only after going back and forth between both).

Enough history i dont think someone will be reading this but if you are then i really wanna know your name :)

Overall it was really nice expreience and "Dont ever give up in anything , Do it again and again untill you get it".

ok enough philosophy. bye bye xD

About

A phisics engine made with javascript (not for real world usage . its just for fun)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published