Multi-layer display & scrolling

Hello all,

I’m completely new to graphical Linux programming in general, and to using
SDL in particular (I used to program ML graphical for the MSX, and MUD
text-based C coding on Linux), and I wonder if SDL has standard functions
for multi-layer display and scrolling (like the SNES) or if I have to
create something myself by using the transparent blit copy functions of
SDL. Advice anyone?

Regards,

Pieter Hulshoff

(I used to program ML graphical for the MSX, and MUD
text-based C coding on Linux),

don’t worry, that’s the level where you will find many of us

and I wonder if SDL has standard functions

for multi-layer display and scrolling (like the SNES) or if I have to
create something myself by using the transparent blit copy functions of
SDL. Advice anyone?

Alas, “modern” PC/Mac/etc video hardware do not have the multi-layer scrolling
capabilities of consoles (hear the collective lamenting of a thousand
programmers). They compensate for this by spinning their CPU insanely fast,
so that is what you have to use. In other words, paste layer upon layer by
blitting transparent surfaces on your screen.

The same goes for sprites - you have to paint them yourself, remove and move
them by hand, and check for collisions manually.

If you are careful and only blit things that have moved, and don’t overdraw
(and use SDL_UpdateRects() carefully), then you can get quite good performance.
But I’d expect anyone with experience from 8-bit assembler to know that :slight_smile: