1. GFX & Chain4
- Posted by Ralf Nieuwenhuijsen <nieuwen at POP.XS4ALL.NL> Jun 30, 1997
- 572 views
- Last edited Jul 01, 1997
GFX is now mostly finished and can be used... --> EMail me to get it... <-- When it's finished it will be available though the Euphoria site. Still to do is: * A routine to make sprites compatible to a screen * A routine to convert a screen to another type and/or size * Routines to put & get and image sequence from a screen * Easy routines for sprite saving & loading * Documentation, tons of it is needed.. I'll work on that... it is taking me more time than i expected..it's already over 800 lines... About the performance note a made some time ago.. it doesn't make sence, so here are REAL values just measured... * Drawing 25 sprites (10*18) on a virtual screen can be done 314 times per sec. * Drawing the same 25 sprites on the real screen can be done 439 times per sec. (Why is my video memory quicker than my real memory?) * Copying a virtual screen (320*200) to the real screen can be done 250 times per sec. * Clearing a virtual screen (320 * 200) to a color can be done 796 times per sec. * Copy one virtual screen to another(both 320*200) can be done 421 times per sec. * Copy one virtual screen to another( 320* 200 and one extremely large) can be done 191 times per sec. (the difference is: their not the same size so i got to do it row by row, not in once) * Drawing 25 sprites on a virtual screen, then copy that screen to the monitor and the copy the normal backgroung back from another(extremely large) screen back to the virtual screen that we use for the sprites. And calculate his new position each time. This can be done 75 frames per sec. The last example was everything you need for a scrolling sonic type game, i think 75 frames per sec is enough for that. As you can see from the above results, drawing a sprite on video memory goes faster than drawing a sprite on real memory. However copying a whole screen to the video memory goes slower than to an other part of memory. My theory is that the video a quicker buffer has. With big parts that are being done at once, it doens't matter, but with sprites that are done line by line, the buffer speeds it up. Maybe i'm wrong, i don't know anything about this, i'm just guessing. But i will support chain-4 mode if somebody gives me the machine code or the Euphoria code. I got the asm code. With chain-4 you can do cool scrolling too. You needed have to copy a thing then... just change the top x,y position. But i am worried i can't just poke & mem_copy the stuff on it right ? Does anybody know about this stuff ? Does any1 have more info about the video memory in SVGA? Can any1 code a mem_copy that copy source byte for byte to a location 4 times bigger (thus the source is {123,23,34} and it should copy it to location 1, 5, 9, (Skipping three each time) Well, if you want it already to beta test and get some more bugs out Email me and i'll mail you the code.... Ralf Nieuwenhuijsen nieuwen at xs4all.nl