Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Monster Truck
#21



You can choose the type of tire during the game. Either 'OffRoad' or 'Drift'. You can choose the strength of the shock absorber. 'Soft' or 'Hard'. This was really needed in the game!
If you are going off-road, Offroad wheels and Soft shock absorbers are worth it. Then it shows the physics and suspension very well, how the car clings to the ground, how the forces fight each other.
If you are on asphalt, then 'Drift' wheels, which are worn and slip, and 'hard' shock absorbers are worth it. Then you can drift very well.
I managed to calibrate it so that it is easy to control in all cases. Your hands should always be on the gearshift, the handbrake, and the arrows.
In the video, the car is not going back and forth because I can't control it, but because drifting simply cannot be missed Smile

There are 3 camera modes. There is the inside view, which is interesting, but not so suitable for gaming. And two outside modes. One, when the drone circles around you very slowly. It is spectacular, that is how I recorded the video, because that way you can see the car from all directions. The third mode, outside view, when the drone always tries to be behind the car. This is good if you are going in a targeted direction, you always want to see what is in front of you.

(Unseen, the perspective angle is a carefully chosen value, that is why the field of view is 70 degrees, and not 45, because due to the nature of the game it is very important to see as much as possible)

https://drive.google.com/file/d/180bmT0h...sp=sharing
Reply
#22
Reply
#23
Very Impressive! The work that went in to this is amazing. It runs smooth on my potato laptop and kinda reminds me of Microsoft Monster Truck Madness. 

I was looking over your code and I was wondering if not using UDT's was a style choice or was it a speed optimization? 

Anyhow keep up the good work!
Reply
#24
The program is basically a car physics simulation.
But I added a 'game-mode' to it so it wouldn't be boring. By pressing the G-button, zombies appear, and the goal is to kill the 3 selected zombies (or however many). In the video, I hit 2 zombies with the car. The zombie can also attack, if you are slow and the zombie is close, it will give the car a big slap.
I will fix a few more things, then I will post them.

justsomeguy: Thank you very much ! what does 'UDT' mean? is it TYPE? It is useful, but for some reason I don't like to use it. I am not avoiding it for optimization, I just don't like to use it. It bothers me.


Reply
#25
@MasterGy Yes UDT is TYPE. Me personally, I just could not keep track of all the indexes for XYZ etc. 
If you wanted to add more trucks (for multiplayer or AI) you will have to implement a three dimensional array. If that works for you, awesome.

Either way, Its a very cool example of what QB64 can do.
Reply
#26
(03-08-2026, 08:54 PM)justsomeguy Wrote: @MasterGy Yes UDT is TYPE. Me personally, I just could not keep track of all the indexes for XYZ etc. 
If you wanted to add more trucks (for multiplayer or AI) you will have to implement a three dimensional array. If that works for you, awesome.

Either way, Its a very cool example of what QB64 can do.

It would be nice to have many cars. Unfortunately, there is only enough capacity to calculate 1 car. With flexible points, beautiful physics can be achieved, but there are a lot of calculations. The car would have even more beautiful physics, but because of the other functions I have to reduce the points. With rigid-body physics, the physics are not so beautiful, but there could be more cars there (like in another game of mine), because there are few calculations there.

I uploaded it, I think I fixed the errors, you can have fun with it.

https://drive.google.com/file/d/1pfjqKtK...drive_link

(I think the best experience for zombies is the 'sports limousine' car)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)