MadcoreTom
./post.sh

🏌️‍♀️ LittleGolf ⛳

This project is an experiment. In a previous project I struggled to balance the state machine of multiple NPCs playing games of golf on a golf course. This is a fresh attempt.

This uses HTML5 Canvas.

Notabe Differences

  • The Entity structure is a tree (each entity has children)
  • An entity has an optional Action, which is just a function that is called with that entity (plus the state) from the update loop
  • An entity has a Renderable function, again, just a function called fom the render loop.
    • Renderables are also sorted by layer, and then by y coordinate so they overlap properly
  • Dynamic world generation
  • I have chosen a polygon-based world instead of grid-based.
    • This makes it harder if I want to make the world editable

Demo

GitHub Repo

You can check it out at github.com/MadcoreTom/littlegolf

To run

Run the following command, it will give you a URL to open in the browser (typically http://localhost:8000)

sh
npm run start

Issues

See the list of issues and upcoming features in issues.md.