ID:154536
 
Look at this ugly text representative of a map:
. x x x x x .
. . . . . . .
. . . . . . .
. . . P . . .
. . . . . . .
. . . . . . .
. . . . . . .
Imagine that the "P" is the player's avatar. The "x"s are invisible non-dense objects that always track and mimic the players movements. Now imagine using image() to define something for each x, and send that image only to the player in question.

What could the images be? Status icons, command buttons (use a map click and calculate relative location to player), health bars, game scores, etc.

Someone please tell me how foolish I am. It wouldn't work, would it? ...

/mob/skysaw
On 6/13/01 12:23 pm Skysaw wrote:
What could the images be? Status icons, command buttons (use a map click and calculate relative location to player), health bars, game scores, etc.

This is done (in a non-moving way) in DragonSnot.

Your desire for a HUD is one reason, for 3.0, I proposed the idea of a set of turfs around the map that don't move with the map.

Someone please tell me how foolish I am. It wouldn't work, would it? ...

It should be totally doable...but you will have some gnarly challenges, like handling cases where player's HUD objects are on the same turf, or how to deal with a mob being on the turf that the player is clicking on. Do they want to attack the mob or click on the HUD?

One thing to consider is floating a full row of HUD objects above everything on the turf, and putting an underlay on the HUD objects that completely covers the turfs. That way you avoid the player seeing/trying to interact with things that are on the same turf as the HUD object. How well this will work with images, I don't know.

In response to Deadron
I have been thinking about similar ideas. The only real problem I see is when the player moves close to the edge of the map.

Anyone know what happens if you try to use image outside the map boundries?

Of course, you could expand the map a few extra squares to accomodate.
In response to Shadowdarke
On 6/13/01 1:30 pm Shadowdarke wrote:
I have been thinking about similar ideas. The only real problem I see is when the player moves close to the edge of the map.

Anyone know what happens if you try to use image outside the map boundries?

Of course, you could expand the map a few extra squares to accomodate.

You can just let the HUD stay in one place against the edge of the map as the player approaches the edge.
In response to Deadron
On 6/13/01 1:58 pm Deadron wrote:
On 6/13/01 1:30 pm Shadowdarke wrote:
I have been thinking about similar ideas. The only real problem I see is when the player moves close to the edge of the map.

Anyone know what happens if you try to use image outside the map boundries?

Of course, you could expand the map a few extra squares to accomodate.

You can just let the HUD stay in one place against the edge of the map as the player approaches the edge.

I'd just cushion the map with a little border, unless I had so much map space that the added turfs would get out of hand... having a HUD bounce around can be annoying and disorienting. (Speaking of bouncing, there's another idea; unless you've got really tiny maps, you're never going to have players at more than 2 edges of a map simultaneously, so you could just flip the HUD to the other side of the screen when players reach the edge.)
In response to Shadowdarke
Anyone know what happens if you try to use image outside the map boundries?

Yes. The image is overlaid, but it isn't on the map until it is moved onto the map. Basically, the normal behaviour. =)