Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 18:07 29 Mar 2024 Privacy Policy
Jump to

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: Australia
Posts: 121
Posted: 02:35am 12 Jul 2020
Copy link to clipboard 
Print this post




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 Kingdom
Posts: 267
Posted: 03:05am 12 Jul 2020
Copy link to clipboard 
Print this post

  halldave said  Im two rows in at the moment.


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: Australia
Posts: 34
Posted: 03:10am 12 Jul 2020
Copy link to clipboard 
Print this post

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: Australia
Posts: 121
Posted: 05:02am 12 Jul 2020
Copy link to clipboard 
Print this post

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: Australia
Posts: 121
Posted: 05:19am 12 Jul 2020
Copy link to clipboard 
Print this post

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: Australia
Posts: 34
Posted: 05:52am 12 Jul 2020
Copy link to clipboard 
Print this post

  halldave said  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


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


To reply to this topic, you need to log in.

© JAQ Software 2024