top of page
Search

A new prototype: Leapfrog!

Finally, it is time to talk about a new project. It feels good to be in this new project stage after so long, though I am considerably more wary this time around. Such concerns aside, I am very excited. So to get it out of the way, here's a little preview.

Concept, Design & getting things started.

This project originates from a design doccument I created in 2019 so the heavy work of coming up an idea is much behind me, ideas for this project have had time to mature and grow. I created this design doccument for a university design unit and managed to get a high A-grade, so its good to know that my lecturer at least enjoyed my concept too.


I will keep my description of the game brief, as too allow it room to develop its own identity during development, however this game will be a mobile application and is constructed of two components: Jumping (leaping), that can be performed by the player dragging their finger on the screen when grounded, for the frog to fire off in that direction; and a grappling mechanic, the player can tap somewhere while airborne, and the frog will fire off its tongue to be used as a grapple, latching onto surfaces.

(Design Doccument Screenshot (2019))


Minimum Viable Product.

For the development of this game, I'd like to manage the image of my "minimum viable product", with my last project, the end goal was "complete game", and that is not the motivator it should be, and doesn't give a good feel for progress.

This time around I will set the bar lower, and keep raising it as I progress. So here forth I will set my first milestone:


Leapfrog will include:

A grappling system,

A hopping system,

15 Mushroom themed levels.


It's simple, the bar is low, and it gives me the space to perfect the simple mechanics and be proud of them.


Prototyping!


Alright. Here comes the fun part. Let me show you in detail what I have been working on. It starts, with a green blob of circles and a funny little tongue.

The very first thing I made was this tongue, it is simply a line render, and some code that places every point on the line an equal distance apart. Unity pretty much does the rest, adjusting its thickness by a chart, setting its color.

The script is simple, and nicely isolated from any other tongue code. But it really does the job, take a look!

leaving the tongue alone for a moment, lets get on to something more code-y.

Leaping.

For this I've needed to manage 3 things: Touch controls, state management, and the execution of the leap itself. Lets take a look at my script.

As you can see I chose to use unity's built in Touch systems. To be honest, it's not my favourite way to handle touch controls, but I would like to make sure I understand all manners hand handling touch inputs in unity.


If an input has been detected, the script will check if the player is grounded, if it is then depending on the touch phase, the player will jump initiate a jump sequence, measure how far the finger has moved, or decide weather to actually launch the player or not. If enough movement hasn't been detected, depending on a min or max distance, it will consider the touch a tap.


The grounded state is actually managed in a different script because multiple scripts will need it, and I believe it would be better manageable if it was contained in its own space. It is simply a ray checking if a floor is below it.


Finally I chose to use the physics system to drive this game as it tends to be a little more fun with its results, even if it isn't as predictable as hard coding physics. Getting the variables right for friction, gravity, jump force and stuff will be a struggle and may require some external playtesting.


Visual Design.

I have to chime in about visual design here before talking about the grapple mechanic, simply because they'd be hard to ignore in my screenshots and clips!

So a brief detour, another part of my 2019 design doccument was some art I created, simple set pieces to give an impression for elements of visual design, it involved items, enemies, and general scenery.

For this prototype, I am basing my work off the 2nd image for now, and will see where that takes me.

Creating sprites however, is hard work. I am, as I say often, not an artist. It's surprisingly time consuming and clicking pixels in sure doesn't do the wrists any favours.


I do however know some tricks to make the whole visual aspects more exciting: I am going with a pixel art style, and to enforce this easily, I am using a pixel perfect camera that downscales everything for me.


I am also using the URP for unity so I can add elements of bloom to add more visual flair.


Finally, you'll see I've added parallax to the varies background objects.


You'll see the visual style develop as my screenshots progress. I'm particularly fond of some repurposed assets from my last project, a certain pink object in the sky was an iteration of the player in my DFNDR project.


Grappling

onto coding the next major component of my game. As well as a little leaping visual demonstration.


Grappling was a much harder component to work on. It was simply just a larger task. I ran into issues of creating new joints every frame, joints not going to the right places, the grapple not retracting like it should, it was a fun little mess to solve. The script has 4 phases to work through as the tongue is: "ready for input, firing, latched, and returning." I started working with bools to manage states but found it much easier when I changed it up to an enum state system. Lets take a look at the script in its current state now.


It's quite a lot to look at so, explore at thou own peril.

Learning about inverted if statements has really been a boon in keeping it readable to me, and I will be slotting this technique elsewhere when possible.


TOOLS!

Okay so this has been my favourite part of creating my prototype so far. I have always been curious about making tools to make developing in unity easier, but have never had the time to truly practice it. Well now I have! I have created a tool to assist me in placing down random assortments of objects in bulk to assist with set dressing. Observe:


With this I have put down little glowing mushrooms, various grass sprites, and the entire flooring sprites. I have even expanded the tool to add variance to the scale and spacing, and made my sprites always place at the bottom of the spawner instead of the middle.


Conclusion:

Lets have a final look at where the project is now, you can see a few extra touches, like the little jump strength indicator.

It's certainly in no gameplay ready state, but I adore the identity being built. I'll have to spend a lot of time tweaking jump forces and grapple reach. There is a lot to consider, I hope to have a range of levels to display in my next blog, though busy times are ahead, I'll be spending 3 weeks in America during the march-april period and that will naturally bleed into my development time. The next blog may be a small one, or it may be a big one.

15 views0 comments

Recent Posts

See All
bottom of page