Sunday, July 12, 2015

Coding Beauty: Part 1

Look how beautiful Ori and the Blind Forest is:



I mean, that's gorgeous. The dilapidated tree trunks in the background, the ominous foreground, the interplay of light and shadow -- not to mention, if you actually play the game it's all animated. The grass sways, leaves blow through the air, mist snakes through the trees. It's really freaking beautiful.


You know what, though? On a gameplay level, that beautiful forest scene is functionally equivalent to this drawing I made in 30 seconds in Paint:


See it? In the forest scene, Ori can walk on the ground and on the tree trunk, and also walk under the tree trunk. That's it. If I drew a stick figure and coded my drawing as a platformer level, the stick figure could walk on the bottom block or the top block, and walk under the tree trunk.

I'm not trying to put down Ori's game design. It's an excellent game with smart, well-designed platformer levels. But if that's all it was, it wouldn't be Ori and the Blind Forest. It would be Mario. The game's visual identity makes it the brilliant work of art that it is.

My goal for the game I introduced last week is to recreate that type of game algorithmically. I want to write a program that generates beautiful, lively platformer levels on the fly. The Ori and the Blind Forest example shows us that there are actually two steps to that process:

1) Generate the location and dimensions of all the platforms in the level (the Paint drawing)

2) Texture the platforms and the spaces between them, giving them a foreground and a background, and add scenery and interactive gameplay elements (enemies, etc.)

This week, I've begun implementing step one. It's going to take a while - my algorithm needs to be able to generate a fun, plausible level that is both visually interesting and possible to traverse. It needs to do that extremely efficiently, also - no one wants to wait three minutes every time they reach the end of the screen. I'm experimenting with different approaches, but I've only just begun. Next week I'll go into a little more detail about the process and what I've done so far.



Here's an article, relevant to anyone developing with the Unity Engine, about Unity's image problems.

No comments:

Post a Comment