Hi,
The max plane size in SGDK is 1024 pixels (or 128 tiles). How i can show planes bigger than this size ?
I suppose that I need to delete tiles on the left side of the plane, move the rest of the plane to the left (redraw all plane?. And reset value of VDP_setHorizontalScroll), and draw the new tiles on the right size (draw the tiles that player don't see).
This is correct ? There are some example ?
Thanks (and sorry for my poor english).
Planes bigger than 128 tiles
Moderator: Stef
Re: Planes bigger than 128 tiles
You are correct, in fact if you are developing for NTSC you may only need planes as big as 64x32 tiles, 64x64 in case of PAL.
Important things to keep in mind:
- Speed of scroll (how many tiles per frame at most)
- You can show partial tiles, so is no longer 320/8 x 224/8 tiles only, but at least 2 more per direction
- Other data that goes with tiles, like collision info
- (And perhaps, size of block of tiles)
Initially, there are two ways to tackle it:
A) Not recommended: just overwrite the new tiles that are going to be appeared on screen
B) The nice one: All you have to do is overwrite tiles that are not shown on screen, if you are moving to the right that would be update some tiles ago at the right of right coordinate of screen mapped on the planes.
So we have 2 separate ideas:
- Scroll will move freely on the planes, remember that conceptually A and B planes are infinite
- The area outside screen mapped on plane will be updated
Important things to keep in mind:
- Speed of scroll (how many tiles per frame at most)
- You can show partial tiles, so is no longer 320/8 x 224/8 tiles only, but at least 2 more per direction
- Other data that goes with tiles, like collision info
- (And perhaps, size of block of tiles)
Initially, there are two ways to tackle it:
A) Not recommended: just overwrite the new tiles that are going to be appeared on screen
B) The nice one: All you have to do is overwrite tiles that are not shown on screen, if you are moving to the right that would be update some tiles ago at the right of right coordinate of screen mapped on the planes.
So we have 2 separate ideas:
- Scroll will move freely on the planes, remember that conceptually A and B planes are infinite
- The area outside screen mapped on plane will be updated
HELP. Spanish TVs are brain washing people to be hostile to me.
Re: Planes bigger than 128 tiles
Check this:
viewtopic.php?f=2&t=2531
viewtopic.php?f=2&t=2531
HELP. Spanish TVs are brain washing people to be hostile to me.