Mario Kart

Propose new game/software design concepts or new game/software ideas. They can be as whimsical as you like, just be careful you don't ask someone to make it for you...
equinox
Dynamite Dan
Posts: 1032
Joined: Mon Oct 08, 2018 1:57 am
Location: SE England

Mario Kart

Post by equinox »

Hi. I've been thinking (not for the first time) how realistic is the idea of a Mario Kart style game on the Speccy?

I imagine we've all played Mario Kart, but it has a number of competing racers (sprites -- no 3D models needed) on a track, trying to complete a number of laps. That's like any Speccy racer (Pole Position, Buggy Boy, Out Run, etc.) -- BUT there's one big difference, which is that the tracks aren't a single long line stretching into space, but more like a certain shaped track (delimited by walls) within an imaginary square. This means, for example, you can turn around and drive backwards; or you might see another racer driving in the opposite direction, but ahead of you -- because they have gone around a zigzag bend that you can see.

I can see that this is a lot more complex than the typical racer, because it would require some kind of basic 3D modelling (if only drawing a few lines here and there). But is it possible? Has it been done on 8-bits? Could it be done on the Speccy? I think this would be excellent.

The closest things I can think of, technically, are perhaps Freescape games (solid 3D, we don't need all of that!), Hard Drivin' (similar -- and it's a racer -- and deathly slow), and Stunt Car Racer (very minimal, but quite real 3D -- however, it involves height levels, which kart games do not need).

tl;dr: Gasman, you have spent too many years making demos. Imagine the joy if you announced 8-player microdriveable Mario Kart at a party.
User avatar
R-Tape
Site Admin
Posts: 6353
Joined: Thu Nov 09, 2017 11:46 am

Re: Mario Kart

Post by R-Tape »

equinox wrote: Sun Nov 18, 2018 1:04 pm Gasman, you have spent too many years making demos. Imagine the joy if you announced 8-player microdriveable Mario Kart at a party.
8 player? I think we need Winston as well as Gasman!

I'd love to see something like this, but would settle for a something simpler. Surely anything truely isometric would be wayyy too slow for a game like this, and any good enough approximation is the way to go?
equinox
Dynamite Dan
Posts: 1032
Joined: Mon Oct 08, 2018 1:57 am
Location: SE England

Re: Mario Kart

Post by equinox »

To clarify: this game genre could be done by just drawing the "walls" as angled lines -- similar to how the actual track is drawn in many racing games. The complexity is that you might see several "walls" at different distances in a single visual frame (and collisions are important, but I doubt that's going to be the hard part). You would have to do a lot of 3D rotation (sine, cosine), maybe painful in Z80 but possibly not too bad. -- By the way, the (very fun) DOS game Wacky Wheels is a good example of the genre.

I don't think isometric is the right term because that's usually a game with a fixed angled field like Knight Lore. You could make a kart game with no actual "floor" tiles, purely karts floating around and moving between the walls/lines. (Of course adding stuff on the floor like oil puddles would be a bonus -- but let's stick to the do-ability for now.)
Bizzley
Microbot
Posts: 124
Joined: Thu Nov 16, 2017 10:47 am

Re: Mario Kart

Post by Bizzley »

equinox wrote: Sun Nov 18, 2018 1:04 pm Hi. I've been thinking (not for the first time) how realistic is the idea of a Mario Kart style game on the Speccy?
If you're talking fast, true 3D then not realistic at all.

You could compromise by making it a 2D top-down view a-la super Sprint or one of the similar Codemaster titles, you might even manage to quarter the screen to get 4 players on at the same time.

Most into-the-screen racing games on 8bit computers fake it, they're not as 3D as you think they are. The ones that don't are the ones with the deathly slow frame rate, all those calculations come at a price.
"He made eloquent speeches to an audience consisting of a few depressed daffodil roots, and sometimes the cat from next door."
Wall_Axe
Manic Miner
Posts: 492
Joined: Mon Nov 13, 2017 11:13 pm

Re: Mario Kart

Post by Wall_Axe »

i was thinking you could have a few dots on the floor to represent the track. The walls are difficult to represent. maybe they could be done like the spectrum version of doom
User avatar
djnzx48
Manic Miner
Posts: 729
Joined: Wed Dec 06, 2017 2:13 am
Location: New Zealand

Re: Mario Kart

Post by djnzx48 »

Something like Wacky Wheels on the Spectrum would be cool. Days of Thunder uses simple vector graphics for the track, and the speed is quite good when turning corners, although some of that may be precalculated so it might not be a good example. Scrolling the background scenery slows it down a bit so that's something that could potentially be optimised with preshifting etc.
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2640
Joined: Mon Nov 13, 2017 3:16 pm

Re: Mario Kart

Post by Ast A. Moore »

Well, lemme tell ya, after adding parallax/perspective shadows to Yankee, which involved spending a great deal of time optimizing and simplifying the math to keep everything moving at 50 fps, I have my doubts about the idea of Mario Kart on the Spectrum done at a decent frame rate. It would have to be sacrificed, and for a racing game, it’s the wrong kind of sacrifice.

Having said that, Micronaut One could be considered a 3D racing game. And it’s a damn good one. Nowhere near 50 fps, though.
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
User avatar
Joefish
Rick Dangerous
Posts: 2042
Joined: Tue Nov 14, 2017 10:26 am

Re: Mario Kart

Post by Joefish »

I had considered something myself - I've done a 3D maze on the ST that properly rotates around the player (a bit like Wolfenstein 3D), though I used depth-shading instead of textures. It worked by drawing the edges of all the nearby walls on the ceiling then copying one pixel row of the screen down over the next one. A bit like an XOR fill, but able to cover up more distant lines without needing a sorting algorithm.
It wasn't very quick, and that was on a CPU with native multiply and divide.

A better approach might be to use a crude form of portal rendering. This is what a lot of early PC FPSs did. The level is chopped up into triangular or rectanglular segments, so there can be no hidden view of walls in any one segment (i.e. no side-chambers or recesses). But there can be completely open 'walls' between segments, so e.g. an L-shaped room would be cut into two rectangles with one common opening. For simplicity you could make your segments all squares forming a regular grid. You start by rendering the segment you're in, and take note of any open 'walls'. Then for each open 'wall', you narrow your rendering down to the width that open 'wall' appears on the screen (your 'portal' to the next segment), then you just render the next segment within the width of that portal. You'd need to be able to clip sprites to the width of the portal too, if there's a sprite in an adjacent segment. You can then iterate again if that segment leads to another, and so on, or you can limit your iterations, or design your level so there are never too many long lines of sight through multiple segments.

For a kart game, I'd render the wall lines on the floor then XOR-fill up to the half-way, eye-level point, to create a boarded-in course. You could then add other details like trees or flags as sprites above this line to give some sense of scenery moving past. You could maybe try rounding down the horizontal points of the walls to character cell columns and so have coloured walls, but that might be a bit too crude and result in the 3D being warped.

For speed though, particularly for more than one player, you'd need to use every mathematical and graphical optimisation trick known to man and invent a few more of your own too.
AndyC
Dynamite Dan
Posts: 1388
Joined: Mon Nov 13, 2017 5:12 am

Re: Mario Kart

Post by AndyC »

Mario Kart relied heavily on the SNES Mode 7 hardware scaling capabilities, which were capable of things that were difficult enough to try and pull of on other 16-bit machines, let alone the humble 8-bit machines. If you were to do it, you'd almost certainly have to limit it to being more like a traditional into-the-screen racer and would therefore lack the tight twisting tracks that really make Mario Kart work.
Bizzley
Microbot
Posts: 124
Joined: Thu Nov 16, 2017 10:47 am

Re: Mario Kart

Post by Bizzley »

And of course there's the controller: Turn Left, Turn Right, Brake, Accelerate, Use Item and Drift/Hop - those are the most important ones which you'd need if you wanted the proper feel of the game even though the original maps a few more functions on to other buttons. That would be fun to implement on a Kempston joystick.
"He made eloquent speeches to an audience consisting of a few depressed daffodil roots, and sometimes the cat from next door."
User avatar
blueowl0708
Drutt
Posts: 29
Joined: Fri Oct 26, 2018 9:55 am

Re: Mario Kart

Post by blueowl0708 »

Power Drift is probably the closest available thing to what your describing?

Forgetting the mode 7 aesthetic, you're basically after a proper track based multiplayer racer with laps.
User avatar
Morkin
Bugaboo
Posts: 3251
Joined: Mon Nov 13, 2017 8:50 am
Location: Bristol, UK

Re: Mario Kart

Post by Morkin »

What about using attributes for the walls/track? E.g. dark colours for walls.

Might not look as good but might work for speed. (And simplicity!)
My Speccy site: thirdharmoniser.com
User avatar
Joefish
Rick Dangerous
Posts: 2042
Joined: Tue Nov 14, 2017 10:26 am

Re: Mario Kart

Post by Joefish »

I don't think an attempt to replicate Mode 7 is worth it anyway. I don't like the gameplay where flat textures on the ground are supposed to represent solid, impassable barriers. I'd take the approach of a course made of 3D upright side-walls.

If you want to do a Mode-7-alike with attributes, you could have a 4x2 colour cell bit of multicolour in the botom third of the screen, then do one of those rotating/zooming attribute demo effects to fill it. Though I don't know how readily you could add perspective to a rotozoomer, and you'd have a problem of needing a very large texture/image of the track, as you couldn't build the texture from tiles in real-time like the SNES does.

Another option might be if you could write a sort of chessboard renderer which can draw a floor of square tiles with different textures, kind of like Trailblazer but able to rotate in 3D. Plenty of 16-bit games managed it (e.g. Archipelagos), but I've no idea how they were optimised to run so smoothly.

At least with proper 3D techniques you'd be able to replicate the arena-battle minigames too.
AndyC
Dynamite Dan
Posts: 1388
Joined: Mon Nov 13, 2017 5:12 am

Re: Mario Kart

Post by AndyC »

It's really not about "walls" though. The reason Mario Kart works, and why Mode 7 was utterly critical to its success, is the ability to have things like 90 degree turns and be able to see that in real time as you're racing. Classical 8-bit racers absolutely cannot do that, not just because it involves a slightly more complex rendering of karts, but because the kinds of road rendering technique used simply do not allow it. Without that, you really cannot replicate the "feel" of Mario Kart and it requires a lot of hard maths that, for an 8-bit machine, is incredibly difficult to pull off.
hikoki
Manic Miner
Posts: 576
Joined: Thu Nov 16, 2017 10:54 am

Re: Mario Kart

Post by hikoki »

I wonder if Spy Hunter could be modified to be played like Mario Kart
User avatar
djnzx48
Manic Miner
Posts: 729
Joined: Wed Dec 06, 2017 2:13 am
Location: New Zealand

Re: Mario Kart

Post by djnzx48 »

I just remembered the infamous driving section in A View to a Kill which had some kind of 3D walls, but rather slowly and only at 90 degree angles.

Image
User avatar
Joefish
Rick Dangerous
Posts: 2042
Joined: Tue Nov 14, 2017 10:26 am

Re: Mario Kart

Post by Joefish »

AndyC wrote: Wed Nov 21, 2018 8:43 pm It's really not about "walls" though. The reason Mario Kart works, and why Mode 7 was utterly critical to its success, is the ability to have things like 90 degree turns and be able to see that in real time as you're racing. Classical 8-bit racers absolutely cannot do that, not just because it involves a slightly more complex rendering of karts, but because the kinds of road rendering technique used simply do not allow it. Without that, you really cannot replicate the "feel" of Mario Kart and it requires a lot of hard maths that, for an 8-bit machine, is incredibly difficult to pull off.
Don't see your problem. Or maybe you're not seeing my solution! ;) Mario Kart 64 has a lot of walled-in tracks. The point is you need the walls, and the track, to be based on a grid map system rather than one of those fake pseudo-3D rolling roads, and to be able to turn right and left and back the way you came in a proper first-person view. You could do a passable Mario Kart game with a Wolfenstein type engine, it just wouldn't be SNES Mario Kart. It'd be better! Like Speed Punks! :lol:
hikoki
Manic Miner
Posts: 576
Joined: Thu Nov 16, 2017 10:54 am

Re: Mario Kart

Post by hikoki »

User avatar
Joefish
Rick Dangerous
Posts: 2042
Joined: Tue Nov 14, 2017 10:26 am

Re: Mario Kart

Post by Joefish »

Raycasting makes sense if you want to do textured walls, as you need to align the pixel column of the screen with the pixel column of the texture, and the raycasting calculations tell you that. Also maybe if you want a low-res character-column solution like The Dark, since then you only have 32 rays to cast.

If you want more accurate pixel-placed lines in 3D I think you're better off plotting the top or bottom edge line of the wall as a line in 3D space (like something from the undergorund bits of Mercenary) than doing an XOR-fill.

Though maybe there's scope for something in-between. Do the ray-casting in whole character columns but use 1-pixel resolution for the vertical calculations. And maybe slant the top and bottom of each column to make edges look continuous.
Alone Coder
Manic Miner
Posts: 401
Joined: Fri Jan 03, 2020 10:00 am

Re: Mario Kart

Post by Alone Coder »

I revived my Wolf 3D engine for ATM-Turbo/ZX Evo/Pentagon 2.666LE, added objects and doors:
https://youtu.be/st4saOGcw8E?t=6682
User avatar
Lee Bee
Dynamite Dan
Posts: 1233
Joined: Sat Nov 16, 2019 11:01 pm
Location: Devon, England

Re: Mario Kart

Post by Lee Bee »

Great idea! Mario Kart is such a brilliant game, and despite its 3D roads, it has a simple, cheerful, sprite-based style that I think would feel at home on the Speccy.

Long ago, I would have thought a game like that completely impossible on the Speccy, but after seeing the speed of the 1997 Doom Pre-Release (and the similar "The Dark"), who knows?

If anyone wanted, I'd be happy to provide accurate AY music for such a project. I love the Mario Kart music and had thought about recreating it on the Speccy (as I've done with other games).
presh
Manic Miner
Posts: 237
Joined: Tue Feb 25, 2020 8:52 pm
Location: York, UK

Re: Mario Kart

Post by presh »

I trust you've all seen this? Not Mario Kart, but a "demake" of SNES Mode 7 racer F-Zero... i.e. very similar concept!

From a technical point of view, it's very impressive. Fun to play too, unlike a number of "tech demo" games!

https://www.youtube.com/watch?v=LSQaR9e ... =emb_title

Download link: https://voxeltower.itch.io/spaceracing

Discussion here:
viewtopic.php?f=3&t=5964
toot_toot
Manic Miner
Posts: 676
Joined: Thu Nov 29, 2018 7:17 pm

Re: Mario Kartr

Post by toot_toot »

Power Drift technically started the whole 3d karting genre and it got a pretty decent conversion on the spectrum.

https://youtu.be/FGkPhPhcB8Y

I’m sure the same engine could have coped with the original SNES Mario Kart levels, although the thing that made Mario Kart stand out was the AI of the other racers. It also set up a truly competitive championship with one or two main competitors. Could the Spectrum do that? The other thing that could have been improved on Powerdrift was making each of the karts look more unique, it was pretty hard to tell who you were overtaking.
AndyC
Dynamite Dan
Posts: 1388
Joined: Mon Nov 13, 2017 5:12 am

Re: Mario Kart

Post by AndyC »

Power Drift is still basically an into the screen racer on the Speccy, I'm not sure it could have pulled off the kinds of sharp bends that make Mario Kart work.
andydansby
Microbot
Posts: 147
Joined: Fri Nov 24, 2017 5:09 pm
Location: Syracuse, NY, USA
Contact:

Re: Mario Kart

Post by andydansby »

It seems to me that perhaps Alone Coder's 3D engine in https://www.spectrumcomputing.co.uk/for ... 3&start=90 might be pretty close to being able to doing the task. With the demo at 3.5 Mhz, you can come pretty close to being a racing game even if the frame rate is slower. I just tried racing around the squares in the demo and was quite playable.

At 7 mhz it certainly can be turned into a Mario Kart type game.
Post Reply