[Plugin] AirConsole - local multiplayer for your game

Post your completed addons to share with the community

Post » Mon Jan 09, 2017 8:47 am

AirConsole team just merged my Github pull request.

Introducing persistent data for AirConsole on Construct 2

Added in version 1.4.7
  • Couple of cosmetics
  • Couple of little fixes and and there
  • New conditions:
    • onPersistentDataLoaded - Trigger - Triggered when the requested persistent data have loaded
    • onPersistentDataStored - Trigger - Triggered when your persistent data have been stored on the servers
  • New actions:
    • requestPersistentData(uids) - Requests persistent data from the server. You have to specify the device uids the request is for. If more than one, separate them by comma. Triggers onPersistentDataLoaded when done
    • storePersistentData(key, value, uid) - Stores persistent data to the server. Triggers onPersistentDataStored when done
  • New expressions:
    • PersistentData - A JSON string representation of the persistent data loaded by the last requestPersistentData in a C2Dictionary format.
    • Highscores - A JSON string representation of the highscores loaded by the last requestHighscores in a C2Dictionary format.
    • GetUID(deviceId) - Returns the globally unique id of a device

Check it out on Github:

Official AirConsole repo: https://github.com/AirConsole/airconsole-construct2
My fork: https://github.com/Psychokiller1888/airconsole-construct2

Feel free to contact me for additions, missing parts etc etc
B
29
S
11
G
3
Posts: 212
Reputation: 4,168

Post » Fri Jan 13, 2017 7:56 pm

Hi, i have some problem with this. On the beginning everything was just fine, work great, but now the simplest think canot work for me...

Now im trying to make "game" that display AirConsole.DeviceIDJoin on screen for each connected player. It work for 2 player but newer for 3 or more players.

file too airconsole with controler (controler copied from tutorial)
http://alfateam.cal.pl/air/Grawitacja2.zip

and construct2 file:
http://alfateam.cal.pl/air/plik.capx
B
21
S
3
Posts: 73
Reputation: 1,488


Post » Sun Jan 15, 2017 1:15 am

Is this something new?
Thanks for fast answer
B
21
S
3
Posts: 73
Reputation: 1,488

Post » Sun Jan 15, 2017 9:05 am

I added it in version 1.4.0
B
29
S
11
G
3
Posts: 212
Reputation: 4,168

Post » Wed Jan 18, 2017 1:30 pm

Hello @Psychokiller1888 ! I'am testing my game using wamp server (localhost). My game has a maximum of 4 players.

My problem is that SOMETIMES when the game loads ONE of the devices gets hold of two players, and when I see the text (nickname) of who is suppose to be the 2nd player is the same nickname as device1.

My code is the same as in the example (https://www.scirra.com/tutorials/9414/c ... nsole#h2a5).

If deviceID1 = 0 then Set deviceID1 to Airconsole.DeviceIDJoin.
Else deviceID2 = 0 then Set deviceID2 to Airconsole.DeviceIDJoin.
Else deviceID3 = 0 then Set deviceID3 to Airconsole.DeviceIDJoin.
Else deviceID4 = 0 then Set deviceID4 to Airconsole.DeviceIDJoin.

Does this happen because the two devices are loading at the same time? Or because I'm testing it on a localhost?

Please let me know how can I fix this. I will appreciate any help.

Thank you!
B
11
S
2
G
1
Posts: 45
Reputation: 1,238

Post » Wed Jan 18, 2017 1:36 pm

Quite honestly, the simulator is so bad that you shouldn't fight for that SOMETIMES. The best way to find out is to upload your game to airconsole. Don't be scared, games aren't published at that point, but you will be able to test the game as real, in a preview mode
B
29
S
11
G
3
Posts: 212
Reputation: 4,168

Post » Wed Jan 18, 2017 1:49 pm

@Psychokiller1888 , I was thinking about that too. I will upload the game to airconsole.

Thank you for the quick response!
B
11
S
2
G
1
Posts: 45
Reputation: 1,238

Post » Thu Jan 26, 2017 1:04 pm

im having the problem with "Rate limiting to 10 messages/updates per second." but i don't know how to restrict messages in screen.html
B
18
S
3
Posts: 93
Reputation: 979

Post » Thu Jan 26, 2017 1:20 pm

There's a rate limiter script available on the official git repo
B
29
S
11
G
3
Posts: 212
Reputation: 4,168

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: BackendFreak and 1 guest