ID:1892433
 
(See the best response by Kaiochao.)
Hi, so I was initially working on a 10 by 10 map but now that I've made the map bigger (30x30) the Huds are out of place... Why does that happen?? The huds position are only dependent of the client screen_loc and the map_format, aren't they?

How can I fix the HUDs position without having to change all the HUDs' position codes?

The Huds position was defined in a 10x10 map (like I said before), shouldn't they automatically adjust to other map sizes ?


Like always, Thanks

Hug,
MistY
Best response
If you use relative positions in your screen_loc (e.g. NORTH, SOUTH, EAST, WEST, CENTER), they should automatically adjust for any screen size. However, if you only used numbers, they're going to stay in the same place relative to the bottom-left corner.
No, I used relative positions..... and sometimes NORTH + 2 (for example). But that will also adjust automatically for any size right?
What's your view size?

You gotta use the right terminology.
In response to Ter13
Ter13 wrote:
What's your view size?

My view size is 6 (world/view = 6)

That's why it changed. Your view was greater than your map size, and you increased the size of your map.

Now your hud is out of place because your view size was clamped to 10x10 instead of 13x13 because of the map size.
Humm ok so let's imagine these 2 situations to see if I can understand this correctly:

1st. Situation:
Map Size = 10x10

2nd. Situation:
Map Size = 100x100


So in the first situation the view size of 6 works fine. To make the huds being placed correclty on the 2nd situation map I should set the view size to what?
In response to Misticone
You should set the view to "10x10" if you want it the same as before. With a world.view of 6, you get a view size of 13x13, but if it's bigger than the map, it clamps down to the map's size, so you were seeing a view of 10x10 originally.
No, in the first situation your view size doesn't work.

The reason your view size doesn't work, is because your view size is larger than the map. If the map is smaller than your view size, your view size is clamped to the map size.

So in your example, the second situation is the only one that actually works. You've just made the wrong assumption and thought that your view size was configured properly on your 10x10 map, when it was in fact, wrong.
Ohhh yeah, it makes sense.

Thanks so much both of you, I was so scared with about the idea of having to recode all the HUDs again...

Thanks, it works perfectly.
FYI: A 320x320 (pixel) view area is incredibly tiny. Also, a square view is probably a terrible idea for any game.

Just a heads up.

(Then again, I created a game with an 80x60 pixel view area... I'm pretty sure I hold the record for smallest viewable area in a game in this community...)
indeed, but this is just for testing purposes. But thanks for the warning :D