Echolite - Update #11 - Proper Lighting, New World Elements
Table of contents
No headings in the article.
This devlog will certainly be one to remember! With the larger goal of revamping the entire world generation of Echolite in the next devlog, we get to tackle the initial work that sets the entire tone of exploration. Let’s do this!
Back in the 4th devlog, some custom lighting was created that could be placed over the larger base camp and Sparkshroom tiles. The idea here was to have a flexible lighting solution that I could apply on different objects that would impact the player’s energy level. For a time, this feature worked well with the limited testing done. With some random tilemap placement however, I found that overlapping light sources did not behave as intended.
This was one of those cases where the design did not cleanly adjust to future changes. Essentially, I assumed that the player’s energy levels would be tied to entering and exiting the area bounds of every light source. It was a simple boolean toggle that would allow the energy bar to either increase or decrease. The overlapping light regions that could potentially generate in the future though would toggle too many times and quickly reverse the behavior. When the player exited a light source, suddenly their energy level would increase and now the game was in a parallel realm where light needed to be avoided. While that could be a cool concept, it is definitely not what this game is built on.
It took me a while to realize what was happening until I recalled similar occurrences in real life. For rooms that have 2 or more light switches, all of them are simply a toggle for the lights. Let’s say that a room is unlit, and we have one light switch near the door and another one against the back wall. I flip the door switch up to light the room and then walk to the back of the room and flick the switch to turn the lights off again. When I return to the door switch and wish to turn the lights back on, now the switch behaves inversely. The door switch has to be flipped down to perform the same lighting action for the room.
If you are doing some face palms right now, I would not blame you! It is one of those things that we all know but hardly ever think about too closely. As indie game developers, we are inspired by real life events to create our games. I think a similar approach can be used for troubleshooting and testing our games as well.
With that, the custom lighting scene was redone to account for this oversight. My solution was to use an array that would contain all of the lighting sources that the player is currently standing in. Whenever they enter or exit any light area, this array is simply updated to either add or remove a listed lighting source. From there, the logic for affecting the energy level of the player is applied only to the individual array. Now, the player has to be removed from all lighting sources in order for the energy level to start dropping.
Oh, and it gets even better! With every lighting source being tracked, this opens up the possibility of energy levels changing at different rates based on how the player interacts with the world. Plus, this fixed some visual issues with the energy bar (which was caused by inconsistent lighting logic from before).
New World Elements
The world of Echolite is supposed to be barren and desolate. On paper, this is a fun aesthetic to work with since the element of the blank and unknown naturally creates a bond with the NPCs in order to not feel lonely. In game though, this means an uninteresting world to explore. If the most detailed area is the main base camp of the nomads, then the player will quickly lose interest in the world around them.
This is where creativity gets to run wild! The plan is to have the world designed in “rings,” so each ring should feel connected but also varied. Here is how we can achieve that visually:
- Add “pools” such as water the player has to navigate around
- Add rock formations that initially serve as obstacles
- New resource tiles
Given that we will have three rings that center around the base camp, the “liquid tiles” will need to form in patches. If we left water as a single tile, then it would not feel different from all of the other nearby resource tiles. To achieve a patch look then, we need to construct an autotile map where the edges of the path will neatly fit together.
I highly recommend the following resource from KidsCanCode that shows how to arrange tilemaps so that all of the possible borders are accounted for: https://kidscancode.org/godot_recipes/2d/autotile_intro/
With this example, I first started with the general outline using the same color palette as the other basic tiles. The general approach was to maintain a distance of 1-4 pixels from the edge of a tile to form the border. Then, instead of straight lines, I moved up and down and placed 1-4 pixels in a line before switching rows again. This helped make the terrain appear more varied and natural without overthinking the design. Here is the initial frame:
The more I do my own artwork, the more encouraged I feel to take risks with the design. This is why I added a lined look around the border to add a slight bit of depth. I also figured that once the tiles are placed in-game, this unique pattern will stand out next to the player under their own light source. The other tiles will have even more elaborate designs!
On a separate layer, I drafted out the look of the actual water. This involved working through one color at a time and filling in the gaps as necessary. I tried to create patterns in what colors followed one another without being too repetitive. Once I had a single tile drafted out, I duplicated it to form a larger sheet and then layered the bordering on top. Ta-da!
Water does not always remain still however, in which I created multiple frames. This was simply achieved by moving the underlying layer of water back and forth in a diagonal fashion. By slowing the movement down, this effect looks quite relaxing.
In terms of seeing this animation plus the other liquid tiles, I will save those for a later reveal - onto the next visual!
This part was perhaps my favorite artistic challenge yet! In sticking with the same 5 colors as the basic tiles, I wanted to find a way to create several different rock formations that could be scattered around the world. Since the colors remain the same, the actual shaping of each rock needed to be unique in some way.
Here is the very first rock formation I designed:
The design approach was fairly standard. I used a single color to form a shape (random blobs essentially). Then, the other colors were added as shading to help add depth. With new found confidence in this first design, I went wild with many more designs!
This leads me to a brief discussion on the use of both these rock formations and the liquid tiles. While they do not serve a functional purpose yet, my plan for them is to use them as additional resource points in the later stages of the game. Let’s say that the player has traveled far enough to reach the second ring. With the new materials they have collected, now they can build a special machine that collects from the water or rocks. This gives additional gameplay value to the initial area of the world and helps make the player’s progress feel even more important. It’s a light teaser, but also a good reminder that I aim to make every addition to the game multi-purposed so that the world feels more complex and engaging.
New Resource Tiles
So far, we have only seen the first three resource tiles of the game which all exist in the “first ring.” Now, we get an exclusive look at some of the other resource tiles! If you recall back to the 2nd devlog, we had a discussion about the “types” of resource tiles we wanted. Essentially, there should be some variety between the more stoney/shiny elements and the general vegetation/life. The idea here is that anything can be considered a resource in this world.
Here is the result!
While these are always subject to changes, I think they do an excellent job of capturing the vibe of each ring. With the world generation, many of these resource tiles will have animations of particle effects to make them stand out further. The more motion we can add into the world outside of the player, the more the player will want to explore.
Usually this section is more of a surprise, but given the 50+ mentions of the upcoming world generation, I bet you can guess what is coming next! I will say that the game is coming together more and more everyday. With several references to past devlogs and changes to existing systems, the game is slowly transitioning from the “core features” phase into the “add new side systems and content.”
While it will be quite a bit longer until any sort of alpha stage is reached, this time is just as valuable for gathering critical early feedback. Definitely let me know what you think either in the comments below or through any of the other social platforms (socials tab)
Thank you as always for your support!