|
Post by nra on Apr 11, 2018 11:09:46 GMT
Hello Jonathan,
The question is in the title, more details-- I realize the concept behind a gamescreen made of blocks (tiles), but how about a set of 'empty' blocks without overwriting the current screen?
I mean whether it makes sense to leave 'empty' blocks as is or AGD needs to restore the background and process even empty blocks?
TY
|
|
|
Post by lukebord1 on Apr 12, 2018 8:54:25 GMT
I'm not sure to have got your point, anyway, just a thought.
The word "SCREEN$" (including the dollar) usually refers to the loading screen, but it seems your post is about the way AGD refreshes the window playarea.
Every "room" (or "screen", whatever you want to name the playarea) is composed by single blocks and the whole mosaic is stored in a memory grid. If memory serves well, someone explained me that there's a kind of compression algorithm to save memory, which avoids the duplication of the same data through a horizontal parse; therefore, any type of block is analyzed, not only the empty space.
|
|
|
Post by nra on Apr 12, 2018 11:04:32 GMT
lukebord1, it's exactly about using a whole loading screen (as a set of data), which consists of relatively unique 'EMPTY' (non-interactive) blocks, as an in-game screen.
For instance, a gun-shooting detailed scene from KANE, where only the player, shots, and a few enemy half-sprites are moving/acting--just imagine it with a KEMPSTONE mouse!
Why, I know about the scratchpad, but-- 1) the blocks are almost* unique; 2) the whole picture is but a background, and 3) after scratchpad, another re-assembling go (copy-placing) is required.
Indeed, if it's possible, then some compression is a must, and for now some external routine to use a chunk of memory as EMPTY blocks in the specific order with certain attributes, perhaps? Loading screen$/data from AGD game would be terrific then)
|
|
|
Post by lukebord1 on Apr 12, 2018 12:22:38 GMT
...i think you're confusing screen background graphics with AGD blocks. AGD blocks have attributes and a byte reserved for their TYPE. They are used to build rooms in the playarea and the "empty space" is one of those types. A background graphic scenery should be called through ASM (assembly commands equivalent to RANDOMIZE USR in Basic), and it isn't composed by "empty blocks", it's just pure graphic. E.g. personally, I usually use this technique to set the initial frame and graphics around the playarea at the start of the game, calling the screen in the "game initialisation event". If you're looking for a good screen compressor for that purpose, I recommend this one: www.worldofspectrum.org/infoseekid.cgi?id=0012062
|
|
|
Post by nra on Apr 12, 2018 12:57:23 GMT
Thank you, lukebord1.
Ok, if one wants to use a screen$ as a non-interactive (neither DEADLY, nor CUSTOM, nor WATER, nor SOLID type) in-game background he must (1) load the screen$ into the scratchpad, (2) dis-assemble the screen$ into empty blocks, and (3) re-assemble the same picture block by block, right?
It works ok, but very time-consuming, let alone almost 99% of blocks/tiles are unique (nonrepetitive).
Now I don't know any straightforward way to do this in the AGD without double-time wasted time and efforts, alas... Do you happen to know any, perhaps?
|
|
|
Post by lukebord1 on Apr 12, 2018 14:44:59 GMT
...you can make it simple and just create your 256x192px art using tools like ZX Paintbrush and save the file as a "simple TAP file". Then, using the above screen-compressor tool, your work will be stored in a relocatable memory area, you just have to choose the free address. All these steps without using AGD. Once having the compressed screen stored in memory (it's suggested to use high memory area up to 64767), calculate the equivalent ASM numbers and write the three ASM commands in AGD. Find more informations in my site, AGD magazine section: www.funspot.it
|
|
|
Post by nra on Apr 12, 2018 15:10:28 GMT
Thank you, Luke.
So, it's ok to have in AGD an in-game screen invoked via ASMs instructions--and no problems with moving sprites, yes? That's great and what I wanted to learn!
By the way, you've got a great site on Speccy programming, how about a sig?
Cheers
|
|
|
Post by Jonathan Cauldwell on Apr 16, 2018 21:30:20 GMT
Interesting; I like the idea of transparent blocks, I might implement them in the new version.
|
|