Browse Source
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>combat-scorched-earth-from-outer-space
3 changed files with 58 additions and 0 deletions
@ -0,0 +1,49 @@
|
||||
# 2021-08-15 |
||||
|
||||
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. |
||||
|
||||
## Today's achievement |
||||
|
||||
I implemented gravity and have first boundary and collision checks in place: |
||||
|
||||
[commit diff 59586dc4684b093e9f68518f114e62100142460b to abe72d67026177be6b028ff21f1b9fd9031cb455][diff] |
||||
|
||||
![screenshot from 2021-08-13][screenshot] |
||||
|
||||
## Next steps |
||||
|
||||
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][sao]! |
||||
|
||||
### Codewise |
||||
|
||||
- [ ] See ToDos from [yesterday][yesterday]. |
||||
- [ ] Investigate, why box and boundary don't collide. |
||||
|
||||
### Previous in line |
||||
|
||||
See journal entry from [yesterday][yesterday]. |
||||
|
||||
[diff]: https://jaenis.ch/hobbies/coding/repos/ryuno-ki/js13kgames-2021/compare/59586dc4684b093e9f68518f114e62100142460b...abe72d67026177be6b028ff21f1b9fd9031cb455 |
||||
[sao]: https://github.com/SecSamDev/HealthBarSAO |
||||
[screenshot]: ./2021-08-15.png |
||||
[yesterday]: ./2021-08-14.md |
After Width: | Height: | Size: 14 KiB |
Loading…
Reference in new issue