Diagonal EntityMove()
Displaying 1-20 of 21 total.
12 next
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
Kildorf

Hey, everyone. Jesse and I are wracking our brains for a good way to deal with diagonal entitymove()s. From what we understand, the only real reason that you can't move an entity diagonally right now is because no one can come up with a good naming convention for the diagonal directions. Soo... what does everyone say about this:

Amend movestrings so that an entry such as 'DL50' would count as 'diagonally down and left'. Right now, it would make them face down for a count of 0 ticks then move left... You wouldn't even see the facing down frame (we checked). Can anyone (engine developers or vc hackers) think of any good reasons why we shouldn't use this?

If that's no good I'll find some retarded way of naming the diagonals. I refuse to not have them available.

Refuse,

Posted on 2005-07-01 13:41:21

mcgrue

I cannot. Ragecage, you've done a lot with movestrings. Any input?

Posted on 2005-07-01 17:08:42

anonymous

How about NE,NW,SE,SW? Makes little difference either way, but it seems more obvious (to me at least).

-basil

Posted on 2005-07-01 21:09:34

mcgrue

!!!

Hrm.

U D L R NE NW SE SW?

Or, clockwise from the top:

U NE R SE D SW L NW?

Posted on 2005-07-01 21:37:49

CrazyAznGamer

YAY!!!!!...
Now, all that's left to make me happy(for a day of programming, then I get frustrated again) is the actual ability to move Entities diagonally.
Can you override functions in VERGE? I know, stupid question, it's no, but if you could, the function EntityMove perhaps may be overridden to support diagonal movement? Other than that, I guess the only way is through some sort of bizzare EntityMove Wrapper function.

Posted on 2005-07-01 23:40:41

Kildorf

Actually we're kinda talking about modifying the engine to support it, Crazy. ;)

Posted on 2005-07-02 00:01:59

zaril

The diagonal movement code should be flexible because if you're generally going left and at the same time down, you should face left. However if you're mainly going down and you strafe to the left you should face down.

My own movement code is based on this in Grand Magic, and if you want an NPC to follow the scheme I guess you should differentiate DL50 from LD50 (down-left or left-down) where the first is the primary and that which the character should face.

However, maybe you were thinking about allowing specific diagonal movement images in the .chr? what if you don't want to make 8 directions and use diagonal movement with 4 directions as i explained it?

In my opinion, if anyone is that picky, they should do it like me and code their own engine and override verge's entitymovement completely. It will grant you all the power.

Posted on 2005-07-02 05:02:12

Kildorf

I was really only looking for a 45 degree down-and-left (etc.) type deal. Basically I want to be able to mimic holding down the left and down buttons; in the engine this amounts to diagonal walking with the entity facing left.

Agh, and overriding verge's entity move is all well and good, but I'd rather not do it so I don't have to duplicate a whole lot of working code (animation, entity and zone checking, etc.) to fix one little thing that should be pretty trivial. ^^

Posted on 2005-07-02 05:23:45

Jesse

Isn't it a bit odd to call the 4 main directions U/D/L/R but call the diagonals by the compass? Wouldn't it make more sense to be consistent one way or another?

And I like the idea of specifying which image to use based on which order the 2 letters come in. That way, you could mimic slightly-off diagonals like: PLD2L2 or PDL2D4.

Which reminds me: when we say PDL2, does that mean 1 pixel in each direction, or 2 pixels in each direction?

Posted on 2005-07-02 10:25:16

Kildorf

PDL2 would be 2 pixels in each direction... to be consistent with keyboard control.

That's what I say, anyway. I think it'd make things needlessly complicated from a usage point of view the other way.

Posted on 2005-07-02 11:11:13

anonymous

Hey, Jesse, calling the diagonals by their compass points would simplify implementation in the engine! Instead of having to consider for all four directions whether the next char would be a letter or a number, more code could just be added to process an N or S char.

[this is yhnmzwcs.] Better a half-hack than needlessly more coding.

Posted on 2005-07-02 16:56:52

Jesse

I think it would be best to decide what we would really like. I don't think it would be any harder to do it either way. (If difficulties do come up in the implementation, then we can talk about compromises.)

I'm going to suggest DL/DR/UL/UR (and their reverses to make it possible to choose which frame to show, which would be weird with the compass directions.) Unless someone has a compelling reason to use a different scheme.

Posted on 2005-07-02 18:01:01

Overkill

Besides. If you did compass directions, there's already a 'W' command. So if NW or SW were parsed wrong, you'd just end up waiting for the set amount. Even though compass directions would be nice. Oh well.

Posted on 2005-07-02 21:43:30

CrazyAznGamer

Well, as long as Vecna endorses it, I won't have to make my own wrapper function for diagonal movement.
Will he?
...
That's left up to God to answer. Or Vecna.
Either one.

Pixel movement would be nice.

Posted on 2005-07-03 00:55:53

RageCage

What I've always fantasized about was a system of moving at a given angle... so instead of udlr it'd just be like M45 to move a tiles worth in a 45 degree angle... better yet would be a position like M(x,y) and the entity would simply move to the X,Y position.

back to the subject at hand...
I created my own entity system of sorts a while back and I remember using a system like: NN NE EE SE SS SW WW NW... I liked it ^^

Posted on 2005-07-06 10:34:43

Gayo

Quote:Originally posted by CrazyAznGamer

Well, as long as Vecna endorses it, I won't have to make my own wrapper function for diagonal movement.
Will he?
...
That's left up to God to answer. Or Vecna.
Either one.

Pixel movement would be nice.


You fool! vecna is merely a figurehead trotted out now and then to appease the masses.

Posted on 2005-07-06 11:02:06

CrazyAznGamer

Quote:Originally posted by Gayo

Quote:Originally posted by CrazyAznGamer

Well, as long as Vecna endorses it, I won't have to make my own wrapper function for diagonal movement.
Will he?
...
That's left up to God to answer. Or Vecna.
Either one.

Pixel movement would be nice.


You fool! vecna is merely a figurehead trotted out now and then to appease the masses.

!!!
|=O
I've been duped!

Posted on 2005-07-06 21:37:38

Jesse

Quote:Originally posted by RageCage

What I've always fantasized about was a system of moving at a given angle... so instead of udlr it'd just be like M45 to move a tiles worth in a 45 degree angle...


This could be done in VC with these diagonal movestrings and pixel-based movement. You'd just write a function that took in angle/distance and output a movestring with the appropriate alternating series of, say, DL and D. You could approximate an arbitrary angle like this. And your M(x,y) business would also be easy to do, too.

Posted on 2005-07-07 07:31:46

fox_astron

Um, since we're on the subject of diagonal entity movement... if implemented at an engine level, we'd be able to define diagonal movement animations without the VC sprite hack, right?

Posted on 2005-07-07 10:28:30

RageCage

Quote:Originally posted by Jesse

Quote:Originally posted by RageCage

What I've always fantasized about was a system of moving at a given angle... so instead of udlr it'd just be like M45 to move a tiles worth in a 45 degree angle...


This could be done in VC with these diagonal movestrings and pixel-based movement. You'd just write a function that took in angle/distance and output a movestring with the appropriate alternating series of, say, DL and D. You could approximate an arbitrary angle like this. And your M(x,y) business would also be easy to do, too.


already have ^_-.... although I hate how hacked up it has to get for me to do it.

Posted on 2005-07-07 11:41:10


Displaying 1-20 of 21 total.
12 next
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.