help understanding collisions

Raftronaut

Member
dale_coop said:
Here a modified one, you could try ;)
Code:
	;; checking center left collision point
	LDA collisionPoint4
	BNE RailsLeftRight	;; there is a collision
	
	;; checking center right collision point
	LDA collisionPoint5
	BNE RailsLeftRight	;; there is a collision

	;; no left/right collision...
	
RailsTopBottom:	
	;; block vertical movement:
	LDA yPrev
	STA Object_y_hi,x
	STA yHold_hi
	JMP endRails
	
RailsLeftRight:
	;; solid from sides:
	LDA #TILE_SOLID
	STA tile_solidity
	
	;; but it sticks !!!!
	;; so...
	;; add here a small sliding down:
	LDA yPrev
	CLC
	ADC #$01
	STA Object_y_hi,x
	STA yHold_hi
	
	
endRails:
(see my comments, in the script)


Dale, this "rail tile" is basically finished for me now. Though I think the earlier Vanilla version of this tile would be helpful for the Shmup community. I have mentioned before that I am planning to start a vanilla shmup project soon to share insights into common shmup game play elements.

Would you mind if I shared your code for the RAILS in the scripts section? Obviously I would give you the full credit, but I could make video examples and post the directions if you would approve of it.
 

Raftronaut

Member
dale_coop said:
Yes, of course, you can share it :)
I am glad we made it work.

Hopefully others will be glad too!

It might take me a few days, I want to set up a vanilla shooter project to use as an example :)
 

voltopt

Member
Will you update this for 4.5.6? I've taken a stab at it, but only just started looking at the physics and collision changes. The tile collision is a nibble now and seems to only have 4 variables instead of 6, so I don't know if mid left and mid right are built into the core. It seems that maybe your rails tile has been default incorporated into the shooter module physics and collision scripts.

I want to adapt it for adventure module to create a lower speed sliding effect along edges, as I have 8 direction movement but am simulating underwater movement w/o gravity
 
Top Bottom