Devlog #4 | Lights and Menus
Dynamic Menus
The menu system has been overhauled to be fully dynamic. It adapts to the available options and primarily server as a navigation tool for development rooms, where I test new mechanics and features.

New Development Room: Lighting
One of these new rooms focuses on lighting and is essentially a copy of the dungeon generator.
However, it now includes a fully functional lighting system to test and refine interactions.

Lighting System Overview
The new lighting system allows for:
- A light on the player character, providing constant illumination.
- Magical lights (up to 4) that the player can place by clicking anywhere on the map.
Magical Light Mechanics:
- Duration: Light remains active for 15 seconds (currently adjustable).
- Enemy Repulsion: Enemies are repelled while the light is active.
- Limits: Players can place up to 4 lights simultaneously. When max reached, user has to wait to a light disappearance until another can be placed. This mechanic adds a strategic layer to game-play, as players must decide where and when to place lights to maintain control over the environment.
Technical Implementation
The lighting system is inspired by GrizzliusMaximus’s 2020 post and shares similarities with Mike Daily’s Real-Time 2D Lighting but includes several optimizations for efficiency.
Shader-Based Lighting
The system heavily relies on shaders to shift shadow calculations from the CPU to the GPU, improving performance and reducing lag. Here’s a breakdown of how it works:
- Vertex Shader:
- Calculates light positioning and size.
- Positions vertices dynamically for shadows.
- Fragment Shader:
- Renders the light with intensity decreasing as distance increases.
- Optimized for scalable light sizes.
- Z-Buffer Optimizations
- Shadows are rendered on a different Z-plane than lights, ensuring accurate depth handling without texture swapping.
This approach allows all lights and shadows to be drawn on a single surface, significantly reducing texture swap overhead.

Get Shadows and Sorcery
Shadows and Sorcery
Explora un reino divino en constante cambio en este RPG 3D donde cada batalla pone a prueba tu alma
| Status | In development |
| Author | iMayiVT |
| Genre | Adventure, Action, Role Playing |
| Tags | 3D, Action RPG, Boss battle, Procedural Generation, Roguelike, Singleplayer |
| Accessibility | Subtitles, Interactive tutorial |
More posts
- Devlog #7 – Shadows and Sorcery: Production ReleaseMar 11, 2025
- Devlog #6 | Dialogues Overhaul and Demo ReleaseJan 28, 2025
- Devlog #5 | Magic and AI UpdatesJan 21, 2025
- Devlog #3 | Reworking the Dungeon SystemJan 21, 2025
- Devlog #2 | Random Seeded DungeonJan 21, 2025
- Devlog #1 | Discovering What I'm Able to Do with GMS2Jan 21, 2025
Leave a comment
Log in with itch.io to leave a comment.