Fig. 1: Link to source
What I want to do today
Today’s game mechanic came to me in a dream. Shame it already exists.
How to implement it
- [20 minutes] Implement a lattice whose points snap to the nearest node. Think Voronoi diagrams but more Cartesian and regular. Include methods for navigating said lattice (e.g., Move(direction dir), GetNearestNode(Vector3 position)).
- [5 minutes] Write a script that instantiates a prefab upon click. Make it instantiate the prefab at the nearest node.
- [15 minutes] Modify (2) so that you can see where the prefab will be instantiated.
- [40 minutes] Implement A* on lattice. If needed, modify (1) so that nodes can have weights.
ETC: 1h 20 m
The lattice script might nerd-snipe me.
What I was able to do
- [20 m] Done.
- [11 m] Technically done.
- [5 m] Failed (due to (2) failing).
- [? m] Gave up
Discrepancy: ∞ minutes
About game design
Can statefulness ever be eliminated1?
I give up too quickly. Quite frankly, I have to be somewhere after this session so I think that was a huge factor in my failure.
What I might do tomorrow
Actually do this thing.
Unity3D’s Transform component cannot be instantiated, only mutated (Though a quick
new GameObject().transformdoes the trick, it isn’t as satisfying.) ↩