Shooting Projectile While Facing Down Left Not Working.

RedeyeHunter

New member
I discovered and issue shooting while the player was facing DOWN LEFT. The projectile was always shooting UP LEFT.

Eventually I found and fixed the issue in the GameEngineData\MainASM.asm file.

The problem was on line 392

.db #%00110000, #%11110000, #%11000000, #%11100000, #%00100000, #%10100000, #%10000000,#%10100000

Change the last value to the correct value for Down Left and it works.

.db #%00110000, #%11110000, #%11000000, #%11100000, #%00100000, #%10100000, #%10000000, #%10110000


I found the correct value by looking at the GameEngineData\Routines\Systems\Macros.asm file between lines 111 and 136, this describes byte patterns for the movements

Code:
MACRO StartMoving arg0, arg1
	; arg0 object to move
	; arg1 direction
	
	;; This macro uses the built in physics found in default physics scripts.
	;; Which observes acceleratoin and deceleration as long as bounds and tile collision.
	;; It is not a direct movement, but rather turns on a check for whether or not
	;; the object should move.
	
	;; Keep in mind, this does not alter the facing-direction of the object, just
	;; the actual motion.
	
	;constant definitions for direction are:
		;MOVE_RIGHT	= #%11000000
		;MOVE_LEFT 	= #%10000000
		;MOVE_DOWN	= #%00110000
		;MOVE_UP	= #%00100000
		;               +--------Bit 7 is yes or no to h movement
		;				 +----------- if 1, bit 6 is L (0) or R (1)
		;                 +------Bit 5 is yes or no to v movement
		;                  +--------- if 1, bit 4 is U (0) or D (1)
		;DIAGONALS:
		;MOVE_RIGHT_DOWN = #%11110000
		;MOVE_LEFT_DOWN  = #%10110000
		;MOVE_RIGHT_UP	 = #%11100000
		;MOVE_LEFT_UP	 = #%10100000


I spent a bit of time searching for the cause and experimenting, so hopefully this will be helpful if you have the same issue using the 8 direction movement.
 

dale_coop

Moderator
Staff member
Nice catch, RedeyeHunter, you right!
Thank you for sharing (will bookmark that for check with the next version)
 
Top Bottom