Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411490 Posts in 69371 Topics- by 58428 Members - Latest Member: shelton786

April 25, 2024, 01:18:46 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsFree Drive Battle - a procedural 3d game
Pages: [1] 2
Print
Author Topic: Free Drive Battle - a procedural 3d game  (Read 2879 times)
Zireael
Level 4
****


View Profile
« on: April 21, 2018, 09:45:31 AM »

So this is my side project, started for good sometime in the summer of 2017. A 3d free roam racing game, in the spirit of NFS Carbon or Most Wanted. The catch is, to minimize the workload of the poor level designer, I am leveraging quite a lot of procedural generation.

The project has gone through several iterations before 2017 (Unity, then UE4). I am currently using Godot 3.


The current state - April 2018

Nearly everything in this gif is procedural. Most meshes (including the terrain you drive on) are made straight in the engine. The driver, however, is imported and some of the props are, too (the billboards/neons, the streetlights and the Chinese lanterns). Even those are placed procedurally - all I have to do is to give the game a JSON listing of how I want the road to go. Textures (as opposed to single color meshes) so far are an exception, imported PNG files and no procedural generation to speak of.

The minimap you see in the corner is procedural (if I were to change the road's placement or layout, it'll adapt upon launching the game) and the panning/masking is achieved with a shader.

The clouds are made with a shader I found on GLSL Sandbox and adapted. The sky behind them is built into Godot and controlled with a script to make a day/night system.


Godot 3 uses Bullet for the physics, so that is one thing I did not particularly have to worry about (car physics are fairly similar across engines I've tried).

The AI drives to a target on a navmesh (only the roads themselves are covered by the navmesh). The reason I have a navmesh instead of a series of waypoints is because it makes it possible to reason about the road's width ("oh my I am out of the road"), and potentially have it vary. I guess the AI is one part that needs quite a lot of work, but I have been postponing it in favor on working on proc-gen and the city itself.

Oh, and - the project's source and assets are available on Github: https://github.com/Zireael07/FreeRoamRoguelikeRacerPrototype


Anything you'd like me to elaborate on?
« Last Edit: November 10, 2018, 02:26:54 AM by Zireael » Logged
Zireael
Level 4
****


View Profile
« Reply #1 on: April 24, 2018, 05:53:03 AM »

I worked some more on the weather system. This is the city in the rain:



(and yes, that sloped road is procedural too)

The weather so far can only be changed in the editor, but I plan to make it dynamic.

I also made some adjustments to the brick and window materials, hopefully they look more realistic.
Logged
Zireael
Level 4
****


View Profile
« Reply #2 on: April 29, 2018, 10:17:51 PM »

Over the weekend, I worked some on the actual game mechanics.


Recharging station - note the induction symbol on the plates

I implemented battery - yes, the cars of the near future run on electricity - and a recharging station. I think electric plugs will be passe by the time the 2040s roll by, plus it would be difficult to represent plugging in in the game.

If you hit stuff, the car now gets damaged. If your health drops to 0, it's game over.

Oh, and the date you see in the welcome window is also procedural. It's certain to be at least 20 years from now, but there's a fairly big random amount on top of that - so you can start as early as 2038 or as late as early 2050s.

The Japanese era name is Mirai 'future' and I worked with the assumption that the current Emperor dies or abdicates sometime in 2018.
Logged
Zireael
Level 4
****


View Profile
« Reply #3 on: May 05, 2018, 02:34:25 AM »


Cherry tree lane...

Apart from the trees (thanks to TreeIt and some dds editing), I have fixed the AI so that they actually come to a stop when supposed to. The colored arcs represent their angle to target, if you were wondering.

The buildings on the left side of the road are now rotated so that the neons are above the road and a slight random has been added to the neon positioning, so some are higher up than others.
Logged
Zireael
Level 4
****


View Profile
« Reply #4 on: May 06, 2018, 11:30:29 PM »

So I watched the F&F: Tokyo Drift last night, and it made me remember one more thing: Japan has left-hand traffic which means the driver wheel and seat (which you can see on player car) should actually be on the right.

Should I keep right-hand traffic (and left hand drive) as is or switch in the interest of more realism? I want to see your opinions.

Relatedly, I am also thinking of a better name. The Japanese seem to love the word 'Battle' in games, maybe something like 'Free Drive Battle'? (I'd like to have an approximate Japanese name on the title screen, as a sub-title or a bonus?)
Logged
Tusky
Level 1
*



View Profile WWW
« Reply #5 on: May 06, 2018, 11:49:53 PM »

Should I keep right-hand traffic (and left hand drive) as is or switch in the interest of more realism?

Depends on how much time / effort it would take to switch it. The benefit of doing it will largely be to yourself not having that niggle that you haven't done everything as correctly as you wanted. In terms of players there might be one or two from Japan who might notice, but probably wouldn't care enough to do something like give you a worse review.
For example if they made all the cars in GTA London steer on the left (England is left hand traffic too) I wouldn't much care - I'd rather have fun playing the game than focus on if the environment was 100% accurate.

So yeah, I personally would say that the effort is too much for the potential benefits.

Unless it takes you, like, an hour.
Logged
Zireael
Level 4
****


View Profile
« Reply #6 on: May 07, 2018, 04:50:30 AM »

Should I keep right-hand traffic (and left hand drive) as is or switch in the interest of more realism?

Depends on how much time / effort it would take to switch it. The benefit of doing it will largely be to yourself not having that niggle that you haven't done everything as correctly as you wanted.

[...]

Unless it takes you, like, an hour.

That's an advantage of generating the cars procedurally in-engine, all it takes is changing a couple parameters Wink
Logged
Tusky
Level 1
*



View Profile WWW
« Reply #7 on: May 07, 2018, 05:00:11 AM »

May as well just do it then Smiley
Logged
Zireael
Level 4
****


View Profile
« Reply #8 on: May 12, 2018, 02:00:20 AM »



A prettier procedural car

2D polygons form the sides, with some work to get the windows, and then the sides get connected. Less of my own code since I can use engine code for polygon and triangulation and better looking Wink

That said, arriving at this took me 3 days.

I tried to match the current procedural car, so the wheel (and seat, when I get around to it) are still on the left hand side. I also need to add the rear lights.
Logged
Zireael
Level 4
****


View Profile
« Reply #9 on: May 20, 2018, 11:04:31 AM »



Two days of poking about (with a prototype script that someone gist'ed on Github), I have a WIP of a ghost system for the time trial

I guess the ghost needs to be faded out to make it immediately obvious that it's just the ghost?

Also, I realized I need to make minimap icons for the race events so that the player knows where to go. I found some vaguely flag-looking references so I have something to work from (my pixel art skills aren't that great).

I also think I need to work in some sparks/smoke for when you hit things, so that you have a more immediate feedback than just the bar dropping. (I think sparks can work even with the car being electric, surely by 2040s the car would be secure from short circuiting just from a few sparks)

Logged
Zireael
Level 4
****


View Profile
« Reply #10 on: May 26, 2018, 02:16:44 AM »



Event markers now have flag icons on the minimap and the cubes that show up when you collide will be replaced with proper sfx soon. Also the AI got a speed boost by reducing the number of points in their paths (the cubes that you see are just a debugging help)
Logged
Zireael
Level 4
****


View Profile
« Reply #11 on: May 31, 2018, 06:02:47 AM »


This week's progress in one GIF - sparks, intersection and garage

There's not much to do in the garage plus it spawns you back with an offset, but I won't have access to the computer over the weekend, so I wanted to show this now. Later on, the garage will let you change the car's performance as well as shape (yay for procedural meshes!)

Oh, and somewhere along the way I made some concrete supports for the sloped road.
Logged
Zireael
Level 4
****


View Profile
« Reply #12 on: June 06, 2018, 03:39:18 AM »


Major milestone - road can now connect two intersections procedurally

Yes, I know one of the curved segments had a bit of a fail when placing the streetlight, it's on my list of things to fix ASAP. However this means I will be able to create a city just by placing pairs of intersections Smiley
Logged
Zireael
Level 4
****


View Profile
« Reply #13 on: June 15, 2018, 11:11:30 PM »


Nice little race positions display

Other than that, this week has been mostly about cosmetic things (HUD font changed, car labels are bigger, the ghost is properly transparent, etc. etc.)

I will be back to developing this in two weeks. Two weeks will also be a lot closer to Godot 3.1...
Logged
Zireael
Level 4
****


View Profile
« Reply #14 on: July 13, 2018, 11:46:01 PM »

Godot 3.1. didn't happen yet, so the hiatus got a bit bigger while I hoped, but I finally got back to it.

The connect intersections code turned out to be easier to extend than I thought:


The town has four intersections total, but I only managed to fit three in the gif

Yes, it's taken me over a year to get to this point, but the procedurality means I can easily extend this to 10 or 20 or whatever instead of placing tons of stuff by hand.
Logged
Zireael
Level 4
****


View Profile
« Reply #15 on: August 01, 2018, 01:20:27 AM »

Some more work on the map, I made a bridge and added it to the main scene (not the one with connected intersections).


The GIF is a day old, the bridge's railings now have a more metallic texture
Logged
Zireael
Level 4
****


View Profile
« Reply #16 on: August 03, 2018, 11:08:16 PM »

The heat was too much to work on the code, so I worked on some assets instead (just the primitive cylinder textured).


Neon tubes placed by hand, but the bamboo along the straight was placed procedurally

The neon tube thingy is inspired by something I saw in a Forza Horizon 4 video. I was looking for a different look (bright on the outside, dark on the inside), but this one works too, I guess.
Logged
NajibSG
Level 0
***


View Profile WWW
« Reply #17 on: August 04, 2018, 02:58:17 AM »

your game looks great, open-world career games are amazing Smiley Smiley Smiley, will you have multiplayer or will you just do it for single player the game?
Logged

Zireael
Level 4
****


View Profile
« Reply #18 on: August 04, 2018, 06:04:19 AM »

your game looks great, open-world career games are amazing Smiley Smiley Smiley, will you have multiplayer or will you just do it for single player the game?

I don't plan multiplayer, just single player for now. The code is available, though, so someone good at multiplayer could probably add multiplayer at some point.
Logged
Zireael
Level 4
****


View Profile
« Reply #19 on: August 11, 2018, 09:40:09 AM »

This week was mostly about working on the minimap. It was basically rebuilt from the ground up. It lost the round shape in the process, but it can now draw the race track.


Minimap during the race
Logged
Pages: [1] 2
Print
Jump to:  

Theme orange-lt created by panic