Hi Joe
,
Quote:
Is it possible to let the kit automatically detect if hardware accelartion is available and use it?
this way we can implement much more special effects (for example: alpha channels for all sprites, which looks more smoother), but it probably won't run smooth on non-hardware accelerated graphic cards!?
Yes, in theory we can do this with SDL.
But this would be quite an programming overhead as
we will need to write the games based on OpenGL
with an additional softrenderer as fallback.
The situation on AmigaOS/MorphOS is a bit unpractical for building games requiring OpenGL. AmigaOS and MorphOS support a wide range of very old GFX-card. Many AmigaOS 68K users have cards with 2MB video memory. On MorphOS you find people using a broad range of video cards ranging from 4 MB to 128 MB.
If we want that our games run on all MorphOS computers, then we need to make the games run smooth on those 4MB cards too. Using OpenGL and even 2D HW acceleration is pointless on these cards as they lack a reasonable amount of memory to store any images.
The KIT currently chooses the most compatible approach.
The games are fully rendered in Fastmem and the screen is simply copied to the GFX card for display. This puts no requirements on the GFX card at all. A 1 MB card is fine for lowres and 640x480 games.
This approach still allows us to create fast games too.
If we reasonable optimize our blitting routines then the games will actually be very fast this way. For example the lowres version of 194x runs smooth on a 25MHz Amiga - even with enabled light casting and dynamic shadows, which are similar to transparent sprites in overhead.
My proposal is to stay in softrender for best compatibility.
But to put some work in optimizing our routines for best speed.
This will give us the advantage that our games will run on other platforms very HW-acceleration is not available e.g like the Linux GP2X console.
A mathematicel example to show the bandwidth needs:
If we create our games in softrender mode (fastmem)
then our game speed will be bound by our memory bandwidth.
A 640x480 screen in 15bit is 600 KB in size.
On the Pegasos we have a memory bandwith of 300 MB using sequential pixel access and up to 700 MB when copying bigger blocks using Altivec or Cache prefetching tricks.
If our game runs in 50 Hz then our available bandwidth per
frame is between 6 to 14 MB.
For a simple blitting to create the screen and then to blit it to the GFX card we need 2.4 MB bandwidth. (4 x 0.6)
So we still have a 3.5-10 MB bandwidth reserve for the sprites and objects. This should be enough even for demanding effects.
I have been told that while the Efika CPU is lower clocked the memory bandwidth is better than the Pegasos.
I'm looking forward to see your ideas for effects challenging this softrendering.
Cheers
Gunnar