;; 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_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
Well thank you Mr. Obvious.chronosv2 said:No. Gamepad is different. It's a variable called "gamepad".
I never said button combinations. I was just wondering if the directional constant values used for obejct movement still matched those read from the gamepad. I'll figure it out on my own.Making constants for all the possible (legal) controller combinations would take a lot of constants. It's easier just to remember that bit order and work from that to check for certain controller combinations.
cargo said:I was just wondering if the directional constant values used for obejct movement still matched those read from the gamepad. I'll figure it out on my own.
No it was your tone and your sarcasm. E.g. The "figure it out out from there" (maybe a little miffed that I called you "Mr. Obvious" after you condescendingly explained and quoted "gamepad"). I was genuinely curious and thought it was okay to ask experts like you without getting mocked. Then again in this text form you can't see the real intent or if you are talking to someone from a different culture or English as a second language. So if I misunderstood then my bad but think about this: Other people will come up with similar questions. Don't be condescending even if the answer seems obvious to you.chronosv2 said:GameEngineData\Routines\UserScripts\[Module]\MovementScripts
Figure it out from there.
Sorry my attempts to assist you were clearly insufficient. Good luck.
cargo said:Well thank you Mr. Obvious.chronosv2 said:No. Gamepad is different. It's a variable called "gamepad".
I never said button combinations. I was just wondering if the directional constant values used for obejct movement still matched those read from the gamepad. I'll figure it out on my own.Making constants for all the possible (legal) controller combinations would take a lot of constants. It's easier just to remember that bit order and work from that to check for certain controller combinations.
;; gamepad bits
;; 7 6 5 4 3 2 1 0
;; | | | | | | | |
;; | | | | | | | +--- A Button
;; | | | | | | +----- B Button
;; | | | | | +------- Start
;; | | | | +--------- Select
;; | | | +----------- Up
;; | | +------------- Down
;; | +--------------- Left
;; +----------------- Right
;; Object_movement
;; 7 6 5 4 3 2 1 0
;; | | | | | | | |
;; | | | | | +-+-+--- Object Facing Direction
;; | | | | |
;; | | | | +--------- (Unused?)
;; | | | |
;; +-+-+-+----------- Object Movement Direction
;; Facing:
;; 000 = Down
;; 001 = Down-Right
;; 010 = Right
;; 011 = Up-Right
;; 100 = Up
;; 101 = Up-Left
;; 110 = Left
;; 111 = Down-Left
;; Movement:
;; 0011 = Down
;; 1111 = Down-Right
;; 1100 = Right
;; 1110 = Up-Right
;; 0010 = Up
;; 1010 = Up-Left
;; 1000 = Left
;; 1011 = Down-Left
cargo said:Originally I was hesitant to create this thread due to the micro focus programming aspect of the subject. Guess I should've trusted my instincts. I've already read those code comments pasted from the assembly files before making the thread and was looking for further insight. To me it doesn't matter if Object_movement has more pre-determined values than gamepad. They could very well share the same values for those relationships that match. At least to me it would because programmatically I think it makes my life easier. Technically it should not matter (though I am sure people will have different opinions).
My original impression was this is a table with all those values you quoted. I wasn't sure if it was that or the values for each monster. E.g. a table holding each monster's movement. That seems to make sense to me. I've seen it called on demo.txt through indexed addressing (eg, LDA Object_Movement, x). Understanding this could also help me understand other movement related scripts (like the one that moves enemy bullets).