[MO6][demo] Bitmap16 Sprite handling
Publié : 30 juin 2017 00:11
First of all, i would thank you for your help so far, i came here one week ago knowing nothing about asm and i had a great time praticing on 6809 and MO6.
Now i would choose a resolution to attempt my game and of course i'm strongly tempted by 160x200. What really scares me is the video memory splitting between RAM A and B so you don't have contiguous columns. I know 320x200 4 or 16 dont have such tricky feature so it would be easier to code on that resolution (yeah there's color clash and limitations but its always a matter of costs and revenues).
Lets focus on 160x200 for now.
Sprites: best thing to me should be load 'em from external files, so i don't have to code-in directly. It would result in a shorter code, and drawing sprites with a tool makes it a lot easier as you know. While im pretty sure i could use even MSPaint and then export to 16color format, i'd need to port the sprite atlas files on MO6 dev environment Or should also use a inner paint tool (i recall Colorpaint but it was slow as hell ).
The tricky part however would be on drawing and moving. Thanks to double buffer, i would avoid flickering or erasement tricks. But having two columns per ram per address is gonna give me headache. I should write a routine to split each sprite in chunks to send to respective A and B buffers, and what for movements? What to determine which chunk you should send to which buffer by checking the position of a moveable sprite? And how to move it by just one pixel instead of the entire memory cell ?
I learned a lot from the Nyan Cat (awesome) source code so it gave me a nice idea about bit16. But that was just a single animation, while having moveable sprites is totally another story.
Before to continue on my evaluation about what resolution to use, i'd like to know some suggestions or tricks by you.
(Feel free to answer me in french as well)
Thanks guys!
Now i would choose a resolution to attempt my game and of course i'm strongly tempted by 160x200. What really scares me is the video memory splitting between RAM A and B so you don't have contiguous columns. I know 320x200 4 or 16 dont have such tricky feature so it would be easier to code on that resolution (yeah there's color clash and limitations but its always a matter of costs and revenues).
Lets focus on 160x200 for now.
Sprites: best thing to me should be load 'em from external files, so i don't have to code-in directly. It would result in a shorter code, and drawing sprites with a tool makes it a lot easier as you know. While im pretty sure i could use even MSPaint and then export to 16color format, i'd need to port the sprite atlas files on MO6 dev environment Or should also use a inner paint tool (i recall Colorpaint but it was slow as hell ).
The tricky part however would be on drawing and moving. Thanks to double buffer, i would avoid flickering or erasement tricks. But having two columns per ram per address is gonna give me headache. I should write a routine to split each sprite in chunks to send to respective A and B buffers, and what for movements? What to determine which chunk you should send to which buffer by checking the position of a moveable sprite? And how to move it by just one pixel instead of the entire memory cell ?
I learned a lot from the Nyan Cat (awesome) source code so it gave me a nice idea about bit16. But that was just a single animation, while having moveable sprites is totally another story.
Before to continue on my evaluation about what resolution to use, i'd like to know some suggestions or tricks by you.
(Feel free to answer me in french as well)
Thanks guys!