Jogo de Saltar Remake – Dev Log

As of writing this I am less than 7 hours away from boarding a bus and crossing Spain, France and Belgian towards the Netherlands. It’s something that both excites me and scares me and something where I found myself unable to sleep. My own imposter syndrome screamed at me that the friend with whom I’m bunking, a lovely fellow linguistic and friend, might just grow tired of me. My more logical side knows that a 31 hour travel across Europe in a bus when my body is hypermobile is all sorts of asking for trouble. My headmates and protector though? Oh she has an opinion on her own. Her own opinion is that I should “Go. THE. HECK. TO. SLEEP”.  Listening to her is usually a good idea, and I have enough sense to know that my travel to the Netherlands will only be more miserable if I don’t have any sleep before boarding in Lisbon but I know the feeling gnashing at my insides, and making my chest feel crushed well enough to know I won’t be able to.

What does that have to do with the fact I’m writing a dev log? Well, while earlier I attempted to distract myself with the Dutch I am teaching myself that wasn’t really working. I have managed to teach myself so much grammar as a linguist that in 4 days I can use the present, I know inversion, I know the past, I can recognise clauses, I can ask questions, I can use the negative and oh so many other things. I can already find myself dreaming in Dutch and have reached language acquisition milestones that should have taken me month (all the while making mistakes that toddlers do, in a process called overgeneralisation).  All the while knowing the most important word I can and have learned is “Knuffels”, as in hug and hugging and I have prepared the first line I will utter once in the Netherlands “Als jij een knuffel wilt, knuffel ik je” that STILL wasn’t enough. Having received upsetting news just a few hours prior, the kind of news that make me cry and make the kids in my system hug me I needed a distraction. More than anything I needed a creative project, something that I could finish soon enough. And while I could write another chapter of Plateau and break that “once every two years” curse what I found myself doing instead was game development. Which is why today we’re talking about the game I had tentatively called. “Jogo de Saltar Remake”.

Work in progress version of Jogo de saltar remake. characters and jumping are implementing but there is no background or UI added in yet except for chunky numbers.

Work in progress version of Jogo de saltar remake. characters and jumping are implementing but there is no background or UI added in yet except for chunky numbers.

JOGO DE SALTAR

What is Jogo de Saltar (Jumping Game)? Jogo de saltar is a game by Nerd Monkeys based on the popular Portuguese character Bruno Aleixo. Originally an Ework and later some kind of vaguely dog like creature Bruno Aleixo started on Youtube before getting a TV show in Sic Radical, the “edgy” “for teenagers” cable channel of TV station SIC and, eventually its own theatrical movie. One of those cult classical Portuguese creations, the kinds that get memed and shared between kids at schools who are too young to be watching it all the while appealing to Millenials with their content in one of the shorts that aired on TV Bruno Aleixo plays Street Fighter 2 as Blanka. In a combination of cheesing it, button mashing and overusing the electric jump attack to stun lock its opponent Bruno ends up winning the match.  So what exactly is the game? Well it’s based on that short. Two characters meant to evoke Street Fighter, each on a side of the screeen, the character of the left shoots a legally distinct HADOUKEN and if you tap the screen you get to jump over it. If you successefully jump over it you get a point, but if you don’t? The score resets. The goal is simple, beat your high score. The kind of game perfect for mobile because you can just pull it for a minute or two, play and be done.

It is also a game that was only available for a few months. The true purpose of the game is to promote a newsletter by the company that handles the merchandise for Bruno Aleixo. Everytime you die a popup appears on screen “Subsribe to the newsletter” with a clickable link. Hilariously enough within two months of the game coming out the link no longer work and within 6 months the game got delisted. Were it not for the fact my friend and fellow archivist Pedro Pimenta had worked on it and made the music for it it would have escaped my notice despite being made by the arguably most famous Portuguese Indie studio.

 

Gif showcasing jogo de saltar. A character jumps over a fireball, whenever the fireball goes offscreen the score has 1 added to it. The graphics are detailed with clear references to Street Fighter 2.

Gif showcasing jogo de saltar. A character jumps over a fireball, whenever the fireball goes offscreen the score has 1 added to it. The graphics are detailed with clear references to Street Fighter 2.

Because it was at its core a very cheaply made, advertisement game released for free the game loop is incredibly simple and relies mostly on a timer counting down. Though I do not know javascript which I assume it was programmed in (Android game after all), it always felt like something I could replicate easily enough. In fact a few days ago I had joked to a game (and senior programmer) about it. In what was probably quite mean I called it “that’s basically just a timer set to a random value counting down, then a switch statement right?”

I even formulated some code on how to achieve the hadouken being launched quite fast as a concept once my friend asked me HOW I would approach it

 

 

Create
Enum gamemode
{wait, shoot, }
Timer = 300
gameplay = gamemode.wait
Step if gameplay == gamemode.wait
Timer -= Irandom(6)
if timer <0 { gameplay= gamemode.shoot
}
if gameplay == gamemode.shoot
{ Timer=450
Play animation
instance_create (obj_kamehameha) gameplay = gamemode.wait
}

 

That, I thought was my whole theory. Set a timer, randomly remove from it, once it gets to zero have it shoot out a fireball, then set the timer back. Because the timer is now bigger than zero it goes back to waiting. It felt clumsy but quite accurate. So when I found myself needing, seeking a distraction, knowing that I had several hours tonight before I could get up and start showering I decided why not? And soon enough, Jogo de Saltar Remake was born.

 

Drawing little dudes.

I had a theory on how the game could work and a few hours free before I had to get on a bus that would (and will) take me across Europe. Knowing that I really should have been asleep, rather than playing with Gamemaker I found myself just creating a test character and applying that block of code to them. Of course I did substitute play animation with the correct code however it worked surprisingly well. This is the entire code block for obj_enemy

start
enum gamemode
{wait,
shoot,
}
Timer = 300
animate = 0
gameplay = gamemode.wait
Step

image_index = animate
if gameplay == gamemode.wait
Timer -= irandom(6)
animate += .02
if animate >2
{animate = 0
}
if Timer <0
{
gameplay= gamemode.shoot
}

if gameplay ==
gamemode.shoot {
Timer=450
animate += .02
if animate < 2 {
animate = 2}
if animate > 3
{animate = 2
}
instance_create(x + 16, y,obj_kamehameha)
gameplay = gamemode.wait
}

It was basically one to one and it worked. It was something that really pushed, however briefly my imposter syndrome away. If I could jokingly break down a game and describe exactly how a mechanic works did that not mean that I was at least, if not good at programming, good at logic? Though my brain rushed to correct me on the point and tell me I was being way too positive about myself I still felt like I had accomplished something.

Quickly I drew up a Mr Game&Watch looking character and gave him a two to three frame animation. This would ensure that I had more than squares shooting at each other. I then reversed the sprites and changed the color of the second character, the one you would be controlling on the other side.

Let me be incredibly clear on how simple the game loop is. It is basically an LED Game and while I had done LCD style games back with Joana’s Garden which I had released a few months prior and am incredibly proud of this is a type of game that is carried entirely by the graphics as the gameplay is otherwise not involved enough to keep anyone playing. It is not a coincidence that from the Coimbra background to the UI, to the sprites the graphics in the Mister Cimba game (Jogo de Saltar) are the most polished thing about it. But running on empty and just wanting something, anything that could move I did not have that benefit.

I had been working with my usual limitations. Screen size of 160 by 144, pushed to 800 by 600. The screen resolution of the Gameboy and one I had used in my now cancelled almost commercial game, Stealthy Dicey DX. Having placed the two little dudes side by side it was time to make it so that when you click on the second one it moves.

MAKING IT A GAME

Now. I must admit to something. I still have not figured out how to make a platformer or otherwise a character jump. Much like with most anything when it comes to my games what I did have was an illusion. What if when the little dude you click on the right is pushed up, it waits a few seconds and returns to its original position? Then it wouldn’t be a jump, that requires physics or even simulating gravity. It would basically be a timer waiting to go off. Readily, eagerly I coded my character. In what quickly shows just how much of this is hyperfocus rather than any real designed and planned for project while the enemy is called obj_enemy and the projectile obj_kamehameha the character you control, the main character is simply called object2. This would be a bit of a theme.

Either way with object 2 the code is simple.

 

Create:

jump = 0
animate = 0

Step

image_index = animate
animate += 0.2
if animate > 2
{
animate = 0
}
if jump > 0
{jump += 0.2
}
if jump > 2
{y = 32
}
if jump > 5
{
jump = 0
}
if jump < 2
{y = 96}

On mouse click

jump = 1

 

So what does it do? Well at first the character spawns with jump being 0. Let’s ignore the manual animation system for now as it isn’t important. When the player clicks on the object2 character then jump becomes 1. Now of course the game is checking every single frame to see if jump is bigger than 0. Since jump is now bigger than 0 it starts adding 0.2 to it every frame. After 6 frames jump is now 2.2 so bigger than 2.

This makes our little Object2 move instantly up, because after all, 2.2 is bigger than 2 right? And since 2.2 is also bigger than 0 our jump keeps increasing. 2.2, 2.4, 2.6 etc. When it finally reaches 5.2 it gets turned back into zero.

Now what does that cause to happen? Well it’s not bigger than zero so now it doesn’t add anything to itself, it’s smaller than two so that means the character goes back to where it was. And it’s smaller than 5 so it doesn’t get reset. Bam the character “jumped” for a few frames, and now needs to be clicked again to restart the process.

It is a solution I thought to be clever. One I had come up up with on my own and one that worked rather well. Pretty soon I had what I needed a character that jumped and one that randomly shot a fireball. What else did I need? Ah, yes, for the fireball to move right!

This is the code for the projectile.

 

Create

h_speed = 3.5

Step

x += h_speed

if x > room_width
{obj_ui.Score += 1
instance_destroy(self)
}

On collision with Object2

room_restart()

 

Basically I assign a variable named h_speed and add it to the kamehameha or Hadouken’s x making it move right. Once it’s past the screen it deletes itself. Because it can be past the screen if the player jumps it also modifies the object that carries the score (where I have drawn 21 numbers) and adds 1 to it.

The object that carries the score is just as simple.

 

Create

Score = 0

Step

image_index = Score

Two lines. And yet it’s all it takes. Whenever score gets added the number of score equals that of image index. Thus it cycles the numbers.

 

Screenshot of Gamemaker open to showcase the 21 sprites held within "sprite3" which is used in "obj_ui".

Screenshot of Gamemaker open to showcase the 21 sprites held within “sprite3” which is used in “obj_ui”.

Finishing touches.

There was no sound and there was only a limited resolution yet I did not let that stop me. Feeling emboldened by the fact I had managed to copy a game loop in only an hour or so I decided that if I’m leaving Portugal I might as well leave Portugal with a game added to my itch.io.  Looking at it what jumped out at me was that right now there was no background and no main menu. So, quickly, with MS PAINT opened, I set out to fix that. Because my canvas was only 160 by 144 I knew I had to keep the main menu simple and I did. Remembering Object2 I drew a simple side view silhouette of a blobby blue character. Very Bone like in design. Though simple it conveyed the idea beautifully and I added a simple square button that cycles through colors and you can click on to start the game. All it does is go to the next room,  room_goto_next() . That’s it.

Background art for the main menu of Jogo de Saltar Remake. It's a side view of a character colored in a single character.

Background art for the main menu of Jogo de Saltar Remake. It’s a side view of a character colored in a single character.

I took a picture I had lying around of some drawing I had made and using Sony Vega as my Photoshop I used filters built within to pixelate it. It came out something that would look good scrolling

 

Big, chunky pixels in a variety of colors though mostly blue. Used as a background in Jogo de Saltar remake.

Big, chunky pixels in a variety of colors though mostly blue. Used as a background in Jogo de Saltar remake.

 

I quite like the look. It was the kind of blocky pixels I’d see in a CRT or otherwise a low resolution video, the kind I watched downloaded videos in the early 2000s. I got that to move as the background and there it was. I had a game. Once again it had no sound, and it was stuck at a simple resolution but it had a win and lose state. It was probably the fastest game I had ever done, in only a couple of hours. But it was a game!

 

Conclusions

I added a few UI elements to indicate to the player that they should click on the character to make them jump and that they should avoid the projectile, before changing the color of the numbers in the UI.

 

UI for Jogo de Saltar Remake it displays a little blue character, "object2" running away from a fireball, with an equal sign next to a skull, as well as a click showcasing the character jumping.

UI for Jogo de Saltar Remake it displays a little blue character, “object2” running away from a fireball, with an equal sign next to a skull, as well as a click showcasing the character jumping.

As a last thing, because I like doing these things I changed what text displays on the Window when you play the game, and gave it an icon. It was finally done.

Though I do not often think of myself as a good programmer or even a particularly effective one there was something about the little MR GAME&WATCH characters and blocky pixels with 1bit game art that I enjoyed. My friend had described me as very good at just getting things to move. Having a prototype in an hour or two and that was a skill that I used to make this silly little game. It was a game that I feel could be polished in many ways. Better art, better character animation, the concept of sound. But one that still fills me with pride to have made.

And hey it’s now 3.39 am. With my Bus leaving in under 5 hours that means this gives me just enough time to play some videogames. Perfect right? Maybe I’ll allow my protector to play that brand new bird game she always gets autistic stimming from when she plays it shouting about being a bird.

Hey, we got to take care of each other right?

Final version of jogo de saltar. A main menu is shown and then the player jumps out of the way of a projectile. A blocky background scrolls by in the background.

Final version of jogo de saltar. A main menu is shown and then the player jumps out of the way of a projectile. A blocky background scrolls by in the background.

You can play JOGO DE SALTAR REMAKE HERE 

 

 

 

 

 

 

 

Leave Comment

Your email address will not be published. Required fields are marked *