I think now is a good timing to share what I have:
(Edit: I forgot to define window.answer in default script, I just updated the file to do that)
Extra small edits
I still didn’t get to add a method to earn energy (having a heart spawn randomly on the map when energy is low) but that shouldn’t be hard to add, I’ll probably do it later when I start cleaning the code a bit.
In order to add/ edit a level or change the appearance of the map, you can check the default script of the frame in the layer titled “Game.”
I also didn’t know how much coins to add after each level, so I set it with this equation:
So if you were to never spend a coin, after completing level 1, you’d have 7 coins total, then 10, 15, 21, 29, 38 … etc. Even though the levels are expected to get tougher as you go, I might still put a limit on how much you can earn from completing a level since the shop prices aren’t that high. Though if we add in upgrades to weapons for things like increasing range or such, that could help with balancing the currency stuff.
Since I added in so many things, I’d like you to also test this file out a bit to make sure everything works right.
OH- before I forget, since there are currently 3 levels added in the code, if you try to run level 4 you will run into an error. I was thinking of making up to 10 levels, then having the code infinitely generate the next levels for us using the patterns from the first 10 levels. I also didn’t know if we wanted to have “boss levels” or change maps in between or such, so I didn’t work too much on the levels system.