Hello /vgr/
Im doing a little project that involves recreating the maps of Outrun games for the SNES in Java. From what I can see, a little bit of math is involved and was wondering if someone can direct me to a quick guide or something that better explains it.
Looks like the classic old F-Zero-ish HDMA+Mode7 trick.
Basically it's a 2D plane that lowest row of pixels is 100% width, the one above it a bit smaller, the one above it a bit smaller, etc. These days every toaster can do 3D math and digital displays have no concept of scanlines, so the method this was "really" done isn't realistic, but for legacy and historical purposes you can read more about it at http://www.coranac.com/tonc/text/mode7.htm
12-03-2015, 04:00 PM (This post was last modified: 12-03-2015, 04:02 PM by DarkGrievous7145.
Edit Reason: well...damn...
)
looks to me like you have either 3d-rendering or psuedo-3d rendering going on there.
i'm not sure how to help you, but i might have a few tips.
Firstly, this game appears to be using 3d perspective projection, with the focal point(s) more or less in the center.
I will say for any of the misc. background objects, such as trees, it is fairly easy to reproduce this effect. you start them at the focal point(s) , and render them at a very small scale. as the car moves forward, you move them out to their respective bottom corner. you also need to account for the car's speed. I can't really say how that formula should work, however.
you also may want to take advantage of pre-rendering, and similar practices. Some good places to try this would be the cars, and maybe the road. Probably what you'd be doing, either yourself, or by a designated graphic artists, is drawing the possible rotations for your cars, and maybe the lines on the road as the appear o be moving towards you.
Ofc, seeing as you're using Java (or any modern language/console/platform) , you could easily utilize an actual 3d rendering program to handle a lot of the dirty work.
Which leaves you with the map format, itself.
I wouldn't know exactly how that works for these games.
Most developers don't use the same formats for anything.
Your best bet is google, or that someone else here can explain it.
You could also attempt to contact the original developers, ideally the programmers.
One way you could do it, let's just stick with the bare-bones basics, let's say a typical straight stretch of your track has, distributed evenly, six places to add an object. Three on the left, three on the right. One possible way you could store this (I'll use XML):
(12-03-2015, 04:00 PM)DarkGrievous7145 Wrote: looks to me like you have either 3d-rendering or psuedo-3d rendering going on there.
i'm not sure how to help you, but i might have a few tips.
Firstly, this game appears to be using 3d perspective projection, with the focal point(s) more or less in the center.
I will say for any of the misc. background objects, such as trees, it is fairly easy to reproduce this effect. you start them at the focal point(s) , and render them at a very small scale. as the car moves forward, you move them out to their respective bottom corner. you also need to account for the car's speed. I can't really say how that formula should work, however.
you also may want to take advantage of pre-rendering, and similar practices. Some good places to try this would be the cars, and maybe the road. Probably what you'd be doing, either yourself, or by a designated graphic artists, is drawing the possible rotations for your cars, and maybe the lines on the road as the appear o be moving towards you.
Ofc, seeing as you're using Java (or any modern language/console/platform) , you could easily utilize an actual 3d rendering program to handle a lot of the dirty work.
Which leaves you with the map format, itself.
I wouldn't know exactly how that works for these games.
Most developers don't use the same formats for anything.
Your best bet is google, or that someone else here can explain it.
You could also attempt to contact the original developers, ideally the programmers.
One way you could do it, let's just stick with the bare-bones basics, let's say a typical straight stretch of your track has, distributed evenly, six places to add an object. Three on the left, three on the right. One possible way you could store this (I'll use XML):
That mode7 explanation Racoon Sam linked to is probably your best bet for the rendering, besides using an actual 3d rendering setup like directx or opengl.
I agree, though, that kind of math is confusing.
Using Opengl or DirectX probably would be somewhat easier.