Log In  

Cart #mypicokart-6 | 2020-03-26 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Very potato and not finished but hey that was fun to code :)
needs lots of everything...

-- 0.6 update: drift!!! wheeeeeeeee! totally unrealistic though...
-- 0.5 update: a lot less potato and fast thanks to @fred72 :)
-- 0.4 update. forgot to put checkpoints on the second track...
-- 0.3 update: sound, checkpoint, still need better driving physics...
-- 0.2 update: more optimization and refactoring
-- 0.1 update: better perfs...

P#73268 2020-02-19 22:45 ( Edited 2020-03-26 18:26)



Wouldnt know where to even begin making something like this!

Great work ;-)

P#74056 2020-03-19 21:44

@ Paul Knight (how do you tag someone with a space in his name????) hey thanks. I'm late to the party and other managed to do this a lot more performance than me, but my version at least is quite straightforward: I first draw the track (in 2D) to the screen (but it will never be display...), then I use some trigonometry (basic ray casting) to render the 3D view in a part of the spritesheet, and finaly I redraw my final frame (drawing the sky and background, using sspr to copy the 3D view, etc...)

P#74073 2020-03-20 08:55

clever but way too many cos/sin per pixel!
have a look at the various sprite rotation routines on the bbs, you can calculate sin/cos once and use delta steps to move along the rotated axis.
much faster

P#74075 2020-03-20 09:20

@freds72 ha! your message was enough to send me in the right direction, I can render a 128 image wide now instead of 64 before and still keep 30fps :) . It works great ingame but I have strange artefacts in the intro scene (with a higher camera...), I'll see if I can fix this, or maybe I'll keep the slow function just for the intro...
(not posted yet)

P#74078 2020-03-20 10:43 ( Edited 2020-03-20 16:21)

So it seems it was a precision issue with small angle changes, I designed around it (and like it better this way...). Thanks a lot for the pointer! (now posted)

P#74081 2020-03-20 16:17 ( Edited 2020-03-20 16:21)

@freds72, not 71 :]

P#74085 2020-03-20 19:28

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2023-02-05 13:30:49 | 0.040s | Q:21