Week 8 and I was once again busy with real life, so you’ve got another one of these weird lo-fi physics “games”:
As you can see this marks the glorious return of “the bird” from week 2, because why not. Not much to talk about this time to be honest
Didn’t really have a concept until I sat down on Saturday and decided I wanted to have some kind of ski slope, mostly for my own pleasure. Then I figured I could go a kind of bowling/Angry Birds route and that was the entire game concept thought up. I started it on Saturday, finished it on Sunday.
One bit that had me worried was figuring out when a crate had been displaced, but that ended up being pretty easy. I recorded its start position (which I needed anyway for when the game resets upon completion) and basically marked it as displaced if it moved a certain distance from that position, or its rotation changed by more than ten degrees. Each crate calls a function in the main GameController class when it is displaced, allowing it to tot up the score. I use the same kind of thing with figuring out when crates/the bird have stopped moving to allow the next shot, but this time I ensure the GameController uses a coroutine with a WaitForEndOfFrame each loop to ensure all the necessary calls have been made before it totals them, as well as changing the script call order to be the GameController first so that the total from the previous frame doesn’t bleed over. It seems to work, when I tested the game never set up the next shot while the bird was still in play, or while crates were still falling.
To measure if the bird or a crate has stopped I use either the built-in rigidbody2D.IsSleeping() or a similar method to the one I used to find whether the ball was stuck in week 5. Alternatively, if they are below a certain y value then they are definitely out of play.
An annoying, time consuming and unexpected issue this time was the differences that manifested between the built version and the in-editor version. The changes that have happened in previous games have usually been negligible or spotted too late for me to do anything about, but this time I must have made five or six final builds because I kept spotting things when I played the uploaded version. It was stupid but easy to fix things like the order of the line renderers I used to indicate shot force (the previous-turn ghost appearing in front of the current shot line, and then the current shot line appearing above the bird), a WaitForEndOfFrame call suddenly not being enough to stop it from registering the space bar hit as both “finish setting up the shot” and “finish adjusting the ramp”, so the ramp-adjustment phase kept being skipped (I changed it to wait for 0.1 seconds before accepting input instead), the camera size I use for adjusting the ramp not being big enough to show the bar preceding it, which I find useful to use for reference while setting up shots… all little things that I could have missed if I hadn’t played it through a few times on the website first. None of my other games have had so many issues right at the end.
One more thing, I was going to do something more interesting with the scoring, like giving more points for the more crates you hit in one go, and bonus points for getting all the crates without using all the tries, but I ran out of time. And it’s only one level and you could easily turn this one into something with a bunch of levels, but you’ll just have to use your imagination unfortunately.
Nevertheless, I got a game finished within a week.