Defined Gameplay Areas won't be symmetrical

Interesting mapping tools and mapping help.

Moderator: Morax

Defined Gameplay Areas won't be symmetrical

Postby Lionhardt » 04 Sep 2013, 18:22

So, following lesson 7 of the map editor tutorial I defined gameplay areas for my map. I have a 512² map, so I set the area to 1, 1, 511, 511. But the darn thing won't be symmetrical. The map only gets cut of at two adjacent sides but not all 4... am I doing something wrong or is this supposed to be like that? I would also like to know what the places the numbers fill correspond to... I mean, yes obviously the coordinates. But assuming that 1, 1 corresponds to the coordinate x=y=1 on the map in the editor does not work out, as the cut off area is only at the two sides that share the point, that in the editor itself would be x=y=512...
I don't even see how 4 values should be sufficient to define the playable area, as you can make any rectangular shaped map, not just square maps... So, you would need at least 3 points to define the rectangle that is not a square...

I feel very ??? right now. Could somebody shed some light on this?
Help me make better maps for all of us, visit my Mapping Thread.

Maps needing gameplay feedback:
Spoiler: show
[list updated last: 31.1.2018]

(maps available in the vault)

- Hexagonian Drylands
- Fervent Soil and Torrid Suns

YouTube Channel
User avatar
Lionhardt
Contributor
 
Posts: 1070
Joined: 29 Jan 2013, 23:44
Has liked: 188 times
Been liked: 144 times
FAF User Name: Lionhardt

Re: Defined Gameplay Areas won't be symmetrical

Postby Deep_ » 04 Sep 2013, 20:05

Hello Lionhardt ^_^
The first two values define the offset of the playable area in x and y directions
and the secound two values define the Scale of the playable area itself.
The example in AngryZealots Tutorial is just wrong!
The right values for your 512² scaled map with a 1 unit thick border would be 1, 1, 510, 510 .
I hope this image can visualise what i am talking about.
Image
Greetings.
Deep_
Crusader
 
Posts: 13
Joined: 31 Jul 2013, 22:53
Has liked: 0 time
Been liked: 0 time
FAF User Name: Deep_

Re: Defined Gameplay Areas won't be symmetrical

Postby Lionhardt » 04 Sep 2013, 20:28

Thank you, but that did not help.

Look, this is my script:

Code: Select all
local ScenarioUtils = import('/lua/sim/ScenarioUtilities.lua')
local ScenarioFramework = import('/lua/ScenarioFramework.lua')

function OnPopulate()
    ScenarioUtils.InitializeArmies()
    ScenarioFramework.SetPlayableArea('AREA_1' , false)
end
   
   function OnStart(self)
   end


And here are my Area values, the x=y=0 corner of my map and the x=y=512 corner:
Attachments
512512.jpg
As you can see, the 512512 corner has a blacked out rim to it.
512512.jpg (46.49 KiB) Viewed 4048 times
00.jpg
As you can see, the 00 corner has no blacked out rim to it.
00.jpg (67.77 KiB) Viewed 4048 times
areas.PNG
areas.PNG (5.2 KiB) Viewed 4048 times
Help me make better maps for all of us, visit my Mapping Thread.

Maps needing gameplay feedback:
Spoiler: show
[list updated last: 31.1.2018]

(maps available in the vault)

- Hexagonian Drylands
- Fervent Soil and Torrid Suns

YouTube Channel
User avatar
Lionhardt
Contributor
 
Posts: 1070
Joined: 29 Jan 2013, 23:44
Has liked: 188 times
Been liked: 144 times
FAF User Name: Lionhardt

Re: Defined Gameplay Areas won't be symmetrical

Postby Deep_ » 04 Sep 2013, 22:51

thats strange.
Can you try 0,0,513,513?
Deep_
Crusader
 
Posts: 13
Joined: 31 Jul 2013, 22:53
Has liked: 0 time
Been liked: 0 time
FAF User Name: Deep_

Re: Defined Gameplay Areas won't be symmetrical

Postby Lionhardt » 05 Sep 2013, 04:29

I did that, it behaved like there was no border... which makes sense I guess...


Also, either I don't understand your explanation or it does not agree with what I observe. Look, I did a test. Apparently, the first value is the distance from x to d, the second the distance from y to a, the third from x to b and the fourth from y to c.

If this should be the case, the way it's done in the tutorial would be in fact correct... though... for some weird reason it does not work either oO

Edit: Did one more test and in fact, there is something not working correctly. I used more exaggerated values and in fact the upper and left edge of the map (the edges that share point 00) seem to have some modifier to it. I set the values to 10,10,502,502 and got a distance of (oddly so) 12 units on the right-hand side and 8 on the left-hand side. It's the same for the bottom and top side. So I need to multiply the bottom/right-hand side value by 1,5 and take that as the value for the other two sides.

But it does not work... wtf is this *****?


Another strange thing: When I set the offset for the bottom and right-hand side to 1 unit in the editor ingame it will be 4 units. When I set it to 10 in the editor ingame it will be 12 units... ????????????????????????????
For the top and left-hand side it is 1 -> 0, 10 -> 8. This is driving me seriously mad.
Attachments
area qwerty.jpg
area qwerty.jpg (128.01 KiB) Viewed 4027 times
Help me make better maps for all of us, visit my Mapping Thread.

Maps needing gameplay feedback:
Spoiler: show
[list updated last: 31.1.2018]

(maps available in the vault)

- Hexagonian Drylands
- Fervent Soil and Torrid Suns

YouTube Channel
User avatar
Lionhardt
Contributor
 
Posts: 1070
Joined: 29 Jan 2013, 23:44
Has liked: 188 times
Been liked: 144 times
FAF User Name: Lionhardt

Re: Defined Gameplay Areas won't be symmetrical

Postby Krapougnak » 05 Sep 2013, 08:28

Do you really need to set a playable area for a 512x512 map ? Is there some ugly strips on the borders like in the tutorial ?
User avatar
Krapougnak
Contributor
 
Posts: 340
Joined: 12 Jul 2012, 11:03
Has liked: 193 times
Been liked: 24 times
FAF User Name: Krapougnak

Re: Defined Gameplay Areas won't be symmetrical

Postby Lionhardt » 05 Sep 2013, 08:36

There are decals that are displayed offmap, so yes, something of that nature.


Edit:

Via trial and error I have now found a set of values that works for me: 5,5,511,511... WHATEVER THE REASON MAY BE!
Help me make better maps for all of us, visit my Mapping Thread.

Maps needing gameplay feedback:
Spoiler: show
[list updated last: 31.1.2018]

(maps available in the vault)

- Hexagonian Drylands
- Fervent Soil and Torrid Suns

YouTube Channel
User avatar
Lionhardt
Contributor
 
Posts: 1070
Joined: 29 Jan 2013, 23:44
Has liked: 188 times
Been liked: 144 times
FAF User Name: Lionhardt

Re: Defined Gameplay Areas won't be symmetrical

Postby Plasma_Wolf » 05 Sep 2013, 11:23

Lionhardt wrote:I don't even see how 4 values should be sufficient to define the playable area, as you can make any rectangular shaped map, not just square maps... So, you would need at least 3 points to define the rectangle that is not a square...


If you express the four coordinates in the input as (x1,y1,x2,y2), then the four corners will be defined as follows:
(x1,y1),(x2,y1),(x1,y2),(x2,y2). Just like dragging a rectangle on your screen (in paint for example), you define the first by the first click, the fourth by the dragging and the second and third are then automatically determined.

Setting the playable map area should be possible, by putting 1,1,(highest coordinate -1),(highest coordinate -1) for the area. I've had issues with it sometimes as well (I did manage to solve them), but I didn't bother doing it with the last map I made.

It should definitely be possible to change those 5 numbers into a 1.

Also, I'm not surprised that the (0,0) corner is cut off, because that is exactly what you do when you set the area.
In the campaign, you also have the large black areas, due to the use of the same code.
I assume that the (0,512) and (512,0) corner are also black? Because if that is the case, the code is working fine I think.

The fact that you seem to get incorrect values on the corner of the map, are probably because of the mountain. The area lines are projected flat on the map, while your cursor follows the height coordinate. So if you think you point at the corner of your playable area, you are pointing at the (x,y,z) coordinate that is on the projective line ("camera"-"corner of the playable area").
You should try it out with a map that is perfectly flat and see if the values coincide then.
User avatar
Plasma_Wolf
Supreme Commander
 
Posts: 1335
Joined: 20 Oct 2011, 11:28
Has liked: 23 times
Been liked: 91 times
FAF User Name: Plasma_Wolf

Re: Defined Gameplay Areas won't be symmetrical

Postby Deep_ » 06 Sep 2013, 01:07

Lionhardt wrote:Also, either I don't understand your explanation or it does not agree with what I observe. Look, I did a test. Apparently, the first value is the distance from x to d, the second the distance from y to a, the third from x to b and the fourth from y to c.

Yes your are right i never noticed that.
Deep_
Crusader
 
Posts: 13
Joined: 31 Jul 2013, 22:53
Has liked: 0 time
Been liked: 0 time
FAF User Name: Deep_


Return to Mapping

Who is online

Users browsing this forum: No registered users and 1 guest