Language…
12 users online:  AmperSam, Apple Boy, Blue Axl, Burning Loaf, Dan2point5, Enderdavid_HD, HD_DankBaron,  RussianMan,  Segment1Zone2, underway, WONIU, Zavok - Guests: 96 - Bots: 118
Users: 67,658 (1,991 active)
Latest user: FlowerHeart

Tower of Heaven fan

SMW Blocks → Tower of Heaven fan

Submission Details

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:
5.0 (1 rating)
No rating
Download 6.35 KiB | 692 downloads

Screenshots

View all

Comments (15)

Epic_Manky Link
Surprised there's no setting or version that makes it blow downward instead...
EmulaDuck Link
Where insert this code?: [JSL TOHFan_TowerOfHeavenFan] in what .asm or document text? In Uber or GPS?
SmokyShroom Link
While it would be easier to ask, it is likely better to try it out yourself. Also, if you know how to edit the code, making a down version should be relatively easy.
zacmario Link
Can you make a down version of this, compatible with swimming? Also does this work under water?
HammerBrother Author Link
Note to anyone interested in making blocks that would execute once per frame: When multiple collision points are touching the block, they all execute in a single frame. Thus a single increment by 1 could have all 10 increments in a single frame, causing an increment of 10 per frame instead of 1, this is why uberasm tool, as well as cooldown timers are needed to prevent multi-activation.
 Major Flare Link
Worked fine. Accepted.
EcTo From older version: Tower of Heaven fan Link
Cool!
 Koopster From older version: Tower of Heaven fan Link
tbh if a block is inefficiently coded to the point of using uberASM code when it's not needed at all, I question if it's worth accepting.
 Hobz From older version: Tower of Heaven fan Link
i cant get the uberasm to work so i guess i'm not using this block
HammerBrother Author From older version: Tower of Heaven fan Link
@chineesmw

Wind blocks does not accelerate. My fan blocks leave the player with momentum after leaving the block.
chineesmw From older version: Tower of Heaven fan Link
What's the difference between this and the Wind Blocks?
HammerBrother Author From older version: Tower of Heaven fan Link
Sorry. It's because that when using all offsets of a block, the acceleration is more rapid. This is because touching multiple offsets would execute the block's code multiple times per frame.
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.
JackTheSpades From older version: Tower of Heaven fan Link
So... this block.
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...

Code
	LDA #$80
	if !Setting_HoldJump == 1
	  TRB $15            ;>Clear the hold jump button
	endif
	if !Setting_HoldJump == 2
	  TSB $15
	endif


... 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.
H.carrell on an ipad From older version: Tower of Heaven fan Link
Good block
Pink Gold Peach From older version: Tower of Heaven fan Link
GHB, i'm your fan