content top

Shooting like an Amateur

This week we are going to take the opportunity to show you the dirty secrets behind some of the mob’s favorite enemies. We are going to make a little trip inside the minds of the Hosioi, the Shield Bearers and Phobos to tell you about a couple of little twitches we have used to improve their behavior.

It is much easier to make an AI with perfect accuracy than make it have a realistic chance to miss.  This is why I hate when robots and androids in movies miss their shots as if they were space cadets. Specially when shooting laser weapons, they don’t even have to compensate for wind speed, direction and things like that! Who makes these purposely faulty robots!? Do they do this to give the humans a fighting chance in case they rebel? Okey, that could be a good argument, because they end up revolting against living beings a lot… But I digress. The point is that is easier, more even so in the case of a simulation where you control all the environmental factors too.

A Hosioi hitting people with his fireball attacks

A lean, mean, fireballing machine

Back to Okhlos. Do you remember the Hosioi? Apollo’s acolytes that shoot fireballs? Well, the Hosioi’s first prototype had perfect accuracy, because they were put together very hastily. The code simply said, the target is at that point, shoot to that point. And since the fireballs were pretty fast there was little chance to avoid them. Our next step then was to make the Hosioi fallible. To do achieve this we did two things: first we added a little randomness to the shots. Not much, but just a chance that when the Hosioi shoots the fireball it comes a bit skew. The second thing we did was making the Hosioi track its target’s position with a little delay. This way the Hosioi will have less chances to hit a moving target but will be more accurate against still targets. And so, with two little changes Apollo’s acolytes went from relentless machines that never miss a shot to being fallible creatures just like you and me, having to aim their shots and sometimes experiencing the bitter feeling of wasting a perfectly good fireball.

A Hosioi missing a shot

Too fast for you, Mr. Hosioi!

 

Something quite similar happened with the Shield Bearers. You remember them, don’t you? From Sparta, big shields, not bears? Well, they don’t shoot anything (they trust their nasty shield bash to punish people) so the attack wasn’t the problem here. The problem here was their movement. Shield Bearers hide behind their towering shields, making the only way to beat them to attack them from their backs, and if they see the enemies are moving to flank them they will turn and face their shields towards them. So if they can follow the enemies’ movements accurately and respond immediately to them,  it becomes nearly impossible to hit them.

ShieldBearer

Yeah, you remember him!

We knew this from the start, so the Shield Bearers are one of the few characters in the game that have a “turning” animation. Everything happens so fast in the game, people are running from here to there all the time, that simply flipping or switching sprites is all that is needed most of the times, but in this case we wanted the Shield Bearer to take some time to turn around, hence the animation. But it wasn’t enough. It takes time to maneuver the mob so the few moments the animation gave you were not enough. This is when we turned to one of the tricks we had learned with the Hosioi, tracking the enemies position with a little delay. This way you may get enough to get them before they face you again, and the idea of these giants hiding behind their massive shields being a little slow makes perfect sense too.

 

The Shield Bearer making his signature turning move

Shield me up, Scotty!

 

Last comes the story of Phobos. Not long ago we decided that Phobos would move around by leaping from place to place, kind of in a hulk-esque way. He is a big guy, bulky and mean, so it is pretty cool to see him land next to you and take a swing with his mighty axe. But, as you may have guessed, not everything was perfect at first. Deciding where to jump was the issue here. The easiest thing to do was just get the mob’s position, either the center of the mob or the leader’s position, and jump there. But that didn’t feel good so we had to resort to some of our old tricks.

 

Look at him go!

White gods can’t jump

 

In this case we used randomness again. Adding some randomness to the jumping target position meant that sometimes Phobos would end up just ahead of the mob, seemingly anticipating the mob’s movements, or a little behind them, giving them a chance to escape or head back and engage. The result was something much more interesting than having him always jump into the middle of the mob and attack everyone there.

 

Is there are morale to this story? Of course there is, thousands of hours of watching pre-Seinfeld sitcoms taught me there is always a morale at the end. It may be that little changes can make a big difference. Or it can be that one of the keys to making an AI more real is to make it fallible. Or that random numbers are awesome. But there is definitely a morale in there somewhere.

Read More

Cameras, Pythagoras and faking it

A decision every game developer must face at one point or another is which camera angle to use in their game. Even in the case of 2D games, developers will have to choose between different perspectives (top-down,  side-scrolling, isometric, etc.), but this is particularly true for 3D games. Since Okhlos takes place in a 3D environment our case was not different. We started with the camera at a somewhat arbitrary position and rotation. Then, as time went by, we tried different angles and positions until we found something we liked. It wasn’t as easy as it may sound since we had two competing factors: on one hand we wanted you to be able to accurately see the mob and its immediate surrounding  as easily as possible, on the other hand we wanted to showcase the game’s art, the units, the enemies, buildings, the landscape etc. Gameplay wise the best perspective seemed to be top-down, clear and simple, but the top down perspective meant that you would be looking at roofs most of the time, and let’s not speak of how horribly incompatible it was with the billboard characters we had planned. The solution we found was the camera you can see in Okhlos’ current build: it lets you appreciate the art as well you give you a decent chance to spot those pesky Cyclops before they crush you.

 

A screenshot with the current camera position and rotation

Best camera ever

 

Happy ending, then? Not quite. There were a couple of issues. The first one was immediately evident. With the current camera perspective, people and enemies, could get blocked from the line of sight by buildings in front of them. It was a problem the top-down camera would have avoided but we now had to deal with. Luckily we were not the first ones to venture into the dangerous seas of isometric perspectives so we resorted to a solution many others have used in the past when faced with the same conundrum: making the objects that block the view transparent while there is something you need to see behind them.

 

A gif showing a building fading out when the leader goes behing it

Magic!

 

So now everything is settled and we can all move to happy land, no? Wrong again. Even though the view-blocking-buildings crisis was averted there was a new problem in the horizon. And this time, the problem at hand was not so evident. In fact we spent months without even noticing it. Throughout many version we played the game with the feeling that there was something odd about the way the mob moved, but not quite able to pinpoint which was the problem. Finally, during one playtesting session we came to the realization that the mob seemed to be moving more slowly when moving upwards or downwards than when moving to the sides. Once again this was due to the camera angle we had chosen. The mob did move in every direction at the same speed but the camera angle gave the illusion that it was the mob was moving at different speeds. Our solution here was to do something that would seem to be the problem in the first place, make the mob move at different speeds depending on the axis you are traversing.

So now, the mob and its leader now move 40% faster when they are going towards the bottom or the top the screen, than when they are moving to the sides. Why 40%? That’s when our good old and soon-to-be-in-the-mob Pythagoras comes to the rescue. The main camera in Okhlos is tilted 24°, and we know, thanks to Pythagoras, that by calculating the sine of that angle how much the view is distorted by the camera, and therefore how much we need to compensate. Hooray Pythagoras!

 

A screenshot showing the camera's angle and position in the editor

Here you can not only see the camera’s position, you can see the frustrum too! Delight in the wonders of the frustrum!

 

If we learned something from all this (and I hope we did), it was that dealing with the camera is an important issue. But we kind of knew that already. What we didn’t know was that sometimes the solution to a problem may be something completely counterintuitive. We ended up with a mob that moves at a one speed in an axis and at a different speed in another, which seemed to be the problem itself. However, it feels much better now, so this largely compensates the fact that you can traverse the levels faster by moving vertically (and by the way, now that know this, don’t exploit it!).

And so we come to the end of this week’s update.  This was not the last time we had to do something apparently counterintuitive to solve a problem, nor it was the only problem we had with the camera, but we will leave those stories for another time. Until next next week!

Read More

I’ve got a fever, and the only prescription is more heroes!

Did we ever mention how important heroes are in Okhlos? No? Are you sure? Well, they are. Very. So creating heroes has been a task that we have been working on from almost day one, and something we will probably keep on doing until the very last day of development (or at least beta). Here is an update on some of the latest ones we have developed. Enjoy!

 

BELLEROPHON

Now this is an old school hero. Before Heracles, before Perseus, before all these new kids on the block took the scene there was Bellerophon.

He started his journeys as an exile, seeking penance for a crime he had committed. He then proved to have the remarkable ability to make enemies in very high places, and as a result  he spent most of the time on seemingly impossible quests intended to kill him (sounds familiar, Heracles?). The most notable of these was the slaying the Chimera (the fire-breathing part-lion, part-snake, part-goat monster we have all come to love and fear), for which he got himself a flying steed, no other than Pegasus. Bellerophon’s fame and glory grew with each victory until eventually he thought he had earned the right to fly with Pegasus to the top of mount Olympus. Big mistake. The always nice and amicable Zeus politely disagreed and sent Bellerophon flying back to earth, blinding and crippling him in the process. Zeus also kept Pegasus because he fancied a flying horse, and  Bellerophon, disgraced and disfigured, spent his last days pitiful as a hermit, away from civilization.

What is Bellerophon’s part in Okhlos? Well, his tale was very interesting, and there were lots of elements from which we could create mechanics but in the end we focused on one aspect, the loner hero. Not only did he start as an exile and ended as a hermit, but at his prime he thought himself to be better than any other mortal, so we came up with a mechanic that plays around this. Bellerophon stats increase as the mob’s size decreases, and he gets weaker as the mob’s size increases. This makes him a very atypical hero, and the perfect choice for players who would like to try a run with a very small mob. Normally it would be close to suicide to face the gods will only a handful of people in the mob but heroes like Bellerophon make it possible. And perhaps this way Bellerophon will get his revenge on his old pal Zeus.

Sprite-wise, Bellerophon is the tallest unit so far. Roque wanted to transmit the idea of this larger than life hero, someone that looked like he could take on an army on himself, so his body was based on that of Sir Gregor Clegane, also known as The Mountain, from Game of Thrones. If you don’t know Gregor, his knickname should give you a hint about how he looks: massive, imposing, not that easy to find t-shirts that fit him nicely in most stores.

 

PANDORA

Pandora was another very interesting character. You probably all know her story, or at least some version of the story. Or perhaps not. All I knew before researching a little bit was there was a box involved, lots of evils coming out of it and some hope in the end. I didn’t know that according to the myth she was the first woman, created by Zeus to punish humanity for using fire to cook food and not starve to death (although that last part doesn’t surprise me at all, #ZEUSISADICK). There are also a lot of parallels between Pandora and Eve from the judeo-christian myth, but I think there is a story that bears even more resemblance to that of Pandora: the story of the Smurfette. Both were created by the villain, both were intended to harm the good guys, and in the end both were turned blond and became regular cast members. But I digress.

Back to Okhlos. While designing a mechanic for Pandora we went straight for the core of the myth: the box, or the jar, depending on the source. Let’s say container. We can all agree it was some kind of container. Probably not a Tupperware. Although it would have been a really good choice. You want to keep all those evils fresh. But I digress. Back to Pandora’s box. There aren’t that many containers in the game but we do have some: the item containers, the things you can destroy and find items inside. So we decided that having Pandora in mob would increase the chances of getting an item every time you destroy one these containers. However, her presence would mean that there would also be a small chance of a monster spawning from the container instead of an item. Pandora is one of those heroes that can be very useful but has a setback, which seemed to us was quite fitting with the myth, and also suits the concept of a Pandora’s Box.

 

ATALANTA

So far most of the heroes we have added to the game were men, and the few women that we did include either had a downside (like Pandora) or were not as heroic as their male counter parts. Partly this is simply  because most of the heroes in the myths are men, but we thought we could still find some cool, kickass heroines throughout the mythos and so we did. Atalanta is a perfect example of this. As baby she left to die in the wilderness by her father, King Iasus, but she managed to survive, growing up in the woods and becoming a superb huntress and fighter. She took part in the most epic quest of her time, the hunt of the Calydonean Boar, was the first to draw blood and got to keep the hide of the beast. No small feat, considering she was competing with pretty much every hero around (except Heracles who had already killed another boar so he didn’t bother). Robert Graves also puts her as one of the Argonauts, being once again part of a dream team of heroes and kicking serious ass. However, she is perhaps best well know for almost supernatural speed.

Atalanta was the fastest runner alive at the time, able to beat anyone in a foot race. So when her father the king (who after seeing that her daughter had slain the boar, beating all other heroes, decided to forget all that nonsense about leaving her to die in woods and take her back) told her she had to get married,  Atalanta, who wasn’t into that marriage thing,  said she would only marry the man that could beat in her in a race (and would kill any who failed, just to spice things up).  Many did die trying to beat her until the pesky gods once again interfered, Aphrodite this time, and one man Hippomenes was able to defeat and marry her. And then one of the gods, either Zeus, Rhea or Aphrodite herself, turned them both into lions. Because that’s what the gods do.

Anyway, Atalanta’s role in the mob was easy to figure out. She was a perfect fit for the stat boosting heroes. Who better than the fastest runner in the ancient Greece to improve the mob’s speed modifier? So if you get Atalanta, she will provide a huge bonus to the units’ speed, making everyone run faster. And also she will kill as many cyclops, centaurs and other Olympian spawns as she can while everybody is running around.

 

And that is all for now. We have been working on several other heroes these last weeks, but that we will leave them for another time. Until then, here is the updated hero count!

Read More

Making things the hard way

When you are working on a game, you get really good at it. You play it so many times, and you know each little detail so well, that in ends up posing almost no challenge to you. So when we started beating the game (or at least our small alpha build of the game) pretty much every time we played we didn’t pay much attention to it. It wasn’t until we started showing around the 0.3.0 version, and people started making comments about how easy it was, that we finally realized that Okhlos, at that moment at least,  was less challenging than pissing off Heracles (it’s really easy, he’s got a short fuse), and that we needed to make it harder.

And so we started our quest to make Okhlos the hardest game known to mankind … or at least a little bit harder. It had gotten so easy that we had forgotten what the “you lose” screen looked like. Literally. I thought we still had a drawing of one of the ogres crushing some citizens, but no, Roque had changed it months ago. And not only we had to make the game harder, we didn’t want to add or remove much from the game. We were about to send a new version to a lot of people and it was no time to start changing things that may cause more problems than they could solve, and we didn’t have much time either. So our goal was to make the game harder but only making small changes, preferably by just adjusting values.

What did we end up doing? Here is what:

More Enemies

Firs rule of fight club is … not this one. In fact, it didn’t take that many people to start the fight club. But it certainly got better once more people started joining the fight club so that’s the morale of the story. The more people (or monsters sent by the merciless Apollo) you have to fight against, not only it will be harder but it will be more fun, and this is why this was what we did first.

In Okhlos you encounter a random number of enemies in each level, but that number varies from a minimum value and a maximum value that we set, so by adjusting those values we made sure that the average trip through Delphi would be much more interesting. Also you might remember that one of the enemies you could find in this level were the Prophetai, those charming buggers that would assist the oracle in her duties and also summoned other monster to try to kill the mob. Well, there is a limit to the number of creatures the Prophetai can summon and we increased that limit. We increased it to infinity! Actually, no. Just from two to three. But that really makes a difference. Trust me. You will see.

Tougher Enemies

We now had the levels crawling with countless legions of Apollonian beasts, or at least a few more of them prowling around.  The next step was making them tougher. We didn’t want individual battles to take too long, specially now that that there were more enemies, so we didn’t increase the amount of hit point they have. We did increase how much damage they deal, though. An average citizen used to be able to withstand a couple of attacks from lovable fire-throwing Hosioi, but now only a battle hardened defender or a hero can survive one of their fireballs.

Finishing Moves are Harder to Perform

One of Okhlos’ best kept secrets is that the units can perform finishing moves. It’s a unwilling secret, actually. We would like players to know they can do this but are still having problems showing the players how this works. This may be the subject for an entire new post but the basics of it is that when an enemy is about 50% of its health, a little speech balloon will pop over one of the units attacking the enemy with a button or key in it. If you press that button or key, the unit will proceed to kill enemy right away. What does this has to do with the difficulty of the game? It used to be very easy to get the timing of this. The speech balloons would be displayed for several seconds, so you had plenty of time to finish off the enemies. Now you only have less than a second to do it. You gotta be fast.

Less Warriors

If you look at the screenshots from some of the previous versions you will notice that the mobs are mostly red. This was not because the mob was covered with the blood of its enemies, it was because it was comprised mostly of warriors, Spartan warriors with their red cloaks. Sure, they are cool and deadly, everybody wants warriors in their mob but too many of them was not only killing all the enemies, was killing the fun too. We reduced the number of warriors you find wandering around the level, so that if you want to have a lot of them you are going to have to work. It won’t be so simple now.

Weaker Warriors, Defenders and Philosophers

If you are thinking, “You have already reduced the number  of warriors and now you are making them weaker? Don’t you have any respect for anything!?”, then the answer is yes. If you were thinking something else, then the answer may or may not be yes. But the point is that warriors were dealing too much damage, and defenders were absorbing too much damaging, and philosophers were spreading too much philosophy. All of that was true (except for the philosophers part, they simply had too many hit points, their philosophy spreading ratio is ok). When we first created the warriors and the defenders we intentionally set them extremely high values of attack and defense respectively, so as to differentiate them easily. We always intended to someday adjust those values and that day was now.

More Bureaucrats

What would be of our lives without bureaucracy? Nirvana? A state of pure bliss? We may never know and neither will our poor old Greeks that now have almost twice as many bureaucrats going around the levels, looking for a mob to bureaucratize. We still have to work a little more on the bureaucrats’ behavior but even so, having people in your mob that take up space and, not only do they not attack, but they prevent others from being able to attack or use their special abilities is something very annoying.

Bombs Do Less Damage

This was pretty straightforward. In previous versions using a bomb would pretty much guarantee killing any enemy near it, except for the bosses. Now, using one bomb won’t kill your average enemy but it is still enough make a serious dent in their armors, or skin, or heads. And using two bombs in a row still guarantees a kill (except again, in the case of the bosses).

More Expensive Heroes

There was a time where you could buy a Heracles, two super philosophers, a Spartacus and still have enough change left for a Minos or a Rhadamanthus. Those days are gone. Purchasing a Pheidippides now, will not only cost you an arm and a leg, but lots of arms and lots of legs. Like we always said, heroes are a big part of the game, and having lots of heroes in your mob made a huge difference. The initial costs were particularly low so that we could get and test them easily (I should have made a cheat for that at the moment, but making them super cheap seemed like a faster solution) but now that we were planning on making the game as hard as it should be, it was time for inflation.

Apollo’s Creed

Granted, that title doesn’t make much sense but you can guess what we changed next, Delphi’s favorite obsessive-compulsive-despotic deity, Apollo. The truth is he wasn’t putting much of a fight. It was our fault. We had neglected old Apollo. He was way down, at the end of the level, and whenever we sat down to do some playtesting something else would draw away our attention before reaching him. Thus, he became weak. Laden with bugs and obsolete behaviors, the god of light had become but a shadow of himself. We had to make amends.

First we started by fixing some of the bugs that were crippling him. Then we moved on to cutting down his idle time, so that he would spend more time either moving or stomping the mob and less time waiting to get hit. And speaking of stomping the mob, all of his attacks are now stronger. Specially his arrows. Only a hero may survive a direct impact from one his arrows now, and if they are lucky. Finally we are still working on improving his special attack, the procusterization attack. It’s not ready yet, but it will soon be. And with all these changes now Apollo is back in business. Once again, he is a lean, mean, mob-crushing machine.

Mob Meter Adjustments

You probably know how the mob meter works. You add people to the mob or crush things and it goes up, you do nothing and it goes down. It is very simple but effective. The changes we made were also simple. It is now harder to make the meter go up and it goes down faster. It sounds almost trivial but it is one of the changes I liked the most. It feels very different. There is a sense of urgency now, and that forces you make each move more efficiently. You don’t have time to waste so you have to optimize the mob’s trajectory so that it can make the maximum damage in the least time possible. This change not only made the game harder, it made it more interesting.

 

And that’s about it. I may have forgotten about a thing or two but I think that were all the changes we made to make the game harder. Is it too hard now? Probably. Will we be fiddling with these things again? Definitely. We are still a long way from the final version, we have lots and lots of playtesting ahead, but it was certainly fun playing around with these values and seeing the impact they had on the game. Not only was it fun, but I think this was an exercise that allowed us to gain a better understanding of how the game works and get a better grip of the what goes on when the things have spent all this time working on come together, and we wanted to share this with you.

 

Read More

The sound of the mob

We have been on Okhlos for a while now, but there was something which we haven’t even started working on: sound and music.

Neither Roque nor, nor José Luis, nor I are musicians, nor very savvy with a mixing console. We can make the art, the code and maybe even some game ingame jokes but definitely not music. So our plan had always been to eventually get  some who can  (and that would make a good job at that), and until then use place holder sounds and music. I don’t think I need to tell you much about the placeholders if you had a chance to watch our first pseudo trailer (I think there is a special place saved for us in the tartarus for having made people listen to that music for minutes) or some of the let’s plays (go, Kenny G, go!).

We have been pondering over this subject for quite a while, listening to the work on many game musicians trying to find the right one. We also went back to our favorite games, paying attention their soundtrack and the work of their musicians. The quest went on for months, until finally we found the perfect person for the job. One musician to outmusic them all (and in the darkness bind them).

Meet A Shell in the Pit. Meet Gordon MCGladdery.

 

We approached Gordon at first as fans of his work with Tettix on Rogue Legacy, not entirely sure if he would be interested in working on Okhlos. To our upmost delight Gordon played a build of game and loved it, so soon afterwards we started talking about things we could do and about our plans for the game. He is very excited about the project, and we are excited that he is excited , so there is excitement galore!

 

And  as you can see Gordon has some really awesome ideas about the music of the game. Just yesterday he gave us a sneak peek of something he was working on, and it was better than Aquiles’ uppercut.

 

Read More
content top