Endless Run day 189. Game Restart

Restarting the boss fight

I am finally done with my assignment in Java (though I still have to get ready for my exam at the end of the month), finally got somewhere with my node.js project (one that I’ll actually get paid for 8)) and sorted out some things with Swift. With all that, I didn’t have much time for Corona and Lua.

Surprisingly (or NOT 8)) when you return to your old project after a break, all your bad habits and practices kind of jump out on you. For instance — I just love my large functions doing all kinds of stuff. Because of that, this Monday I spent 2 hours trying to figure out why after I clean up a level, there are some physical objects left. I dug around, stackoverflowed the s*** out of it only to figure out that my unremarkable clearLevelObj() function does not just clean up the old objects — it also creates a couple of new ones. Because a long time ago this function was executed on game restarts, and it was convenient to clean up old objects and have some work done for the new ones.

But after all that I finished game restart workflow and game progress. With that, I am almost done with Level 1. Two important things are left. One is an object generator that will create a collectable object for the character if the Boss was shot successfully. The second one is the game save feature, but it should be easy with require(“loadsave”).

Then I’ll progress to level 2 and get into all kinds of trouble because my levels package is really messy :sunglasses: But we’ll cross that bridge when we get there.

Another important question is the difficulty progression. A game should get harder as you progress — at this point, I’m planning to achieve it with a growing number of elements to destroy, and an increasing run speed, but maybe I’ll come up with something else later on.

Also, as you can see in the video — menu buttons drift away when you start playing. That’s kind of good because I don’t know how to deal with them for now. I need to stop the character if the menu is up, and have all kind of functionality like restart from the beginning of the level, achievements, collections and sound control which makes no sense for now because I don’t have any sounds yet.

But the project starts taking shape, and I am pretty happy about it.