woensdag 29 mei 2013

Endless worlds

Two weeks ago, the project I was working on went gold. More about this new release soon, I promise J. So I switched to a new project. The new project which I’m currently working on is all about running in infinity without knowing it! This may sound kind of strange and somewhat impossible (infinity), but in fact it is not that complicated and I’ll try to explain it to you.

The new project will feature you, the player, as a running character through a world that is endless. The world is infinite. We do this by creating a variety of ‘Blocks’ of the world. Think of this as a slice or tile of an environment.


Most of the blocks can be placed (snapped) next to each other. We can say that they 'Tile' with eachother. This is possible because the road is always the same width for example. Also, all of the blocks have the same dimensions, this is very important. Creating the blocks this way lets us tile them behind each other seamlessly to create infinite worlds. Well infinite infinite.. More of a repeating world kind of, as you can see here:
As you can see in the above image, the world looks pretty repetitive. Which isn't surprising since there just is one block involved to create the above tileset. On the other hand, placing three of the same blocks after one another as a 'section' of the world doesn't feel that strange. I found that moving through three blocks of the same type was actually quite satisfying IF there was some variation after the tileset. It makes it kind of feel walking from one neighbourhood to another.

Next to the city's downtown area we decided it should have some other area's too. We came up with a few and one of them is a subway area. The player runs along the subway's railroad tracks towards.. infinity. The subway area has several blocks ranging from plain straight ones to some which have little subway stations and platforms in them. One good thing of using the subway as a theme for this kind of game is that a subway is quite repetitive from itself already. This makes it feel, and this may sound strange, less repetitive in-game. Since you and me accept it being repetititve J


This all sounds nice however, a subway and a generic city street don't match up that well, being tiles in our game. Also the subway being underground makes it not logically align with an above ground street. There for we created several 'Transfer' blocks. These blocks are used when we want the player to dive underground into the subway while running on the street for example. The other around visa versa, we need a kind of transfer block to get the player out of the subway back above ground onto the street. 


To go back to the street from the subway we use a similar transfer block:


So now we have our running towards infinity pretty much covered. However this doesn't make it a game yet ;). We decided to place several obstacles along the way for the player to avoid. When the player makes a mistake and hits one it is game over.


Placing obstacles isn't anything new and fancy. Just place nodes with the corrensponding names of the obstacle you want to put there and voila! The programmers now have their reference points of where to instansiate what object for a player to avoid. But remember.. Our world is infinite.. so how would that work?

Playing through the same obstacle composition all the time wouldn't be much fun would it? No.. not really. Especially not when every level block tile has the same corresponding obstacle set which doesn't change .Every block would be the same when the player walks through them again, which is boring. Also it wouldn't be possible to make the game harder over time, resulting in the player never dying in the first place if the obstacle sets are too easy. Or it could be the case that the first ever obstacle set which the player encounters is too hard and instantly makes the player go game over.

The solution we came up with is to create several obstacle sets per block. These obstacle sets are divided in several difficulties ranging from very easy to very hard. The image below shows 3 difficulty sets of obstacles for one block, ranging from easy to hard.


Now when playing the game, it doesn't really matter what kind of block tile the player encounters first. Since every block has it's own obstacle sets in all difficulties available. It is now possible to start with block A and have it use it's Easy obstacle set. Then move over to let's say block B with an obstacle set in Medium difficulty, keeping the game getting harder in a linear way. After block B we can use block A again but this time using block A's hard difficulty obstacle set.

If we have enough block sets and enough obstacle sets per block we can make the world feel infinite for the player. We also can have a complete different world combination the next time the player plays it by using a different order of block tiles and obstacle sets. This contributes to the replay value of the game, since the player encounters a lot of variety in gameplay everytime he or she starts the game again.

Greetings,
Joep





5 opmerkingen: