NoshBar's Dumping Ground




Introduction:


I touched my first computer at age 16. I almost made a game immediately.
I almost made a game every month of every year for the next 16 years.
There's only so much self-respect you can lose until you just have to prove that you're capable of finishing something.

The time had come where I asked my life for 8 hours of uninterrupted codery goodness, and this is how it went...

(DOWNLOADS are at the bottom)

The game idea:


Something simple that can be finished in 8 hours.
Something that has few actions performable by the player.
Something that can easily have randomly generated levels.
Those infinite jumping games are popular, they only have tilt left and right, they also use the only physics/maths I understand, velocity.
I hate infinite running/jumping games, no sense of accomplishment.
Make a jumping game with a defined set of levels and each level must have a finishing point/goal.
For some reason, people like competing, so make the levels timed.

The engine:


I've looked at many frameworks in the past few years, I've also ALMOST finished quite a few myself.
The LÖVE framework seemed to have a simple enough API to get a grips with, and even though I'm not that familiar with Lua, it didn't seem like it would take long to learn.
10 minutes of messing around with the engine and its examples and I was sold. For prototyping, it was gold.
And if worse came to worst, I could always write my own lightweight framework for all the platforms, and oh hey, I just recently put the Lua engine into Tweenimator to see if I could, I wonder if... NO, FOCUS!

The editor:


Sublime Text setup with a LÖVE "build" command.
Tools->Build System->New Build System
{
"selector": "main.lua",
"cmd": ["F:/apps/LOVE/love", "$file_path"]
}

I also used the Lick addition for LÖVE so that every time I saved changes to my code, the game would restart automatically.

The prototype:




107 lines.
The orange rectangle at the bottom is the permanent floor.
The orange square is the player.
The blue tiles are all platforms you can pass through upwards but rebound off when falling.

Bah, this is dull, if you had a level with platforms stacked in a neat center row, everyone would always have the same time, it's impossible to be quicker.
Make it so that the player can SLAM DOWN to hit a platform quicker and thus improve their time.
Hmm, better, but not great.
AHA, make it so that platforms are in two states that the player can switch between, making them only collidable with their current colour!
Muuuch better.
For some reason the dual colours make me think of Tron (and Transformers, and Jumper (hey!) and...)
That's it, I'm going full Tron on this one... while being respectful of IP and copyright and what-not...

The graphics:


No matter what I make, it'll suck.
But I'm also against just leaving things as plain squares.
Well, seeing as I'm Tronning this lot up, may as well make everything glow like a sonofafemaledog. JJ Abrams would be proud.

Open Paint.NET.
Draw something on one layer (text, block, whatever)
Duplicate layer, shift it down and right one.
Change the colour to blue or orange.
Apply Photo->Glow effect to both layers, SHAZAM!


I need something for the background, to parallax scroll, because no game is complete without it.
Think "jumping" as the theme.
That's it, I'm going Tron, may as well print some source code with some "jmp" instructions in.
Open the Tweenimator binary in OllyDbg to see some assembly, holy balls, look at all those jumps at the entry-point, jackpot!
Also, this game shall be called "jmp:err", or "jmperr"

The audio:


Music.
No matter what I make, it'll suck.
Go through some chiptunes for ambient music, they all sound too "busy".
Search for randomly generated music.
The Trance Music Generator sounds promising.
Download 3 different MID files from it, find one that might work.
Convert the MID to OGG using VLC with the jRhodes3 soundfont (audio codec) I'm so fond of.
The resulting file is 5MB and a bit busy in the middle... sod it, open it in Audacity and strip it all down to one tiny 10 second looping sample... no one sane is going to keep the music on any way.

Sound effects.
I don't need anything complicated, just a few blips and bloops for jumping, boosting and... menu sounds.
Make some samples using an online sound effects generator.

The menus:


Every game needs menus to be "complete". Damn.
I need text for this. It must look Tronny.
Hello Tr2n.ttf!
Find some menu code examples on the LÖVE forums (can't remember where exactly, sorry source!).
Modify it so that every menu item has a data item associated with it that is displays next to the menu text. This is useful for displaying times next to levels and...
Make options menu for adjusting volumes, modify menu so that it can take left/right as input and call appropriate callbacks.

The persistence:


Time to save/load scores and configuration options.
Hmm, Lua must have some simple function to do this, right?
It does, it's called the Lua Community, huzzah!

The result:






911 lines of slightly mutated ill-tempered spaghetti code.

The game works. There are some features/patterns left to the player to find out, kind of like the first few times you play Mario Brothers.

It's nice to have finally finished a game.
Well. Almost.
See.
It's like this...

The splash screen is vile...
The graphics and audio are terrible...
Showing the code to any living organism would result in it bleeding out of the spaces between its cells.
The gameplay is good enough, but there are so many things I could do to improve it...
There still isn't any real sense of "winning"... you make it to level 10, it shows a different "win" message, then lets you go on forever...

... or at least that's the theory.
Every level is assigned a random seed.
Every level is randomly generated according to this seed, each platform is placed within vertical reach of the previous one.
There is no check to see if the horizontal + vertical distance is reachable... but all of the first 10 levels are completable... either by magic, or by the magic numbers I came up with for platform heights and widths.

I don't know how the game works really.
But I felt myself playing it quite a lot while developing it... something I never expected to do.

Most importantly, I finally came closer to finishing something...

The summary:


Editor:
Sublime Text with LÖVE build system

Engine:
LÖVE with helper libraries
- Lick
- Menu.lua
- table saving stuff

Visual:
- Tr2n.ttf
- OllyDbg for generating some ASM code for my background
- MWSnap (my keyboard doesn't have a print-screen button on it, required for capturing assembly output in OllyDbg)
- Paint.NET

Audio:
- Sound Effect Generator
- Random Music Generator
- VLC using the jRhodes3 soundfont
- Audacity

The download:


Windows Executable
OSX Executable
Generic .LOVE file for existing LÖVE 0.8+ installations

permalink print article