gama-platform / gama.experimental

Home of experimental plugins for GAMA
13 stars 6 forks source link

Gama & Unity #14

Open agrignard opened 6 years ago

agrignard commented 6 years ago

It would be great (and would open many new opportunities) to display a Gama Simulation in a high level 3D renderer like Unity. I am not saying that the current java2D or Opengl are useless they are a must have but they show some known limit in term of realistic and performant rendering.

By having a look in the experimental repo of GAMA I see that @ysklab seems to work on a Unity project link to GAMA: ysklab/Scene-GamaUnity

Maybe this can answer to some of the question raised in this issue?

I copy/paste Youcef answer in this issue:

Hi, I have started working on this idea since a couple of weeks. The right repository is: ysklab/UnitySceneWithGama, which consists of a Cube-Collector game, where a Gama agent moves a ball in a Unity scene in an attempt to collect cubes. After having the total collected cubes reached the needed number (the latter is indicated by the Gama agent at the beginning by mean of notification subscribe message), a notification message from unity to Gama agent is sent, thus, ending the game. Other functionalities are available. I will describe how the whole things work soon.

YoucefSklab commented 6 years ago

Hi, having worked on the Unity environment, it seems to me that it is possible to do a lot of things with Gama on a Unity scene. However, I think we need to set and fix the border between what will be done with Gama and what will be done whit Unity. I think it is possible to develop a kind of generic Unity scene, on which a Gaml model can create and manage objects as needed, without touching Unity.

So far, I have investigated several aspects and I would like to have your feedback on this subject, by mean of this discussion, to fix the points to achieve. To have a preview of what I have done, you can run the model TwoPlayersWithSceneBuilding.gaml and the scene (EmptyScene) in the repo: YoucefSklab/UnitySceneWithGama

Basically, possible actions on a scene are:

Best,

benoitgaudou commented 6 years ago

Hi Youcef,

I was interesting to try your work, and I followed the steps to be able to run it in the README. But at the first step, I get:

MacBook-Pro-de-ben:~ ben$ brew install mosquito

Error: No available formula with the name "mosquito"

==> Searching for a previously deleted formula (in the last month)...

Warning: homebrew/core is shallow clone. To get complete history run:

git -C "$(brew --repo homebrew/core)" fetch --unshallow

Error: No previously deleted formula found.

==> Searching for similarly named formulae...

Error: No similarly named formulae found.

==> Searching taps...

==> Searching taps on GitHub...

Error: No formulae found in taps.

Any idea ?

Cheers

Benoit

Le ven. 24 août 2018 à 17:08, Youcef SKLAB notifications@github.com a écrit :

Hi, having worked on the Unity environment, it seems to me that it is possible to do a lot of things with Gama on a Unity scene. However, I think we need to set and fix the border between what will be done with Gama and what will be done whit Unity. I think it is possible to develop a kind of generic Unity scene, on which a Gaml model can create and manage objects as needed, without touching Unity.

So far, I have investigated several aspects and I would like to have your feedback on this subject, by mean of this discussion, to fix the points to achieve. To have a preview of what I have done, you can run the model TwoPlayersWithSceneBuilding.gaml and the scene (EmptyScene) in the repo: YoucefSklab/UnitySceneWithGama

Basically, possible actions on a scene are:

  • Create/manage objects.
  • Assign a value to a given field in a Unity object.
  • Request the value of a field of a Unity object
  • Call any method, with one parameter (or more) of a Unity object. Methods with several parameters should be written following a specific scheme.
  • Assign a value to a property of an object (Color, position, rotation,... ).
  • Manage the movements of a Unity object;

Best,

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/gama-platform/gama.experimental/issues/14#issuecomment-415788271, or mute the thread https://github.com/notifications/unsubscribe-auth/ABe7SmjtDY_8tEffJ5Ku5d2QH8Pa6nwNks5uUBbOgaJpZM4WF0gb .

YoucefSklab commented 6 years ago

Hi Benoit, Strangely, after a few attempts, I got the same message. I just reinstalled Homebrew and it works fine again.

Please try with:

Hope this will fix it!

best, Youcef

benoitgaudou commented 6 years ago

Thanks it seems to work. At least I have no error during the installation process :-)

Cheers

Bneoit

Le ven. 24 août 2018 à 19:13, Youcef SKLAB notifications@github.com a écrit :

Hi Benoit, Strangely, after a few attempts, I got the same message. I just reinstalled Homebrew and it works fine again.

Please try with:

Hope this will fix it!

best, Youcef

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/gama-platform/gama.experimental/issues/14#issuecomment-415823033, or mute the thread https://github.com/notifications/unsubscribe-auth/ABe7Sn6s-23vTrIq2yaF7QoPBvkcJ8U8ks5uUDQfgaJpZM4WF0gb .