Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : CMM2: Sprite Question
Author | Message | ||||
halldave Senior Member Joined: 04/05/2014 Location: AustraliaPosts: 121 |
Hi, I'm currently creating a Space Invaders clone and have a sprite question There are 55 Aliens displayed on the screen at the start, 1 row of 11 of the the smallest 2 rows of 11 of the middle 2 rows of 11 of the largest each of these aliens have two animation states do I load each of these as sprites 1 to 55 then clear each of them and reload the second animation state, or how would you suggest the best way to go about this? Im two rows in at the moment. David |
||||
Womble Senior Member Joined: 09/07/2020 Location: United KingdomPosts: 267 |
David ... looks good I can only suggest "Dakka, Dakka, Dakka ..." I like your screen layout, keep up the good work |
||||
realmnm Newbie Joined: 07/07/2020 Location: AustraliaPosts: 34 |
I've been playing with something similar that requires a lot of sprites. I have just been overwriting them, and according to the documentation, as they are the same size, it reuses the same buffer. I've attached it so you can see what I was doing, it isn't usable as is for a final program, it was purely just for experimentation, so no warranties expressed or implied! I hope to make this into a full game at some stage, but I'm going to start smaller for now. Galactica.zip Martin This signature intentionally left blank. |
||||
halldave Senior Member Joined: 04/05/2014 Location: AustraliaPosts: 121 |
Wow I love Galaga, so would love to see the final version ,Your code looks like a good start, however I am using the sprite copy command in your code where you have for i = 0 to 19 sprite read 23 + i, 160, 175, 16, 16 next Maybe could work like this sprite read 23, 160, 175, 16, 16 sprite copy 23,24,19 ' Copy sprite 23 to 24 starting at 24 and a further 18 I wonder in the 64 sprites is a hardware or practical limit or if you there is someway if it can be increased if many of the sprites reference the same memory. Ill keep playing anyway |
||||
halldave Senior Member Joined: 04/05/2014 Location: AustraliaPosts: 121 |
galaga.zip I added a couple of Galaga resources for you to play with, I will go with your open and close technique as that can be adapted to the Space Invaders. |
||||
realmnm Newbie Joined: 07/07/2020 Location: AustraliaPosts: 34 |
Yeah I didn't know about the SPRITE COPY command when I wrote that, I'm working through the manual at the moment. I think it is a practical limit, so it doesn't chew through a lot of memory storing the sprite and the background under it. Keep on playing, that's what I'm doing. Martin Edited 2020-07-12 15:54 by realmnm This signature intentionally left blank. |
||||
Print this page |