Since I could paint my hero onto the next screen, the next step was adding gravity. I suceeded at this aspect!
With that in my pocket, I looked into adding boundaries, so I could have a first prototype ready. Sadly, this turned out to be trickier than I thought. Also, it's prone for me to overthink.
My current strategy (checking for two intersecting line segments) clearly have some shortcomings. But now I can add test cases to investigate these more in isolation.
Also, I was informed, that geometric algebra isn't that widely known. Once I wrapped my head around what's going on here, I can add some pictures and explain the logic.
I implemented gravity and have first boundary and collision checks in place:
I want to have collision checks working flawlessly. Then, I can refactor the code to make gravity be a variable and include a range slider so I can tweak the gravity and see the effect on the canvas. It's a first playable prototype at that point. Also, it allows me to change the gravity between levels.
Once I get that in, I will add some kind of energy levels. This should split up in life support systems as well as transport. It could look a bit like in Sword Art Online!
- See ToDos from yesterday.
- Investigate, why box and boundary don't collide.
Previous in line
See journal entry from yesterday.