Banner
Views: 568,214,287
Time: 2017-09-22 10:40:11 PM
17 users online: Gloomy, o Koops, Manuel Jesus, MarioFanGamer, Mellonpizza, MercuryPenny, Nariofan101, NaroGugul, NeXuS15, Rainbow Star, SNEStilting, TheBiob, toad64, Tob, trackftv, XtraFlatt, yoshiatom - Guests: 44 - Bots: 200Users: 32,510 (1,189 active)
Latest: Cupckacke23
Tip: Add decorations to the overworld. Don't leave large empty grass or sea regions.Not logged in.
Details for Relative teleport blocks
SMW Blocks - Relative teleport blocks
File Name: Relative teleport blocks
Added: 2017-09-08 07:18:33 AM
Authors: GreenHammerBro
Act As: 25
Includes GFX: No
Description: A special teleport block that keeps the player's physics during transition to another level. Good for cross-level effects.
Tags: physics, position, teleport
Rating: 5.0 (Votes: 1)
Download: Download - 56.52 KiB
39 downloads
  Submit Update
Screenshots
Image
GreenHammerBro
@MarioFanGamer

oh crud:
Code
	RelativeWarpPos:
	LDA !Freeram_PlayerInfoSave
	BEQ .RestoreCodeEnd

	.AdjustPos
	PHX					;>X is still being used

	REP #$20				;>16-bit A
	LDX #$02				;>Start loop counter/What position to use

	..Loop
	LDA $94,x				;\Adjust player position
	CLC					;|
	ADC !Freeram_RelCoorWarp,x		;|
	STA $94,x				;/
	DEX #2					;>Next index/position value
	BPL ..Loop				;>Loop if 0 or positive
	SEP #$20

	PLX					;>Restore X of something else.

	.RestoreCodeEnd
	LDA $13BF
	CMP #$24
	RTL


I forgot to add a check if the warp is normal to skip displacing the player's position. I assume that I set the displace values to 0 when doing a normal warp, my bad.
Posted by: GreenHammerBro - 2017-09-12 02:42:58 AM
MarioFanGamer
Originally posted by GreenHammerBro
@MarioFanGamer: uh
Originally posted by uberasm GM14 init
Code
	LDA #$00				;>A = #$00
	CMP !Freeram_PlayerInfoSave		;\If regular warp, don't set player
	BEQ .Return				;/info.
	STA !Freeram_PlayerInfoSave		;>Clear itself so when switching to normal doesn't screw up.


that was ment to prevent applying the physics to the next level if other than teleport blocks.

The physics weren't the problem (I mean, hello, I can read ASM cdoes too). In fact, I never even addresses the UberASM code.
I rather meant the positions which are handeled by the patch instead of UberASM and it used to not check whether it was a relative teleport or not. I mean, if you still have got the old version (you know, before I accepted this patch) or remove the check, just do a regular teleport after a relative teleport and see what I mean.
Posted by: MarioFanGamer - 2017-09-09 09:00:27 PM
GreenHammerBro
@MarioFanGamer: uh
Originally posted by uberasm GM14 init
Code
	LDA #$00				;>A = #$00
	CMP !Freeram_PlayerInfoSave		;\If regular warp, don't set player
	BEQ .Return				;/info.
	STA !Freeram_PlayerInfoSave		;>Clear itself so when switching to normal doesn't screw up.


that was ment to prevent applying the physics to the next level if other than teleport blocks. During testing, yoshi had weird bugs that I can't fix, such as glitch facing pose (hard to reproduce).
Posted by: GreenHammerBro - 2017-09-09 08:35:51 PM
leod
Originally posted by Hallo
Was macht man jetzt hier?

Wo? Mit dem Block? Den benutzt man mit GPS, so wie alle Blöcke.

--------
English:

Originally posted by Hallo
So what does one do here?

Where? With the block? You use it with GPS, like all other blocks too.
Posted by: leod - 2017-09-09 02:02:35 PM
MarioFanGamer
For smoother transitions (as seen in e.g. Metroid where you still are in the same position you have entered the door), this patch is made for you. You might want to consider to use Horizontal Scroll Fix, though, as the blocks you place, are most likely be placed at the very end of a level.

I also have fixed a serious issue with the patch as it didn't take account whether it was a regular or relative teleport so it also moved Mario when the teleportation came through other means (like doors or pipes).
There also were some other, minor issues, namely that Yoshi always faces to the right and the ducking and sliding state isn't preserved.
Posted by: MarioFanGamer - 2017-09-08 07:23:54 AM
zacmario
I've hoped for a long time to see this effect. Thanks.
Posted by: zacmario - 2017-07-28 03:52:21 PM
GreenHammerBro
Thanks, I've found a code that handles setting the player's position during warp, and by using RAM as displacement, I can override that position to rely on the displacement prior teleporting. It has to displace XY after the code gets 100% done calculating the coordinates, else there are bugs. Be careful with extending the blocks vertically, smw's screen X position is automatically set to the player's pos, but the Y position is set by level (Layer 1 Init Y pos). Luckily it isn't a major problem when there are no V scroll.
Posted by: GreenHammerBro - 2017-07-18 09:52:23 PM
Blind Devil
lol you beat me to it

Anyway, these are pretty neat blocks. Well done!
Posted by: o Blind Devil - 2017-07-18 06:36:33 PM

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

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


Total queries: 27

Menu

Follow Us On

  • Facebook
  • Twitter
  • YouTube

Affiliates

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