Name: | Tower of Heaven fan |
Author: | HammerBrother |
Added: | |
Version History: | View |
Act As: | 25 |
Includes GFX: | Yes |
Description: | Not to be confused with the simple blocks that DEC/SEC : SBC your $96 Y position to make you float. This is a fan block that sends the player flying upwards in an acceleration-based momentum gradually unlike traditional boost blocks (which changes your momentum instantly). The longer or lower you are touching this block, the higher the player is sent. Inspired by the propellers from Tower of Heaven by askiisoft. |
Tags: | acceleration lorom physics platformer sa-1 tower of heaven |
Comments: | 15 (jump to comments) |
Rating: |
Download
6.35 KiB | 692 downloads
Comments (15)
Wind blocks does not accelerate. My fan blocks leave the player with momentum after leaving the block.
EDIT: Also, for the sound effects, blocks can't really tell if the sound is currently playing and also cannot detect when you leave the block, therefore, uberasm and freeram is needed.
I'll update it to reuse the same byte, the bit idea was a smart move.
It works so I accepted it but I'm really not happy with it.
The code doesn't seem to work on gamemode14 at all. Either that or I'm just doing it wrong but I know for a fact that changes to $15 in gamemode14 have no effect since it runs before the controller is updated, so the whole...
... is useless in gamemode14. While on that topic, why not put the LDA inside the if?
Anyway, putting minor coding related things aside (such as using BRA .return instead of just RTS) I have two real problems with this code:
1. The wast of a freeRAM. If all you're doing is using freeRAM as a flag to check if something has happened (LDA !flag : BEQ .skip) you really don't need a second freeRAM address, just set the bits of the first address for different meanings:
!Freeram_Fanned = $60 ; ---- --si
; i=inside block
; s=sfx played
2. The use of uberASM. I know there are certain things you can't do using just block code, but here it just seems wasteful. Basically, all your block does is set a flag and let uberASM do all the rest. This is more of a personal oppinion but I always hate it when I download a block and see if I have to patch something else to make it work.
Anyway, back to topic, in this blocks case, I don't get it. Since, if you remove the SFX sound effect (which gets pretty anoying after a while anyway) you can do everything inside the block code without using uberASM at all, by simply copying the code between .AccelUp and .OffRan to where LDA #$01 : STA !Freeram_Fanned is.
Not only does that remove the need for uberASM but also for any freeRAM..
Gotta admit though, with the SFX, you probably need it. Even so, I'd like this a lot more if the code was layouted in a way that the block works on it's own and you have the option to use freeRAM + uberASM for the sound effect.