Forum C# API support

API support

Postby snowman745 » August 28th, 2020, 2:29 pm

Does (or is) PlayerIO planning any support for API calls or something similar where a player can get data without a dedicated connection?

A dedicated connection from a mobile phone quickly consumes the users battery so many requests can be done via an API instead of over TCP/IP.

Just curious. I'm new to PlayerIO and looking at whether its a viable option for us.

Thanks,
--Mike
snowman745
 
Posts: 6
Joined: August 28th, 2020, 2:27 pm

Re: API support

Postby snowman745 » September 4th, 2020, 4:28 am

Anyone? Bueller?
snowman745
 
Posts: 6
Joined: August 28th, 2020, 2:27 pm

Re: API support

Postby Henrik » September 7th, 2020, 10:24 pm

All the API calls are already done over HTTP, and therefore don't require a persistent connection.

The only thing requiring a persistent connection is when you're connected to a Multiplayer room, because you're supposed to be continuously sending and receiving messages.
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: API support

Postby snowman745 » September 8th, 2020, 5:41 pm

How do I upload and host my own custom APIs for my game then?

I only see the ability to upload game code for multiplayer, not for an API that I create.

Thanks again,
--Mike
snowman745
 
Posts: 6
Joined: August 28th, 2020, 2:27 pm

Re: API support

Postby Henrik » September 9th, 2020, 8:24 pm

Sorry, no, there's no "rpc" capability in PlayerIO, i.e. you can't make one-off calls to your own serverside code. We only support live, synchronous, multiplayer rooms, and those require a persistent connection.

You *could* of course quickly join a service room, fire off a single message, receive a single reply, and then disconnect from the room, which is effectively the same as what you want, but there's going to be a bit more handshaking overhead for each call.
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: API support

Postby snowman745 » September 10th, 2020, 5:22 pm

Ah, that is too bad. If PlayerIO ever supported this, it would create an incredible E2E game hosting experience.

Thanks,
--Mike
snowman745
 
Posts: 6
Joined: August 28th, 2020, 2:27 pm

Re: API support

Postby Emalton » September 19th, 2020, 11:47 pm

Maybe when using CreateJoinRoom from the client you can specify stuff you in the JoinData parameter? This you read JoinData in serverside code in UserJoined method and then disconnect the player. You wouldn't even need to store a persistent connection this way either.
Emalton
 
Posts: 86
Joined: June 28th, 2013, 3:49 am

Re: API support

Postby JanetteMason » December 21st, 2021, 8:42 am

I'm so excited to share this with you! I first started developing my game on September 29, and now it's on Steam! I first built a prototype and submitted it on itch.io on October 1, and after some feedback from the community, I went back and rebuilt it from scratch. When I submitted the new version of the game after LD49, the response was incredible! People told me they loved the art style and how unique it felt compared to other games in its genre and I can visit https://mobilunity-bpo.com/about/ site for best work. I wanted to share these points with you because I think that this story shows that if you work hard enough, anything is possible.
JanetteMason
 
Posts: 1
Joined: December 21st, 2021, 8:37 am


Return to C#



cron