Hello friends and welcome once again to another Stealthy Dicey Devlog, the twelfth in a series of blog posts describing the development of Stealthy Dicey DX, the Metal Gear like humor game made with the constraints of the Gameboy color in mind. That means two buttons plus D-pad, start and select, sprites with only four colors including transparent and a game resolution of 160 pixels by 144. Sterning from a gamejam entry for GB Jam Stealthy Dicey DX is our attempt to make something commercial. When I posted Stealthy Dicey Dx’s developer log 11 out of 26 last week our team had found itself incapacitated and broken by life. Our producer had laryngitis. Our environmental artist? Carpal Tunnel and I had just gone through dental surgery. Indeed things were bad and I had found myself working on polishing some art as, with our programmer having abandoned the project once he learned he was to become a father to twins we had no playable build.
While originally we had decided that this would be a 22 week project. That is, around 6 months we now found ourselves in week 15 out of 22 with nothing but a couple sprites, animated by me, some tileart and nothing playable. A skeleton of sorts but nothing to make it move or interact. I had earlier in April made a playable minigame to try and show what the game could be but the truth was that the project seemed headed towards a slow death. How could it not? A team of 3, with no programmer? Games can look good, but if there is no one to put it together in Unity, our engine of choice for this project then what use is that.
That is to say that starting this week moral had hit an all time low. After all with everyone sick, two thirds through the project with nothing to show for it our deadline seemed unrealistic and the possibility of ever finishing the project even more so. I could claim that watching James Bond movies and designing some cover art in the style of old Flash cartoons (something I showcased in the last devlog) was progress. But with nothing to put it in was it really? No what we needed was a win. Something to show that we were still moving towards our goal. Even if 22 weeks seems unrealistic at this point.
So what was it that I did this week? Did I once again polish art , even though I had nowhere to put it? Or did I do something else? Did I move the project forward? Well, my friends. This week my contributions weren’t so much art related, because there was little I could do to advance that, but more prototype/programming related. I might not be the best programmer in the world, in fact my code is downright bad. But when it comes to game feel? I needed something to motivate my team.
THE PROTOTYPE
I had been wondering how to approach the idea of stealth for some time. Though I knew what professional commercial games did, raycasting where there’s basically a line that the guards throw towards the player for a certain range and if it connects the player is detected that all seemed way too mathematically complex for me. No, as a somewhat poor programmer my goal was to break it down to the simplest possible form. What did, and what does a stealth game have? Well of course it has states, the guard patroling, the guard turning, the guard standing, the guard suspicious, the guard looking another way so you can pass and it has detection. The guard detecting you when you’re within range. That was the simplest possible stealth mechanic I could possibly do. Right? If the guard is looking your way AND you’re within range they see you. It would be basic but it would work! At this early stage no need to actually have patrolling guards or to have raycasting or whatever for the player to be within range. No need to decide if guards can see through objects or to have someting that attracts guard to a location. No right need I just needed a simple check. Is the guard looking your way? If yes are you in range? Well then my friend. You were captured.
I had been using Merry Gear Solid, a metal gear solid fan game from the early 2000s as a potential inspiration for a bit. It’s a very short ame, no more than half an hour but it implements stealth mechanics simply and it was one of the first freeware stealth games I ever played. In one of the early floors/levels of the game the challenge is simple. There’s stationary guards, with different cycles, they don’t move but you have to get through a narrow corridor in front of them. By simply passing when they’re turning (as the game has no “noise you’re making” faeture to call their attention) you can cross the room.

Level from Merry Gear Solid. A very narrow corridor the player must pass, with guards turning either up or down in grooves on that corridor. The goal is for the player to pass as the guards are turned the opposite way.
Our producer, turned programmer had sworn that once she felt better she would start programming in C#, a language I know but don’t really like using all that much. But while I waited for her pills to end, and her laryngitis to get better I thought…why not build that prototype myself?
Before worrying about any turning, I simply wished to create a way for the player to be detected while in range. This involved a bit of math. The player had to be in view of the character. Popping gamemaker open I started work on it. Creating a variable named “range”, how far the enemy could see the player and then checking if player was within a certain range horizontally and vertically from the enemy. This made the “detection area” a square rather than a cone, like if I were using raycasting but it served as a basic prototype. This was the result.

Initial prototype I worked on. Player (a green) square) and two enemies (blue squares). Player can pass directly below the guards (blue squares) in front of them if far enough or by their side if far enough. However if they enter range the game immediately resets.
With that working fairly well my next goal was to implement turning. As stealth guards heavily rely on state machines and enums anyway, I created an enum. This was my full enemy guard code.
CREATE (it initialises with this variables)
enum stealth {
up,
down
}stealthstate = stealth.up
animate = 0
range = 45
counter = 150STEP (it runs every frame)
image_index = animate
if stealthstate == stealth.up and obj_player.y > y – range and obj_player.y < y and obj_player.x > x – range and obj_player.x < x + range
{room_restart()
}if stealthstate == stealth.down and obj_player.y < y + range and obj_player.y > y and obj_player.x > x – range and obj_player.x < x + range
{
room_restart()
}counter -= 1
if counter > – 30
{
stealthstate = stealth.down
animate = 1
}if counter < -30
{stealthstate = stealth.up
animate= 0
}if counter < -180
{
counter = 120
animate = 1
}
So what does this code do? First of all it creates a state machine, where guard is looking either UP or DOWN, which gets reset when counter reaches a certain value, changing the animation of the guard too to be looking up or down. If the guard is looking up, it checks a square area directly above them, to a certain range. If the guard is looking down, their sprite changes to one where they are looking down and they check the area in a square below them. It’s scruffy code that avoids the problem with raycasting, and it’s early days but it worked as a prototype.
I was ready to create the “Merry Gear Solid” like corridor. I created the entire room as a single flat image I used as a background, and created an object_hitbox, to be able to manually control where the player could and go not go, which I then made invisible. Still looking at it in the editor room looks kinda fun.

A 160 by 144 room with hitboxes visible in a bright magenta color. They were placed atop the palmtrees that form a narrow corridor so player can not go out of bounds. With them a visible magenta a narrow corridor is revealed. They are hidden and invisible during regular gameplay.
I could have made each palmtree an object and give it a hitbox this way, but this form of manual control allowed me to better create what I was looking for. The corridor is simple. A single indent with a guard on it. And the player can go left and right. Hitboxes prevent the player from leaving the world. Once I got the rotation of the guard working, messed about with range and timers to get a good game feel it was time to see if it worked…

Forced into a narrow corridor the player awaits the guard (blue square) to look up before crossing into the right. Trying to go back from the right to the left through the corridor the guard looks down, notices the player and the room is reset.
It worked! It was basic as a system but it worked! And while this was more code than art, as my other developer blogs were I won’t lie and say that this did not feel particularly good. My producer (now programmed) commented with me I had sort of been morphing into a more of a production role, keeping the team motivated and ready to work on this stuff. Having a very basic stealth prototype working though? That felt great.
And of course resetting the room immediately was harsh. there was no vision cone, nothing to indicate what the range was and when we moved onto Unity and raycasting the idea is to make the guards grow suspicious, not immediately detect you. But it was something. It worked!
The Good News
As our producer, turned programmer by necessity healed she decided to try and open up Unity and do something. Although she would claim her code to be inneficient and basic (it basically is an int of 1 to 3, casting a direct line of sight at 90 degree angles) having something playable in Unity felt exciting, even as we still limited ourselves to game rooms. Could we really achieve the 22 weeks goal? It seems unlikely at this point. And our producer, still somewhat sick felt limited by her ilness on what she could do, but for the first time since we lost our programmer a month back we had something else playable. How cool was that? Perhaps my friends? It was enough to say we’re back.
So this week on Stealthy Dicey DX I:
- Created a square of doom where the player gets caught if they’re seen
- Prototyped a very basic stealth system somewhat avoiding the tools and ways any other stealth system would use
- Saw and cheered our producer on as we got back on track
- Realised for the Artist, animator, character designer, producer lite etc…I did very little art this week.
Still it felt good to see progress. Hopefully there’s more next week!
