Outrun style road demo MSX2

Página 23/26
16 | 17 | 18 | 19 | 20 | 21 | 22 | | 24 | 25 | 26

Por Metalion

Paragon (1628)

imagem de Metalion

24-08-2022, 09:05

hit9918 wrote:

In screen 4 one can get more speed. If you find a way to render the road in the charset. I mean still this nice pixel exact road. A lot of it got 8x8 pixels the same color and this could go fast in the nametable. And then the other things like the stone tunnel could be rendered in the nametable like the sega master system version.

Indeed, I'm currently thinking about testing a switch to screen 4.
But it's not as easy as one might think.

There are currently 3 problems with a screen 4 version:
1) The 3D computing engine needs to be rewritten, as it's specifically made for a 256x212 screen.
2) I will probably have to loose the border strips of the road, because on the upper two thirds of the rendered road, the strips are less than 6 pixels wide. So we have 3 colors within 8 pixels. I know it might not sound much, but I think the border strips are a integral part of the 'Outrun look'.
3) The horizon animation will be much more limited. A first estimation tells me that I would have about 144 free tiles to do it. Not enough for a 64x2 tiles horizon that needs to be pre-scrolled in both directions.

Still, it's worth a test.

Por Manuel

Ascended (19688)

imagem de Manuel

24-08-2022, 09:10

How does it work in the SMS version?

Por Metalion

Paragon (1628)

imagem de Metalion

24-08-2022, 10:11

In SMS mode 4 (used by a majority of games), you have:
- 32 colors (16 for the tiles, 16 for the sprites) out of a palette of 64
- bitmap 8x8 tiles (so no color restrictions)
- 64 sprites on screen
- 1 pixel hardware scrolling
Clearly, the SMS had superior graphic capacities than even the MSX2! ... Somewhere between the MSX2+ and the V9990. In fact, I think that, in view of its capacities, the Outrun SMS version was mediocre.

Por Mumbly

Expert (121)

imagem de Mumbly

24-08-2022, 09:57

Hi Metalion, just a 2 cents thought, does it helps if you swap screen4 to screen 5 (VDP line interupt) to handle aspects differently depending on the raster screen position. Its used a lot to allow HMMC and other copy operation in screen4.

Por Micha

Expert (110)

imagem de Micha

24-08-2022, 10:13

Metalion wrote:

2) I will probably have to loose the border strips of the road, because on the upper two thirds of the rendered road, the strips are less than 6 pixels wide. So we have 3 colors within 8 pixels. I know it might not sound much, but I think the border strips are a integral part of the 'Outrun look'.

The border strips and different colors for asphalt and roadside are crucial indeed. Check how they solved this in Hyper Rally; draw a piece of road outside the strips (just like in real life, haha), and don't draw the strips in the upper pixels of the screen where things get too narrow. When optimising this I think it is possible to make strips that look even better than the Hyper Rally ones by the way...

Por Metalion

Paragon (1628)

imagem de Metalion

24-08-2022, 10:44

Mumbly wrote:

Hi Metalion, just a 2 cents thought, does it helps if you swap screen4 to screen 5 (VDP line interupt) to handle aspects differently depending on the raster screen position. Its used a lot to allow HMMC and other copy operation in screen4.

Hi Mumbly. Unfortunately, extensive sequences of di/ei are needed, and I think they will prevent from being able to do a precise screen split. PS : Long time no see! We should meet again soon Wink

Micha wrote:

Check how they solved this in Hyper Rally

Indeed, that might be a solution. The only problem that I see is it will cause a small perspective distortion, because the 8 pixels offset will be the same on all rendered lines, whatever the distance from the viewer.

Por sd_snatcher

Prophet (3675)

imagem de sd_snatcher

24-08-2022, 11:07

Metalion wrote:

1) The 3D computing engine needs to be rewritten, as it's specifically made for a 256x212 screen.

Humm, but it's possible to enable 212 lines on screen-4. It's just not the default. Wink

Quote:

Still, it's worth a test.

Always! Keep up the good work! Smile

Por Metalion

Paragon (1628)

imagem de Metalion

01-09-2022, 20:47

Metalion wrote:

Indeed, I'm currently thinking about testing a switch to screen 4.
But it's not as easy as one might think.
[...]
Still, it's worth a test.

Trying to build a SCREEN4 version of the road rendering engine is giving me a headache. First, let's get something out of the way: it's impossible to have precomputed tiles. There's too many combinations to do that. So the only solution is to draw in tiles on the fly, line by line.

The first challenge is the tile usage. Let's say for example that I use only the 3rd bank of 256 tiles to draw the road. I know for a fact that I won't use all the tiles to draw the road, since it does not use all the screen. Let's say it uses about 2/3 of the tileset. Since I'm drawing the tiles on the fly for the road, the best way would be to use the 3rd bank in a bitmap mode (256 consecutive tiles). But then I need to track the tiles I did NOT use for the road, and fill them afterward to display the road shoulders. Which is a great loss of time compared to the use of a small set of tiles (8) that I can use across the screen to display the road shoulders in the first place.

It seems to me that mixing bitmap and tile modes is almost impossible, because one negates the advantages of the other.

Even if it's possible, there's the problem of the time taken to draw a line across several tiles. Drawing a line requires to do one address setup per tile, and one write per tile. Meaning that drawing 8 lines across 5 tiles, for example, needs 8x5x3 = 120 OUTs or 2400 cycles. Quite time consuming.

Por sd_snatcher

Prophet (3675)

imagem de sd_snatcher

01-09-2022, 22:30

Tip: take a look at the Road Rash game for the SMS. It's makes brilliant use of:

1) Horizontal hardware scroll, for the per-line horizontal raster effect of the road
2) Tile redrawing for the vertical undulations of the road
3) The grass is a combination of tile redrawing and name table writes
4) Split-screen for the mountains/sky background, with multiple splits for the clouds depth

PS: Remember that the SMS has much stringent VRAM bandwidth limitations than the MSX2/2+.

Por ARTRAG

Enlighted (6979)

imagem de ARTRAG

01-09-2022, 22:43

I would look at Formula 99 demo for the TI -99/A
https://www.youtube.com/watch?v=O0OF2gyyXdc&t=33s
It is using a TMS 9918 and he is updating only colors using 4x1 "pixels" in screen 2
IIRC the coder (Rasmus Moustgaard) has a github repository with the sources

Página 23/26
16 | 17 | 18 | 19 | 20 | 21 | 22 | | 24 | 25 | 26