Collision detection
Pictured: Basic carriage vs. mouse overlap being detected (red highlight)
This evening I started to properly consider how collision is going to work.
It's an underappreciated concept but it really is the workhorse that everything else relies on - all game interactions (object collection, vicinity to specific areas) and even the UI require collision to work and to work fast.
So far I've just done the super basics of rectangle overlaps but the plan tomorrow is to consider spatial partitioning for the entire world. I'm keen on loose quadtrees or some variant of hierarchical grid, but I will need to see how it shakes out (Tiled gives us a leg up here by pre-partitioning the tile world into NxN chunks which is a handy starting point)
Train game
A work-in-progress game probably featuring trains. Not a puzzle game.
Status | In development |
Author | d w roberts |
Tags | Life Simulation, Trains |
More posts
- Train delayed (or cancelled)Nov 04, 2023
- Back on track(s)Jun 01, 2023
- Train yardsApr 23, 2023
- Frame timing hellApr 21, 2023
- Basic object placementApr 15, 2023
- Spline cleanupApr 10, 2023
- NPCs, shops, inventoriesApr 09, 2023
- Basic gameplay milestoneApr 03, 2023
- Invisible technical workApr 02, 2023
- Putting some more thought into artworkMar 26, 2023
Leave a comment
Log in with itch.io to leave a comment.