Ghost Lights
The video above is about a new debug tool added to Brigador Killers called “Ghost Lights”. The rest of this article repeats the content of the video in text form with some additional details.
A brief note about map making
Like in Brigador: Up-Armored Edition, the Brigador Killers engine uses a combination of global illumination and small destructible props called “minis” to light its levels. Global illumination is where we model the position of a “sun” inside the game, while minis are things like lamp posts, traffic lights, neon signs etc. When these minis are destroyed, the lights attached to them are also removed, as one might expect.
The levels are made in SJTiled - a fork of an open source program called Tiled - and it works like a WYSIWYG (What You See Is What You Get) editor. In other words, where you place a building prop or an NPC spawn in the editor corresponds to the same position inside the game when you load that map. SJTiled, however, cannot have the same lighting conditions as the game as can be seen at the 34 second mark.
Regardless, SJTiled is great at making levels. When we export a file from SJTiled, it creates a .json file for the game to read. This .json file tells the game what to load for that map and where. We demonstrate this in the footage by placing a blue barrel in the map, exporting the map, switching over to the game that is currently still running, and reloading the map with a developer command to show that same blue barrel in the game. Dave promptly kicks the barrel to show it’s not some sort of trick.
Although placing mini lights to illuminate a scene in the right way is still something we’ll do, constantly having to go back and forth between SJTiled to adjust the position of a lamp post, exporting the map, reloading the map over and over can become tedious.
What are ghost lights?
Ghost lights allow us to dynamically place lights anywhere in-game via the debug panel, instead of placing minis via SJTiled. They are neither props nor minis and can exist entirely on their own if needed.
In the footage we start by placing a simple electrical light via a sub menu in the Rendering control tab, which in its default state is a bright white sphere that initially has green, blue and red lines sticking out of it when selected. We then use the debug panel’s Data editor to change the width of its cone to create a small spotlight and give it a sodium lamp-like color.
After navigating back to the ghost lights sub menu, we change the direction of this spotlight via the X, Y and Z direction where X corresponds to the red axis, Y corresponds to the blue and Z corresponds to the green. This spotlight is then categorized by giving it the category name “spot” before it is duplicated to create a second light in the list.
This duplicate light uses the same data values as the first but we can change its position and direction independent of the original ghost light as seen at the 2:37 mark in the video. Also, since both lights are in the same category, this lets us bulk select and move them together as a group, so we move them over to spotlight the barrel that was placed via SJTiled earlier.
When we save our ghost lights via the “Save ghost lights for this map” button in this sub menu, this creates a “meta” .json file for that map specifically for the ghost lights. Once the lights have been saved, if we mess up the position, we can reload that meta file to reset their position.
Where things get interesting
The sneaky part comes at the four minute mark: ghost lights can be linked to a prop or mini. In the video we link our two ghost lights to the barrel, then have Dave destroy the barrel, at which point the ghost lights disappear just like when Dave kicked over the lampposts earlier.
We can also make the ghost lights flicker by checking the flickering checkbox in the ghost lights sub menu. Once enabled, we can choose from one of many preset patterns available in the Data editor depending on what sort of effect we want, be it something like a fluorescent light with a faulty capacitor, or the gentle whispering of candlelight.
Since Brigador Killers is more zoomed in than the first game, the player’s attention is much more likely to be drawn to environmental details, so it’s important that we have the capability to fine tune those things.
Get Brigador Killers
Brigador Killers
Isometric power fantasy
Status | In development |
Author | Stellar Jockeys |
Genre | Action, Shooter |
Tags | Cyberpunk, Dystopian, Isometric, Mechs, Music, Retro, Sci-fi, Singleplayer, Top-Down |
More posts
- Meet the Teddy Boy45 days ago
- Crash Test Dummies In Brigador Killers67 days ago
- Introducing: weapon pick up and drop and vehicle bays95 days ago
- The challenges of putting a McMansion in a video gameSep 30, 2024
- Brigador Killers Will Not Come To Steam In 2024Aug 29, 2024
- Dioramas and Color Look Up TablesJul 26, 2024
- Dystopian By DesignJun 28, 2024
- The Sun Never Sets On VoltaMay 31, 2024
- How the carmine suit is unlockedApr 24, 2024