Converting to C#

138 views
Skip to first unread message

Tipo de incognito

unread,
Oct 2, 2015, 11:42:01 AM10/2/15
to worldengine
Hello,

I want to try to translate this generator worlds on python to C# and use it on Unity3D.

Could you tell me the order of execution of .py files when generating the map of elevation, temperature, rainfall, etc? Any indication or help to make the conversion is welcome.

Thanks.

Tipo de incognito

unread,
Oct 4, 2015, 6:09:21 AM10/4/15
to worldengine
Nobody help?

I've been watching and I think it starts in generation.py, but I'm not sure. Also I do not know if there are any other important .py before generation.py.

Generation.py calls the algorithms of temperature, wind, precipitation, etc. That are in the simulations folder. But I missing something?

Guys, can you help me?

Federico Tomassetti

unread,
Oct 4, 2015, 10:52:16 AM10/4/15
to Tipo de incognito, worldengine
Hi, I am not familiar with Unity 3D but can't you invoke Python code
from there? Consider that the world generator use a library written in
C++ so you would have to translate also that code. It could take
sometimes.
Did you consider the possibility to generate worlds in WorldEngine and
just open the generated world from Unity 3D?

Cheers,
Federico
> --
> Visit the homepage of the project at
> https://github.com/Mindwerks/worldengine
> ---
> You received this message because you are subscribed to the Google Groups
> "worldengine" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to worldengine...@googlegroups.com.
> To post to this group, send email to world...@googlegroups.com.
> Visit this group at http://groups.google.com/group/worldengine.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/worldengine/580350ab-b9f1-4eae-a482-5749b731d8ed%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Website at http://tomassetti.me
GitHub https://github.com/ftomassetti

Tipo de incognito

unread,
Oct 4, 2015, 5:38:36 PM10/4/15
to worldengine, dmp...@gmail.com
Hi,

The idea is to translate WorldEngine to C#, but if the program uses libraries in C++ (I guess the tectonic plates), that would be a problem.

I've been researching and apparently it is possible to invoke WorldEngine from Unity:

http://answers.unity3d.com/questions/51439/launch-a-python-script-from-a-javascript-file.html

http://onedayitwillmake.com/blog/2014/10/running-a-pythonshell-script-from-the-unityeditor/

Perhaps it could be done as you say, run WorldEngine from Unity and use the map generated in Unity. But it would be a problem of distribution and compatibility, because it is difficult to make run the program in Python. I still have not gotten it to work in Windows.

Thank you for respond and help me. :)

Federico Tomassetti

unread,
Oct 4, 2015, 5:40:51 PM10/4/15
to Tipo de incognito, worldengine
On Sun, Oct 4, 2015 at 11:38 PM, Tipo de incognito <dmp...@gmail.com> wrote:
> Hi,
>
> The idea is to translate WorldEngine to C#, but if the program uses
> libraries in C++ (I guess the tectonic plates), that would be a problem.
>
> I've been researching and apparently it is possible to invoke WorldEngine
> from Unity:
>
> http://answers.unity3d.com/questions/51439/launch-a-python-script-from-a-javascript-file.html
>
> http://onedayitwillmake.com/blog/2014/10/running-a-pythonshell-script-from-the-unityeditor/
>
> Perhaps it could be done as you say, run WorldEngine from Unity and use the
> map generated in Unity. But it would be a problem of distribution and
> compatibility, because it is difficult to make run the program in Python. I
> still have not gotten it to work in Windows.

We have also a binary version for Windows: perhaps it would be easier
to help us improving that binary version that port the whole code of
WorldEngine.

Cheers,
Federico
> https://groups.google.com/d/msgid/worldengine/91afb1fc-cf3f-4a95-88a6-58910c64ff4a%40googlegroups.com.

Tipo de incognito

unread,
Oct 5, 2015, 6:26:36 AM10/5/15
to worldengine, dmp...@gmail.com
I saw the binary version, and neither I have gotten it to work. I'll try on another computer to see if that was the problem.

I can help you implement WorldEngine in Unity, but I do not think I can help you to improve the binary version.

Tibor Bamhor

unread,
Oct 5, 2015, 4:04:36 PM10/5/15
to worldengine
Would it mean that it would no more run on linux?

Dňa piatok, 2. októbra 2015 17:42:01 UTC+2 Tipo de incognito napísal(-a):

...I want to try to translate this generator worlds on python to C# .....

Tipo de incognito

unread,
Oct 7, 2015, 9:05:18 AM10/7/15
to worldengine
Unity is compatible with Linux and Mac in addition to Windows. :)

Jonathan Quinth

unread,
Aug 29, 2016, 12:32:06 PM8/29/16
to worldengine
Hey there,
I'm actually doing exactly what you mentioned, and have translated a lot of the platec code to C#. Did you ever get to translating all of it, or did you end up invoking it from Unity?

On Friday, October 2, 2015 at 5:42:01 PM UTC+2, Tipo de incognito wrote:

Tipo de incognito

unread,
Aug 29, 2016, 5:04:51 PM8/29/16
to worldengine
Neither one thing nor the other. At the end I implemented my own worlds generator, much easier and simple. And if in the future I want the players can use the maps created with worldengine, I'll create an algorithm that can read maps exported by this generator.
Reply all
Reply to author
Forward
0 new messages