Moving Platform Objects

User avatar
WolfMerrik
Posts: 199
Joined: Sat Aug 11, 2018 4:59 pm
Location: Maine
Contact:

Re: Moving Platform Objects

Post by WolfMerrik » Mon Sep 03, 2018 3:51 pm

Craigery wrote:
Mon Sep 03, 2018 3:38 pm
Just gotta say this is absolutely amazing! :shock:
Thanks man!

I really do hope to be able to post a tutorial of it soon!
ImageWant to download & share Image NESMaker Resources? Check out My Files on www.NESMakerFiles.com Image
User avatar
WolfMerrik
Posts: 199
Joined: Sat Aug 11, 2018 4:59 pm
Location: Maine
Contact:

Re: Moving Platform Objects

Post by WolfMerrik » Mon Sep 03, 2018 5:27 pm

I figuered it out... it does not add to the objects vSpeed with the Acceleration...
So it NEVER changes or goes above 0, except with gravity, or jumping.

I think I may need to rework the entire physics script and make my own.
This will take a bit, but allow for things that I need in my engine, and I can remove things (like ladders) that I do not.
ImageWant to download & share Image NESMaker Resources? Check out My Files on www.NESMakerFiles.com Image
User avatar
ostincoolston
Posts: 40
Joined: Sun Apr 22, 2018 11:21 am

Re: Moving Platform Objects

Post by ostincoolston » Sun Sep 09, 2018 7:47 pm

Try this, I just figured out a weird way of doing this, kind of... set your monsters details to jump on kills. Then in the jump on monster script in HandleObjectCollisions_Platform_Simple simple comment out the DeactivateCurrentObject like this

Code: Select all

jumpOnMonster:

	LDX player1_object
	;TXA
	;STA tempx
	;JMP playerWasHurtDuringCollision
	;LDX player1_object
	LDA selfCenterY
	CMP otherCenterY
	BCS dontJumpOnMonster
	;;; JUMP ON MONSTER
	LDX player1_object
	LDA #$00
	SEC
	SBC #$04
	STA Object_v_speed_hi,x
	
	LDX tempx
	;DeactivateCurrentObject
	LDY tempy
You bounce around on the moving monster and it does not die, and you do not get hurt. I don't know how, but I'm sure there is way to stop the bouncing, but I cant figure it out.
User avatar
ostincoolston
Posts: 40
Joined: Sun Apr 22, 2018 11:21 am

Re: Moving Platform Objects

Post by ostincoolston » Sun Sep 09, 2018 7:51 pm

Oh lol, I just noticed you actually did use the jump on enemy code to figure yours out too. whoops.
User avatar
SuperMar10Brothe
Posts: 62
Joined: Sat Aug 11, 2018 4:43 pm

Re: Moving Platform Objects

Post by SuperMar10Brothe » Sun Sep 16, 2018 10:18 am

Can this be somehow repurposed to make an elevator platform that only starts to go up when the player steps on it?
User avatar
DanielT1985
Posts: 55
Joined: Sat Sep 01, 2018 7:44 pm

Re: Moving Platform Objects

Post by DanielT1985 » Thu Oct 04, 2018 5:11 pm

I see that someone did make moving platforms possible. I was wondering what do I do to import it to my game, and if I do, will it affect any of the other enemies I made in my game, or just the one enemy that is gonna be the platform itself?
User avatar
DanielT1985
Posts: 55
Joined: Sat Sep 01, 2018 7:44 pm

Re: Moving Platform Objects

Post by DanielT1985 » Sat Oct 06, 2018 1:39 am

WolfMerrik wrote:
Sun Sep 02, 2018 2:43 am
By making a few changes to HandleObjectCollisions_Platform_Simple.asm
I was able to make some SMALL progress lol

Image

I used Flag 6 for the object, and added this code that handles it:

Code: Select all

solidMovingPlatform: 
	LDX player1_object
	LDA #$00
	SEC
	SBC #$01 ;;basically just push them up 1
	STA Object_v_speed_hi,x
	JMP doneWithThisObjectCollision
To detect the flag, I added this code, right before the code that detects the player being able to jump on the monster flag:

Code: Select all

	AND #%00100000
	BNE solidMovingPlatform
The problem being, you cant jump off of it... I need to find a way to set the players position, and possibly even have the x position of the player move with the block.

It is a start!
I tried adding the code to my asm, and it just gave me this error.

Routines\System\Vectors.asm(1): Value out of range.
Post Reply