-
Notifications
You must be signed in to change notification settings - Fork 2
Launching V2
- First and foremost, Gama Server Middleware based on Node.js 22th version (not tested with previous versio). It is imperative to install the latter via this link: https://nodejs.org/.
Tip
After installation, if the node
command is not recognized in your environment variables, please run the commands below in the node.js console.
This step only needs to be carried out once during the first installation. After this step, you can launch the Middleware.
-
To start the middleware:
-
launch command "npm install", in the project root directory.
-
launch command "npm start", to launch the project.
-
This execute in the terminal differents http links. Each will redirect to the application, by default open this one: http://localhost:5173/.
Caution
When the middleware is launched, it opens several internet ports. If these ports are already occupied by another program, you'll see this in the console. To remedy this problem, you need to change the ports used in .env
, and in particular change the problematic port.
Tip
In general, I suggest you take a look at .env
to understand the global variables used by the middleware.
Tip
If you want to launch the application on a tablet, first make sure that the tablet and the laptop is connected to the same network. Then on your mobile, enter one of the link showed in the terminal except the "http://localhost:5173/".
You will also need to load Gama Server:
- If you have a recent version of Gama wich includes Gama Server GUI (GAMA 1.9.3+), you only need to launch GAMA.
- If you have an older version of GAMA, you will need to launch Gama Server. For more information see this documentation.
Note
To install Gama Server, go to Gama Platform
Warning
You must have Gama 1.9.3+ version if you want to run Gama Server easily by just launching Gama. To check the version of Gama, go to Support > About Gama.
You can start Gama before or after the middleware
To launch an experiment, first put on the "learning-packages" folder, your project including an settings.json file. Add an image for your simulation (splashscreen) which will be display on the main page. The image path will be add in the settings.json file. Add also the minimal players or maximal players in the json will allow to start or not the simulation. And the "selected_monitoring" attribut choose between "gama_screen" & "shared_screen" for now Here is an example of settings.json file for you to create your own settings.json. The name attribut will be display also on the page :
Tip
The file path of the splashscreen must follow this template : "learning-packages/yourDemo/splashscreen/yourdemoSplashscreen.png" .
The middleware now, detected a new simulation and display it on the main page
On Unity change the default IP by putting the one from your wifi Put on the case "Use Middleware DM " Then Ctrl+S
On the main page you can choose the language you want : English, French, Vietnamese, Thai