English Amiga Board

English Amiga Board (http://eab.abime.net/index.php)
-   project.Amiga Game Factory (http://eab.abime.net/forumdisplay.php?f=69)
-   -   Super Sprint AGA (http://eab.abime.net/showthread.php?t=101722)

mcgeezer 13 April 2020 23:38

Super Sprint AGA
After ripping out the Super Sprint car sprites on Friday (not that days matter now) I had a bit of time today and thought I might as well see if I can stitch some physics code to them.

See here for the thread and video...

Anyway... I've been racking my brains and I can't think of a way if I was making this game to ensure that the player followed the track completely.

What algorithm could I use to ensure that the player car went round the track in the correct order? I'm totally stumped by this one, it has really got me thinking and it the only barrier I can think of.

Any suggestion from the awesome EAB coders?



fgh 14 April 2020 00:11

Put a numbered waypoint at each turn, and one at finish line, lap+1 if all were passed in correct sequence?

DanScott 14 April 2020 00:24

Yeah, fgh is correct.. we did this (or similar) for BC Racers

There were marker "strips" of floor blocks around the track... it you passed through them in sequence, and then cross the finish line (final marker), then a lap is completed.

We also used them for another reason, but can't remember exactly what it was... oh yes.. it's come back to me... can work out the position of each car, 1st,2nd,3rd to a reasonably reliable degree during the race

Galahad/FLT 14 April 2020 00:26

You need to do essentially 3 checks, but doing it one way takes care of all three.

1). First set of checks is numbered collision points. You can't just count collision blocks passed, it needs to be numbered, otherwise a player can go back and forth over one collision block and then goto finish.

So at certain points around the course, you would have collision barrier 1, then 2, then 3 etc, which have to be done in order, so lets assume you have 10 collision barriers, you would have a 10 word table, and first word refers to collision barrier 1, 2nd word etc, etc, and you would only allow a lap complete if the word table was filled from start to finish in order.

So what this also does means it solves the 3 check problem.

1). Forces driver to go in order you specify
2). Means driver can't go up to collision barrier 1 and simply cross over it again and again 10 times and then go back to finish
3). Means driver can't go around course backwards and confuse your detection.

And obviously once the lap is completed, you would then add 1 to that players lap counter and then clear the word table to start again.

mcgeezer 14 April 2020 00:32

Cheers gents, i’ll see if i can implement it this week.
Its and interesting problem.

DanScott 14 April 2020 01:06

it's quite a bit harder to work out the code that stops a player driving the wrong way, and creating "laps" in that way... if they have passed point X, then turn around and go the other way, and pass point (X+1), then you don't want that to count.... you need to store the last point they passed through... so to get to point (X+1) the wrong way, they would have to have passed through (X+2) peviously.. so it would not count... I hope you get what I mean :D

DanScott 14 April 2020 01:08

basically store away the last point they passed through... the next point (X) is only valid if the previous point they passed through was X-1

shit I had too much Gin tonight :D

jotd 14 April 2020 01:18

don't do like I did with my Supercars III remake. Geometric zones that you could "tunnel" though because they were triangles (and the lap isn't validated)... Apart from that I did exactly how everyone is telling you do do, and it works.

Use an unshown picture with color codes for walls, bridges, etc... and for each lap note the zones that you have to pass on with another color too. The test is instant, too.

Guiding computer cars isn't trivial either. One way I successfully implemented in SCIII is to make them aim a point on the road, then another, then another. Problem with that approach is that the cars never deviate too much from the same trajectory. Target the next point as soon as you're close enough to the current point (so if cars collide, they're not going backwards to validate the point)

It was my first big project (in Java, on windows) and I didn't think I could manage with the pseudo-AI and track laps and all, but I ended up completing it :)

Implementing real AI for computer cars is another story! (can be done of course, there's an open source 3D racer which does that, I didn't even dare looking at the code)

phx 14 April 2020 01:35

Oh yes, Super Sprint! That brings back memories! I loved to play it with three players at a friend's AtariST 30 years ago.

I even started to recreate the game on my Amiga in 1990. There is a screen shot of it in our Games Museum: http://night.owl.de/index.php?id=54

I remember that I didn't even touch the lap-counting problem but had serious trouble with the collision detection. The cars were constantly stuck in the track borders.

I wish you good success with it! A real Amiga version would be just great! :great

DanScott 14 April 2020 01:49

For computer controller car guidance in BC Racers, each "block" on the floor had a set of direction bits (3 bit for 8 directions), showing which way to aim for. It worked quite well, as from any point on the map, the "arrows" would guide the car in the right direction... ie. off the side of the track the arrows would guide the car towards the middle racing line.

with the added inertia, this worked a treat

jotd 14 April 2020 08:38

If you check Supercars II, you'll see that sometimes the computer cars are stuck. After several repeated collisions against walls, you can make cars explode (if the game allows cars destructions, not in super sprint!) or/and increase the bounce force.

I think CPU behaviour heavily depends on the circuits themselves. That's the problem when you're remaking a game without the actual code: original coders made sure that computer cars behaved properly on all circuits. It means that they hacked the AI only for those circuits.

mcgeezer 14 April 2020 10:42

1 Attachment(s)
Thanks for the input here...very informative.

In my head I have a fairly good idea how I would go about achieving this, I've attached an image to help describe it though.

Each track would contain a 64x48 byte array containing the numbered checkpoints (4 bits), drone car direction (3 bits), and 1 bit for a DRS enable zone (if you like F1 you'll know what that is).

I've attached an image of how this would work, I'd just draw the grid out with different colours and use a Python script to build the byte array for each track.

For the track collisions I was simply going to use a 2 bit bitmap, 1st plane would be for the track collision using the blitter zero flag to check against with the car mask, 2nd plane I would use as an additional mask for when the car goes through an underpass. It might not be very efficient but I reckon the A500 would breeze it anyway.

I think that's a decent quick approach.


Edit:- I just checked and I would need something that modifies the car angle, for example when it drives up a ramp.

kamelito 14 April 2020 13:09

Loved the ST version 3 players too. You could crash the computer car easily in the last track because of the collision with the track. It will then never be able to continue. As for the algorithm I was asking the same question to myself and thought about the same solution. I’ll play it for sure but it should IMO need beta testing to calibrate the gameplay.
I still have the ST source code I did disassemble if you want.

jotd 14 April 2020 13:46

1) make a special color for slopes
2) make checkpoint color codes wider just in case the framerate update tunnels through the checkpoint.

Problem of remaking super sprint is that you can't use the superb endless steering wheels they had in the arcades. Even with a microsoft steering wheel it's not the same since it's not endless.

Atari was famous at the time for those arcade games with special controls (with paperboy, marble madness)

WayneK 14 April 2020 15:25

We (my flatmates and I) actually had a Championship Sprint arcade machine in our flat for a while - until the girls downstairs complained to the landlord about the noise we made stamping on the accelerators and shouting at each other during late night alcohol-fueled races...

fgh 15 April 2020 21:06

1 Attachment(s)
I have this one. Would love to make some 360 degree wheels for it! :)

One feature that would make the amiga version stand out is four player multiplayer. Four player adapters are available and super easy to build.

(Some admin should turn off ‘force landscape orientation’ when uploading pics!)

malko 16 April 2020 00:33

If you go for this conversion Graeme, in addition to the 4 players facility (adapter), would you mind to try to add a "net-play" feature if it's not too time consuming doing it ? :) Over serial/parallel port (like lotus link play) or tcpip (like Battle duel) https://www.youtube.com/watch?v=Iq1IYa9g8SM ?
I subscribe in advance for being a beta tester (even without the net-play facility) ;) :agree

mcgeezer 16 April 2020 10:56

I doubt I will do the full conversion, besides Badlands on the Amiga looks like it was a direct rip-off of Super Sprint.

If i was to do it I'd probably go with the a A1200 and use Hi-Res interlaced mode (640x400) for the native Super Sprint resolution (512x384).

That way I could use the 4 hardware sprites for the cars but also pop it into Dual Playfield mode and solve most of the bridge/underpass problems quickly.

I've not done much in hires interlaced mode before, but the question would be would it be worth the effort to port the game - however if I did I would definetely put in as much multiplayer capability as possible.

Super Sprint - Covid19 Edition.

Graeme :rolleyes

str0m 16 April 2020 12:15

Is this one an ST port and you are looking to do a direct arcade one? https://www.lemonamiga.com/games/details.php?id=4298

mcgeezer 16 April 2020 13:05


Originally Posted by str0m (Post 1392401)
Is this one an ST port and you are looking to do a direct arcade one? https://www.lemonamiga.com/games/details.php?id=4298

Yes, that's an ST port (or more an ST emulation).

All times are GMT +2. The time now is 06:12.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.

Page generated in 0.05478 seconds with 11 queries