Author Topic: Proof-of-concept for a lap-based Speedkarts gamemode (need a name)  (Read 1878 times)

https://www.youtube.com/watch?v=9D3Vy_uY8Yk

I do fully plan on expanding this much more into a full-fledged gamemode, and I'll take suggestions.
https://github.com/TheBlackParrot/blockland-racing

Looks interesting as a proof of concept, however I'm curious as to why you make it check every brick as it passes.

A way of making a minimap?

Looks interesting as a proof of concept, however I'm curious as to why you make it check every brick as it passes.

A way of making a minimap?
It's moreso to prevent cheating and (possibly) near-accurate position stats, but I suppose a minimap could also be doable.
even though I have no idea where I would start with that, haha

It'd be better to just have 2 bricks both 1/3 of the way(s) through than scanning for every single brick:
You'd need to do the 2 bricks consecutively, you can't skip either. A "lap" will count only if you touched the second brick.
If you touched 1/3 and you'd go back, nothing would happen.
If you touched 1/3 then 2/3, you can continue and fulfill the lap.
If you touched 1/3, then 2/3 and decided to go back, because you'd be forced to touch 1/3 you aren't going to get the lap through reverse, as touching 1/3 would "cancel" the 2/3.

Interesting, this way you can also track how far the player is in the race and if he runs off the track, you could potentially put him back in the right spot of the track.
Which would be a lot more interesting than the current deathrace-like speedkart gamemode in my opinion.

It'd be better to just have 2 bricks both 1/3 of the way(s) through than scanning for every single brick:
You'd need to do the 2 bricks consecutively, you can't skip either. A "lap" will count only if you touched the second brick.
If you touched 1/3 and you'd go back, nothing would happen.
If you touched 1/3 then 2/3, you can continue and fulfill the lap.
If you touched 1/3, then 2/3 and decided to go back, because you'd be forced to touch 1/3 you aren't going to get the lap through reverse, as touching 1/3 would "cancel" the 2/3.

They might not touch the brick though. I did consider that.

Interesting, this way you can also track how far the player is in the race and if he runs off the track, you could potentially put him back in the right spot of the track.
This as well

This looks very promising.

i worked on a lap-based racing gamemode with armageddon before and it worked similarly to this except it used a checkpoint system rather than each significant portion of the track

the main drawback with that is obv that it requires some additional consideration when making more complex tracks

So how does it know what the consecutive track segments are?

With this system, would it be possible to have Bots that drive vehicles in the track in a predefined movement?

Having race bots would be nice.

So how does it know what the consecutive track segments are?
It looks for a certain color of bricks and checks to see if it's the highest brick in a stack. It's using a box search (40 40 40) to act as a fuzzy collision of sorts to see if the player at least gets near a track brick.
Lap bricks and last position uses a more accurate search (1 1 1).

With this system, would it be possible to have Bots that drive vehicles in the track in a predefined movement?

Having race bots would be nice.
Would be theoretically possible, idk if it would be worth the time however.


I asked because it would be nice to have say if a server has 4 people playing on it, but you want to have 8 players racing, 4 bots would be added and if a player joined, the bot would be removed.

I asked because it would be nice to have say if a server has 4 people playing on it, but you want to have 8 players racing, 4 bots would be added and if a player joined, the bot would be removed.
That's what I assumed you were talking about lol.
I wouldn't just outright remove the bot and put the player in though, you would still have to wait until the end of the round.

That's what I assumed you were talking about lol.
I wouldn't just outright remove the bot and put the player in though, you would still have to wait until the end of the round.
Yea that's exactly what I meant.