Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
1 user currently in Super Mario World hacking: labmaster | 3 guests
Acmlm's Board - I2 Archive - Super Mario World hacking - Uh...help...
  
User name:
Password:
Reply:
 

UserPost
mvent2
Posts: 31/73
Originally posted by Pikachu025
May I use something like that in my hack...?


I dunno I want the hack to have all these unique things so I could AT LEAST have a shot at the best newbie hack award.
HyperLamer
Posts: 4861/8210
Because If and Goto are too complicated for ASM. (Actually, 'goto x' is basically just the same as 'jmp x' or similar.) It takes some getting used to but it's not that bad. Basically in ASM you can only compare two values and jump to different parts of code based on whether one is greater than, less than, equal to, or not equal to the other. You use this in conjunction with math and various jumps to achieve the same effect as an If statement.

Example: a chunk of C code:
if(a == b) DoSomething(); else if(a > b) DoSomethingElse();

Might look like this in ASM:
cmp a,b ;are A and B equal?
bne .next1 ;If result of last compare was 'not equal' go to '.next1'
call DoSomething
bra .end ;Go to '.end'

;A != B... is A > B?
.next1:
cmp a,b ;Not entirely necessary, included for demonstration purposes
bcc .end ;BCC = branch if less than (Branch if Carry Clear); go to .end
call DoSomethingElse

.end: ;Code ends here
mvent2
Posts: 30/73
Darkflight, after seeing that, you reaffirmed my fear of ASM. Instead of using cmp, why doesnt it just use IF??? And instead of beq, GOTO???? Whoever invented ASM is either foreign or retarded.

I used Ballom's suggestion and it went like a charm, after some vigorous problem solving. eg. A vertical layer 2 interactive level will only show its layer 2 stuff if it has more than 1 screen. Second, the layer 2 stuff scroll with the scrolling, so I disabled scrolling (duh) but then found out the stuff in layer 2 is NOT where you put it in Lunar Magic. So I moved the on/off switch until it was in the right place.

So after adding about 10 more blocks in Block tool, I perfected it. Yay! Sorry to whoever wanted to do this, and thanks Ballom.
Sukasa
Posts: 805/1981
Or maybe you could use blocks that trigger the on/off register ($14AF), which would turn them into different GFX. After that, code them so that they are unresponsive to mario jumping with the switch OFF, because all levels start with it ON. also, a block would need to change register $14AF to OFF after being hit.. then just enable side exits.

Partial example:

lda $14AF
cmp #$0 /check if the switch is ON
beq label1 /if so, execute code
rts /otherwise leave the code segment
label1:

//place your item code here

lda #$1
sta $14AF /stop the code from running again in this level, at least until you re-rts /enter it from the OW.
Pikachu025
Posts: 61/96
May I use something like that in my hack...?
Glyph Phoenix
Posts: 264/745
That's actually pretty clever. Brilliant, even. I might use that in my hack if mvent2 doesn't.
Alastor the Stylish
Posts: 6574/7620
Here's a stupid idea: Have a block just below each item block that, when hit, triggers something. The floor is all custom blocks, and when that something is triggered, you can pass through the floor. Below the floor is the level ends.
DisruptiveIdiot
Posts: 105/147
Originally posted by Cirvante

Maybe you should enable side exits. That's what FuSoYa did in DWTLC.


Then he'd have to somehow disable the other items, Fu just gave you a bunch of items, this guy only wants one given to you.
Cirvante
Posts: 35/80

Maybe you should enable side exits. That's what FuSoYa did in DWTLC.
mvent2
Posts: 29/73
Would my idea work or am I simply being naive again?
DisruptiveIdiot
Posts: 104/147
Originally posted by mvent2
I have an idea but I don't know if it'll work. I set the layer 2 to level with layer 2 interaction on. I put the block which gives the item on object layer and put the goal block in the same position on layer 2. That way they'll hit both blocks simultaneously, though it'll be at the cost of a good background, which will leave me open to criticism from some people (*looks at people accusingly* )


You could use objects in layer 2 with background gfx to make one, just make them all behave as walkthrough dirt.
mvent2
Posts: 28/73
I have an idea but I don't know if it'll work. I set the layer 2 to level with layer 2 interaction on. I put the block which gives the item on object layer and put the goal block in the same position on layer 2. That way they'll hit both blocks simultaneously, though it'll be at the cost of a good background, which will leave me open to criticism from some people (*looks at people accusingly* )
HyperLamer
Posts: 4833/8210
It's $100. I think you use something like #$0B to exit the level.
Sukasa
Posts: 790/1981
try... shoot. Can't remember the register, but there was an action register that would fade out the level when a certain number was written to it. try giving the player an item and then writing that register.
mvent2
Posts: 27/73
Originally posted by Ikuzou
How about this:
Remake the block so that it makes the bumping sound when you touch it.
Then, insert the block and make the setting water or 25 or something.
Place the sphere behind the bumping block.
When you test the block it should seem like Mario hit the block and ended the level.

I don't know anything about ASM, but I think it'll work, though.


That won't work as you have to hit the block from below and solidify it to get the item.
Ikuzou
Posts: 25/181
How about this:
Remake the block so that it makes the bumping sound when you touch it.
Then, insert the block and make the setting water or 25 or something.
Place the sphere behind the bumping block.
When you test the block it should seem like Mario hit the block and ended the level.

I don't know anything about ASM, but I think it'll work, though.
mvent2
Posts: 26/73
The thing is, I am trying to replace the bonus game with a thing similar to Toad's item shop. You arrive in the bonus level and you have 3 blocks you can bump. Im using Block tool to make the block that puts an item in your spare item box. After bumping one block, the level ends.

My problem is, I can get the get-an-item part to work properly, but the level won't end. I have tried making a goal block in block tool and making the item blocks "act like" the goal block, hoping the get-an-item part would still work, but it will only end the level and not give an item. I have tried putting a goal point sphere sprite in front of each block, but when you hit the block you cant get the sphere. How do I make this work...

If only you could put two working objects in the one tile, that would make things so much easier
Acmlm's Board - I2 Archive - Super Mario World hacking - Uh...help...


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.005 seconds.