Forged Alliance Forever Forged Alliance Forever Forums 2013-09-06T01:07:27+02:00 /feed.php?f=53&t=5064 2013-09-06T01:07:27+02:00 2013-09-06T01:07:27+02:00 /viewtopic.php?t=5064&p=53218#p53218 <![CDATA[Re: Defined Gameplay Areas won't be symmetrical]]>
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.

Statistics: Posted by Deep_ — 06 Sep 2013, 01:07


]]>
2013-09-05T11:23:13+02:00 2013-09-05T11:23:13+02:00 /viewtopic.php?t=5064&p=53158#p53158 <![CDATA[Re: Defined Gameplay Areas won't be symmetrical]]>
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.

Statistics: Posted by Plasma_Wolf — 05 Sep 2013, 11:23


]]>
2013-09-05T08:36:08+02:00 2013-09-05T08:36:08+02:00 /viewtopic.php?t=5064&p=53141#p53141 <![CDATA[Re: Defined Gameplay Areas won't be symmetrical]]>

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!

Statistics: Posted by Lionhardt — 05 Sep 2013, 08:36


]]>
2013-09-05T08:28:44+02:00 2013-09-05T08:28:44+02:00 /viewtopic.php?t=5064&p=53140#p53140 <![CDATA[Re: Defined Gameplay Areas won't be symmetrical]]> Statistics: Posted by Krapougnak — 05 Sep 2013, 08:28


]]>
2013-09-05T04:29:43+02:00 2013-09-05T04:29:43+02:00 /viewtopic.php?t=5064&p=53130#p53130 <![CDATA[Re: Defined Gameplay Areas won't be symmetrical]]>

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.

Statistics: Posted by Lionhardt — 05 Sep 2013, 04:29


]]>
2013-09-04T22:51:06+02:00 2013-09-04T22:51:06+02:00 /viewtopic.php?t=5064&p=53107#p53107 <![CDATA[Re: Defined Gameplay Areas won't be symmetrical]]> Can you try 0,0,513,513?

Statistics: Posted by Deep_ — 04 Sep 2013, 22:51


]]>
2013-09-04T20:28:33+02:00 2013-09-04T20:28:33+02:00 /viewtopic.php?t=5064&p=53078#p53078 <![CDATA[Re: Defined Gameplay Areas won't be symmetrical]]>
Look, this is my script:

Code:
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:

Statistics: Posted by Lionhardt — 04 Sep 2013, 20:28


]]>
2013-09-04T20:05:51+02:00 2013-09-04T20:05:51+02:00 /viewtopic.php?t=5064&p=53075#p53075 <![CDATA[Re: Defined Gameplay Areas won't be symmetrical]]> 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.

Statistics: Posted by Deep_ — 04 Sep 2013, 20:05


]]>
2013-09-04T18:22:09+02:00 2013-09-04T18:22:09+02:00 /viewtopic.php?t=5064&p=53051#p53051 <![CDATA[Defined Gameplay Areas won't be symmetrical]]> 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?

Statistics: Posted by Lionhardt — 04 Sep 2013, 18:22


]]>