posted in Projects Of Some Degree Of Interest

I've decided to change the frequency of these updates: most of the times, I just do some minor updates and graphical tweaks here and there. Therefore, if I do these updates weekly, then I'll have a lot more content to write about.

So, yeah...

Last week, I've been working on adding many different types of rooms in the level.

You may or may not know that I use BPS trees to generate a level, and previously, only 5 types of rooms spawned in a level: starting rooms, ending rooms, normal rooms, tunnel rooms and Malls.

It was very static and not flexible, so I've changed it to make it more dynamic.

Malls Variations

First, I've added two different variations for Malls: Blood Malls and Clothes Malls.

These were originally planned and already built.

Big Malls

These are your typical type of Malls. You can find everything here.

This is where, for example, you'll find hearts, keys and/or bombs.

They were already in the game, but now they're more specialized (or generalized in this case)

Blood Malls

The Blood Malls specialized in bloody activities. (meaning that you'll mostly find a selection of weapons here)

Clothes Malls

The Clothes Malls are specialized in clothes, which in our case are actually pieces of equipment the player can have

New Rooms

Aside from these new type of malls, I've also added 3 new types of rooms.

These rooms, however, are guarded by a locked door: the player must use a key to enter.

In order to unlock a locked door, the player just needs to touch it.

If the player has enough keys, then a key is used and the locked door disappears.

There's also an event that triggers that can do things when the player unlocks the door (like revealing hidden models and what not)

The Gym

The gym is a room resembling some of these outside gyms you can see in some places.

The player can use up to tree gym equipment to get a permanent stats bonus to a randomly selected stat.

The prices of usages of these gym equipment doubles after each use. (i.e. if using one piece is 10$, then after buying it the others will cost 20$ and so on)

I've planned that NPC would use non-interactive gym workstations for decoration, but it's not really important as of right now...

The Bank

The bank is not fully functional at the moment, but it still spawns.

The idea is to give the player a way to store money persistently throughout runs.

The player can then withdraw money (with a certain transaction fee) from that bank.

That means that you can effectively get previously deposited money back when you'll need it the most.

The Landfill

The landfill gives you the opportunity to gain back previously thrown away pieces of equipment.

Basically, the game stores the last three thrown away pieces of equipment.

When the rooms spawn, it simply displays you those pieces of equipment. you can then pick them up for free.

This, however, comes with a caveat: pieces of equipment that will be switched from a previously thrown away pieces of equipment won't reappear in another landfill.

Also, once the landfill despawns, the items in that landfill will be discarded. (Think of it as a last chance opportunity)

There aren't any props at the moment, but it's fully functional.

Minor Tweaks

Aside from that, there are also some minor tweaks:

Bombs now damage the player if the latter is within its blast radius;

Player jumps are now more precise: letting go of the jump button early makes a smaller jump than if it was held down longer;

Ground detection (that was previously done with raycasting) now uses Unity's CharacterController.isGrounded property;

When the player is hurt, a knockback is applied to him; The strength of said knockback is actually the total amount of damage the player took.

Coins and money items now emit particles to help the player localize those important items;



They're now keys (left) and bombs (right) counters in the HUD;

The key one still needs a specific icon, but it's fully functional;

There were many shader optimizations and adjustments: Many shaders were merged together and are now sharing most code; I've also changed the shaders so that we can use GPU instancing for most props, I also now use MaterialPropertyBlock for things like wetness; Also, now the palette texture and its palette index are now global variables, this effectively means that I only need to set these values once and everything else follows;

A small "Sales" sign is placed in front of most types of malls. This sign has a random orientation and position each time it's spawned. ;



Props that obstruct a passage are removed from the room; This way no prop can obstruct the room so that the player cannot exit it.

Some rooms now spawn ferns instead of palm trees;

Lianas also have different configurations based on which prop spawns.



Next week

Over the next week, I've planned to integrate the first relic. Relics are items that give the player capacities and stats boosts. It's common to have something similar in most roguelite and roguelike games.

That type of thing needs to have a good abstraction in order to work: there are many different types of capacities that affect the player in radically different ways.

There's a lot of work ahead. But I'm confident it'll be easy. Just need to get in the groove.