Echolite - Update #4 - Interactions, Lighting

Echolite - Update #4 - Interactions, Lighting

Play this article

Table of contents

No heading

No headings in the article.

We have a real special devlog today! For a game all about interacting with the world and working with light mechanics, the lack of lighting and GUI popups currently seems like quite the oversight. No longer though! Also, thank you again for all the incredible support lately <3


Interactions

With the last devlog update, we saw the development of a small base camp made up of several tents. Given the player will want to talk to the people inside these tents, they need a way of walking up and triggering movement inside.

The idea here is to add a triggering Area2D outside each tent region that instantly teleports the player to a separate part of the map. Ideally, the player will move to separate saved scenes to cut down on hard-coded positions, but for now it will suffice for implementing interactions.

image.png

With this region established, we can move forward with a “popup” that will alert the player they have reached an interact-able point. Using Buch's incredible Golden UI assets to stay consistent with previous GUI elements, we are able to draft up the following panel:

image.png

After adding this new asset into the project, I made some fairly flexible functions where you can pass desired text or actions to the panel alongside triggering it. The movement is achieved through the use of Tweens, which allow you to change any property over a given period of time. Here’s the result!

via GIPHY

This view isn’t exciting though, so we can hop back to Aseprite for some basic “interior tent” elements. This will give a general location for Litebot to enter outside of the main world.

image.png

Most of these are recolored assets, provided by the amazing GIF. This particular set of assets can be found here. The thought process was to use established assets for the starting furniture in the base camp so that it feels really cohesive. In the future, the player will be able to craft and place their own furniture, in which those will be custom-made assets in Aseprite.


Lighting

This stage of lighting will focus on the general look and feel, while future implementations will add the related “energy” code to make the mechanic run. For the look, I leverage a basic light map along with a Light2D node, resulting in the following structure in editor:

image.png

At this point, I sort of had two directions. I could either make the light “cut” into the dark parts of the map or have everything lit and use the darkness to “cut” into that. With the premise of “echoing” the light, the first option seems more fitting. In editor, this means setting up a CanvasModulate node to be pitch-black, and then adding in the Light2D node with “sub” configured to break through the canvas.

image.png

This also means we can apply the lighting to the player to give small visibility starting out. This light should match the other lighting and only be seen as a separate lighting source once moving past the base camp. Here is that effect in action:

via GIPHY

One side item I want to attempt with lighting is a “flickering” effect around the Sparkshroom resource tile. They are intended to provide early-game lighting options, and with a natural glow it will add some much needed ambience against the pitch-black darkness. It will also encourage players to explore further, potentially creating a style of play where the player “hops” between Sparkshroom tiles to survive longer.

This is achieved by setting up a boolean value on the custom DetectLight scene that, if set to true, then the light will maintain a flickering effect. Interestingly, I decided to tie this flickering effect to the generation of the world (to be expanded once I focus on world generation a bit later). For now, this helps create a more sporadic effect that makes the place feel “alive.”

via GIPHY


What’s Next?

The next update will lean heavily into the technical side of development, as we will be setting up an inventory, hotbar, item collection, AND crafting system. If it sounds ambitious, you would be right! It is a core part of the game though, and certainly needs to be built if further progress is to be made.

With that, thank you again for reading! Feel free to share your thoughts below - I love hearing what you all think about the direction of this game :)