Free Roam Roguelike Racer

ZireaelZireael Posts: 14Member
edited June 1 in Projects

This is what I tinker with when I'm not working on my main project (non-Godot).

The goal is to have something like the 2005s era Need For Speed games or Burnout Paradise, but with procedurally placed stuff so that the poor level designer does not have to place everything by hand.

The code is slowly being uploaded to GitHub -

Currently the basic procedural generation of road segments is in, as well as their placement (two kinds, a straight with a curve left and a series of curves). I have also figured out how to place props (buildings, road signs) procedurally but this is not in the repo yet.

Player and AI use the same physics under the hood. The AI drives to a target, one target per AI. I have a version where the AI pathfinds using a procedural navmesh (that matches the road mesh) but this is not committed yet.

I have also figured out how to draw a 2D minimap using Controls (to avoid rendering the whole level again). The minimap in the repo works like a radar, showing the AI's positions compared to yours. In the test version, it's slightly more advanced and uses shaders to achieve panning (not shown in the gif) and a circular mask. The minimap texture is just a test texture, but I plan to use Image.setPixel() to draw roads based on the data that the procedural generator outputs.

The gif shows my test project (so it has the props and the navmesh and the better minimap, but on the other hand it also has a ton of testing/debugging stuff that the version in the repo doesn't)

P.S. The project is being made in 2.1.3, hence some rendering glitches. I plan to move to 3.0. at some point though.

Tags :


  • ZireaelZireael Posts: 14Member

    More progress! The minimap is almost complete (as you see it lost the circular mask in order to be able to procedurally draw it based on road positions). It rotates as the player rotates, so the arrows fit. Since the minimap is generates at start time, it has no noticeable performance effect at runtime.

    Both the player and AI have a working brake light effect (the code for it is uploaded to github).

    Not uploaded: navmeshes (they are being finicky sometimes, still) as well as the minimap improvements (the procedural drawing code needs a ton of cleanup at the moment)

  • BishopBishop Posts: 168Member

    Interesting project..i like, interested about this minimap..would be great some 'how to' minimap tutorial because....looks like low cost minimap :)

  • ZireaelZireael Posts: 14Member

    @Bishop said:
    Interesting project..i like, interested about this minimap..would be great some 'how to' minimap tutorial because....looks like low cost minimap :)

    Head over to tutorials section to see a tutorial :)

  • alexwbcalexwbc Posts: 15Member

    Your project looks cool, congratz!

    I was wondering if I could ask for help; I've build your cars on top of the draft of this demo project, I was looking into that too becouse wanted to make a prototype for this idea of a very basic "racing thing" to be moddable. To make this appealing I was thinking it may need the [url= rendering feature[/url] of godot 3.

    I've tried to strip said truck demo; keeping it as much simple possible I just exported the car, but it behave in really weird way, so I wasn't able to even get thing started (at programming I barley mange to get things done in 2D; 3D it's beyond my skills)
    this is what I did: GranModLibertyGT.tar.bz2(GT is for GodoT).
    Since you said you'll port your project in GD3, I was wondering if you could, well, maybe export just the basic vehicle (no IA, not camera... just the plain car with physics, engine and keys) so I could use it already. ^^"

  • ZireaelZireael Posts: 14Member

    I am using the same truck demo car as the base and I saw the same very weird behavior in Godot 3. The issue has now been reported to Godot repo and I hope it'll get fixed.

  • ZireaelZireael Posts: 14Member

    This is the current state of my working copy. The repo has been updated a bit (it includes the new ground texture, for instance, and the message box [but not the font for Japanese characters]).

    The player now has something to do in the working copy, too (this is NOT in the repo yet):

    I'm leaving for holidays tomorrow so I wanted to leave a note that shows it's not just a tech demo but it'll actually become a game at some point, or so I'm hoping.

  • memermemer Posts: 35Member

    The million dollar question: does your demo support drifting?

  • ZireaelZireael Posts: 14Member

    @memer said:
    The million dollar question: does your demo support drifting?

    Not yet, but I hope to have drifting someday. The changes I made in my only PR so far make it much more possible (by making possible to reduce the rollover if needed - otherwise you'd start to roll before you started to drift)

    And before you ask, no updates. I was on holidays and now I've got to get caught up re my day job, and I'm generally hoping that 3.0 will get the vehicle physics fixed so that I can move to it...

  • ZireaelZireael Posts: 14Member

    Here's the current state of the working copy:

    About the 3.0, the Bullet physics PR ought to get merged soon(tm), and as soon as it happens I will start porting to 3.0.

  • ZireaelZireael Posts: 14Member

    I found some free time to update the repository. The code used to create the procedural car (the one to the side in the gif in the previous post) is in. I also optimized the curved road segments a bit.

    In the working copy, the procedural car has seen some more improvements:

    Also the AI can navigate around obstacles using a simple raycast setup:

    Those two improvements will be the next to go into the repo.

    After that, I will work on committing the navmeshes (because they finally link properly and a path can be found along the whole road). To think that I've been working on the navmeshes since June and only now they are in a committable state... The "vertices must fit perfectly for navmesh to work" rule is fairly annoying.

  • ZireaelZireael Posts: 14Member

    AI raycasting and the general navmesh setup are now in the repo. I will have to make the navigation node itself next so that the navmeshes can be used :wink:

Sign In or Register to comment.