Super Sprint A.I.
Super Sprint A.I.
has anyone got any idea how the AI works for games like super sprint, ivan 'iron man' stewart's off road racing, overhead codemasters games like super jetski simulator?
Re: Super Sprint A.I.
For Jet Bike Simulator they used the very same record function the game uses for replays to record gameplay for the computer. They had some clever code to get the computer back on track if it got bumped by the player.
The Oliver twins talk about it here:
https://www.youtube.com/watch?v=tDX5tqY8fSY
The Oliver twins talk about it here:
https://www.youtube.com/watch?v=tDX5tqY8fSY
ZX Soft - ALIEN(BUGFIX) - GB Soft - Demoscene
Re: Super Sprint A.I.
That's awesome!
However, "do something clever" is not a very detailed algorithm
I would try a 32x24 map of direction (0-7) and speed (0-31) for each map which would fit in 768 bytes, then for each character turn towards the ideal direction, and thrust if slower than the ideal speed. You could drive around yourself and have the computer accumulate your direction and speed in each square, although that wouldn't work so well to populate the edges of the map, which should instead point towards the ideal lines.
However, "do something clever" is not a very detailed algorithm
I would try a 32x24 map of direction (0-7) and speed (0-31) for each map which would fit in 768 bytes, then for each character turn towards the ideal direction, and thrust if slower than the ideal speed. You could drive around yourself and have the computer accumulate your direction and speed in each square, although that wouldn't work so well to populate the edges of the map, which should instead point towards the ideal lines.
Re: Super Sprint A.I.
Draw two vectors from the front of the car, pointing towards the edges of the road. If one is shorter than the other, turn the other direction. The amount of turning can be tuned to make the cars more or less "intelligent" - if they only adjust in small increments then their reaction time in corners will be reduced, making them more likely to crash.
Re: Super Sprint A.I.
It's a bit vague isn't it. The video states that the replay function only recorded key presses and duration, not actual coordinates. Though I'm wondering if they didn't also record positions at certain points and did some simple extrapolating to get them there, if bumped, before continuing with the replay.
The advantage of pre-recorded computer players is of course that it looks organic, the downside would be that the computer always behaves the same (bumps discluded) unless you have multiple recordings (which Jet Bike Simulator doesn't appear to have).
ZX Soft - ALIEN(BUGFIX) - GB Soft - Demoscene
Re: Super Sprint A.I.
It means that the game is 100% deterministic, at given circumstances enemy vehicles would always behave the same. So we need to record human behaviour only and all the rest would be recalculated to the same result.The video states that the replay function only recorded key presses and duration, not actual coordinates.
It's an interesting subject. Personally I never wondered much about AI for vehicles on a track but have a feeling that a comment from [mention]ZXDunny[/mention] may be pointing us in right direction.
Re: Super Sprint A.I.
I just tried Jet Bike Simulator and it was pretty easy to figure out the 'clever' part... there's no collision between player(s) and the computer. They simply recorded a three player game and used that for the computer players.
ZX Soft - ALIEN(BUGFIX) - GB Soft - Demoscene
Re: Super Sprint A.I.
good answers, i thought jetski was really tough too!
Re: Super Sprint A.I.
some kind of tron variation logic where cars follow two invisible bikes ?