MoI discussion forum
MoI discussion forum

Full Version: Tiles and tile maps

Show messages:  1-6  7-26  27-46  47-49

From: Michael Gibson
23 Nov 2017   [#47] In reply to [#45]
Hi Marco,

> So...this sentence invalidates the "manual" method I wrote in my previous message ?
> LOL :)

Yup, that's correct, when calling objectlist.getCurves() it will give back both "standalone curves" and also "edge curves". But you could call objectlist.getStandaloneCurves() instead.

- Michael
From: mkdm
23 Nov 2017   [#48] In reply to [#47]
Thanks for the tip Michael.

Ciao.
From: bemfarmer
24 Nov 2017   [#49]
Here is the TruchetTile script.

To use the script, first load the file TruchetDuo22.3dm.

Considerable time was spent in tile design, and coding "design," and in re-writing documentation in the .js file.
The screen display was "tuned up," by introducing a limited amount of Curves, and by hiding all edges for quadrant I.
The .3dm file loads with a few edges not hidden, but still looks good.

Michaels help was invaluable, including many code samples from the forum.

Unique and specific naming conventions were used in the .3dm file. There are 5 tile pattern examples, 4 tiles each.
A solid sphere may be added to a tile, and works, provided it is named properly, although 2D surfaces are expected.
This script was written by an amateur programmer.
Note that parity, in the classic tile case, reduces the randomness of the display.

Functions very well in MoI3 and in MoI4BetatNov18. Row and column numbers worked OK at 25x25 for MoI3, and 100x100 for MoI4 (12 seconds+/-)

(Random replacement of single tiles was not implemented. (It would likely flicker.) (Some orphan code was left.))
- Brian

Attachments:
_TruchetTile11_24_2017.zip


Show messages:  1-6  7-26  27-46  47-49