Saturday, March 20, 2010

Trampoline Gunmen



Trampoline Gunmen is the greatest videogame series every developed – true fact, fans of facts. Better than Mario, Sonic, and the CD-i Zelda games combined. Yes, I’m afraid it was inevitable that with my over-inflated ego and unashamed self-obsession, I would, at some point, hijack HG101’s otherwise fine blog and, like Narcissus on meths and at the helm of Concorde, ruin it irrevocably by gushing at high-speed about the only self-made game I ever loved. Attach oxygen masks and tighten those lifejackets, because I’m about to crash this sucker into a trampoline!



This is a follow-up to my previous post, regarding the games I’ve made using QBasic (and was inspired by Kurt’s awesome post on his own game). Trampoline Gunmen stands as the series which I put the most effort into, and the one which seemed to be enjoyed the most by those who played it (which I think was all of 10 people). A download link is available right at the bottom of this post.

It all started in 1999. That’s 11 years ago. After a friend in the year above mine at high school introduced me to QBasic, I spent 6 months dabbling in game creation, making mostly awful derivatives of already available titles. My biggest hurdle was not learning how to do arrays until much later, and even then I didn’t really master it. From what I understand, an array allows you to set-up the code to deal with multiple objects without having a line of code for each one. In QB, if I wanted a bullet, it needed a line of code to draw it, another line for its movement, another line (or four) for when it went off screen, plus further lines for how it interacted with the player, enemies, other bullets and so on. One projectile could have 10 lines of code or more governing its behaviour. Five bullets and you’d need 50+ lines of code, unless you create an array which, in theory, should control all projectiles under the rules of the initial 10 lines. Or at least that’s what I can remember – I might just be making this up.

I couldn’t do arrays and so to keep my work easy, I made simple games. Creating working AI also seemed too daunting, so I stuck to games which were multiplayer, or didn’t require it. Trampoline Gunmen was born of this inability to create anything which required complex routines.
My initial idea was for a target practice game: what if you were falling alongside a building and had to shoot through a window to cut some rope which would release a mattress at the bottom and save you. After a while I thought, what if there were people in the building shooting at you? What if you had to shoot back? What if you could bounce on the mattress and fly back up, shooting at them? From here the basic idea of TG formed: two people on trampolines, at either end of the screen, shooting at each other. Speed changing is handled like rocket thrusters: fire in the direction you are travelling to slow down, and fire in the opposite direction (behind you) to speed up. Each character has 3 speeds. To make things easier to code, each person could only fire 2 bullets at a time, meaning a maximum of only 4 projectiles to keep track of. It also seemed logical to have an ammunition box at the top of the screen to reload your ammo.
At first I called it Tramampolining Gunmen (based on the Simpson’s episode where Homer takes a free trampoline from Krusty), but this was confusing and so I eventually just called it Trampoline Gunmen. It proved popular at school, with a lot of kids wasting time in the computer room loading it up. There was very little sound, partly because I couldn’t get music to work correctly, but also because it allowed you to play unnoticed.

I went on to make other games, but regularly came back to my TG series, updating it with follow-ups, and at one point even creating a Dreamcast version with the help of another programmer.


THE GAMES


Trampoline Gunmen
The first game was 2 player only, based on the mattress minigame idea which ended up in TG: Minigame$. There were actually two versions of this first iteration, since the original contained a nasty bug which meant you couldn’t reload if any of your bullets happened to be onscreen when you touched the ammo box.

Trampoline Goats
Technically a sequel to the original TG, this was made several years after I’d stopped thinking about TG (about 2002 I’d guess). I replaced the main characters with the heads of goats, and the bullets with cheese. It was a homage to Jeff Minter and his use of animals in games. It also incorporated, rather unsuccessfully, a power-up system. If two bullets collided they formed a bubble, and shooting the bubble caused your opponent to freeze.
It caused balancing issues though, and the collision detection never really worked, so it was scrapped from later games. Due to the complexity of the DRAW statements used for the goats, it also runs slower and there are graphical glitches in DOS Box.



Trampoline Gunmen: Turbo Deux
A proper update to the original this time, it was the first version to feature AI. It also featured a bit of code at the start to detect your system speed – unfortunately it doesn’t work as well as it should. The AI was actually based on a perfect algorithm which read the speed of your bullets, opponent position, speed and direction, and calculated the likelihood of a hit – so it always avoided your projectiles. It also only ever fired when it was guaranteed a hit – it would check your direction, speed and position and calculate precisely when to fire. I then slackened the parameters so the variable ranges weren’t as precise, and then I added randomisation. For the final boss it was 50/50, meaning there was a 50/50 chance that he’d avoid your shot or fire at you given the chance. Even if he did, since I’d loosened the ranges to no longer be precise, he could still miss you or mis-time his speed change. For weaker enemies this randomisation went up, and I think the first opponent it’s a 1-in-10 chance. At first though this meant he didn’t do much, since 9-out-10 times he’d ignore the opportunity. So to give the impression of constant activity, I made the weaker enemies do random stuff in reverse proportion to when they did take perfect shots. I also tried to make the random behaviour be based on as many variables as possible – bullets held, bullets on screen, position, position minus the other person’s position then divided by the number of bullets held after being multiplied by the number of rounds won – and so on. My hope was that by layering it in ways undetectable to the player, interesting behaviour might result. It works reasonably well in giving the impression of intelligence. TIP: I could only ever get the AI for attacking to work if you’ve switched speeds either to slow or fast, mainly due to the constant variation in both players’ positions. So by keeping your speed at the default medium, you’re far less likely to be attacked or hit. Don’t play it like a shmup – take your time when firing, and play it a leisurely pace.

It included a tournament against 6 progressively more difficult opponents, each of whom had their own distinct background – it was tremendous fun creating the animated ocean background. There was even a hidden Easter egg that allowed you to see the ending (it’s the # of rounds you select). The sub-heading of ‘Turbo Deux’ I added for a number of reasons. Capcom sequels liked having Turbo at the end instead of a number, and of course there’s the film ‘Hot Shots: Part Deux’. It also sounds similar to Turbo Duo, a classic gaming system. I wish I’d made all the deaths as violent as the final boss’ death, since it looked awesome. I also wish that I’d included some kind of story mode to go alongside the AI and single player campaign. Other improvements would have been tweaking the speed (and changing the fact that t/y changes the speed parameters instead of +/-), and the front end. Otherwise I’m happy with how this turned out.

Generic dude
Easy and stupid. No background

Desert Fighter
A basic Egyptian desert background. I’m not sure why I didn’t fill the sun in – it now gives the game a creepy atmosphere. I had wanted to put an animated tornado in, but it glitched when bullets flew through it, and I was too lazy to tweak it.

Ocean Twin
You fight a mirror image of yourself against the backdrop of a constantly moving ocean wave. I love this animated background, even if it is just randomised lines. From here I find the AI starts to get tricky.

Mountain Guerilla
It’s the other guy from the original 2P game. I like to think that his first name is Mango, due to the colour of his trousers. There’s also an eagle flying around the night-time background, which is cool.

Kabuki Gunman
Your opponent here is a kabuki warrior with a painted face. Actually, I should have made his hair red in that case, since here he looks a bit like a clown. There’s a delicate background of falling cherry blossoms. If I could, I would have had the background music as a lonely shamisen being plucked.

The Ending
The final boss is an invisible enemy, which you only have to hit once. Annoying, I know, but I wanted to scare players. He’s actually not too tough. Just stick to the default medium speed and fire like mad. The ending has your character rotating and inflating to screen-filling proportions, while the boss explodes in torrents of blood.



Trampalien Gunmen DC (aka: Trampoline Gunmen DC)
A Dreamcast remake of the original Trampoline Gunmen, albeit with underpants at the bottom of the screen representing a sort of pseudo health bar. I did the design, painted the cover you see here, sprite artwork (mostly Metal Slug sprite rips), music (a Street Fighter rip for the title, the in-game tune I composed on Dezeamon for the SNES), sound effects, and playtesting. Voices were done by my brother.
It was meant to go further, but my programmer grew bored of the project. Annoyingly, I’d written up designs for all the minigames before they were added. (Also available on PC and Linux)


Trampoline Gunmen: Minigame$
With my programmer leaving, I decided to make the Minigame$ version by myself, using QB. It was originally inspired by WarioWare. This was also the first game I made to feature hi-score saving, and the ability to move your character left and right using the arrow keys. Even if I say so myself, I think it turned out damned well, especially the front-end and save function – it all comes together to feel really professional. The storyline, which is redundant in a collection of minigames, is pure condensed ridiculousness – I think I’d actually been drinking wine when I cobbled it together.
I included 3 selectable difficulty levels, which I seem to recall altered the speed/score loss of the minigames, but also boosted your score. Unfortunately higher difficulty levels aren’t much fun, it unbalances the hi-score table, and there’s no real need to play on higher levels. I urge everyone to ignore this and just play them on Level 1. I’ll also list my hi-scores here, though they’re by no means impressive. There is also a button to reset the hi-scores to zero, if you’re having trouble beating them, and in hindsight perhaps I should have included the ability to add a 3 letter name to each score.

Mattress Hopping (16)
This is what TG could have originally turned out like. In hindsight, it’s not that much fun. The window gets smaller as the game progresses. I was tempted to include several windows instead of one giant window, each giving a different score, but I coded this last out of the 8 available games, and just wanted it finished.

Bullet Tsunami (82)
Avoid the oncoming bullets for a high score. There’s only a maximum of four, and the game works pretty well, but I wished I’d varied the time between a bullet going offscreen and then re-appearing on the other side, since as it is, they tend to cluster together.

Missile Demand (82)
Inspired vaguely by the arcade game Missile Command. Russia has fired to nuclear missiles, and it’s your job to repeatedly knock them back. The visuals are pretty damned awful, with the LINE statements for the missiles leaving a trail – this is because once an object is drawn to screen, if you move the object and redraw it elsewhere, the old image remains unless it’s drawn over with the background images. I was in a hurry and needed to keep the speed up, and the only solution I could think of was blacking out each missile before redrawing the new one, but this caused flickering. So instead there’s an invisible cube of black following each missile, which slowly erases the blurring. I think I should have also coded it so the missiles avoided each other, since with purely randomised vertical movement, they tend to fuse together sometimes.

Boolzai (91)
Aim as close to the centre as possible. You get five shots, and the score is an average of those five, using the CINT command to round the final score. It’s pixel perfect, with only a single pixel representing 100.

Lantern Blast! (21)
You’ve got a time limit to shoot as many randomly appearing lanterns as possible. If you aim it right, you can shoot several lanterns with a single bullet. After shooting a lantern its tattered remains still stay on screen. I could have drawn a solid black square over the lantern once destroyed, to clean up the screen, but I decided against this since I really liked the effect it created.

Bullet Pong (43)
The TG series is a bit like Pong with guns, so here I bring you, Pong with guns! I was also thinking of making a variation on this called Body Pong, where you needed to use your body to rebound the ball, but 8 seemed like a good number and I just wanted the project finished.

Bounce for me Baby (21)
When coming up with the title, I had hoped people would picture an nubile young woman in skimpy top, bouncing up and down for one’s entertainment at some form of high class gentleman’s establishment. In contrast, the point of the game is to repeatedly shoot a baby in order to make it bounce, and therefore protect it from the spikes below. To complicate matters, there are spikes up above, and too much bouncing will also cause problems. I’m really pleased with the momentum of the baby and the way it increases in speed – had I motivation, I would have taken this code and made a decent platformer. I coded the Game Over noise to change in pitch as it played, giving a fairly good faux-impression of synthesised speech. It’s very difficult at first, since the timing of the first shot needs to be precise, but afterwards it’s quite a tense target practice game.

Got cheese? (24)
White balls of goat cheese are fired at you, and you need to catch them. This is the weakest minigame, since speed changing to grab the cheese is nearly impossible. Perhaps the cheese should fly a bit slower? Also, in hindsight I wish you didn’t lose points for missing cheese, since I find that often I’ll end up with a negative score. I should have changed this before finalising the game, but for whatever reason didn’t.

----

Trampoline Gunmen Quadro
The last version of TG which I worked on. This too was meant to be included in the DC version, and it would have been far more fun with four controllers around a TV than four guys crammed around a single keyboard. It can be played either a 1 vs 1, 1 vs 2, 1 vs 3, or 2 vs 2.
Instead of the round ending when one person dies, like in previous games, they flash white and become invincible for a short period, while the game continues. As a result it has a much smoother flow than usual, and convinced me that in future versions there should be a health bar to main momentum. There is also no friendly fire, and although I considered giving an option where you could kill the other person on your team, I decided against it in the end because of balancing issues. I also wish I’d included a tournament mode, so up to 16 players could enter, and then they’d be played off against each, either 1 vs 1, or 2 vs 2, until the grand final, since I recal really enjoying the tournament modes in Super Street Fighter II.
Unfortunately I’ve never been able to find three other people willing to play it, so I’m not really sure how well it all works. Based on my solo attempts, I’d say there’s probably quite a few bugs still. Anyway, it should hopefully give you an impression of the potential TG had. The story was inspired an indie game competition some time back, where you needed to create a game featuring zombies, ninjas, pirates and robots – I typed it up in English, then ran it through Babelfish’s language translation a few times, into Japanese and Chinese before back into English, then tweaked the spelling to be reminiscent of old arcade games.




THE FUTURE

I kept meaning to go back to TG and incorporate new things, but I never did. Today, I’m sad to admit, I no longer remember enough QB to attempt programming anything, and I haven’t the motivation to relearn it. If I did make an attempt to learn anything, it should be C, or some other more versatile language, perhaps which I could then use for PSP or 360 homebrew development. As it stands, my programming days are over, but I’m pleased with what the TG series managed to achieve, even if it was only played by a few people.


I had many ambitious hopes for future versions:
* Multiple characters with different traits. For example one might be able to change speed at will without using bullets, but he’d only have one bullet to shoot with, and his speeds would be limited to Very Slow and Slow. Another might have two guns, one solely for shooting, the other for speed changing. A second might also have dual pistols, but with one specifically for firing up, and the other down, and either for firing at the opponent. Some characters might have 5 speeds, but low health, and another might only have 3 speeds, but more health. Some might have up to 5 bullets, but others only 1 at a time. Several would need to be unlocked.

* Better visuals for the characters, maybe some animation. Also, a Super Deformed anime styling with massive heads, if I could draw it using the small amount of pixels available.

* Health bars. The underpants in the DC version was stupid. These wouldn’t be massive bars, since I wouldn’t want the game to drag on too long.

* Timers, just like Street Fighter.

* Each character would have signature super moves and a power bar, which could be charged either by hitting the opponent, being hit themselves, or other means. There could also be clever means of cancelling an opponents’ super move. For example, if one’s person’s SUPER released a falling homing beacon from the sky, which when it touched the ground caused missiles to rain down and fill the screen, the opponent would have a short time to shoot this beacon and cancel the super. Other supers could be a single massive bullet, homing bullets, slowing down time, infinite ammo for a period, invincibility, and so on.

* Faster and more fluid ability to move left and right, and also the ability to cancel an opponent’s shots by hitting them (this could be toggled).

* Power-ups, akin to Smash Brothers. Trampoline Goats had power-ups, but they didn’t work very well. I’d bring back the bubble popping idea, with power-ups contained within, but I’d base their occurrence rates on unseen variables which can’t be predicted by players. I’d hope to make their abilities different to those of the character’s super moves.

* Tournament mode – supporting 4, 8, and 16 people, either as 1 vs 1 or 2 vs 2.

* Survival mode – one hit kills you, or the other player. See how many rounds you can survive in a row (requires maximum AI).

* Practice mode – the enemy (a sack of potatoes), just bounces up and down allowing the player to practice techniques.

* Stories for everyone, with some kind of animation and endings.

* A lot more minigames: Body Pong (knock ball back using body) / Raining Missiles (like Missile Command, where they slowly fall to the ground and you need to destroy them before they do) / Box Bounce (shoot the boxes that are bouncing) / Girder Grid (avoid the flying girders) / Ring Runner (position yourself to go through the rings flying towards you, similar to Got Cheese?) / Balloon Bulge (shoot a bouncing and expanding balloon to shrink it, similar to the Sumo Head boss in Mystical Ninja) / Creature Bleacher (creature goes for you, shoot a bullet and he goes for that, if he eats the bullet he gets faster. A timed survival game. He always goes for the last bullet fired) / Creature Seeker (a creature goes towards you, shoot him to knock him back. Similar to Missile Demand, except instead of random movement he homes in).

* Better backgrounds and AI, plus music, and an improved save function which remembered more.

* Better front-ends and title screens, with proper graphics instead of just text. An improved credits screen.

If you’d like to play any of the Trampoline Gunmen, they can be downloaded HERE. They all work on my Windows XP computer quite well, and the speed detection also functions reasonably. If running it through DOS Box, I’m afraid you’re going to have to set cycles to maximum, and then manually tweak the speed in-game to run faster, since under DOS Box the auto detection routine sets the speed as far too slow. There’s a white bar at the top of the screen: the shorter this is, the faster the game will run. When you initially run it in DOS Box, this line will be off the right side of the screen, and you need to hold your finger on the SPEED UP button until it’s shrunk down to about only an inch in length.

3 comments:

  1. Certainly the best series that ever existed.

    ReplyDelete
  2. I second him , really good one,
    I love trampoline, it make me feel happy and keeps me fit :) come join me let us jump trampoline

    ReplyDelete
  3. This is brilliant. And very nostalgic for me - in high school I too used to make little QB games, and like yourself I never bothered to figure out arrays and had to develop other ways of doing things. The way you did the nuclear missile movement is how I normally did that kind of thing as well.

    ReplyDelete