Language…
8 users online: Batata Douce, crocodileman94, DimeR, Dzing,  icrawfish,  Nanako, temsuper1, TheXander - Guests: 272 - Bots: 302
Users: 64,795 (2,377 active)
Latest user: mathew

Sprite Programming [Legacy]

1. You will have to setup a counterloop type routine that will check the sprites state and not animate if so.
Something like:
Code
LDA $14C8,X
CMP #$02 ;Falling off screen
BEQ DontAnimate
;;Animation routine and then the rest
DontAnimate:
;;Generic 1 tile write to $0302,y
RTS


2. Do the same as above except set X (or Y) flip to the YXPPCCCT.

3. Yes, you have to add this routine yourself and JSR to it.

4. Same as above, JSR to the Generate Smoke Subroutine

5. For that you'd do something like check Mario's Y speed and then the sprites Y position, I guess....

Originally posted by NamelessProtagonist
Also, it would be nice if you could cover what to do to set the palette and whether or not the sprite uses the second graphics page or not using the cfg file in a bit more detail...

All of this (or at least most of it) was covered in the tutorial, please read all of it...
Well, I spent some time today looking at other sprites and managed to fix a few issues... All of them but #5 so far actually...

Still, I think these are important things that the tutorial should cover.

As for the CFG file thing, the tutorial does mention it, but only once and seems to favor directly setting the YXPPCCCT in the asm file. Although I managed to work it out myself, it would probably be better for the tutorial to explain that a bit better.

(Oh, and regarding #4, thats unnecessary...

Spinkill:
LDA #$04 ; \ sprite status = 4 (being killed by spin jump)
STA $14C8,x ; /
LDA #$1F ; \ set spin jump animation timer
STA $1540,x ; /
JSL $07FC3B ; show star animation
LDA #$08 ; \ play sound effect
STA $1DF9 ; /
RTS

works just fine without the need for a whole new subroutine)

Edit: Well, its official. I'm an idiot. Turns out every problem I was still having with it was caused by the .cfg file. Its always the simplest fix that you overlook...
I have a hack thread - Link (Now with a demo!)
Also a music thread - Link

C3 Projects
2013: Modern Spiny Pack
2012: MGSS v0.1
Spring 2010: SMB2 Autobomb Sprite
How should increase more tiles??

First,answer my questions:
1)GET DRAW INFO is increased more diferent tiles??
2)Exist another code for sprite size??
3)And the graphics routine?After to increase more diferent tiles??
4)More theory about this??
i don't fully understand but i sorta do so ty anyway



Sorry for bumping but..
The links are broken.
So now it's very hard to understand it all, so do you mind placing the codes in this thread???
Your layout has been removed.
Could somebody give me the 16x32 Sprite Routine?
The link is broken, so..
Your layout has been removed.
What they said. This is the only good sprite programming tutorial (as far as I know) and without functioning links, it's almost impossible to understand.
Yes, please fix the links as soon as possible.

I was planning on trying to make a 16x32 sprite tonight but without the tutorial I'm lost =/
I have a hack thread - Link (Now with a demo!)
Also a music thread - Link

C3 Projects
2013: Modern Spiny Pack
2012: MGSS v0.1
Spring 2010: SMB2 Autobomb Sprite
The statcic 16x16 tutorial links are broken...
I actually lost of all the sprite files in a hard drive crash (including all other SMW related stuff).. does anyone have them?
I have your backup thing. gotta find it.

But sorry, I don't have your other smw related things.
I own a community of TF2 servers!

ASMT - A new revolutionary ASM system, aka 65c816 ASseMbly Thing
SMWCP - SMW Central Presents a Product- tion long name

frog

http://esolangs.org/wiki/MarioLANG
Awesome, can't wait to finish the tutorial
Ah well, Iceguy PM'd me about the files, but just so you guys don't have to wait any longer...


Link

zKiP was to the rescue!

Give Mario some love?~

by the way, for something like

LDX $1337,x

which doesn't work, cant you just use

LDA $1337,x
TAX

instead of the one in the tutorial?

its much easier compared to the one in the tutorial.



I might put some sort of signature here once. I guess.
Thank you so much zKip.
I can't find anything in the tutorial about an animated 16x32 sprite. The files zKip posted only have a non-animated one, and the tutorial skips straight from that to 32x32. In my own attempts, the best I've been able to do is an animated 16x32 that uses the same tile for both the bottom and top... which is essentially useless.

What changes would I have to make to the non-animated 16x32 graphics routine to animated it.

I would also like to know how to...

1) Use the CFG file to determine the palette and graphics page to use.
2) Stop the animation when the sprite is not touching a ledge (falling off the screen)
3) Flip the sprite upsidedown if it is falling off the screen

I've managed to do this with a 16x16, but doing it with a 16x32 is still above me. Thanks.
I have a hack thread - Link (Now with a demo!)
Also a music thread - Link

C3 Projects
2013: Modern Spiny Pack
2012: MGSS v0.1
Spring 2010: SMB2 Autobomb Sprite
If we wanted to create a sprite that was 8x8 big, would we need the INY anyway in the graphics routine?
Yes, but only once, not 4 times.
I have a hack thread - Link (Now with a demo!)
Also a music thread - Link

C3 Projects
2013: Modern Spiny Pack
2012: MGSS v0.1
Spring 2010: SMB2 Autobomb Sprite
'k. Thanks!
Originally posted by NamelessProtagonist
Yes, but only once, not 4 times.

Wrong. You increase Y because you need a new offset to OAM to not overwrite the tile data you just stored; since the data for one tile (8x8 or 16x16 doesn't matter) uses four bytes (x position, y position, tile number, and properties), you increase it four times. However, when you are only writing one tile to OAM, there is obviously no need to get a new offset, and therefore you won't need to increase Y at all.
My YouTube channel
Get the official ASMT resource pack here!