Categories
Game Design Game Development Geek / Technical

Freshly Squeezed Progress Report: Scripts, Lighting, Fixes, and New Art

Last time, I reported that it was a lot easier to create the level layout for The Dungeon Under My House, my non-violent, first-person role-playing game and my second Freshly Squeezed Entertainment project.

I spent the last two weeks integrating a scripted scene, then fixing a few graphical issues that had been bothering me.

Sprints 2024-16 and 2024-17: Level editor and Lighting & Art

Planned and complete:

  • Create level editor
  • Defect: Flashlight should light up adjacent cells

Unplanned and incomplete:

  • Defect: Wall from cell behind player should not render on screen
  • Create dungeon wall textures

It didn’t take me long to finish the work of adding tags to the level editor. Basically, I can have sections of the dungeon arbitrarily tagged with a string, and I can use the trigger I created last time to make something happen when the party enters that tagged area.

Which allows me to have this scripted sequence when the party enters the new large room:

The Dungeon Under My House - entering the big room

And with that task done, the entirety of the work to support the intro sequence I had planned is functionally complete!

There are some areas that need more iteration, such as the part when you first discover the secret room in the basement, but the game now supports organic conversations, scripted conversations, scripts and flags, updating room art and objects based on player actions, items and inventory, interactive furniture in rooms, lighting and dynamic lighting thanks to a flashlight, a new heavy door with a minimum party size criteria to open it, and the ability to load levels from a file so that it is easier for me to create the titular dungeon.

So…now I just make the rest of the game, right?

Well, I wanted to fix a few issues that have been bothering me.

First, I wanted to make the flashlight feel better. My initial attempt had a single beam of light project out in front of the party, and it is functional, but in practice walking through an otherwise dark area felt like walking in a narrow hallway with black walls on either side.

The Dungeon Under My House - single beam of light from flashlight

It took a bit of math and then some debugging of my bad math, but eventually I got the flashlight beam to be joined on either side with a shorter, less bright set of beams.

The Dungeon Under My House - flashlight lighting is more spread out

It feels a lot less claustrophobic and helps the player to notice things off to the side when they are nearby but without revealing too much of the dungeon either.

With that part finished, another thing I needed to address was a problem with rendering the walls of the dungeon.

Normally, when you are walking around, you see part of the cell you are currently in, plus any walls it would have. But if you had a cell behind you that had a wall directly behind you, due to how the camera and raycasting was implemented to allow for part of your current cell to be seen, the wall behind you would get rendered, blocking the entire screen.

I didn’t address it when I first noticed this problem shortly after getting the raycasting code finished because I could always work around it: just don’t put two cells next to each other that are divided by walls.

The Dungeon Under My House - non-adjacent cells

But I decided that it was time to figure this out because I didn’t want to limit my level layouts due to a silly rendering bug.

After all, the reason why my game has arbitrary walls inside a cell is to allow for more flexibility than having a cell itself act as a wall as you might see in my raycasting tutorials. It seems silly to throw that flexibility out.

I could get into the math, but after spending days (or mere hours, if you remember that I don’t work full-time on this project) on trying to solve it with math and not getting too far without introducing other problems, I decided to fix it with a hack. I basically figure out which cell is behind the party, then when I check for walls to render, I ignore a wall if it was found in that cell.

It worked. I can now create levels that use up all of the cells instead of needing to remember to leave gaps in between.

Since I was spending so much time maneuvering through the dungeon and debugging what I was seeing, I decided to finally add new wall types. I now have not only stone walls but also dirt walls.

The Dungeon Under My House - dirt walls

I’m not an artist (or maybe it goes without saying), and I’m not entirely happy with it, but these walls will fill the dirt tunnels of the dungeon.

I expect to replace the original stone walls soon. Those were placeholder art based off of some art found on OpenGameArt.org and modified, and while they worked fine, I think I need to focus on getting a cohesive look for this game.

But I found myself thinking about the nature of the rooms and hallways that the player will be entering, and I will be creating and changing the wall, floor, and ceiling images to support it.

Thanks for reading!

Want to learn when I release The Dungeon Under My House, or about future Freshly Squeezed games I am creating? Sign up for the GBGames Curiosities newsletter, and download the full color Player’s Guides to my existing and future games for free!

One reply on “Freshly Squeezed Progress Report: Scripts, Lighting, Fixes, and New Art”

Comments are closed.