DEVLOG: Random Acts of Mining, part 3 – putting rocks in the dirt

Yes, that title is a reference to Terraria‘s map generation. And why not?

Early on I came across a problem with Random Acts of Mining and how I intended to implement the procedural generation of the soil; although objects themselves could get away with being randomly-placed absolutely anywhere (and with gravity enabled, fall to where they’d normally fall), the soil itself was to be a different affair, ‘dug’ out of a completely-solid stage comprising a repeated 16×16 pattern of 1×1 pixel tiles, so that destructible scenery would be pixel-perfect.

Well. Long story cut short, even early attempts at this with just over a single 160×120 screen worth of tiles was too slow by far on my work machine, a 2.1GHz laptop (I’ve had it for years, and have also for those same years been too broke to afford something better). For a blocky-pixel retro-styled game, that’s not too acceptable really. And so, my solution was to craft a number of stages by hand using 8×8 tiles; each layout having 8 player starts (chosen at random). With 16 layouts, these eight starts would equate to a combination of 128 possible ways to start any given game; and this is even before the object generation.

Either way, first port of call was clearly to get the base physics working, a rundown of which follows:


My first job was a small test area and the basic left/right platforming movement implemented; but without the standard platform game jumping. I instead went for the ‘jetpack’ style of movement as initially planned.


Next task: destructible scenery! This was just a matter of removing any 8×8 soft tile shot by the player’s mining lazer — hard indestructible tiles exist also. Although not present in the above screen, dirt particles would be added to this destruction at a later date. Can you dig it?

Also a HUD was added, but at this point without functionality outside the fuel counting down with use. Speaking of which…


Gimme fuel, gimme fire, gimme that which I desire! *cough* Canisters of fuel, and the implementation of player death for expending all 100 cells of fuel. Also, shooting the mining lazer now depleted 1 fuel per shot; doesn’t sound much but adds up when digging through dirt.


And here is where I really did put rocks in the dirt — as well as their gravity, and ability to kill careless players. Hazards in the game, at last!


Critters in the caves served as another type of hazard; here seen with a bomb on its head, another newly-established thing that serves to destroy scenery the lazer can’t reach — and stun critters so they may be counted as cargo to take to…

haulreceived…the ship! Touching this craft would replenish the player’s fuel and ‘cash in’ their haul in exchange for that universal game currency, points (score displayed top-center). I also changed the player to start without the mining lazer, ensuring they’re tasked with finding this ship as a first port of call in any game. Eight starts per layout, remember? This is not going to be a walk in the park. Or caves.

Test area finished (and with all the game’s functional elements in place), the next thing to do would be to actually add the random to this as-yet-unnamed game. And name the main player character.

What would I call it?
What would I call it?

Leave a Reply

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

You are commenting using your 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