Working on a little 3D racing game called Trackminia

Been working on a third environment (though I think it'll be the second in the final game's level-progression) - a weirdly-tall bridge, way up in the sky.

2024-06-24_01-28-32-ezgif.com-optimize

This one involved a fun bit of new tech: you don't get a great view of it in the clip above, but the skybox in this area is fullscreen so that it can include terrain far below the track. This terrain is pre-rendered like the rest of the skyboxes, but it's using some 3D projection to do that, so I'm hoping it might trick some people into thinking it's more mode7 stuff (like the ground in the other areas).

Speaking of which - this area can't use mode7 for the track, since it wants to have smooth edges around the track's bends (and my mode7 renderer would give ugly stair-steppy aliased edges in those areas). Instead, it generates reusable track-meshes based on the curves present in the map - one set for the drivable surface, and another set for the vertical edges below the track. It's important for these to be separate, because we need to make sure that all "below track" content gets drawn before any track pieces (and all track pieces need to be drawn before any above-track objects, like walls, the car, and the nearby clouds). The large support beams are regular pre-authored meshes from blender, like most of the other meshes in the game. As a cheeky performance gambit, the game doesn't do any painter's-algorithm sorting between the below-track meshes...because they're all the same dark-grey color, so they look the same regardless of what order they're drawn in. Similarly, the track pieces aren't sorted against each other either...because they're all coplanar and never overlap each other.

Feeling pretty good about the set of environments now - the forest is pretty standard fare (but looks nice to me anyway), and then the other two are more wacky and fantastical.

5 Likes

Taking a second shot at obstacles, because the first try didn't actually turn out so good - for one, since it was just drawing large extra walls, it only really worked when the walls were rendered Wolfenstein-style, which isn't the case anymore, and also, they were just extremely punishing when you hit them (not only killing all of your speed, but also jolting you sideways, so you'd have to fiddle around just to get forward again), which felt pretty nasty.

The new approach is to draw them as more plain-meshes and let you knock them away by hitting them - you lose a lot of speed, but you can keep driving in the same direction. The intent here is that you'd still want to avoid all of them if you were going for the best possible time, but if you're not in an absolute tryhard type of mood, then hitting a few is relatively forgiving.

2024-06-2914-50-52-ezgif.com-optimize

Longer clip (with sound) on twitter

5 Likes

I've mostly been posting progress on the Playdate Squad discord server lately, but really a lot of it is just backend stuff and things that i can't show for spoiler reasons anyway. Still, I wanted to throw out another message here just to reassure forum people that the project is still moving - and in fact, it feels like it's getting close to being finished now!

Campaign Mode:
I've got a full set of campaign tracks (24 races in the 3 settings shown in earlier posts here), though I still might revise or replace a couple of them after doing some more playtesting with other folks. These tracks are all very short, around 30 seconds (because that's my general preference in full-Trackmania maps), which may sound like "only 12 minutes of gameplay" but each of them has four replays to compete against (Bronze, Silver, Gold, Author) and I think most players won't get the gold times on their first playthrough. For a lot of players, I expect them to get "mostly bronzes and a few silvers" on their first campaign-completion, and then (hopefully) they'll want to go back and get tougher medals, to unlock some bonus rewards (which I'll get into later in this post).

Companion App:
This is mostly working now, and just needs a few extra features (stuff like "rename/delete tracks on the device"). The website can load a list of tracks from your device, and shows a thumbnail for each one - these thumbnails are generated by the game, instead of the web service, which is a little odd but it lets me be confident that they'll always look correct between the two apps (since they get generated with the exact same routine that usually draws the level-select previews in the game's menus). Currently you can only share a track via a Huge URL (where the URL contains all of the track data, meaning nothing has to be stored on a server), but I'd like to add an option to upload/download plain files too, particularly for tracks that are too large for URL-sharing (since URLs are limited to about 2KB for browser-support reasons).

Cars:
Along with less-exciting options menu stuff, the game has a car-select screen, and I started working on an old-timey car (based on old versions of the game, where the original car model accidentally looked like one of these from the back). Car choice is cosmetic-only, so there's no strategy involved in picking a model. Another user on the discord offered to make a car model, so if he doesn't find the game's mesh restrictions too irritating, I'll include that one too - or, if the weird rules turn out to be too much of a nuisance, I'll just make a third one myself.

Unlockables
Here's the current plan for stuff you can unlock by playing the Campaign mode (any mention of "get this type of medal" really means "get this medal, or a tougher medal"):

  • Get a Bronze medal: unlock the next track
  • Get a Bronze medal in all 24 tracks: unlock the track editor
  • Get 8, 16, or 24 Silver medals: unlock goofy joke-cars (in addition to the default three)
  • Get 8, 16, or 24 Gold medals: unlock little themed rendering demos (more info below)
  • Get Gold medals in all 24 tracks: unlock author-ghosts in all tracks
  • Get Author medals: reveal pieces of a secret QR code

The "themed rendering demos" have been a fun little diversion lately. Since these are unlockable rewards, I haven't been showing the actual scenes publicly, and instead I'm just showing this doofy example scene featuring Suzanne Blender to show progress on the renderer. This is a completely different rendering setup than the main game, taking heavy advantage of a static camera but letting the player control the sun with the crank (you can also adjust the fog density, but that's not shown in this clip).
2024-08-22_23-18-27-ezgif.com-video-to-gif-converter

If you've heard of Deferred Shading, this is basically "Very-Deferred Shading" - the gbuffer is generated offline, and then only the skybox and lighting (lambert, blinn-phong, rim-light) are rendererd in realtime. You can see some ghosting artifacts on the sun as it moves quickly...this is a result of the renderer only updating part of the screen during each frame - this problem is more pronounced on the device (the ghost-trails take longer to fade away), but it still feels fast enough for this type of usage.

It's hard to guess how much time is left on the project, but my to-do list is finally getting shorter instead of longer, so I feel like the end is in sight! Excited to finally submit this thing for Catalog consideration some time in the not-so-distant future.

6 Likes

Wow! I've been away from this forum for a while and missed a scorcher. Genuinely impressed by the tech going on here!

2 Likes

Getting started on a 3D airplane game and feeling like I need to pick your brain. Your project looks incredible. Godspeed!

Thanks! If you're looking to chat about rendering, my discord username is the same as here.

The game is getting sorta close-ish to being done now, so I've been preparing for trailer stuff.

First off, that meant adding a "watch replay" feature which gives you procgen camera angles, partly because it's fun and partly because it'd be lame if the trailer was entirely "regular gameplay footage" with the camera always behind the car.

Another notable thing is hacking together a way for the game to export greyscale video - this one is an internal tool only, so the final game won't let you do it...really, the only reason I wanted to do this is because of the game's heavy reliance on dithering. It looks good on the real device, but if you blow up a video of it to fullscreen on a computer monitor, it sorta falls apart (like looking too closely at a pointillism painting). Greyscale footage lets you get a sense of how the game looks on the real device, without having to be a tiny little video.

It's gonna be a bit of a puzzle to explain this in the trailer, but I think there's a way to do it without popping up a bunch of disclaimer text...after all, the game doesn't really look like this, but also it sort of does really look like this.

Frame_0001-ezgif.com-optimize

5 Likes