What is the purpose of "Object_movement"?

User avatar
cargo
Posts: 54
Joined: Mon Sep 03, 2018 4:34 am

Re: What is the purpose of "Object_movement"?

Post by cargo » Wed Nov 07, 2018 6:01 pm

chronosv2 wrote:
Wed Nov 07, 2018 4:47 am
GameEngineData\Routines\UserScripts\[Module]\MovementScripts
Figure it out from there.
Sorry my attempts to assist you were clearly insufficient. Good luck.
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.
Last edited by cargo on Wed Nov 07, 2018 9:59 pm, edited 3 times in total.
User avatar
Dirk
Posts: 157
Joined: Fri Mar 09, 2018 5:30 am

Re: What is the purpose of "Object_movement"?

Post by Dirk » Wed Nov 07, 2018 6:06 pm

I don't think he meant it condensing. As far as I know him from the forum he is very nice and only trying to help.

Editl: "gamepad" is not in sarcastic quotes but in simple quote quotes.
User avatar
chronosv2
Posts: 203
Joined: Wed Aug 08, 2018 9:30 pm
Location: KY, USA
Contact:

Re: What is the purpose of "Object_movement"?

Post by chronosv2 » Wed Nov 07, 2018 7:42 pm

I'm not going to sit here and argue on the internet -- my original intent when I made my responses to your posts was to help. My intent wasn't to be condescending -- I had gone over the movement constants, you asked if they applied to the gamepad variable, and I took the time to explain how the gamepad variable worked and why the constants were not shared.

Then you reply to me with this.
cargo wrote:
Wed Nov 07, 2018 2:27 am
chronosv2 wrote:
Tue Nov 06, 2018 9:07 pm
No. Gamepad is different. It's a variable called "gamepad".
Well thank you Mr. Obvious.
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.
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.
You say yourself that we can't tell intent by text, yet you immediately assume I was being condescending to you when all I had done is thought that my answers combined would give you the complete answer. The format of the gamepad variable is different from that of the Object_movement variable. I was attempting to be informative, nothing more.

And by no means am I an "expert" with anything ASM related. I've been learning it since August 26th. I'm about as novice as they come. I've been corrected multiple times by others on the forum who are much more knowledgeable than I. But this is a community and I'd like to be of assistance if at all possible. Before I wrote my original "gamepad" response I didn't even know what order the button states were stored in so I took the time to open an emulator, get the debugger set up and I manually tested the variable to find out which bits represented which button one by one so I didn't give you incorrect information.

Judging from the above response, you no longer wished for my help. I felt that the response I got for my time was rude, and I originally wanted to be much more confrontational with my own response. But this is the Internet. It's not worth it to get upset over words on a digital page and being confrontational here undermines my entire intent of attempting to be a useful asset to the community. So I concluded "Okay, this person no longer wishes for my help, so I won't beat about the bush; I'll tell them where to look, wish them luck and be on my way."
User avatar
MistSonata
Posts: 250
Joined: Fri Feb 16, 2018 7:10 am

Re: What is the purpose of "Object_movement"?

Post by MistSonata » Wed Nov 07, 2018 8:24 pm

Hi there! I'd like to make sure to remind everyone to try their best to keep things civil, even if you feel that someone isn't acting civil toward you. Misunderstandings can very easily happen, especially when the language spoken is not someone's native tongue, so please try not to continue the antagonism. If someone is being consistently rude and abusive, please report them so that I can help. It's what I'm here for, after all.

To address the topic of the thread, here's the notes I have on these two variables.

Code: Select all

	;; 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
Object_movement is divided up into two main parts, the first four bits determine which direction the object is moving, and the last three bits determine which direction it's facing. As far as I can tell, bit 3 isn't used right now, so best not to worry about it.
User avatar
cargo
Posts: 54
Joined: Mon Sep 03, 2018 4:34 am

Re: What is the purpose of "Object_movement"?

Post by cargo » Wed Nov 07, 2018 10:51 pm

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).
User avatar
MistSonata
Posts: 250
Joined: Fri Feb 16, 2018 7:10 am

Re: What is the purpose of "Object_movement"?

Post by MistSonata » Wed Nov 07, 2018 11:58 pm

cargo wrote:
Wed Nov 07, 2018 10:51 pm
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).
I see. Object_movement is a table that holds the movement value of every active object in the game (including the player, monsters, bullets, etc), that's why it's separate from the gamepad variable, otherwise pressing a direction on the controller would move every object on the screen. I think the reasoning is also that (particularly in the case of pulling up menus or using different game mechanics) you might not always want pressing up to automatically move your character up the screen.

You might also find that some code uses something like "Object_h_speed_hi, x", which takes more direct control over the object's speed, but doesn't account for objects that have different movement speeds, which is why Object_movement is more commonly used, so that it respects the object's movement speed variable no matter what object you apply it to.
digitalbooty
Posts: 21
Joined: Fri Oct 19, 2018 7:42 pm

Re: What is the purpose of "Object_movement"?

Post by digitalbooty » Wed Nov 14, 2018 11:30 pm

Is there a way to use this to make my melee attack move with an ascending or descending player character. For example, if my melee attack lasts 4 frames and I jump and perform a melee attack, my character begins to fall, but the melee object continues to spawn in the original position in air where the melee attack was summoned instead of falling with the character. Is there a way to use the object movement data to "track" and "follow" my character on the way down or up as it is spawning?
Post Reply