Skip to content

Pitching an idea: Full blown Box2D ecosystem #74

@Lusito

Description

@Lusito

Hi @flyover,

I recently started digging a bit more into typescript game development and wanted to get started by porting some of my existing java/libgdx projects to typescript, which use box2d and box2dlights.

After researching the various box2d implementations that support typescript, I ended up with your port (nice work!). However, I was still missing box2dlights, which doesn't seem to have a typescript or even javascript port yet.

While spending some time on porting it myself, I noticed the performance issues and forked your project to find the issue. This led me to read more into the code and getting distracted by the additions (controllers & particles) as well as the duplicated files (.js files still present in the "first pass at 2.4.0" commit).

Anyway, I ended up playing a bit with the code, restructuring it into subpackages, porting benchmarks, fixing performance issues, etc. and I'm currently at a point, where I'm committed to create a typescript ecosystem for box2d, where users can choose, which subpackages they want and which they don't.

Currently I have the following subpackages in mind:

  • benchmark: library, cli and webapp to compare different implementations of box2d.
  • controllers: The controllers part of your code
  • particles: The particles part of your code
  • core: The rest of your code, except for the testbed stuff
  • lights: 2D Lights for WebGL (currently WIP for WebGL 1).
  • testbed: A separate project in order to avoid dependencies between the other packages.
  • canvas-debug-renderer?: possibly extract this from testbed to simplify getting started.

Here you can find my current testbed showcasing the box2dlights port, including your existing tests:

Long story short: Would you be interested in a cooperation on this? Or should I just keep this a fork?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions