• Add Review
  • Subscribe
  • Nominate
  • Submit Media
  • RSS

Nostalgia Engine

Historically, game engines and console hardware from the late 80s/early 90s were powerful bitmap image transfer machines. That's a fancy term for "copies images really fast onto the screen at various places". The faster you could fill rectangles on the screen, the better your machine was. These had some restrictions in how you could draw objects on the screen, you know these restrictions as the Tile Maps and Object Sprites models.


GameBoy Color Tile Viewer

Around the same time on PCs in 1995, Microsoft released the first version of DirectX (though to slow adoption) which let you use DirectDraw to perform image transfer- named "blit" for short. As far as I can tell, RPG Maker 2000 and RPG Maker 2003 use DirectDraw as a base. This API has been deprecated since 2010 and you can see reports of it falling out of compatibility around this forum.

The much more impressive aspect of classic 2D games were always when images were scaled, rotated, and transformed in various ways. It was a big deal when hardware could perform these for you, most notably when the Super Nintendo was released. Scaling and rotating could be done on a background on the Super Nintendo using graphics mode 7. This mode did not actually support the various "mode 7" effects despite everyone calling them by the graphics mode. You still had to calculate a perspective mapping and alter the background's rotation and scale for every scanline to produce the effect.

RPG Maker 2000/3 by comparison probably used software techniques whenever images are scaled or rotated. Some variations of hardware blit on PCs supported the scaling of images, but not always rotation.

Finally, we get down to RPG 20XX and most modern retro-style game engines. These days, you simply use DirectX's 3D or OpenGL to render the tiles with Z=0. The video card can't really tell or doesn't care that it isn't a 3D scene, and with the texture filter purposefully turned off, you get the retro look.

Drawing a tile and drawing a transformed, scaled, rotated tile are identical to the video card. It will just fill in the pixels and apply any shaders along the way all the same.

But then you're drawing thousands of quads in the case of the tile map. This becomes a problem because then existing scene optimizations can't be applied- the scene really is a bunch of loose quads. Even if you use vertex buffers, you're still having to write out the squares one by one. There are some cases where if your tile map is small enough and static enough, you could store the entire map as a drawing list/vertex buffer on the video card.


RPG 20XX Perspective Mapping

One obvious suggestion is to "cull" or eliminate objects you know are going to be offscreen. In normal mode, you can just draw the tiles within a rectangle from the map, but in the perspective mode I've shown you before, it is possible you could see all the way to the edge of the map. I have to develop different more advanced methods of cutting the scene down. I could just "do it old school" and actually draw scanlines in perspective mapping from the map, but I intend to have shaders working later which could use the depth information to do interesting things in perspective mode.

Posts

Pages: 1
This is really cool! What a great, informative post!
Turns out even if you put a single quad into a display list and spam that, it still improves performance by 20% for the above perspective tile map situation.
I see you finally changed the title image, so I'm not getting false positives anymore. ha Also, when I looked at the second screen I thought my screen had a red dead pixel.

But yeah, I don't really understand most of this stuff. I don't care how the cow is butchered, I just want a working hamburger :P
I see you finally changed the title image, so I'm not getting false positives anymore. ha Also, when I looked at the second screen I thought my screen had a red dead pixel.

No, I actually threatened to Twitter echo every false positive report I get from followers like you from Avast to Avast and that's when they finally responded. The RPG20XX title logo you see is still hosted at landtraveller.com.
Pages: 1