(shouting)

Sprites and Blocks: Requests, help, and discussion.

we don't need no edu - I mean, these threads, anymore.
User avatar
anonymousbl00dlust
Posts: 131
Joined: 14 years ago
Location: West Korea

Re: Sprites and Blocks: Requests, help, and discussion.

Post by anonymousbl00dlust »

(Reposted from smwcentral)

looks like this is going nowhere productive, so let me try and ask something else. I made this special version of the creating eating block that not only allows me to choose what direction to go in but also what tile to generate. The structure of it looks more or less like this:

Code: Select all

MAP16_NUMY	    db $03,$04,$05,$06,$00,$03,$04,$05,$06
X_SPEED		    dcb $10,$F0,$00,$00,$00,$10,$F0,$00,$00
Y_SPEED		    dcb $00,$00,$10,$F0,$00,$00,$00,$10,$F0
DIRECTION	    dcb $00,$00,$01,$00,$02,$00,$00,$00,$03,$00,$00[/size]
stuff happens, then

Code: Select all

		LDA X_SPEED,y           ; \ set x speed
		    STA $B6,x               ; /

		    LDA Y_SPEED,y           ; \ set y speed
		    STA $AA,x               ; /

		    LDA MAP16_NUMY,y	    ; \ set direction-based tile-gen table
		    STA $185E		    ; / for Block1 code later (done while y is still correct) 


decides weather or not to be a creating or an eating block, then

Code: Select all

BLOCK1		;block chosen to gen already selected when sprite speed was set			

		    LDA $185E		;choosing tile to generate from table
		    STA $9C		;

		    LDA $E4,x		;sprite xpos low (table)
		    STA $9A		;blockgen xpos of contact low
		    LDA $14E0,x		;sprite xpos high (table)
		    STA $9B		;blockgen xpos of contact high
		    LDA $D8,x		;sprite ypos low (table)
		    STA $98		;blockgen ypos of contact low
		    LDA $14D4,x		;sprite ypos high (table)
		    STA $99		;blockgen ypos of contact high

		    JSL $00BEB0		; generate Map16 tile routine
                    RTS

BLOCK2 		LDA #$02		;
		    STA $185E		; tile from map16

		    LDA $185E		;choosing tile to generate from table
		    STA $9C		;

		    LDA $E4,x		;sprite xpos low (table)
		    STA $9A		;blockgen xpos of contact low
		    LDA $14E0,x		;sprite xpos high (table)
		    STA $9B		;blockgen xpos of contact high
		    LDA $D8,x		;sprite ypos low (table)
		    STA $98		;blockgen ypos of contact low
		    LDA $14D4,x		;sprite ypos high (table)
		    STA $99		;blockgen ypos of contact high

		    JSL $00BEB0		; generate Map16 tile routine
                    RTS    
so the problem is, this only lets me generate certain map16 tiles. To fix this I had to use that tile generation expansion patch, but according to the readme I have to do so like this:
GENERATE ARBITRARY MAP16 TILE

Code: Select all

		LDA.b #$FF
		STA.b $9C
		;;STORE YOUR 16-BIT BLOCK NUMBER into $0660/1
		JSL $00BEB0
and that doesn't work with what I did at all. how do I fix this?
alex2 wrote:It's all a matter of taste.
Septentrion Pleiades
Banned
Posts: 0
Joined: 13 years ago
First name: Stephen
Location: Holstaurus Heaven

Re: Sprites and Blocks: Requests, help, and discussion.

Post by Septentrion Pleiades »

With my current level I'm having a problem with midpoint entrances being limit to screen 00-0F. Do we have a teleport block in the baserom?

Edit: Sorry about not noticing it sooner than posting, I just found it in the OP.

Edit: still don't understand inserting it.
Last edited by Septentrion Pleiades 12 years ago, edited 1 time in total.
Image
Image
Image
User avatar
raocow
the death of the incredible huge
Posts: 4078
Joined: 15 years ago
Location: maybe the Wizards are the most complex, and the sales guys are up their daily
https://raocow.talkhaus.com/

Re: Sprites and Blocks: Requests, help, and discussion.

Post by raocow »

What do you mean by that? Just make a block in one of your own map16 spaces imitate the behaviour of... whatever block it is, I forgot its number, haha.
the chillaxest of dragonsImage
Image
Image
Septentrion Pleiades
Banned
Posts: 0
Joined: 13 years ago
First name: Stephen
Location: Holstaurus Heaven

Re: Sprites and Blocks: Requests, help, and discussion.

Post by Septentrion Pleiades »

I thought the rom would already have a teleport block, and inserting them would be similar to inserting the boomerang brothers.
Image
Image
Image
User avatar
raocow
the death of the incredible huge
Posts: 4078
Joined: 15 years ago
Location: maybe the Wizards are the most complex, and the sales guys are up their daily
https://raocow.talkhaus.com/

Re: Sprites and Blocks: Requests, help, and discussion.

Post by raocow »

The rom DOES have a teleport block.

Did you find it in the map16? Just have one of your blocks 'act like [whatever block number it is]'
the chillaxest of dragonsImage
Image
Image
Awakenyourmind
Muwha!
Posts: 141
Joined: 13 years ago

Re: Sprites and Blocks: Requests, help, and discussion.

Post by Awakenyourmind »

Try 25 or 130 for the block to "act as"
I don't know which teleport block types we are using (as there are a few on smwcentral) but try either of those two numbers and post back. I checked the base rom zip and it does indeed have the teleport block, there are in fact 3 of of them.
limepie20
Posts: 0
Joined: 14 years ago
Location: Doesn't Matter

Re: Sprites and Blocks: Requests, help, and discussion.

Post by limepie20 »

The teleport block is 470. So have your map16 block act like 470.
Septentrion Pleiades
Banned
Posts: 0
Joined: 13 years ago
First name: Stephen
Location: Holstaurus Heaven

Re: Sprites and Blocks: Requests, help, and discussion.

Post by Septentrion Pleiades »

limepie20 wrote:The teleport block is 470. So have your map16 block act like 470.
I think I managed to create it in Map 13 as page 55 tile 00. I don't know how to insert it.
Image
Image
Image
User avatar
raocow
the death of the incredible huge
Posts: 4078
Joined: 15 years ago
Location: maybe the Wizards are the most complex, and the sales guys are up their daily
https://raocow.talkhaus.com/

Re: Sprites and Blocks: Requests, help, and discussion.

Post by raocow »

It's already inserted. I... I don't understand what you don't understand, here.
the chillaxest of dragonsImage
Image
Image
Septentrion Pleiades
Banned
Posts: 0
Joined: 13 years ago
First name: Stephen
Location: Holstaurus Heaven

Re: Sprites and Blocks: Requests, help, and discussion.

Post by Septentrion Pleiades »

I think I figured it out. I just had to learn map16.
Image
Image
Image
User avatar
anonymousbl00dlust
Posts: 131
Joined: 14 years ago
Location: West Korea

Re: Sprites and Blocks: Requests, help, and discussion.

Post by anonymousbl00dlust »

I'm trying to make a block that stops the camera from scrolling vertically when touched. I tried

LDA #$00
STA $1412
RTL

but it doesn't work for some reason. can I get some help?
alex2 wrote:It's all a matter of taste.
User avatar
Isocitration
Posts: 33
Joined: 13 years ago

Re: Sprites and Blocks: Requests, help, and discussion.

Post by Isocitration »

I think there's a block like that already in the base rom.

Try Map16 tile 43A. Tile 439 will turn vertical scrolling back on if you need that too.
raocow wrote:you are dommed iso.
User avatar
anonymousbl00dlust
Posts: 131
Joined: 14 years ago
Location: West Korea

Re: Sprites and Blocks: Requests, help, and discussion.

Post by anonymousbl00dlust »

Does anyone know how to change the sprite palette used by the creating/eating blocks and falling castle spikes? It doesn't seem to follow the usual format.
alex2 wrote:It's all a matter of taste.
User avatar
Paralars
Posts: 0
Joined: 14 years ago

Re: Sprites and Blocks: Requests, help, and discussion.

Post by Paralars »

the brown used blocks use the coin palette, which is 6 or something.
The yellow castle spikes use probably the same palette.

The block-snake thing and the falling spikes are sprites, and sprites only use palettes 8-F.
You'll have to change those in your level's custom palette to affect these sprites.

palette A is usually the yellow one used for the spike, try changing that one or the other 8,9,B,C,D,E,F.


In case that wasn't your question and you want to change the setting which palette these sprites use, you'll have to make a custom sprite with cfg editor and set it to use whichever palette you want.
User avatar
anonymousbl00dlust
Posts: 131
Joined: 14 years ago
Location: West Korea

Re: Sprites and Blocks: Requests, help, and discussion.

Post by anonymousbl00dlust »

two questions:

1. What timer does the falling spike use to determine when to fall?

2. Have we inserted those hyper V "bounce any touching sprites" block? Does anyone know where I can get that block?
alex2 wrote:It's all a matter of taste.
User avatar
anonymousbl00dlust
Posts: 131
Joined: 14 years ago
Location: West Korea

Re: Sprites and Blocks: Requests, help, and discussion.

Post by anonymousbl00dlust »

Alex wrote:
anonymousbl00dlust wrote:1. What timer does the falling spike use to determine when to fall?
$1540,x. The address it uses is indexed by the sprite slot it's in.
anonymousbl00dlust wrote:2. Have we inserted those hyper V "bounce any touching sprites" block? Does anyone know where I can get that block?
I can make you one if you can't find it. It's a pretty simple thing.
thanks for the help!

on another note, does anyone know if there is a disassembly of the key available for download anywhere?
alex2 wrote:It's all a matter of taste.
User avatar
anonymousbl00dlust
Posts: 131
Joined: 14 years ago
Location: West Korea

Re: Sprites and Blocks: Requests, help, and discussion.

Post by anonymousbl00dlust »

stupid creating eating lineguide still isn't working and I have absolutely no idea why.

can I please have some help with this thing? It generates the right tiles but now the paths won't work properly. I think it has something to do with the tables.
alex2 wrote:It's all a matter of taste.
User avatar
anonymousbl00dlust
Posts: 131
Joined: 14 years ago
Location: West Korea

Re: Sprites and Blocks: Requests, help, and discussion.

Post by anonymousbl00dlust »

what code do I run to make a sprite disappear/despawn?
alex2 wrote:It's all a matter of taste.
User avatar
anonymousbl00dlust
Posts: 131
Joined: 14 years ago
Location: West Korea

Re: Sprites and Blocks: Requests, help, and discussion.

Post by anonymousbl00dlust »

Alex wrote:Regarding anonymousbl00dlust's above posts: I've helped him in IRC.
Except with the lineguide because it is retarded and impossible to work with
alex2 wrote:It's all a matter of taste.
User avatar
ProfessorDemetri
Posts: 0
Joined: 14 years ago
Location: BC, Canada

Re: Sprites and Blocks: Requests, help, and discussion.

Post by ProfessorDemetri »

Hello. :ugeek:

I'm not sure if this would be a block or sprite. I'd assume a block. And I'm not sure if this can be done, or if there is a default way of doing this in Lunar magic or not, buuuuut-
I need a sprite/block for what Demo crosses it, it triggers exanimation. And I need a ton of them. Different ones. All to be laid out in different areas of a level, and sublevel.
Either I need someone to help me make that, or to make it for me, or to tell me how I can do it with lunar magic.
Thanks guys.
Image
Image
If you need help with anything, contact me on my skype: Demekun
Septentrion Pleiades
Banned
Posts: 0
Joined: 13 years ago
First name: Stephen
Location: Holstaurus Heaven

Re: Sprites and Blocks: Requests, help, and discussion.

Post by Septentrion Pleiades »

I've been trying to do an enemy spawner but I can't figure out how to use Sprite Tool. Whenever I try it nothing seems to actually get inserted. I've been trying to use Normal_shooter4.cfg(stationary bullet bill generator disassembly). I'm also worried that it might cause slowdown if it does work in the future.
The Sprite I'm trying to generate is 6f. Whenever I try to insert with Sprite Tool v1.40 I get "Error couldn't open cfg file .\sprites\FF".
Image
Image
Image
Septentrion Pleiades
Banned
Posts: 0
Joined: 13 years ago
First name: Stephen
Location: Holstaurus Heaven

Re: Sprites and Blocks: Requests, help, and discussion.

Post by Septentrion Pleiades »

I got the sprite inserted, but it slowdowns the game quite a bit. I would think adding something to the code would limit sprite creation to reduce lag, although it might be unaviodible.

Code: Select all

;; Normal Shooter 4, based on the Bullet Bill Shooter disassembly by mikeyk, 

further 
;; adapted into Sprite Tool by Davros  
;;
;; Description: This will generate a normal sprite without smoke and will keep 

shooting.
;; Specify the actual sprite and sound that is generated below.
;;
;; NOTE: Trying to generate a sprite that doesn't exist will crash your game.
;;
;; Uses first extra bit: NO
;;  
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;

                    SPRITE_TO_GEN = $6F
                    SOUND_TO_GEN = $02

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;
; sprite code JSL
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;
                    
                    dcb "INIT"              
                    dcb "MAIN"                                    
                    PHB                     
                    PHK                     
                    PLB                     
                    JSR SPRITE_CODE_START   
                    PLB                     
                    RTL      

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;
; main bullet bill shooter code
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;               

SPRITE_CODE_START   LDA $17AB,x             ; \ return if it's not time to 

generate
                    BNE RETURN              ; /
                    LDA #$60                ; \ set time till next generation = 60
                    STA $17AB,x             ; /
                    LDA $178B,x             ; \ don't generate if off screen 

vertically
                    CMP $1C                 ;  |
                    LDA $1793,x             ;  |
                    SBC $1D                 ;  |
                    BNE RETURN              ; /
                    LDA $179B,x             ; \ don't generate if off screen 

horizontally
                    CMP $1A                 ;  |
                    LDA $17A3,x             ;  |
                    SBC $1B                 ;  |
                    BNE RETURN              ; / 
                    LDA $179B,x             ; \ ?? something else related to x 

position of generator??
                    SEC                     ;  | 
                    SBC $1A                 ;  |
                    CLC                     ;  |
                    ADC #$10                ;  |
                    CMP #$10                ;  |
                    BCC RETURN              ; /
                    JSL $02A9DE             ; \ get an index to an unused sprite 

slot, return if all slots full
                    BMI RETURN              ; / after: Y has index of sprite being 

generated

GENERATE_SPRITE     LDA #SOUND_TO_GEN       ; \ play sound effect
                    STA $1DFC               ; /
                    LDA #$01                ; \ set sprite status for new sprite
                    STA $14C8,y             ; /
                    LDA #SPRITE_TO_GEN      ; \ set sprite number for new sprite
                    STA $009E,y             ; /
                    LDA $179B,x             ; \ set x position for new sprite
                    STA $00E4,y             ;  |
                    LDA $17A3,x             ;  |
                    STA $14E0,y             ; /
                    LDA $178B,x             ; \ set y position for new sprite
                    SEC                     ;  | (y position of generator - 1)
                    SBC #$01                ;  |
                    STA $00D8,y             ;  |
                    LDA $1793,x             ;  |
                    SBC #$00                ;  |
                    STA $14D4,y             ; /
                    PHX                     ; \ before: X must have index of 

sprite being generated
                    TYX                     ;  | routine clears *all* old sprite 

values...
                    JSL $07F7D2             ;  | ...and loads in new values for 

the 6 main sprite tables
                    PLX                     ; / 
RETURN              RTS                     ; return

Image
Image
Image
User avatar
Goomba98
Posts: 4
Joined: 13 years ago
Location: I dunno.

Re: Sprites and Blocks: Requests, help, and discussion.

Post by Goomba98 »

anonymousbl00dlust wrote:
Alex wrote:Regarding anonymousbl00dlust's above posts: I've helped him in IRC.
Except with the lineguide because it is retarded and impossible to work with
http://www.youtube.com/watch?v=GIN1To_Nwqg
No signature ideas right now.
Septentrion Pleiades
Banned
Posts: 0
Joined: 13 years ago
First name: Stephen
Location: Holstaurus Heaven

Re: Sprites and Blocks: Requests, help, and discussion.

Post by Septentrion Pleiades »

Alex wrote:Why does everyone use fucking TRASM in this hack?
It's the first ever custom sprite I ever inserted. Is there a better way to do it?
Image
Image
Image
User avatar
swirlybomb
a bomb that is swirly
Posts: 65
Joined: 12 years ago
First name: Swirlus Bomberton
Location: The Canadas

Re: Sprites and Blocks: Requests, help, and discussion.

Post by swirlybomb »

Limepie says that the blocks that crumble on contact without bouncing Mario/Demo upward are already in the baserom, but I can't seem to find it in Map16? I also don't think I understand the blocks list in the first post, that is, what the numbers refer to, because I don't believe those are the Map16 spots?
anonymousbl00dlust wrote:All the obstacles in my level can be beaten on the players first attempt without any 'future predicting'.
Image
Locked