Latest Posts

Topic: Completion of a map by symmetry

einstein13
Avatar
Joined: 2013-07-29, 00:01
Posts: 1059
Ranking
One Elder of Players
Location: Poland
Posted at: 2015-02-10, 07:51

After my exam I'll have some time. Maybe till the end of week I will test some things in my idea + your idea.

(we still need this trick using non algebrical number to avoid parallel situation ...)

In my code I expected some parallel situations- they aren't painful. Don't be afraid of that face-smile.png

I'll look at this language. it will be interesting if we share the code in the same language ...

I will try to write everything in Julia and put it in one place, that you will have the acces. Hope it will work. New idea need testing face-tongue.png

At the end , we will need to implement this feature in the map-editor , and we should consider choosing a language that could work for it.

We have 3 solutions (as I know): C++, Python, Lua. For sure if we bring Julia code, anybody can rewrtite it.


einstein13
calculations & maps packages: http://wuatek.no-ip.org/~rak/widelands/

Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 2919
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2015-02-10, 09:27

We use Python only for external utility scripts. Anything in the game itself is either written in C++ or Lua. Our map generator is written in C++.

I just had a quick peek at Julia, rewriting math stuff from it in our languages shouldn't be a problem.


Busy indexing nil values

Top Quote
gnarfk
Avatar
Joined: 2015-01-05, 16:18
Posts: 37
Ranking
Pry about Widelands
Location: France
Posted at: 2015-02-10, 18:06

einstein13 wrote:

(we still need this trick using non algebrical number to avoid parallel situation ...)

In my code I expected some parallel situations- they aren't painful. Don't be afraid of that face-smile.png

i'm not afraid of ants or spider , but i still prefer them not to be walking on my food. i think it is a matter of taste.

I'll look at this language. it will be interesting if we share the code in the same language ...

I will try to write everything in Julia and put it in one place, that you will have the acces. Hope it will work. New idea need testing face-tongue.png

At the end , we will need to implement this feature in the map-editor , and we should consider choosing a language that could work for it.

We have 3 solutions (as I know): C++, Python, Lua. For sure if we bring Julia code, anybody can rewrtite it.

We know actually that our programmers think it'll be easy to rewrite julia to C++, so we can start the work face-smile.png


Top Quote
gnarfk
Avatar
Joined: 2015-01-05, 16:18
Posts: 37
Ranking
Pry about Widelands
Location: France
Posted at: 2015-02-10, 18:38

i can think of an improvement of my idea using edges as borders, and the coding and computing could be simplified a lot.

We don't need our border equation thing and Jordan theorem ....

We want to set the terrain-type of a field.

Rotate the center of this field in the other direction, look where it falls in the original region we want to rotate. This point falls in a field. copy the terrain type of this field (if it is not the "default" terrain-type)

But there is a little problem. With some angles (30° ,90°, 150°) , for some centers of fields (few of them , only a line of them) , the center of the fields, when rotated, falls exactly on an edge . We can either avoid this case (if we know that we have to avoid this line , which can be done as we still dispose of a 60° area to work without any problem) , or find a trick to solve this (choose one of the two fields at random ? which causes no problem when the two fields concerned by this are of the same terrain type , which may be the case very often)

i want to point out that we face this problem with the other version too... with center of fields falling exactly on the border of the shape...

Edited: 2015-02-10, 18:41
Top Quote