I finished my next project.
Another car racing game? Yes. In principle it is a further development of DSDrive. DSRally now has cars that adapt to the terrain. The opponents can find the route themselves based on a hight map. The tracks are completely created in CGE using hight maps. The opponents also got an engine sound. There is a local multiplayer mode available. The controls can be freely assigned, depending on personal preferences. It can also be controlled with gamepads. Fake shadows are no longer used, but rather real dynamic shadows. The cars use the TCastleSpotLight on the track “Night” to simulate the car lighting. A check point system is implemented. The laps will only be counted if all check points are passed through in the correct order.
Please let me know what you think and as always, suggestions for improvement are welcome.
It is great to see your projects, you have a lot of content and gamplay there – lots of cars, tracks, multiplayer in this case… I’ll make a news post about your project around next weekend.
Oh, the night looks cool!
I was playing various tracks. It’s fun!
Some suggestions:
The DSRallyV1.0.zip download from https://didisoft.itch.io/dsrally contains also some sources – third_person_camera_standalone.dproj. third_person_camera_standalone.lpr, CastleEngineManifest.xml etc. You likely want to remove them, i.e. they belong only to “source code” ZIP.
Note: To package a “release” version of your game easily, you can use CGE feature “Run → Package (Release To Users)”, this should automatically include all proper files and only them. You can use CastleEngineManifest.xml rules to include/exclude specific files (like include libeffekseer.dll).
The font of big letters when you start the race (“1”, “2”, “3”, “GO”) is a little blurred.
The car is shaking a bit (it seems when going on slight upward / downward slopes). I would say to try to counter-act this (but I don’t know how, it depends on your physics setup). TCastleRigidBody ( Castle Game Engine: CastleTransform: Class TCastleRigidBody ) and TCastleCollider ( Castle Game Engine: CastleTransform: Class TCastleCollider ) have some properties to play with, like Restitution, Friction, Mass (on colider), AngularVelocityDamp, LinearVelocityDamp (on rigid body). I would play with them and see can I counteract this shaking.
In case this is specific to my system, I’m attaching a video showing the shaking. Download it here:
I would add “going back” option, on the down arrow, to allow to easier “back up” from situations when I crashed myself into a tree etc. I see you also have a nice automatic solution there (pressing “forward” when facing a tree will actually back up the car a bit), still it seems a standard to have a “back up” key to be able to do this like in a real car.
Hm, I see the controls actually have a “back” key (down arrow for 1st player, S for 2nd player) but it seems to not work for me?
There is “Z fighting” on the “striped stands” (that show which direction to go) in the “City” track. It seems you have there 2 planes, close to each other, and the Z buffer precision is not good enough to determine which is in front. The solution should be just making the planes (that I guess are used to design the 3D stands) a bit further apart, e.g. make them 0.1 not 0.001 distance from each other. This screenshot hopefully helps to illustrate what I’m talking about (the effect is most obvious in the game when you actually move, keep looking then at the “stands” outlined in the screenshot)
Thank you very much for these suggestions for improvement. I’m working on it. At the moment there is a lot going on in business and private life and there isn’t much time for hobbies.
Wish you all a good start into 2025.
Thank you, good 2025 to you too! I hope to bring some cool CGE developments soon to start 2025 with a bang
And no worries about the time. I’m always busy and late too Hopefully my suggestions are useful, but there’s no pressure from me, these are just suggestions.
Your game looks amazing! The detailed features, like terrain-adaptive cars and dynamic shadows, really stand out. The effort you’ve put into creating realistic gameplay and local multiplayer is impressive. Great work, and I hope to see more updates when you have time.
Didi, are you still using the code you adapted from mine for rotating a vehicle to match terrain? Or are you doing something more sophisticated now? I was wanting to revisit vehicles on terrain in my project, but figure out how to have independent wheels and suspension.
(Michalis… that shaking happens to me too, when I drive my real car off the real road and up and down hills over rocks, so perhaps that is intentional?)
Yes, I still use this code. I check 4 points: one in front of the car and one behind the car, and two on the left and right. This then gives the angles for roll and pitch.
The 4 points could of course also be the wheels. But how could suspension be implemented? Maybe the wheels could be on the ground using physics and the chassis just rests on top and slowly adjusts to the angle. I have seen some unity tutorials where this is shown.
The shaking only comes from the uneven terrain, away from the road. I can limit this a bit by doing fewer calculations per second.