SamuZai
drjavi
drjavi

patreon


Devlog: Curves and Ágonos Temple

I made some great progress this week! Video at the end.

Mar 23

To guide the player through the darker room of Vocifer Cave, I needed to figure out how to describe the layout of the platforms using navigation nodes. This was easy for straight segments, but how to carefully lead the player along curved platforms? Why, with maths, of course.

 Third degree polynomial calculation from two points and their slopes

It works like an absolute charm. I just have to put down one node at each end of the curve (points A and B), orient their coordinate axes so one of each (vectors a and b) are tangent to the intended route, and everything else is computed automatically.

Intended trajectory

Following the calculations above, the guiding ally just computes where the player should be (position P) from where they are (position Q). To make the gameplay feel more natural, I adjusted the algorithm to guide the player towards relative position P(x + 1m), so the ally tries to lead them both towards position B and back to curve f, where the safe path is. It isn't strict enough to make it annoying, nor loose enough to let them fall off the platform.

Mar 24

I have learned that, while the visual details aren't priority at this stage in development, that's no excuse not to throw some proper UV mapping in my meshes. They don't need to look perfect yet, but I need to be able to see what I'm working with and bad UVs are better than no UVs at all. Plus, unwrapping just takes a few minutes. Seconds, if I'm extra lazy.

I have starting coding the exterior area of Ágonos Temple, which contains several rotating staircases that block or open navigation paths depending on their position.

Mar 25

I added guardrails to the whole structure to keep the player from cheesing the entire puzzle with a couple of kamikaze jumps, which included securing one of the types of rotating staircases, making its animation more complex. Although keeping all the code together in one file was tempting, I found that it's way more efficient to let each kind of staircase handle itself and just ask them politely to move when needed.

Mar 26

The guardrails are in place, but they don't seem to stop the player from jumping over them. I must have made some mistake in the function that detects climbable ledges. For now, this bug lets me explore the level faster, but I'll have to fix it later. I could just add invisible walls, but they completely mess up the camera control algorithm.

All staircases are properly coded and looking beautiful, but I must remember to properly document all this. That's an important step of the coding process that I keep neglecting. I should start working on the hypercube room soon, but I detected a nasty collider glitch that freezes the player at the very end of the exterior area. I must fix that first.

Mar 27

I fixed the collider glitch by rearranging a few conflicting vertices and tweaked the guardrails so they no longer trigger the climbing function, but that trick won't help with Godot's built-in colliders. So I added an extra check: a platform can only be climbed on if its floor is wide enough for the player to stand on, which rules out guardrails with default colliders.

Mar 29

The hypercube room is completely functional and I can't believe I got it programmed in just one afternoon. It was actually really simple: all gates are gravity changers, when crossed they rotate so the player ends up walking on the wall. To make the room look more confusing, I made their orientation random except for the gates within reach of the player.

Whenever the player crosses a gate, control is temporarily removed from them so the room can be safely reconfigured. This was surprisingly easy, once I realized that I didn't have to rotate the room around the particular gate the player had crossed, but simply check what the new floor should be and apply a fixed rotation. Only the player has to be teleported back to the gate they were at, since it will have shifted. This currently causes a minor camera glitch, but that's really easy to fix, I've dealt with that in previous levels.

And here's the result! https://www.youtube.com/watch?v=_IvXj6hI2w4 It includes both the exterior of Ágonos Temple and its hypercube room. They are of course at a very early state, missing proper textures and enemies, but I'm still very happy with my progress.

Next is the non-euclidean library of the temple. I figured out a very simple way to solve the camera issues caused by overlapping architecture, although it's kind of cheating and I'll be upset if I can't do on Godot what I could easily do on OpenGL 15 years ago.

However, there's a bigger issue: Ternera is never supposed to enter the library. That area is only reachable by one of her allies, who isn't even modeled yet, so I'll only program the most basic mechanics of it and move on to level 6, the Battle of Alegro.


More Creators