Tutorial (or long explanation) About Scripting


#1

Hello there,

This is my very first post on this forum. I’m actually studying programming and decided to create a RTS (like Warcraft let’s say) game with a client/server design.
As UI and client-side are not really the core of my studies, I opted for something quite simple like GDevelop. But I have a problem: the goal here is to have an REST API, I just need to communicate with GDevelop.
From what I read recently, I guess Websocket is more or less supported by GDevelop.

This is what has been already done so far:

  • A REST API, which is already operationnal, with websockets handler
  • A simple game created on GDevelop

My questions are:

  • Where do I have to put my code to connect to the server? (in a javascript event?)
  • I know how websockets work, but How can I interact between the info I receive from the server with the game? Which classes do I have to use?

I am pretty aware GDevelop is not made for programmers and this is the main reason why I chose it, but I feel a cruel lack of documentation on Gdevelop scripting :’(

Anyway, your advices would be welcome!


#2

hi
take a look here
wiki.compilgames.net/doku.php/gd … ts/js-code
then explain to me :smiley:
I wan:t to read a php page taht shows scores and show in my game, i found an example and can write database dping post but don’t know how to read from web :confused: