Roadly banner

Roadly

12 devlogs
18h 42m 3s

This is an open world car driving game made in Godot 4. this was challenging as Godot is not known for creating open world games easily as it takes up a lot of RAM and computing power (btw i have an MI laptop …….yup) but well i did it it generates procedural spline-based road to generate chunks near the user and make forget chunks away from the user. This saved both my patience and my CPU.

This project uses AI

I used github copilot for making the floating origin script that i made better and smoother.

dhairyakhannabuiss

Well i have been testing my new system that i made the terrain chunk recycler and um…….. unfortunately it is not working i mean its not like not working at all its working but not as i wanted it to so now i am going to go and try and actually try and debug this thing probably even use ai to actually make it better. So yeah hopefully it gets done.

Attachment
0
dhairyakhannabuiss

All right so i have made a few minor adjustments but am still not liking the full floating origin thing right so it just feels wrong to trick the player by just respawning them (even if it is smoothly) so instead i am trying to make a chunk recycler now. It basically works like this -
Player moves →
Check distance to front chunk →
If threshold crossed →
Recycle back chunk →
Move it forward →
Regenerate terrain →
Regenerate road →
Infinite terrain!!!!!!
I have not actually created it yet but that is going to be my next move. right now i have just updated my floating origin script , car script and add fog (i think i will remove the fog) but my next move will be to make the chunk recycler.
So hopefully my next devlog will show that i have succesfully created the chunk recycler(HOPEFULLY).

Attachment
0
dhairyakhannabuiss

My original floating origin script was working but it was a little lagy and wasn’t smooth enough so i tried using chat gpt to actually debug the issue but i was unsuccessful in doing so with chat gpt(so i ditched chat gpt), then i tried using github copilot and it made it better but it was still lagy (very little) so with some minor adjustments from me it started working perfectly also i have expanded the game terrain so that the user gets more area to play under before the floating origin script does its job.

Attachment
Attachment
0
dhairyakhannabuiss

I have added a floating origin script to the world. So what it basically does is, it basically trasports the player back to the origin back at the origin and as the main terrain is so large most of the times the player feels that the origin is different but in reality it makes it feel like an open world game!

Attachment
0
dhairyakhannabuiss

LET THERE BE GRASS!!!
So as this was my first actual project in Godot it took me some time to realize how to add the grass texture to the terrain but now i have figured out how to do that - it was literally right in front of me (the add texture button).

Attachment
Attachment
Attachment
Attachment
0
dhairyakhannabuiss

Well finally after like literally a lot of try’s i have finally created a lag free chunk manager to generate trees near the user and delete them away from the user without the game lagging like crazy. the lag is gone the tree’s are actually being generated near the user and yup words can not express how happy i am that this is finally working. Now all i have to do is add grass , add the texture to the terrain and lastly add the road generator for a truly open world game.

Attachment
Attachment
Attachment
0
dhairyakhannabuiss

Well so i found a few bugs while testing the main one being the massive lag in the game due to-

  1. A pretty bad script for the chunk manager which is responsible for scattering trees , adding new ones deleting old ones based on the user’s position.
  2. My not so powerful laptop

Luckily I can fix the first problem (the bad script) but the other well……. they say never let go of hope. So hopefully by my next devlog the lag problem will be fixed.(keyword- HOEPFULLY)

Attachment
Attachment
0
dhairyakhannabuiss

Well there we go so i have created the Tree Scatterer that basically generates the trees near the player and makes them disappear away from them. So yeah pretty good.

Attachment
0
dhairyakhannabuiss

Well so i made the terrain better , smoother and easier to drive on and its looking pretty good!!

Attachment
0
dhairyakhannabuiss

Well so i have added terrain now i just need to make the curve roads , hills , grass , trees adjust the camera positioning and the game is done!!

Attachment
Attachment
Attachment
Attachment
Attachment
0
dhairyakhannabuiss

Well i have made the following changes -

  1. Added environment and sky
  2. Made the camera follow the car
  3. Made the visuals better
    Now all i have to do is -
  4. Make the hills and the other stuff around the road - trees grass etc.
  5. Add grip physics to the road and environment
    3)Create curve based roads
    4)Create the Procedural chunk loader (infinite world) since it is an open world game.
Attachment
0
dhairyakhannabuiss

Well i have finally created the basic framework for the game. it took a lot of patience coffee
(and telling my mom that i will leave the laptop in 5 mins like 100 times in a row!). But well finally the physics is not exploding car is not bouncing, not vibrating. Now all that is left is like 60% of the main part………… Sigghhhhh😮‍💨(just realized this emoji - 😮‍💨 - looks like a vaping emoji from afar)

Attachment
Attachment
Attachment
Attachment
Attachment
Attachment
0