Skip to content
This repository has been archived by the owner on Nov 25, 2023. It is now read-only.

A real ECS this time, no object oriented behavior nonsense.

Notifications You must be signed in to change notification settings

def-SpaceWar/ecs-game-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TODO

  • Documentation!!!
    • lib (Only folder that needs documentation)
      • ecs.ts << Finished >>
      • components << In Progress >>
        • tag.ts << Finished >>
        • mass.ts << Finished >>
        • name.ts << Finished >>
        • friction.ts << Finished >>
        • position.ts << Finished >>
        • rotation.ts << Finished >>
        • velocity.ts << Finished >>
        • restitution.ts << Finished >>
        • simple_drag.ts << Finished >>
        • acceleration.ts << Finished >>
        • text_renderer.ts << Finished >>
        • animated_dialog.ts << Finished >>
        • circle_renderer.ts << Finished >>
        • ...
        • sprite_renderer.ts << Finished >>
        • ...
      • systems
        • ...
      • util
        • ...
EntityWrapper.bind(generateBinding: (e: Entity) => System): EntityWrapper;
  • Bind!

    • EntityWrapper.bindRender((e: Entity) => (world: World) => void)
    • Use it to do some quick stuff! (Save a bind as a Bind or BindRender component)
    • bindSystem, bindRenderSystem
  • UI Elements (Input.mouseX,Y,Input.mouseDown,Input.mouseUp)

    • This will be almost as complicated as the physics engine.
    • Example: Button
      • Components: Button {onClick: () => void}, ButtonRectangleCollider, ButtonCircleCollider, ButtonPolygonCollider, (Buttons can have multiple collider components!)
        • Use regular render components to render.
      • System(s): buttonSystem
  • Event System

    • Events and listeners, but not from the DOM!
      • Works hand in hand with buttons
  • Sprite Sheet Support

    • SpriteSheet component
    • spriteSheetRenderSystem that updates Sprite based on SpriteSheet
    • Obviously animations will work fine with this
  • Entity destruction handling (It's already there, but there may be bugs to work out.)

    • Lifetime component and Lifetime system so users don't have to make it.
  • Directional colliders (collide from only up not down etc.)

  • Constraints (like axels, and stuff rubber bands that hold stuff together)

FAR FUTURE

  • Make this an npm package
  • WEBGL instead of 2D Canvas
  • WASM: probably Rust

About

A real ECS this time, no object oriented behavior nonsense.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages