Page 1 of 1
Increased Sprite Plane to a larger range than 512 (horizontal).
Posted: Mon Jan 20, 2025 7:04 pm
by siudym
Is it possible to increase the Sprite Plane to 128x the TileMap Layer (1024-Pixel)?
I tried to make a scrolled Screen of 128x32 (1024x256) in the Horizontal and I noticed that the Sprites at the beginning of the Screen duplicate their presence in the further part of it (Sprites Plan is probably 512x512 now?).
Is there anything I can do with it?
This is the first time I'm making something scrolled on SMD.
Attached is a demo (.BIN) - Going right will make the Sprites from the beginning of the screen reappear.
Re: Increased Sprite Plane to a larger range than 512 (horizontal).
Posted: Mon Jan 20, 2025 8:04 pm
by TmEE co.(TM)
It is not possible to extend the sprite area wider, you have to manually cull out stuff that's off screen to prevent them from becoming visible due to coordinate wraparound etc.
Re: Increased Sprite Plane to a larger range than 512 (horizontal).
Posted: Thu Feb 13, 2025 5:53 pm
by siudym
Ok thanks. Another thing: Is it possible to move the sprite plan edge so that, for example, the top position of a sprite on the edge does not start at +128 ($80) but, for example, at 0000?
Re: Increased Sprite Plane to a larger range than 512 (horizontal).
Posted: Thu Feb 13, 2025 10:57 pm
by TmEE co.(TM)
No, this is all fixed in hardware and cannot be changed in any way.
Re: Increased Sprite Plane to a larger range than 512 (horizontal).
Posted: Mon Feb 17, 2025 10:48 pm
by siudym
I managed to do it in a simple way. On Sega it is very useful that despite the physical limitation of the sprite plan to 512x512, the X/Y coordinates are FULLY 16-bit, i.e. each increase/decrease of the X/Y value is in the range 0000-FFFF (only every 512th sprite is "wrapped"). I did a simple check if the sprite is in the visible range of the window, i.e. 128-432 (+ added 32pix margin left/right), if so, it stays on the screen, if NOT, it adds 256 to the Y value to "throw it" to the lower, invisible part of the plan (when it appears in the "window" range again, it subtracts 256 from Y). Of course, the collision code is also corrected so that even if the sprite jumps to +256 Y, collisions will be calculated relative to the higher plane (correction -256).
Video:
https://www.youtube.com/watch?v=cn4Y6H25PdA
.
https://www.youtube.com/watch?v=SKHNiErIK2Q
.