ID:172996
 
I'm trying to control the movement of a small mob. Typically, your mob(represented as the "x" in the examples) will move from [Example: 1] to [Example: 3]. What I want to happen is this. The mob moves from [Example: 1] to [Example: 2] and stops. Upon the next EAST move, the mob moves to [Example: 3]. I've been trying a bunch of different things to get this movement to work but I keep getting stuck. I've thought of using a multi-ton of turfs that contain directional information (like a mud) but I would like to avoid that if I can. I would also like to retain the animated movement from one location to the next if at all possible. Not mandatory though. Any ideas, suggestions, and/or pointers would be appreciated. I'm looking for "best bets" vs actual code.

In the following examples, the "x" represents the mob, the other lines are trying to represent two turfs that are virtually divided into 1/4 which is represented by a, b, c, and d. The two turfs would be seen as grass to the player.

1.
|a|b|a|b|
|x|d|c|d|

2.
|a|b|a|b|
|c|x|c|d|

3.
|a|b|a|b|
|c|d|x|d|

Thanks,
Alex
You mean you want the players to move less than 32 units at a time? You can use the pixel_x and pixel_y variables to offset the icons. I don't think there is a way to move client.eye in less than 32 unit intervals though, so your view wouldn't follow the mob around perfectly.
In response to Sarkhan
Sarkhan wrote:
You mean you want the players to move less than 32 units at a time?

Yes. I want to divide the 32x32 square into 4 16x16 squares. mobs should be able to freely move n,w,e,s, nw, ne, se, and sw within the same 32x32 turf. Keep in mind, this is a very small mob. Lets say its a 4x4 pixel black dot. Along with the freedom to move within a single turf, I would also want to move from turf 1, location c; to turf 2, location d as shown in the examples before.

Perhaps there is a better way. Can I somehow re-size the map grid to be 16x16? Perhaps that would solve my problem?


Thanks
In response to Tsfreaks
Tsfreaks wrote:
Sarkhan wrote:
You mean you want the players to move less than 32 units at a time?

Yes. I want to divide the 32x32 square into 4 16x16 squares. mobs should be able to freely move n,w,e,s, nw, ne, se, and sw within the same 32x32 turf. Keep in mind, this is a very small mob. Lets say its a 4x4 pixel black dot. Along with the freedom to move within a single turf, I would also want to move from turf 1, location c; to turf 2, location d as shown in the examples before.

Perhaps there is a better way. Can I somehow re-size the map grid to be 16x16? Perhaps that would solve my problem?


Thanks


Describing what I wanted to do was difficult and apparently I didn't do a very good job as very few people replied. Regardless, I found that setting world/view=10 will meet my needs. This gives the appearance of 16x16 and the look I needed. Is there any way to show more of the map though? I want to show more x and y in dreamseeker without changing my current z(zoom level). I found some old posts that said you couldnt do this. Has this changed?
In response to Tsfreaks
Ebonshadow created a library that can do this. It's pretty advanced however, so you can't really learn by reading unless you've already got a good grasp on what is going on.

Anyway, what you're after is refered to as pixel movement. Searching the forums should bring up piles of results, however Lummonx JR recently posted a interesting snippet showing how Move(). That snippet will be a great reference if you want to create your own movement system.
Basically you want to over-ride atom/movable/Move() and then use pixel_x and pixel_y on it.


IMPORTANT: When you create a map you can place four turfs on one tile, but they will merge when you compile the game files. So although it comes up as being four tiles, it is actually one while you're playing the game (so you're going to have to figure out a new density system).


[Edit] Lummox JR's snippet.
In response to Tsfreaks
setting the world view to 10 is not making it smaller, but making it bigger, but (my guess) because your resolution is lower dream seeker resizes the window to fit onto ur screen... and what exactly do u mean by show more x and y?
In response to InsayneWrapper
He means show more of the map. As in view = 20.
In response to DarkView
Actually, view = 20 isn't what I'm looking for. I want the view (zoom level) to stay the same(view=10) while increasing the viewable area of the map panel.

view = 1 shows me 3x3 large "turfs". (I don't know the right word for referring to a map location.)

view = 10 shows me 21x21 turfs but they are much smaller.

If the player could resize their own map panel which in turn would show more of the map, that would be good enough. It doesn't work that way though. When I resize my map panel, the map stays the same.

Example of the effect I'm looking for: Using a microscope, you zoom in on your specimen. You don't like the limited view of just the specimens ear. You resize your viewable area and now you can see the entire head at the same zoom level.

I tested the map using resolutions between 800x600 and 1280x1024 and the viewable area for each res was acceptable. Should I have any other concerns? If not, then I'm happy with view = 10.

Thanks

In response to Tsfreaks
Tsfreaks wrote:
Actually, view = 20 isn't what I'm looking for.

Actually it is. Making it so that you can see more of the map would be increasing the view. However you want zoom aswell, which was suggested a LONG time back, but has yet to be added.

In theory, zoom would just shrink/expand the icons on the screen.
In response to Tsfreaks
When you set the view to 10, the map screen becomes too big for your puny resolution, so it automatically goes into small icon mode, which is an option in Dream Seeker.