"Out Run" Road movement. How?

SGDK only sub forum

Moderator: Stef

Post Reply
POLYGAMe
Very interested
Posts: 151
Joined: Sun Apr 14, 2013 1:19 am
Location: Auckland, New Zealand
Contact:

"Out Run" Road movement. How?

Post by POLYGAMe » Tue Oct 14, 2014 4:25 am

Hey guys,

I have decided, after playing about and making some basic demos, that I'll "port" my game Project Downforce to Mega Drive.

Instead of the "Mode 7" effect I used in the iOS version, I want to go Out Run style, for obvious reasons.

I think I know how to do the corners. I built a similar engine in Unity and used quads instead of rows of pixels but I believe to get the effect on the Mega Drive, I simply scroll each line of pixels individually. That seems fairly straightforward...

... my question is... how would I move along the road? Also, for the graphics on the road, would I use .bmp images or just change colours somehow? Perhaps that would also help me get the forward motion?

Anyway, I think that will be the hardest part of the game to work out (and possibly handling roadside sprites, but I'll worry about that later).

In case I haven't explained myself very well, here are videos of Project Downforce and my 2.5D engine respectively:

The game I want to "port":
https://www.youtube.com/watch?v=C7JbTJAM4TY

The style I want to do it in:
https://www.youtube.com/watch?v=7jQmND1Pdsg

Cheers!

neologix
Very interested
Posts: 122
Joined: Mon May 07, 2007 5:19 pm
Location: New York, NY, USA
Contact:

Post by neologix » Tue Oct 14, 2014 5:19 am

codeincomplete has a 4-part series on using Lou Gorenfeld's pseudo-3D procedures to create an Outrun-style racer in JavaScript; I'm pretty sure it's rather easy to port to another language. :)

tryphon
Very interested
Posts: 316
Joined: Sat Aug 17, 2013 9:38 pm
Location: France

Post by tryphon » Tue Oct 14, 2014 5:36 am

There's also Cannonball : https://github.com/djyt/cannonball/wiki

The author has a whole website about Outrun disassembly.

POLYGAMe
Very interested
Posts: 151
Joined: Sun Apr 14, 2013 1:19 am
Location: Auckland, New Zealand
Contact:

Post by POLYGAMe » Tue Oct 14, 2014 5:52 am

Thank for the answers but I understand how to do it on modern systems, I've done it myself.

My question is Mega Drive specific. I can't go moving quads around, as the SMD doesn't use 3D objects.

I'm interested in how to get the forward movement of the road working only, as I understand how to make the corners work via line by line scrolling.

Please note that I'm not doing hills in this game, so I don't need to worry about that...

I'm guessing I need to change the colour of the lines etc....

EDIT: Just had a thought. I could do it the same way raster bars are achieved in all those old 8 bit computer demos. Shouldn't be too hard to work out.

tryphon
Very interested
Posts: 316
Joined: Sat Aug 17, 2013 9:38 pm
Location: France

Post by tryphon » Tue Oct 14, 2014 9:39 am

The link I sent is not about modern systems. The guy there wrote a lot of stuff on about the road effect was handled by the old System16 hardware (I believe there's a disassambly of the original arcade game, you could learn a lot from it), and I believe it's done the same way on the MD ports (not sure about that, the objects on the side may use hardware zoom MD can't handle, but I'm pretty sure having read on the author's blog an article about the tricks used ; I remember it involved palette switching).

Maybe I should have linked his blog : http://reassembler.blogspot.fr/

I don't find the article back though, I may have mistaken for another site, but I'm pretty sure I was lurking on this one at the time I found the article (so it could be referenced somewhere).

POLYGAMe
Very interested
Posts: 151
Joined: Sun Apr 14, 2013 1:19 am
Location: Auckland, New Zealand
Contact:

Post by POLYGAMe » Tue Oct 14, 2014 10:12 am

tryphon wrote:The link I sent is not about modern systems. The guy there wrote a lot of stuff on about the road effect was handled by the old System16 hardware (I believe there's a disassambly of the original arcade game, you could learn a lot from it), and I believe it's done the same way on the MD ports (not sure about that, the objects on the side may use hardware zoom MD can't handle, but I'm pretty sure having read on the author's blog an article about the tricks used ; I remember it involved palette switching).

Maybe I should have linked his blog : http://reassembler.blogspot.fr/

I don't find the article back though, I may have mistaken for another site, but I'm pretty sure I was lurking on this one at the time I found the article (so it could be referenced somewhere).
Ah, apologies! I took one look and saw it ran on modern machines, so assumed it was the typical manipulate the vertices of a plane approach. Lol. I'll have a read!

tryphon
Very interested
Posts: 316
Joined: Sat Aug 17, 2013 9:38 pm
Location: France

Post by tryphon » Tue Oct 14, 2014 3:03 pm


POLYGAMe
Very interested
Posts: 151
Joined: Sun Apr 14, 2013 1:19 am
Location: Auckland, New Zealand
Contact:

Post by POLYGAMe » Tue Oct 14, 2014 5:01 pm

tryphon wrote:I found the link back : http://www.extentofthejam.com/pseudo/
Funnily enough I was just reading that. I emailed Chris White whose blog you posted above and he sent me the link.

Turns out I was on the right track and that's exactly what I need. Thanks!

neologix
Very interested
Posts: 122
Joined: Mon May 07, 2007 5:19 pm
Location: New York, NY, USA
Contact:

Post by neologix » Tue Oct 14, 2014 5:43 pm

POLYGAMe wrote:
tryphon wrote:I found the link back : http://www.extentofthejam.com/pseudo/
Funnily enough I was just reading that. I emailed Chris White whose blog you posted above and he sent me the link.

Turns out I was on the right track and that's exactly what I need. Thanks!
That's the Louis Gorenfeld pseudo-3D article I was referring to.

Next time don't be so quick to dismiss something just because its ultimate goal (in this case, implementing old-school pseudo-3D in JavaScript) doesn't immediately jive with yours (implementing old-school pseudo-3D in, presumably, MD 68K). Nowhere in the JS Outrun series was there mentioned 3D quads or any such modern niceties and if you had bothered to take a look you would have seen that.

POLYGAMe
Very interested
Posts: 151
Joined: Sun Apr 14, 2013 1:19 am
Location: Auckland, New Zealand
Contact:

Post by POLYGAMe » Tue Oct 14, 2014 6:53 pm

neologix wrote:
POLYGAMe wrote:
tryphon wrote:I found the link back : http://www.extentofthejam.com/pseudo/
Funnily enough I was just reading that. I emailed Chris White whose blog you posted above and he sent me the link.

Turns out I was on the right track and that's exactly what I need. Thanks!
That's the Louis Gorenfeld pseudo-3D article I was referring to.

Next time don't be so quick to dismiss something just because its ultimate goal (in this case, implementing old-school pseudo-3D in JavaScript) doesn't immediately jive with yours (implementing old-school pseudo-3D in, presumably, MD 68K). Nowhere in the JS Outrun series was there mentioned 3D quads or any such modern niceties and if you had bothered to take a look you would have seen that.
I did actually look at that page and saw he did it a very similar way I did in Unity, using an array of road objects, rather than scroll line by line and it's not as simple as "porting to another language" (at least, not for me - lol).

I did however, find the answers on Louis' page, re: palette cycling, so you're right, I should have gone there.

Thanks for your help :)

POLYGAMe
Very interested
Posts: 151
Joined: Sun Apr 14, 2013 1:19 am
Location: Auckland, New Zealand
Contact:

Post by POLYGAMe » Tue Oct 14, 2014 7:36 pm

Thanks again for your help, guys. I apologise for making assumptions about "modern hardware" too quickly.

Anyway, you've put me on the right track and I look forward to creating my first SMD game!

CHEERS :D

Post Reply