Coder Social home page Coder Social logo

gpdk's People

Contributors

dannyko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

gpdk's Issues

Polygon-polygon collision detection

update code to support polygon-polygon interactions.

check bounding box first before looping over path segments connected to nodes inside bounding box intersection

Wall Ball version 2

Wall ball v.2 will use the gpdk. This will also include documentation that will serve as a tutorial guide for developers looking to get starting using the gpdk.

fix circle-circle collision/reaction

this bug was introduced after adding Vec class and refactoring code to use Vec in force, collision, reaction, and element etc.

symptom: at higher levels drones fly off in weird directions.

add rectangle element

Rectangle class with collision/reaction cases

e.g. use code from Udacity quiz solution showing Rect collision detection - low priority update (use Polygon for now)

fluid SVG size

adjust dimensions of game to window size; for now, use SVG transforms. later, add canvas support...

automated deployment

Makefile to compile example game(s) coffeescript into js

(for generating production code from .coffee files)

global physics timer/move collision_detect and integrate into physics

global physics timer will allow us to reduce the total number of collision detections being executed, improving computational efficiency.

collision detection and numerical integration are not state variables and so don't really belong inside of the element class.

maybe its time to add an physics/modules/integration.coffee class providing different numerical integration algorithms and interfaces for their parameters etc.

optimize collision detection

speed up collision detection to reduce the number of elements checked after each positionupdate.

e.g. using d3 geom.quadtree

garbage collection

I just learned about garbage collection overhead due to object creation / memory churn in JS and how it affects peformance in HTML5 games in particular, even simple things like splice, pop, and literals like {} create new objects... any time the "new" keyword is used, a new object is being created. We need to "pre allocate" or reuse objects as much as possible.

Since we don't want to go too extreme on minimizing garbage collection, my plan is to start with a dynamic allocation + reuse approach, where new objects are only created if an unused one is not available in the dynamic "pool" and once an object is "done" it goes in the "pool" rather than getting "destroyed" or collected by the GC.

That way, there won't need to be any static pre-allocation, but at the same time, we should be able to avoid creating any new objects if there is one that can be easily reused.

We can use the profiler to work from the top-down on the most expensive GC related churn issues first.

see:

http://www.htmlgoodies.com/html5/client/high-performance-garbage-collector-friendly-code.html#fbid=T3Okal6Nvcu

and

https://www.scirra.com/blog/76/how-to-write-low-garbage-real-time-javascript

plus

https://github.com/martinwells/gamecore.js

as well as

http://beej.us/blog/data/object-pool/

and also

d3/d3@bef1ccb

create ForceParam object and move Force to module

since only the parameters change we can refactor Force into a Module instead of an Object and create a new, lighter-weight ForceParam Object to manage the different types of parameters. Each element will store instances of ForceParam in a force_param array rather than instances of Force in a force array.

asset loader

need a module to handle loading of assets before running game

element rendering to canvas or svg

  1. add @canvas attribute to Game class to hold new Canvas layer
  2. render method for element.draw() with options for SVG or canvas
  3. update draw() for all Elements to support either SVG or Canvas rendering
  4. move the "element.g" variable into a method switching on SVG / Canvas for each element, keep "g" for SVG case (or, make element.g a custom JS object rather than a d3 selection)
  5. Root event listeners should be able to update root graphics for both SVG and Canvas

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.