Okhlos is a game about an angry mob in ancient Greece. You will have to travel all around Greece and conform a very large group of angry people to fight armies, mythological creatures and even the gods themselves! Each stage will have its unique challenges based around the gods they worshipped there. You will have lots of fighting in Sparta, lots of thinking to do in Athens, and lots of partying when facing Dionysius. You get the idea. Also, each unit will have its unique set of skills, making the mob unique each time you play. There will be heroes, warriors, philosophers, slaves, and much more!

Report article RSS Feed Cameras, Pythagoras and faking it

About how we faced dire problems with the camera and we learned how to live with an isometric view, with Pythagoras help.

Posted by SebastianGioseffi on Aug 27th, 2014

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

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 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 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

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

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 the end of this week's update. This was not the last time we had to do something apparently counterintuitive to solve, nor it was the only problem we had with the camera, but we will leave those stories for another time. Until next next week!

Post comment Comments
TKAzA Staff
TKAzA Aug 27 2014, 11:21pm says:

Love to see this explained in the editor as you show the 2 movement examples, small changes that make a big difference.

+4 votes   reply to comment
CoffeePower Creator
CoffeePower Sep 3 2014, 12:50pm replied:

Maybe this can help!
Coffeepoweredmachine.com

+1 vote   reply to comment
gamedev12
gamedev12 Sep 2 2014, 11:29am says:

Can't wait for this to come out! I like the art style, how's it's a clear solid pixel. Will get as soon as it comes out!

+2 votes     reply to comment
CoffeePower Creator
CoffeePower Sep 3 2014, 12:25pm replied:

Thanks!!

+1 vote   reply to comment
Post a Comment
click to sign in

You are not logged in, your comment will be anonymous unless you join the community today (totally free - or sign in with your social account on the right) which we encourage all contributors to do.

2000 characters limit; HTML formatting and smileys are not supported - text only

Icon
Okhlos
Platforms
Windows, Mac, Linux
Engine
Unity
Contact
Send Message
Official Page
Coffeepoweredmachine.com
Release Date
TBD
Game Watch
Track this game
News
Browse
News
Report Abuse
Report article
Related Games
Okhlos
Okhlos Single Player Arcade
Related Engines
Unity
Unity Commercial Released May 30, 2005
Related Groups
Coffee Powered Machine
Coffee Powered Machine Developer with 3 members