• Register
Devblog #5 - 3D Architecture!

This is a quick update on the 2D to 3D architecture translation.

Posted by on

Hello everyone!

I hope you weren’t lost without me for those 3 weeks of silence :°

So, after a lot and lot of work, family issues and a Master memory helping, I’m finally back (to kick some tails)!

Obviously, nothing is finished yet. I just thought there was enough content to show you, and since the focus on this update was the 3D architecture and not the new circuit, I just went for it now and not after finishing it.

Also, disclaimer:

I’m not a 3D artist, I merely had a day or two of basic learning on Maya3D. I know the difference between vertex, edges and planes, I can extract and move stuffs… but that’s it! I have no 3D creative mind for this, and even less skill on texturing. I just try my best!

First of all, video:

Now, back to our architecture: what’s new?

## New horisons

As I explained last time, the previous (2D) architecture was in a vertical plane in world units, meaning the “forward” showed ingame was actually “up”. First thing done was to convert all code and assets to face the actual forward (Z direction) and not up (Y direction).

Now that we’re no longer limited to flat colliders, the ship “height” position calculations were no longer needed, and actually not wanted! Since we couldn’t have colliders on tracks and grounds, and there was some sort of elevations, we needed gravity; but with no collisions, ships would go through the ground and endlessly fall in despair. So, to bypass that problem, there was an heavy calculation that involved the splines around the circuit. And it was -definitely not- optimised. We lost an average of ~20 fps!

With the new 3D architecture, no need of splines approximations anymore. Since the tracks and grounds have 3D colliders, I just had to add a capsule collider on the spaceship and voilà! Everything works just fine.

## Which way to go?

Well, sort of? Now that there is real gravity affecting spaceships at all time, the forward speed was influenced by it, resulting in losing ~10% of total speed. Thanks for physics material, we could remove friction; that helped, but not totally fixed the problem.

What could we do more? Wait, we’re in 3D, we can do whatever we want! LETS PARTY

What I thought what could be interesting was to align the spaceship to normals (i.e.: align the object to the surface of the ground it is standing on). That way, since the movements of the spaceship is its relative forward, if it’s pointing 30% up, it will go 30% up!

Now that we’ve freed up some fps, and that there is real walls and not flat stuff everywhere, we can do something I wanted to do since day one: lights!

I wanted to make really deep caves in pitch dark atmosphere, where only a little spotlight on your ship could show you the way, with little red positions lights on wings for spotting the others competitors. That’s now possible!

Well, possible after a lot of work and tweak on lights, since I have little experience on lighting and baking. But it’s coming!

## Other cool stuffs

It’s not like it wasn’t possible in 2D, but I took advantage of the big update to sneak in some changes:

First of all (and that’s actually easier in 3D), when a ship will go beneath something (inside a building or a cave, under a bridge etc), the surface above will fade out so you can still see where you're going.

I also added a new gameplay mechanic that helps balancing the stats: spaceships will now bounce off others spaceships. Think Mario Kart 7 & 8 style, when Bowser rams into Toad, making him fly 10m away; we'll do something like that, depending on ship mass.

Also small thing but better in 3D: camera 'cinematics'. Before the start of a race you'll se some camera angles showcasing some circuits parts.

Oh yeah and I can also make cool details like that:

## What's next

Next up is continuing work on the circuit and beggining implementation on the Health System 2.0, then we'll follow with the Equipment System 2.0, some UI, new gameplay mechanics etc.

And for the team: Yuubae's Master Memories is almost over, he's made some new spaceship concepts and he will continue his work on the scenario soon.

Hillean is still stuck in the VR reality and Prox is idontknowactuallysorry.