Commandos Games Style - Top-down stealth prototype in Godot 4 – navigation, guard vision, interactions and camera system [Full Source Code on GitHub]

Hi everyone,

I’m currently working on a top-down stealth game prototype in Godot 4.

This is a personal project that I’m building from scratch, mainly to experiment with reusable gameplay systems, navigation, interaction mechanics, NPC behavior, and stealth-related systems.

Current features include:

  • Click-to-move player navigation
  • Improved movement and stuck recovery
  • Navigation-aware doors and detour handling
  • Object interaction system
  • Guard field-of-view visualization
  • Obstacle-based vision occlusion
  • Standing / crouching visibility classification
  • Basic NPC physics and interaction
  • Camera rotation, vertical tilt and zoom
  • Hover highlighting and contextual cursors
  • Localization and basic UI systems

The guard vision system has been the main focus recently. The visible FOV is generated on the environment surfaces and takes world geometry into account, including walls, ramps and other obstacles.

There are currently some debug rays between guards and the player that I intentionally left enabled while testing the vision system.

The project is still in an early prototype stage, so the visuals and assets are not final. Right now I’m mainly focusing on gameplay systems and architecture.

Source code:

I’d really appreciate feedback, especially on:

  • Guard vision behavior
  • Navigation and movement
  • Detour handling
  • Camera controls
  • Overall project structure

Thanks!

2 Likes

I’m adding a short video here to show you what has been done so far

2 Likes

Looks like there is a lot to it already. The video certainly shows some capability.

Can you speak a little more about your high level goals and how you are approaching them? For e.g. when you say “clean architecture”, what exactly are the goals around this, and how is it reflected in your approach?

Similarly, with the reusable systems, what / how are you hoping to reuse them? Are you going to make multiple games, or …?

1 Like

Thanks! I’ve always been a big fan of games in the Commandos style, and that’s really the kind of game I’m aiming for here: a small top-down tactical stealth game where movement, visibility, guard behavior, interactions and planning are the main focus. I should also mention that this is my first time working with Godot, so I’m sure I haven’t done everything the “right” way, but I’ve been doing my best and learning as I go.

I’m also using the project as a way to learn how to structure a game so it can grow without turning into a pile of tightly coupled scripts.

When I say “clean architecture”, I mostly mean keeping responsibilities reasonably separated, avoiding unnecessary dependencies, and trying not to hard-code one system around one specific level or object. I’m not trying to build some huge abstract framework, though — I actually want to avoid over-engineering as much as possible.

A good example of what I mean by reusable systems is the door system. A single door scene, with its own script, can support open, closed and locked states, use different textures, and then be instanced many times throughout a level. Each door keeps its own state and behavior, so opening or locking one doesn’t affect the others. That’s the kind of reuse I’m aiming for: build the behavior once, then use the same scene in different places with different configuration.

The same general idea applies to interactions, cursor states, dialogs, movement states, and eventually the guard AI.

I’m also trying to keep input handling centralized through Godot’s InputMap, instead of having hard-coded keys scattered through different scripts. That should make things easier to maintain and eventually makes key remapping much simpler too.

For reuse, I mainly mean reuse within this game — across different levels, doors, guards and interactions. I’m not really trying to make a general-purpose framework for several unrelated games. If some systems are useful in another project later, that’s a nice bonus, but it’s not the main goal.

I’m also trying to only generalize things when I actually have a reason to. I’d rather have something simple and understandable than create a complicated abstraction just because it might be useful someday.

The guard AI will probably be the next big test of this approach. I’m planning states like idle, patrol, suspicious, investigate, chase and search, while trying to keep perception, navigation and decision-making separated enough that they can be extended without rewriting everything.

So I guess the short version is: I want to make a Commandos-style stealth game, but I also want the project to stay easy to extend. If I add another level, door, guard or interaction, ideally I should be able to reuse what’s already there instead of copying code or creating special-case logic every time.

1 Like

I’ve also finished the first pass of the HUD. It now has the player portrait and health, action slots with dynamic shortcuts/counts, and the map/log area on the right. I’ve tried to keep the UI modular as well, so I can add or change actions later without having to rebuild the whole HUD.

1 Like

HUD looks good. I like the semi-rounded motif.

1 Like

Thanks! Yeah, the semi-rounded look is actually done with a very simple shader. It just lets me control which lower corner is rounded, so I can mirror the same style between the portrait and the map area.

If you want, you can grab it from the GitHub repo here:
data/shaders/hud.gdshader

Feel free to use or modify it in your own projects.

1 Like

Progress Update – Key Remapping and Tactical Map Completed

Hi everyone,

It has been a while since my last progress update, and two fairly large systems are now complete in my top-down tactical stealth project: the key remapping system and the tactical map.

The key mapping system is now fully integrated into the game settings. It supports keyboard and mouse bindings, detects binding conflicts, allows resetting controls to their defaults, saves custom bindings between sessions, and can be accessed from both the main menu and the pause menu.

HUD shortcut labels also update immediately when a binding changes.

After that, I moved on to the tactical map, which turned out to be a much larger task than I initially expected.

Instead of creating a separate simplified version of the level, the map uses another Camera3D to render the actual game world from above. A shader is then applied to give the result a more stylized paper-map appearance.

The current tactical map includes:

  • Resizable map panel
  • Independent map zoom
  • Live synchronization with the main camera position and rotation
  • Smooth main-camera movement by clicking a location on the map
  • A frame showing the main camera’s visible area
  • Directional markers for the player and NPCs
  • Markers for doors and other gameplay objects
  • Scene-based marker definitions, so each object can define its own map appearance
  • A shared game color palette for consistent marker and gameplay colors
  • Filtering of character meshes, vision cones, movement paths, debug visuals, and other elements that should not appear on the map
  • Persistent map panel size
  • Proper interaction with the HUD, pause menu, custom cursor, and camera controls
  • Localized HUD text and tooltips

One design decision I made is that guards are visible on the tactical map from the beginning. I want the map to work as a tactical planning tool rather than as a fog-of-war or discovery system.

I am intentionally leaving AI-state-dependent marker behavior for later. Once knockout, death, body carrying/hiding, alert states, and the guard AI are implemented, the markers can react to those states as well. For example, an unconscious or dead guard may eventually use a different color or even a different marker shape.

At this point I consider the first version of the tactical map complete, so I can finally move on to the next gameplay systems.

I’m still learning Godot while building this project, so feedback and suggestions are always welcome.