[Suggestion]: Entry points & Walk-to points

Started by tzachs, Sun 13/09/2009 00:19:40

Previous topic - Next topic

tzachs

Hi, I have two suggestions that revolve around the same concept: not having to write x,y coordinates inside the code.

1. Entry points
Basically, I suggest that each edge in the designer will have a marker for an entry point.
Here's an illustration:

The arrows in the image stand for the markers and can be dragged from the designer to decide on the entry positions. Then we will be able to use those from code (with an overload to the ChangeRoom function):
Code: ags
cEgo.ChangeRoom(15, eLeft);

If we will decide to move the edge later on, the markers will move along with the edges. That will guarantee that the characters will always enter the room and will be placed in the correct side of the edge.

2. Walk to points
Here I suggest that the menu for walkable areas, walk-behinds etc will also have walk-tos, here's another illustration:

Then we will be able to write an overload for the Walk function and write (in that room):
Code: ags

cEgo.Walk(wRoomCenter);
cDoctorEvil.Walk(wElevator);

And from other rooms we will be able to write (with another overload for ChangeRoom):
Code: ags

cEgo.ChangeRoom(15, "Elevator");

Although I agree that using strings is not optimal, I think it is better then specifying x,y coordinates.

What do you think?

skuttleman

I kind of like the idea of the "Walk-to-points", but the entry points seems like it might be a little useless if you have, for example, a row of doors along the back wall and you might enter the room from multiple rooms. Of course, you could combine both of your ideas and just have something like walktopoint[0-49] for example and in room 2 you could walk off the edge or use the hand icon on the doorway, and then call a command like:

Code: ags

player.ChangeRoom(1, walktopoint[3], eSouth);


.... adding an additional option to set which way the character faces in the new room.

Ali

It think it would be possible to write a module to produce this effect. You could use invisible objects with a "walkToPoint" property. The module could scan for those objects and store their positions under their in-game names. Then you could add a function along the lines of cEgo.WalkPoint ("Elevator"); which would allow you to type in the in-game name.

That would probably take more work than just typing in x,y coordinates in the script though.

Pumaman

Yes, I think some sort of "walk-to point" feature should be in AGS, because having to remember lots of co-ordinates is a bit silly. However, because it's not a major pressing issue, it has never made it high enough on the priority list to be implemented.

As for edges having entry points -- I would argue that if you this wouldn't be necessary if you had walk-to points, since you could just use one of them as the entry point.

tzachs

The reason I came up with the entry points on the edges in the first place, is so that I won't have to worry about moving the edges inwards and creating a bug in the process because a character will now enter the room in the wrong side of the edge.
I guess it's not a good enough reason to justify a feature, if ags will have the walk-to points it will probably be enough.

Thanks for your comments.

SMF spam blocked by CleanTalk