Cameras & Motivation

Warning: this update is sorta long and technical, unless you’re very interested in the tiniest intricacies of game design, you might wanna skip this one. Thanks for reading!

Almost immediately after finishing the last update, I discovered demodag, which is a day, where developers come together and demo their latest prototypes and such. This would be the perfect place to show off Hackerman, so October 30th became my unofficial deadline for getting a demo together.


I had a lot of things in my project already, but they weren’t quite ready to be shown off yet. I started off by making my guards an actual threat by giving them weapons and the ability to open doors (yeah they couldn’t do that before…).

Adding the ability to walk through doors turned out to be relatively simple, but once I got to work on the guns, my perfectionism kicked in and suddenly I found myself making impact effects and bullet holes. Not the best use of time, when on a deadline, but at least it did made the game feel more clear.

Camera troubles

All self-respecting stealth games have CCTV cameras, because they are hella cool. It just makes sense, and in this game they play a major role. Obviously this game is about hacking, so just throwing a chaff grenade wouldn’t cut it. I made an entire program to handle inputs/outputs etc. You wont just avoid cameras, you’ll also use them to scope out levels before hand, spy on guards and more!

But no matter how many fancy ways I added to interact with the cameras, it didn’t solve the biggest issue of all. How they spot you. It might sound easy; is the player in view of camera? > you’ve been spotted, but unfortunately the most realistic option isn’t always the funnest one and this method felt extremely unfair.

I decided it’d be better if there was an actual visible cone representing the FOV of the camera, sorta like the map in MGS 1 (see below) but in full 3D!

At first I just made a giant 3D cone and put it on the camera, but since it was a solid object, it would go through thin walls/floors and although I could easily check if the player was actually in view, it’d be very confusing to see a bit of cone sticking out of a wall.

Solving the Cone Crisis

I would need a mesh, that could form around obstacles… This is not simple task, but I remembered an old example of FOV cones, doing almost the same thing:

I wanted essentially the same thing, but in 3D, so I did just that:

And thus all my camera issues were behind me! Hurray… wait no. It worked relatively well until I had a camera at higher elevation, but with a cone that still reaches the bottom part. Getting spotted by a slight sliver of cone by a camera in another part of the level felt very unfair.

But before we get to how I solved this issue (uh cliffhanger), we have to make a quick stop for the:


Making any big project comes with a lot of unforeseen issues and artistic issues are always fluffy and hard to define, which makes them prime fodder for existential crises.

Okay obviously I’m using “Existential Crisis” loosely, I’m not actually questioning my existence, but I did question the existence of my game.

What’s the point? Does it even make sense? Why am I making it?

This “crisis” came, when I had finish all the functionality for the game and tried to make a level. This is the worst part of the game development process for me, because I’m pretty bad at level design.

How do I put all these things together in a meaningful way? And how do I do it in a way, that incorporates the hacking system? Oh man, what have I gotten myself into…

I tried to write everything down again, to get a grasp of what my game even was, but it was really hard to see how things would fit together.

I also found out I couldn’t go to demodag, because of work, which sucked, since that was what I had been working towards this whole time. I was pretty demotivated, so I ended up not working for a day, which turned into a week. At first it was shitty, because I felt I wasn’t doing enough, but I think I really needed that break. I’ve been working almost every single day for the past 3 months (sometimes only an hour or two but still).

Back at it again

Anyway, when I finally did return to working, it went surprisingly well. I did a quick greybox level and posted about my camera troubles in a gamedev-group.

Quick greybox-level for testing out gameplay

They gave me lots of good answers and the final solution was to shorten the length of the cone and having it fade out. I also added a timer, so you’d have to actually be inside the cone for more than 1 frame to get spotted. This means that if you accidentally touch the very edge for a split second, you wont then be immediately detected.

All these answers gave me a nice clean and fair solution. The only issue is that you might still be visible in the camera, without getting detected, but you’ll experience that same phenomenon in any game with AI guards anyway, since their sight has a max range. As for the visuals I can just switch off the player layer until detected.


I’m entering a new stage of development, where it’s not so much about coding features, but more about figuring out the design and making things work well together. Personally I find this stage way harder, but I’m determined to stick with it.

I also got a new batch of motivation, when I posted my camera-question, because one guy got really hyped and messaged me a bunch of tips and told me, that my game was gonna be awesome. I guess I got my first fan!

Let’s fucking do this,
-Hjalte Tagmose (@hjaltetagmose)
Indie Game Developer, Real Fast

Next Post

Previous Post

Leave a Reply

© 2019

Theme by Anders Norén