DEVLOG: Random Acts of Mining, part 4 – a splash of colour

Thus far the bulk of RandoMining’s development has been generating the layouts. I decided early on (and after a few tests) that I’d create 16 layouts, each one having 8 player start positions to choose from (giving from the offset 128 possible ways to start any given game, and that’s before the random-generation). These have been time-consuming, as I carve out the empty space in a ‘full’ tilemap repeating the same 2×2 tile pattern; and then smoothing them off manually with grassy ‘top’ tiles and rounded ‘bottom’ tiles. They look like this:


The above contains a mixture of open areas, narrow passages, floating ‘islands’ of dirt, initially-inaccessible caches, steep drops and lengthy walks. There are sixteen of these in total, each one having those eight player starts and one ‘crashed shit’ with which the player robot can refuel and check in to convert their current haul into scored points.

Speaking of which, this is done with a points value that is added to a running subtotal that will be added to the main score when the crashed ship is touched. Common green gems are worth 1 point. Semi-common blue gems are 2, wildlife is a bit more, rarer items worth as many as 64 points — but don’t bank on those to meet the level-completion target of (at press, this can and likely will change when balancing the game nearer completion) 150 points. Due to the random item placement, there may not actually be any rare gems in the map at all!

This was the first screen I took of the random generation -- I didn't place these items, the game did!
This was the first screen I took of the random generation — I didn’t place these items, the game did!

Speaking of which, it breaks down like this; the game decides, upon map start, that it will place a few hundred items in the map. It counts from one to this number (let’s say 500 for the sake of brevity). As it counts to 500, two things are decided: 1) the type of item and 2) the X,Y coordinates. And the item is placed if a gem. If it’s a rock or bomb, it’s only placed if the X,Y coordinates overlap a non-empty tile. If a critter, it is only placed if these coordinates overlap an empty one. Repeat until 500 is reached, and the level is populated.

It’s not at all complex, but it works surprisingly-well. I modified certain parts of the spawning process too, such as constricting the X,Y coordinates closer to the middle of the layout for the jellyfish-like critters to give them more of a ‘zone’ to inhabit — such tweaks are always small, but when applied correctly make the placement seem a little bit more intelligent (and sadistic) than it is, being random number-generated.

Of course, when testing the layouts are they’re made one-by-one, that Commodore 64 palette I drew the graphics in started to get a little familiar. It’s a nice enough palette and quite easy on the eye, but there’s a definite bias toward earthier colours and an apparent lack of contrast, if not an actual one. And so, the random number generation was employed for another modifier: hue adjustment.

hsv4 hsv3

This was implemented as only four layouts were complete, and did an amazing job of making even the same one feel different in terms of atmosphere. The only thing left was to change that awful repeating far background layer:

raom2 caves BLUE

Also affected by the random hue-shifting, this did nicely.

This devlog has had a very past-tense approach so far as I’ve been recapping the development of this game for posterity. Next part should be the final recap, as I approach a description of the game as it currently stands.


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