Life points are implemented - and improved!
Solution To A Level With Life Points
Updated Road Map
Use aseprite for pixel art (and animations in the future) Between each of the following, many test levels will be made Implement new goal block (All sides open, OR logic) Implement life points
- Implement color posts - see below
- Implement new vehicle - not yet, see notes below
- Implement remaining goal blocks and other objects
- Implement time travel rewind & undo (instead of undo acting like rewind)
- Implement time immune changers
This week was a success, so I can move on to implementing vehicles. I estimate at least 3 weeks before these are done to the same level of polish as life points. It’s a much more complicated mechanic, especially with time travel involved. Rotation is not easy to work with yet, nor is dealing with entities larger than 1 tile. There’s a lot of logic and edge cases I haven’t even thought about either. Plus, I may want to spend more time on level design/planning this upcoming week, to build out world #1 with life points and lasers.
Looking further ahead, with the XOR blocks, I have yet to design an algorithm that can reliably detect loops to set the 9th color. It appears it may be related to the halting problem. I can still attempt to try other logic types (ones that don’t cause loops), but I think it may be best to keep things simple, and just have a single goal block type.
All the time travel stuff is still planned as the last logical change. After that, there’s polish, assuming no logic needs to be revised.
The original design was to only have the concept of “current” life points. I noticed this didn’t feel right, since you couldn’t easily see feedback on damage taken. So, I added in current and max, but kept the same “heart” entity which either increases your current or both current and max depending on if your health is full.
There is a status UI in the corner to show the life points. They work with various edge cases, such as a life point being inside of a dangerous area - it will heal before hurting to allow you to pass. Time travel rules and other edge cases are well defined.
Fixed all sorts of bugs and edge cases. Before this week, there was only a basic concept of the player dying, but now there is a fully functioning life point system. One notable case was going back in time to a point where you were standing inside a laser - you would get damaged again. To fix this, I had to use the time direction to enable/disable damage from lasers. There were many other cases like this, but I carefully reviewed everything I could think of and made sure the logic was well defined.
Planned out a structure for the order of levels. There will be three main worlds: lasers & life points, vehicles, and time travel. Each world will have a sub-section of levels for teaching specific ideas, and other levels to test the player’s newly learned abilities.
Reworked all the sound effects (mostly from public domain/creative commons assets) and logic to work correctly with time travel. Goal blocks were creating phantom sounds, so the logic was rewritten and simplified and now works correctly in all cases, because the direction of time is taken into account.
Fixed another issue with laser colors being wrong in complex scenarios, this is the last one I know of.
Started designing new levels to utilize the new mechanics.
Update Since Writing This Post
While making all of the new levels, I noticed the possibility of a new mechanic, which will also clarify and simplify the goals of the puzzles.
Portals are always active, the player simply needs to enter them to solve the level.
When all goal blocks of a particular color are solved, the posts of the same color would be lowered. To emulate the existing levels, all that would need to be added is a hallway to each portal with posts of each goal block color used in that level. Later levels could mix the posts throughout the level instead of just stacking them up at the end.
When a post is raised, it blocks all entities similar to a wall. When a post is lowered, it allows all entities through like a floor tile. If an entity is on top of it when it is raised, it will get stuck until it is lowered again. I will start with these rules, but am considering making the edge cases more interesting:
There is the possibility of a “post” dimension where you’d be able to push objects and yourself over other posts, by raising things up to that level. There would be a gray post that is static like walls, but would allow movement on top. Movement should not be allowed on top of walls since it could allow for unwanted situations. This would mean once on top of a post, you and other objects would only be able to move to other raised posts. Once in this dimension there isn’t really anything you can do to escape it, other than reversing time. So it only works in time travel levels.
Another possibility is a “spring” like function, where if any “heavy” object is on top of it, it will keep it pushed down. Say a block is on one, then that color becomes unsolved, it stays down, then you can even push the block off and move off it yourself, before it will raise again. Not sure if all the same color posts should be connected physically, or if this should be on an individual post basis. Once a post raises, it can only be put back down by re-solving the required blocks - even time travel cannot reverse these since they will immediately update based on whatever situation comes up - but time travel putting an object back onto a post will always lower it.
I will work on these first thing because they affect the core more than vehicles do.