We Got Dungeons - Dev Log 3
A look at structures and game objects for our tactical RPG on the Sega Genesis and Mega Drive.
A look at structures and game objects for our tactical RPG on the Sega Genesis and Mega Drive.
Last time we announced our new upcoming game for the Sega Genesis, We Got Dungeons.
This time we'll delve into the technical details of the game, so strap in for some tech talk!
First off let's talk about the levels.
We are planning on having several different tiers of levels, each of them comprised of several floors of increasing difficulty. The levels are broken down into separate discrete rooms that are filled with randomly generated encounters.
In order to maximize the number of different rooms that we have to work with, and make each room as interesting and varied as possible, we have an elegant yet simple system in place.
First, we create a room template that is a plain old matrix of numbers. Looks something like this:
Now that we have these templates we can easily generate a floor map by stitching multiple rooms together.
You can notice that in that example we have 6 as a decorative object that is 3 tiles wide. When the room is generated a random object will be picked and placed there.
This approach gives us the ability to quickly create lots of room templates and have them appear random but at the same time have enough control to give each and every single room that handcrafted feel that many procedurally generated levels lack.
But this is ROM memory, so how do we use this in the game. Well, we have a matrix of pointers to game objects (we will talk about those structures in a later post so stay tuned) that point to whatever is loaded in at that particular square. After that, we can finally draw those objects on the screen. Right?
Unfortunately, there is one last catch. The internal data structures are normal matrices that represent 32x32 pixel squares on the screen. But We Got Dungeons uses an isometric perspective. This means that we have to transform the Cartesian coordinates of a square grid matrix into isometric coordinates.
Due to the isometric perspective, the art is "squished" and the grid runs at an angle of 26.565°. That number is very specific for a reason, and this is where a little bit of maths comes in very handy.
A slope of a line is defined as the ratio between the change of the y coordinate and the change of the x coordinate or:
With a little bit of geometry we get the following:
Looking at this picture it is clear that the slope is:
Which in our case is tan(26.565). Google tells us that the tangent of 26.565 degrees is 0.49999888349. Which is close enough to 0.5 which in turn gives us a nice ratio of 2:1.
Now we can use this simple ratio to convert the square coordinates into isometric coordinates and draw the art at the proper coordinates on the screen.
Thus, we are able to generate good looking, unique dungeons for each and every playthrough of the game. Check out part 3 in our series to talk about the game objects and how they interact with each other!
We got a danger. We got to battle. We got tactics. We got a choice. We got a story. We Got Dungeons.
Imagine that Neil Gaiman wrote a novel about Buffy the Vampire Slayer investigating some weirdness in Earthbound. Now imagine that this novel was actually a tactical RPG with some rogue-like elements and a unique progression and customization system. Now imagine that this RPG came out for the Sega Genesis in the 90s.
Still with me? Good…
We Got Dungeons is a tactical RPG with:
In a 90s suburbia, not everything is as fly as it seems. Beneath the veneer of normalcy lies cynicism, doubt, and dissatisfaction with life. People want something, they just don't know what that is. But forces from the beyond think they have the answer, and things get weird when they begin to enter our world through the mundane. Weird like your neighbor’s basement going down ten floors. Weird like movie rental stores that are bigger on the inside than on the outside. Weird like your favorite VHS tape trying to choke you to death.
These forces are launching unannounced, unplanned, uninvited visits to our reality. It’s an unbidden invasion of suburbia, an unsought for contact from beyond the screen that separates us from them… and it all starts in your town…
So who is gonna step up to stop this invasion? Who can we depend on to turn the tide of this sinister threat? The military? Superheroes? 90s cartoon characters?
Actually, the world’s last hope is your mother.
Eschewing the traditional RPG/tactical RPG heroes of knights, wizards, and rogues, We Got Dungeons features ordinary people in a situation that is definitely buggin’. Luckily, the weirdness that is creeping in from the other side is amping up some of their everyday abilities. Let’s meet a couple of our unsung heroes:
The Troublemaker
She’s a high-school delinquent that cuts class, smokes, and runs afoul of the local neighborhood watch. Whether it’s flaunting the town’s “No Skateboarding” laws or tagging the convenience store with graffiti, you know the troublemaker is to blame.
Her skateboard and spraypaint come in handy as useful weapons, and she has a variety of skills (like bullying and shoplifting) that make her a versatile character.
Your Mother
Dear old mom. Everyone has one. Always there for you, she’ll love you forever, no matter what you do. But don’t let all those bedtime stories, embarrassing baby pictures, and boo-boo kisses fool you; when push comes to shove, mom is who you want on your side to fend off the forces from beyond.
Mom can make you feel better, easing all your troubles and woes with a hug. Or she can totally mess up your social life by grounding you. Either way, the weirdness invading our reality is sure to find out that there is no such thing as “just” a mother.
Want more dungeons? Keep reading our series of dev logs here. More classes, tons of weapons, armies of 90s enemies -- we are pushing the Sega Genesis to its limits for this one. Next time we’ll introduce some abilities that put the "Tactic" in "Tactical RPG", and a dungeon boss you may recognize from a famous basement…