add a pause functionality
That’s what it does. In addition to the three speed settings it is now possible to fully pause the logical ticks.
If you check out the above video and watch the console output, you will see this feature in action.
Ramblings about hobbyist game development
add a pause functionality
That’s what it does. In addition to the three speed settings it is now possible to fully pause the logical ticks.
If you check out the above video and watch the console output, you will see this feature in action.
base gamestate ticks on a user adjustable setting, not just “as fast as possible”
Before this, the logic thread was a little out of control. This binds the logical ticks to time elapsed instead. To make things a little more interesting, this also introduces three speed settings (1x, 2x and 10x).
finish the offset logic for objects other than 1×1 and rename the enum values to something more accurate
As it said on the lid, finishes the work started in the previous commit.
– do not always recalculate positions and rotations even if nothing changes
– introduce the concept of object dimensions, orientation (WiP) and isStatic
This introduces the concept of logical object dimensions. This had to be done as objects that do not happen to be chairs may have dimensions other than 1 by 1 tiles.
This also means that depending on that size they have to have some sort of offset calculated when positioning them on a field of tiles.
It also adds the notion of “static” objects which do, well, nothing except just existing and minding their own business. In other words, that means they will quit the tick function right after entering it.
– small refactoring: move the rotation calculation to its own function
– make the movement less jerky by making the “snap in place” distance a lot shorter
It’s almost nice to watch it now. Why don’t you check it out:
do not immediately rotate when reaching a waypoint
Instead of just switching to the next target node rotate towards it before start to move in its direction.
– fix visual offset when moving objects
– do not take “shortcuts” when navigatin
Apparently we no longer take shortcuts when we are navigatin‘ (sic). What that means is that we are no longer move through objects that may be in the way.
add rudimentary path finding based on A* (WiP)
As it says, this implements path finding using A*. For not it only checks for walls that may be a way, objects are being ignored.
do not directly set the target for an object, preparation for path finding. also some minor refactoring
As it says, mostly that means fleshing out the tick() function on the Object class. Also, the last reference to the now-disused “floor” monicker was removed from the ObjectManager.
elongate faces that make up outfacing corners slightly to make up for the gaps that would otherwise appear
This one might be a little confusing, but maybe a picture helps:
In the end this is all about handling the literal corner cases.