Banner
Views: 737,248,216
Time:
10 users online: Cote de Boeuf, o Deeke, Golden Yoshi, Green Jerry, idol, N4m3_H3rE, NaroGugul, PowerStrike, The Hacking Yoshi, TycjanGamer - Guests: 70 - Bots: 249Users: 38,780 (1,919 active)
Latest: TycjanGamer
Tip: You can edit the properties of the original sprites using Tweaker.Not logged in.
**SOLVED** Creeper almost finished
Forum Index - SMW Hacking - SMW Hacking Help - ASM & Related Topics - **SOLVED** Creeper almost finished
Pages: « 1 »
Hello, I am currently altering the AB Rex disassembly sprite to turn it into a creeper (from minecraft). So far I have:

1. Changed it so that spin/yoshi jumping only squishes it.
2. Custom sprite
3. Fixed X offset for head
4. Changed the palette to D so that it's green by default - no palette editing needed
5. Copied code from Pokey disassembly to make it follow Mario instead of walking by

The only thing remaining to make it perfect would be to make it act like a stomped on bobomb after one stomp. Meaning flash for a time and then explode. If you stomp it again before it explodes, it would just disappear like normal.

If there is anyone that could help me with this, please let me know. You would of course be credited.

--------------------
Solo Hacks In Progress:
Luigi's Big, Green Adventure
Jello's Journey

Collab Hacks In Progress:
K-16 - Story of Steel - Playtester
The Dimensional Rift - Level(s), Title-screen lettering

Sprites:
Creeper Pack - Project Thread

Sprites In Progress:
32 x 64 Creeper Boss
Boom Boom
The easiest way of making a sprite explode is simply turning it into a bob-omb and setting the explosion timer to zero. Like so:

Code
			LDA #$0D		; \ turn sprite
			STA $9E,x		; / into bob-omb
			JSL $07F7D2		; reset sprite tables
			LDA #$08		; \ sprite status:
			STA $14C8,x		; / normal
			LDA #$01		; \ make it
			STA $1534,x		; / explode
			LDA #$30		; \ set time for
			STA $1540,x		; / explosion
			LDA #$09		; \ play sound
			STA $1DFC		; / effect

To make it sit still and flash before exploding, things get slightly more complicated: you need to add a third sprite state that gets triggered after the sprite gets stomped a second time. Although the state itself doesn't have to do much, other than decreasing a timer so it knows when to explode. Also, you need to edit the graphics routine so that it uses different palettes depending on some sort of timer: the explosion timer would probably work here as well, as long as you make sure that a timer value of zero corresponds to the green palette (since the timer would be zero for the non-explosion-countdown states).

Also thread moved.

--------------------
My YouTube channel
Get the official ASMT resource pack here!

Originally posted by yoshicookiezeus
The easiest way of making a sprite explode is simply turning it into a bob-omb and setting the explosion timer to zero. Like so:

Code
			LDA #$0D		; \ turn sprite
			STA $9E,x		; / into bob-omb
			JSL $07F7D2		; reset sprite tables
			LDA #$08		; \ sprite status:
			STA $14C8,x		; / normal
			LDA #$01		; \ make it
			STA $1534,x		; / explode
			LDA #$30		; \ set time for
			STA $1540,x		; / explosion
			LDA #$09		; \ play sound
			STA $1DFC		; / effect

To make it sit still and flash before exploding, things get slightly more complicated: you need to add a third sprite state that gets triggered after the sprite gets stomped a second time. Although the state itself doesn't have to do much, other than decreasing a timer so it knows when to explode. Also, you need to edit the graphics routine so that it uses different palettes depending on some sort of timer: the explosion timer would probably work here as well, as long as you make sure that a timer value of zero corresponds to the green palette (since the timer would be zero for the non-explosion-countdown states).

Also thread moved.


Thanks a bunch, that makes it explode, I just don't know how to make it happen after one stomp. What I have figured so far is that I need to load and compare to the smushed state and then branch. What I have so far is:

Code
LDA $14C8,x
CMP #03
BEQ Boom

Boom:
The above code


However, this just blows it up instantly, and I'm mot sure what I'm doing wrong, as my ASM skills are rudimentory.

--------------------
Solo Hacks In Progress:
Luigi's Big, Green Adventure
Jello's Journey

Collab Hacks In Progress:
K-16 - Story of Steel - Playtester
The Dimensional Rift - Level(s), Title-screen lettering

Sprites:
Creeper Pack - Project Thread

Sprites In Progress:
32 x 64 Creeper Boss
Boom Boom
When the code doesn't branch it goes on with whatever comes afterwards, and since in your case that's the "boom" part as well, both will lead to the same place.

If that part were the end of your code, you could just stick an RTS after the branch, but in many cases switching the conditions works wonders:

Code
; this essentially skips the explosion part
LDA $14C8,x
CMP #$03
BNE NotBoom
[insert explosion code here]
NotBoom:


--------------------


 
Originally posted by WhiteYoshiEgg
When the code doesn't branch it goes on with whatever comes afterwards, and since in your case that's the "boom" part as well, both will lead to the same place.

If that part were the end of your code, you could just stick an RTS after the branch, but in many cases switching the conditions works wonders:

Code
; this essentially skips the explosion part
LDA $14C8,x
CMP #$03
BNE NotBoom
[insert explosion code here]
NotBoom:


Well, that makes it act like it did before, no explosions at all...

--------------------
Solo Hacks In Progress:
Luigi's Big, Green Adventure
Jello's Journey

Collab Hacks In Progress:
K-16 - Story of Steel - Playtester
The Dimensional Rift - Level(s), Title-screen lettering

Sprites:
Creeper Pack - Project Thread

Sprites In Progress:
32 x 64 Creeper Boss
Boom Boom
Because the branch now makes the code skip the explosion if it's not in state 03.
And the sprite won't get in that state on it's own, you need to set $14C8,x somewhere in your code. Probably after some Mario-Sprite interaction.

--------------------
Anime statistic on MyAnimeList:
400 animes completed ✓
6000 episodes completed ✓
100 Days completed ✓
... what even am I doing with my life?
Thanks for helping the n00b everyone, I now have three four working versions:

1. Acts like a Rex but chases Mario
2. Explodes after being jumped on once
3. Explodes after being jumped on twice
4. Flashes and explodes after being jumped on twice

EDIT
I accomplished the last by changing it to a normal bob-om without the code that made it explode. Then I just changed the ExGFX standing bob-om sprite space into the smushed creeper sprite.
/EDIT

I'd also like to have a boss version that is invulnerable while smushed, and unsmushes a few times before exploding. At this point, I have not figured out how to do this yet, so any further help is appreciated.

Using the n00b boss, almost there, consider this thread solved.

Thanks,
Uncle Monkey

--------------------
Solo Hacks In Progress:
Luigi's Big, Green Adventure
Jello's Journey

Collab Hacks In Progress:
K-16 - Story of Steel - Playtester
The Dimensional Rift - Level(s), Title-screen lettering

Sprites:
Creeper Pack - Project Thread

Sprites In Progress:
32 x 64 Creeper Boss
Boom Boom
Pages: « 1 »
Forum Index - SMW Hacking - SMW Hacking Help - ASM & Related Topics - **SOLVED** Creeper almost finished

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2019 - SMW Central
Legal Information - Privacy Policy - Link To Us


Total queries: 23

Menu

Follow Us On

  • Facebook
  • Twitter
  • YouTube

Affiliates

  • Talkhaus
  • SMBX Community
  • GTx0
  • Super Luigi Bros
  • ROMhacking.net
  • MFGG
  • Gaming Reinvented