AStar seems to be working (More complex tests need a scenario editor...)
Last update on .
Got the AStar implementation working again. Was a couple of stupid little bugs in the code that creates the topology from the map. AStar is a graph-based implementation (which is nice, because Productive uses a graph-based world definition so that at some point we can have very complex map types), which traces through the connections between locations in order to determine the cost of a trip.
With Productive's movement rules (roughly):
* you can move instantly through your own units (very good public transport)
* you can only jump over an enemy unit if you are a "strong" unit, given strengths grant a longer leap
* you can move a single step in any direction in a given period (strongs steps are strength units in length)
the generation of the topology is involved enough that a single missed "not" can readily result in entirely unreasonable paths being generated (isn't that the case with all programming, though).
There are some obvious things that need to be done to make the game more fun now:
* implement the feedback UI so that it's easier to see what's going on
* make the strongs far more persuasive when they arrive, both in terms of their weight (e.g. make a first level strong balance 5 or 6 farmers) and the speed with which conversion happens (right now it's way too slow)
* if you have a unit selected, move the selection with the unit so that you can change a unit's direction while it's moving (currently selection happens at the tile level)
* make the production queue actually work as a queue
* tweak initial resources so that creating a new farmer doesn't increase your total resources (oops)
* implement animations so that conflicts, farming and the like are easier to understand
There's lots of clean-up work too, such as implementing game-saving, restoring and interruption. Should have a scenario editor as well, and example lessons... but all of that will have to wait for some day when I have some spare cycles.
Comments are closed.
Pingbacks are closed.
Wyatt on 01/23/2008 1:24 a.m. #
Is your A* implementation written in Python? I'd love to see it. I have a version on PyPI called Dijkstar.
Mike Fletcher on 01/23/2008 10:03 a.m. #
It's just a modified version of the Rainy Day implementation. It's available in the git repository for Productive on dev.laptop.org.