23 July 2009, 12:21 | #1 |
68k
Join Date: Sep 2005
Location: Somewhere
Posts: 828
|
(asm) how many gfx tiles I can put in one frame
How many gfx tiles 16x16x4 or 16x16x5 ( pixels x pixels x planes ) I can put ( paste ) on screen in one frame ? I think about amiga 500 and screen is 320x256x4 or 320x256x5.
|
23 July 2009, 17:55 | #2 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
It depends on circumstances and what techniques you use. Do you want to make a scrolling map of tiles? Bobs that fly around on the screen, on a cleared background or on top of a backdrop?
In one 50hz frame there are about 70 000 memory cycles during which chip memory can be accessed, and for a 320x256x5 screen an OCS system will need 320*256*5/16 = 25600 cycles to generate the display signal, which leaves about 44 400 cycles free for other DMA. For a scrolling game map you will be drawing tiles without masks or consideration for the background, and in word aligned positions. In this case the blitter will need 2*16*16*5/16 = 160 cycles for each 16x16x5 tile, excluding blitter setup time, which gives a theoretical max of only 277 tiles per frame. However for a full screen scrolling map you don't need to redraw all the tiles each frame, but only the new tiles that have just come into view. For a 320x256 screen this means never more than 20+16+1 tiles (unless you want to scroll really fast), and so a 320x256x5 scrolling map in 50fps is not pushing the limits. |
24 July 2009, 00:38 | #3 |
Registered User
Join Date: Aug 2004
Location: Poland
Posts: 142
|
You could perform hardware scrolling for 1tileset. Just add 16 pixels right and down.
After that scroll You need to redraw whole screen. But wait. Do it only for tiles which change. Which means tiles that change on line movement and next one line on screen border. Here is our screen: DDDCDDD DDDCDDD DDDCDDD If we scroll horizontally then only tile C is to redrawn and D next to it. This works nice when You have static tiles and not much objects (not sprites) on playfield. At every 1px hardware scroll You need to redraw tiles under them and put objects again. Superfrog might be a good example how to do fast tiled screen. |
24 July 2009, 04:36 | #4 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,629
|
You can calculate this from the blitter speed formula in HRM.
Use copyblit from A to D on even word boundaries and the blitsize width will be only 1 word. |
08 February 2010, 12:48 | #5 |
68k
Join Date: Sep 2005
Location: Somewhere
Posts: 828
|
@Leffmann, AGN, Photon
Its maybe a little late, but thanks for advices. There is another question/problem. To find fastest way to copy tile ( 16x16x4 ) to interleaved screen. Any suggestion are welcome. |
08 February 2010, 12:55 | #6 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
|
|
08 February 2010, 12:59 | #7 | |
Registered User
|
Quote:
|
|
11 February 2010, 16:40 | #8 |
68k
Join Date: Sep 2005
Location: Somewhere
Posts: 828
|
Hi
@StingRay, You're right but I need to copy at least about 300 tiles on one frame and I need some special ( mean speeeeed up technique ) way to do this, if exists of course Any ideas ? Regards asman |
11 February 2010, 18:08 | #9 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,629
|
There's no faster way than using the blitter. If doing 300 16x1x4bpl blits takes too long, you have to either only blit the tiles that CHANGE (anim tiles), by diffing (subtracting) the grid with tile numbers and only blit the tiles that have changed. To reduce the tile-count to minimum. Or, you need to make some design change to reduce the max count, f.ex. shrinking the screen.
If you don't have animated tiles, and need to blit 300 tiles just for scrolling, every frame, then you must re-code your scrolling routine to only blit the tiles that are coming in from top/bottom/left/right edge. And that's 72 tiles for a 320x256 screen, divided by two because you can't scroll BOTH up-left and down-right in the same frame |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Giana Sisters Tiles | BippyM | project.Maptapper | 6 | 21 March 2016 17:36 |
Making tiles and Sprites..... | sebmacfly | Retrogaming General Discussion | 4 | 31 March 2010 13:34 |
Dragon Tiles | Badders | request.Old Rare Games | 2 | 28 August 2006 17:19 |
Found -> Dragon Tiles | BippyM | Looking for a game name ? | 5 | 21 July 2004 10:05 |
|
|