content top

Terrains, everywhere!

I’ve been, for the last few weeks, trying to decide how we will be doing the environments of Okhlos.

This process was not pleasant, to say the least. It would normally be a cool process, prototyping, trying to decide aesthetics, profiling, etc. But with the IGF around the corner, every method I discarded, made me feel more pressured to have something definitive, and less time I had to have something nice to show.

We are planning on having two “playable” levels for the IGF, where you can have an idea of what will be the overall aesthetic, plus the core mechanic.


It all started with the buildings (I will do an update on how I managed to get the pixel art in the textures, soon).

We had  some nice buildings. The main problem was that they were too historically accurate. They were damaged, filled with imperfections, and mainly made of stone. The rock texture gave the impression of something old and neglected.

Later, Sebastian pointed out that they were no fit for Delphi, as Apollo represents order, thus Delphi should have been spotless, and showing that everything is in order. I thought that changing the textures should suffice, unfortunately, it required some uv mapping changes, also removing the sprites objects in order to make everything more marble-like, and some geometry changes were in order.

That took me some time, but the result helped the general idea of the level.

Previous house model vs new one. We may utilize the old one for some other levels.

Later, when we had what would be the main buildings of the levels (we could add more variation later) it was time to figure out how to put these buildings into this:


First try: Tilemaps

We use 2dToolkit. It’s extremely cool, fast, intuitive, yadda yadda yadda. We use it mainly for the characters and ornaments It has some tilemap functionality, but it’s not its core.

First of all, setting the map was not very intuitive, we had to upgrade the plugin, which was not that painful, but it took some time, in order to be able to have the new features specially for the tilemap editor. Finally, we figured out how to set a scale congruent with our current one.

Later, we found out that the meshes didn’t have normals, so we must generated them by code. (without normals, we wouldn’t have shadows!)

And finally, we had the problem of Y (in Unity, Z in Max). Greece was full of mounts, mountains, cliffs, and working in 2d for a map that would be 3d was not practical at all.

We could have discarded the Y, and made all the levels flat, but there was one more main problem, and that was the materials we use for the bump mapping. There was no easy way of setting the normal maps in the atlas we used for the tilemaps. And that is one of the main things I use to take some work form the textures :P

Unfortunately, there is no picture, as I deleted it accidentally, and it’s a long process to do it again, just for the sake of the screenshot.

I do have here what could have been the necessary tiles for making different roads.

Combinations for a lot of roads! And none of them take you to Rome

And some tiles that could eventually end up in the final version (not in the same way probably)


Jepegized image!


Second try: Unity terrain

At first, a long shot, but it could be cool, the contrast. Eventually, mixing high poly mesh, low poly buildings, pixel art characters, was not such a good idea.

The first problem, as always, was setting parameters that would be consistent with our scale. It was not easy, and the values were extremely different.

From the aesthetic side was not good either.

I tried to export some heightmaps, making them by hand in photoshop, and later working them into Unity or Zbrush. Eventually I could set up some kind of pipeline, but it was not very efficient, as the heightmap, when exported into Unity, was not very precise.

(Click in the picture to enlarge it!)

The terrains in unity, are definitively nasty. The vertex painting part is incredible cool, but otherwise, there are just a headache, or just something quick for prototyping (if you are working in the same scale).


The third try: Modular and low polyhhhh

Before I came to this, I was really frustrated. I was searching for something consistent within the game, something beauty, and light in performance. Also fast. I wanted to do a few clicks and have something working.

Eventually, it hit me. We are making low poly buildings, for pixel art characters. The environment it has to be all low poly. And as it would be a stupid amount of work making an entire city unique, the best approach was to made it modular.

In this train of thought, I arrived to my second error. The concept (which all of you can see here!) was very vague in some areas. I didn’t figure out how all parts would fit together, and the blank spaces in which “I’ll put a mountain or something later” were really not helping to gain a big picture.

So I sat, tok the map, and did it again, now having in mind a tile size, and that each square had to be declared.

That helped me figuring out what will be the definitive layout.

(Click in the picture to enlarge it!)

As for the side of the amount of meshes, eventually, I realized what Sebastian was trying to say for a week now. It’s not time for optimization. We will have that time, but for now, we can take a few liberties. Also, the performance problems are coming from the physics side, not the rendering one.



Read More

Flocking Like It’s 1999

When we first started discussing the game’s idea with Roque, and the word mob was mentioned, another word come into mind: “empanadas” (because we were hungry, and we always eat some delicious emapanadas on Fridays). But immediately after lunch yet another word come into my mind: flocking. The algorithm that mimics the coordinated movement of bird flocks or fish schools ( seemed like the way to go. Sure, people were not going to behave exactly like fish or albatrosses, but the three rules that govern the flocking algorithm, separation, alignment and cohesion, were going to be more than useful to determine how the people in the mob behave.

The three rules of the boids

The three rules of the boids: Separation, alignment and cohesion

Being the lazy programmer that I am … errr … I mean, the efficient programmer that I am, and trying to avoid reinventing the wheel, I set out to seek flocking algorithms implementations on Unity. Soon I came across this neat little set of scripts on the Unity Wiki: It was very simple to implement and the use of a centralized controller made it very efficient as well. It allowed to create a mob of several hundred boids at a very low performance cost. So I used this as the mobster’s behaviors’ foundation stone. Our early prototypes were all done using a modified version this algorithm.

And so everything was peace and quiet, months went by and the game grew until one day the algorithm was not enough. The game’s needs had changed and it was time to write a new super efficient yet flexible and versatile flocking algorithm … or search the web again. So I did the latter and this time met Unity Steer:


One of the older prototypes

One of the older prototypes

Unity Steer proved to be very flexible, you can add or remove different steering behaviour to get different results easily. It seemed just what we needed. But this came at a performance cost. My good old MacBook started to suffer when a couple hundred boids were added.

What I did then was a fiddle around for a while with the different behaviours, to see which combination worked best (and because it was fun to do so, wiiiii, flocking!!!) until I found something I liked and then merged the behaviours together. The next step was doing some more optimization, taking advantage of the mob’s specific characteristics, removing a little bit of this, merging some of that, profiling, adding a little bit of that, profiling again, checking imdb to settle some arguments about Willem Dafoe’s career, removing some more stuff and profiling once more. You know, the usual mob optimization process.

The Cubes are Back

The Cubes are Back


When it was all over, several hundred boids were moving smoothly around the computer’s screen, doing their boiddy things, aligned, separated yet cohesive. The boids were ready to be integrated into the game, to spark some life into those pixelated and angry Greeks. Pure beauty.


Read More

Googling Delphi

As Sebastian put it last week, we are developing Apollo’s level. Every level in Okhlos will be based around a Greek god.

Apollo is the god of order and perfection, so in the game he will have a little OCD. As the city is build up around him, we focused on making it look very neat, and that everything was in order.

First, we chose Delphi as the main city, because it had the greatest Apollo temple in all ancient Greece. The first misconception we had was thinking Delphi was an island (I think it was because the argonauts searched for the Delphi’s oracle in a fracking boat). So that made me do a few concepts of an island, that eventually, when I entered Wikipedia and found out, I discarded with a vicious anger.

The good thing, is that the new findings made me go to google maps and search how the city is right now. Amazingly, it is almost intact! We took the original layout of the city, and gave it a more harmonious and symmetrical design (because, you know, Apollo has OCD).


(Click in the picture to enlarge it!)

As you see, the city looks very inorganic, and that’s what we searched for. Future levels will have a more organic/city look. Each square represents a tile, which usually is the size of a little house. Also, there are three major elements: Apollo’s temple, the oracle’s tent, and the main city.



The temple will be the scenario where the confrontation with the god will take place. You will have to do some things in order to be able to defeat him.

(Click in the picture to enlarge it!)

This is the max version. As you can see, we try to keep the polycount very low. Not for performance reasons, but to achieve an overall look.

This is how it will look in the game:

(Click in the picture to enlarge it!)

As with other buildings, some of the decorations are sprites, while the main building is a mesh. Also, the bump mapping in the material works perfectly to make the pixel art in the texture more visible.

One of the puzzles to solve in order to defeat Apollo, involves some of the pillars that the user will find around the temple:

(Click in the picture to enlarge it!)


The tent will have some encounters with the guardians of the oracle, also, there will be some light puzzle solving around the tent.

(Click in the picture to enlarge it!)

Note that the tent’s texture is not final.

Also, you will see that there are some stakes, which again, revolve around solving something in this part.


Well, that’s pretty much what we where doing the last weeks. Programming wise, they were doing some other boring technical stuff, but I prefer not to ask what.

Read More

[Dev Blog] Fighting Apollo: Beauty, reason and OCD

After doing some research about Apollo we ended with the feeling that he was one of the good guys. He was the god of light, healing, truth, music, harmony. That is almost as good as it gets. But we had decided that our game was going to be about taking down the old gods. About humans (and some demi gods, and some other quasi humans, and some not some humans, and some chickens) breaking free from the tyranny of the whimsical and stagnant Olympians that would not let mankind grow. So it was our job to portray Apollo as the enemy. We could have had the mob simply destroy Apollo’s perfect world of poetry and beauty … and there will some of that … but instead we decided to focus on the darker side of the god. Sure, harmony sounds very nice and having some order is pretty useful but what if there is too much order?

With that in mind we set out to design the enemies that would populate the level. The first ones we though off were the ones we ended up calling the Rhythmic Adonis: beautiful, athletic giants that would move and strike down people following the music’s rhythm. They seemed to embody several of Apollo’s aspects (music, beauty, harmony) and looked perfect to serve as guards, patrolling the streets of the city. I always pictured them simply like really big men, dressed with togas and showing off muscles, but when Roque started sketching them, he had an amazing idea: make them out of clay. And by this I do not mean that we are going to star doing claymation (although that would be awesome … I’ll see if I can persuade Roque to start taking some pottery lessons), no the Adonis will still be made out of pixels but they will be portrayed as sort of automatons made out of clay. Shiny, beautiful, clay giants. I already love them.

Apollo, the Rhythmic Adonis, griffon and more


Next, were the griffins. They were one of the creatures associated with Apollo so we said: Let there be griffins! This time we thought not make out of clay (nor metal). Just a good old fashioned griffon. Who does not like a griffon? You? Then you are in luck, my friend, because you will have the chance to beat the hell out of those griffins in Okhlos. The griffins will try to snatch people from the mob and drag the away to turn them into griffin food. If you want to save them, you will have to chase them and give them a taste of mob fury before it is too late.


There are lots of other things in the level but I this is getting too long and I want to go back to the code, so I will just skip to good part, the boss battle. The mighty clash between the mob and Apollo himself. The ultimate struggle between order and chaos. And so on. This is the moment where the god of prophecy and poetry will show he is not such a nice guy after all. Besides being the god of medicine he is also the god of plague, so he will unleash his pestilent powers upon the mob. He may or may not throw cats at the mob (arrows for sure, but maybe, only maybe, just a tiny little cat once a while?). Apollo will also try to organize your mob a little bit … but in a very procrustean way so speak. A grim perspective for the angry Greeks of the mob for sure. However, there is something the player can use in his or her advantage, Apollo’s obsessive compulsive disorder. If something near his temple gets a little messy during the fight, he will go and tidy everything up before carrying on with the fighting. A great chance for the mob to strike with its mobly power.


And that is it for now. As I said, this just but a glimpse of how the first level in the game is going to be (or at least how it is right now in a pseudo prototipical form) and there will be more to come in the future. Until then … Power to the people!



Read More

A brief reflection on programmers and art

Poisonous cats are awesome.

In the first level, the god Apollo fires arrows to the mob. Right now, we are using cats as placeholder sprites for them, so it looks as if Apollo is throwing cats at you, like that crazy cat lady from The Simpsons, which is hilarious. Unfortunately, that will have to change because evil Roque wants to use proper arrow sprites.

This goes to show how important it is for programmers to NOT be in charge of the art, because if that were the case, all games would be about cubes or random sprites downloaded from internet. There are exceptions, of course: programmers that are great artists, or programmers that, independently of how “good” their art is, have a consistent style that goes well with the game. This is not our case, obviously, so be thankful that Roque is here. If it weren’t for him, the game would look like this:

But, no matter what, Apollo throwing cats at the player is still awesome.

Read More
content top