Lots of progress this week, including a new video preview! As you can see, level 2 is functional, just missing textures, NPCs, enemies and bosses. Read below for a level summary.
It took some trial and error, but props rotate perfectly now. Every time the player enters or leaves the maze, the center prop and the outside prop copy each other, depending on whether the player is going in or out. But when they walk into another room inside the maze, that's when the magic happens.
Regardless of which side room the player is walking into, the props are always rotated so that they're actually walking back into the center room, always from the same angle, which makes calculations really simple. However, there are a few problems:
The lighting is at a constant angle throughout the level, which reveals the trick when the player and the camera suddenly rotate when teleported around.
Apple trees are generated randomly, so whenever the player leaves the maze through its entrance, they can see the apples suddenly shift their position.
If the player rams through the maze, their trail goes absolutely insane, as it's trying to follow a character that is teleporting around.
I tried both making the lighting vertical when entering the maze or using local lights. Both work well, perhaps the former is more computationally efficient, but the later looks nicer, so I kept that one.
The apple trees now clone the entrance instance whenever the player enters the maze, and the ramming trail teleports along with the player. It was super easy, barely an inconvenience.
I noticed that the maze algorithm ensures that the first room is always easy to find, but the prop in the first room is different in every randomized sequence. That means that you can still get a little lost, unless you pay attention. I could fix it, but I think it's funnier if I let careless players get lost.
Now I have to use fog to hide the teleportation effect. Creating it with proximity fade is serviceable, but I simply had to use the depth buffer because it's the coolest technique ever. My shader is basically this:
fog depth = (depth buffer - fog radius) / fog thickness
visual fog = fog visibility x (fog depth + fog spookiness² x fog visibility)²
It took 10 hours of tweaking with the parameters, but now the fog hides the rooms that don't exist but shows the ones that do.
The first preview of Vecino Forest is complete, see the video above.
The level starts with a brief introduction to the ramming and climbing mechanics. In the next room, the player will meet their first ally, who enables the checkpoints mechanic. The bridge, which will get cut by an enemy imp if the player tries to cross it, teaches that dying is okay. Pushing blocks and ramming jumps are also introduced.
The next room will contain a big battle between demons and jackalopes. The player must defeat all demons, while they cut bridges to hinder their progress and jackalopes help the player by creating new paths.
After another battle room, the player will find the non-euclidean grove, a geometrically impossible maze that can't be crossed unless the player knows the right sequence of rooms - which is taught in a different level. If the player can't cross the grove, they'll have to fight a demon general in the next room.
If the player can can get through the maze, they'll meet a new ally and face an alternative boss. The bridge at the end allows the player to exit the level without having to fight the default boss.
Level 3, Sheerk Prairie, is going to be even more of a challenge than level 2. It has a lot of puzzles, some of which I'll have to adjust a little, since some of the mechanics have changed since I designed all the levels.
First puzzle of Sheerk Prairie