September Dev Diary: The Deadline

Is it that time again? It’s the last day of the month, that means I have been summoned to my little corner of the internet for my (slightly) regular monthly dev log. As always, I’ll discuss what I’ve been up to, what’s new & what’s next. Let’s begin…

Last Month

The game was in a good place last month, with only a few important jobs left on the to-do list. When the month began, I was focused entirely on these jobs, starting with the UI. As the month progressed I started slowing down again, not good. But rather than give up there, I switched tasks and worked on a random feature (trajectory prediction) to keep things interesting. That got me back into it!

Besides the actual gamedev work, I said I wanted to go back to posting on my socials. At first this was pretty slow too, but midway through the month I picked up the pace and have since been trying to post daily. Not every post is my work, there’s quotes, memes & planning on there too. I’ll also try retweeting a couple of things a day, it’s nice sharing others work, especially the really cool or unique stuff!

Progress

Trajectory Prediction

This ended up being the biggest job of the month, I started thinking it would be easy, I was wrong. All I wanted was a line to show where the player was headed when you jump, it was suggested by someone on Twitter a while back and I though it would be a nice way to polish things up.

Turns out there’s two primary solutions for achieving this, either you work things out using maths or you can use physics simulation. The second option seemed the easiest and probably the most accurate, but it’s less efficient. This method works by duplicating the scene and running it alongside your main. It then simulates all the forces and physics at high speeds and feeds all the information back to your main scene. I may have explained that poorly, if you’re interested in how this works it’s explained better here:

https://austin-mackrell.medium.com/unity-trajectory-prediction-simulation-method-5b441ee1604

It may sound complicated but Unity actually makes it pretty easy to setup. My problem was down to efficiency, Jelly Toss is a mobile game after all & it would be running this simulation every frame (while charging the jump). Now using loads of crazy maths isn’t too much better but it’s definitely not as heavy on the device.

There’s plenty of tutorials online using the math approach, the problem is half of them are outdated, incomplete or broken altogether. In the end, I got it working but it took merging multiple tutorials across the internet until I saw results. Here’s trajectory prediction version 1:

Not perfect, not bad. I could have left it here but this gave me an idea, the players jump is pretty restricted with the current controls, why not free that up some. This sent me on an epic quest to redo the trajectory line and include drag & shoot controls. Surprisingly it wasn’t too difficult to do, the biggest problem I had came with creating the drag line. Apparently “Camera.ScreenToWorldPoint(Input.mousePosition)” will only work if the camera is Orthographic. I tried that but that made the game look… not good.

My workaround was to have two cameras, one in perspective that displays the game as we see it, and one in orthographic that does nothing but accept the input. Well, it also renders the input line (not the trajectory line), rendering the line in perspective caused some graphical bug that would misplace the start/end point. It took some fiddling around but I got it working from there:

Much better. Now the player can go anywhere with plenty of room for mistakes to be made. This also led to the next job, which wouldn’t have worked without free movement…

Collectibles

With the freedom to jump where you like, why not make things more a little harder? Introducing the jar of jelly:

This is a collectable that will spawn in every level, you can use it to buy new hats, eyes & colours! I was going to have challenges to unlock items (like I have in previous games), but with there being so many this seemed like a much better approach. Currently, they spawn in fine & you’re able to collect them:

However they are not yet spendable. I need to set up the costume screen properly before piecing it all together.

UI – Settings

Last month this screen was getting there, but it was unfinished, we had half a screen:

Since UI was probably the most important job I had left, I got to work finishing the settings. I made a return button (using the style of the other buttons) and after some trial and error had a simple background panel I was happy with:

It’s a pretty basic settings screen, but it works & it fits the theme! There was a couple of ideas I played around with which were slightly more creative, but I couldn’t get them looking decent enough so I settled for something less complicated in the end.

Extra life & ads

Last but not least, I started work on the game over screen. I wanted to sort & stylise the entire screen to fit in with the rest of the UI. But first, there needs to be a screen between death – game over. The continue screen, this is similar to the one in Cluckin’ Around, it allows the player to spend their jelly or watch a rewarded ad in exchange for an extra life. I’ll show that screen later on my socials, for now enjoy a test ad:

Since rewarded ads were now in, I may as well put the pop-up ads in properly too. I’d already made a start on ads in a previous month & set up one provider (I use 3). Making this pretty easy, I just had to change some of the code around & set up the other two providers. Oh let’s not forget I had to sort ATT for iOS 14+, and create the little GDPR pop up that asks for permission to serve personalised ads for other devices (fun):

28/10/2021

Finally, we have a deadline. No more guessing or just saying “it will be done next month” five times. This is the date, by the 28th of October I want the game on the store, or at very least going through the review process (since that can take anywhere from a day to a week). I’m sharing this date to make it official, if I haven’t posted saying it’s submitted to the store around or on this date, spam my socials with hate messages! I’m joking that might be a little far, but you get the point.

Next Month

A deadline has now been set! Usually I would just say “I want it finished by next post” but that isn’t strict enough and clearly hasn’t been working. Instead I have 4 weeks from the date this post goes live. I don’t care if the game isn’t “finished”, in 4 weeks time I will release the game in whatever state it’s in. No excuses.

Let’s get this released!

Until next time…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s