Replace the simple isStatic flag with a more meaningful enum in objects
This sets the groundwork for more complicated object categories later on.
Ramblings about hobbyist game development
Replace the simple isStatic flag with a more meaningful enum in objects
This sets the groundwork for more complicated object categories later on.
add a concept of day and give the user an allowance of 50 per day
Universal income has been achieved! What a time to be alive!
also charge the user for building walls and restrict their selection depending on funds
Let the same restrictions as for objects and tiles apply!
Fix reducing the wall draw height when placing new walls
Fixes this regression that happened.. sometime?
move more UI update code into the passive update() function
Streamlines things and makes things ready for more complicated use-cases
– remove dead code
– do not allow to replace a type with itself and still charge the user
– always check the available funds to ensure no unsingned int wraparound (sic)
Exactly as it said on the lid!
– add prices to wall and floor tiles
– change the way we update the UI (do everything passively in one place now)
– find a somewhat better hashing technique when calculating the UI hashes of containers when taking their children into account (workaround for collisisions)
Not just objects have prices now! The last part was particularly nasty, as containers that had the same type of contents would return the same hash, which was.. less than ideal.
– add the object id to objects
– also remove the texture path mapping when removing a texture
– increase the funds by half the original price when removing an object (“sell it”)
The first two were some background work to make things a) more manageable and b) try to not leak memory.
As for the bit of game play, check out the video:
– redo the way we update the UI from the game state and only have one entry point for it
– add the concept of prices to object types
– show the price when buying an object and only allow for placement if there are sufficient funds
There were multiple ways to update the UI before, some of which would have made it very complicated to update the display of the funds.
We also add prices to the object defintion files and lastly also add a check and subtract funds when the user places the objects, effectively changing it to “buying” them.
add missing asset files
Whoops!