Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / AGK v2 Tier 1 (Multiplayer question) Select text in an EditBox or share text message

Author
Message
Multicoder
AGK Developer
10
Years of Service
User Offline
Joined: 25th Oct 2014
Location: Germany
Posted: 8th Nov 2014 06:20
Hi there,

I am trying to bring multiplayer for 2 players to my Pong Clone on Android using the Network-Commands.
I don't want to use a master-server of any kind or the Google Play Games platform.

I think, the only ways to connect 2 players without too much effort for the players would be:
1. send a message with the hosts IP via the android sharing dialogue to the possible 2nd player
or
2. let the hosts IP appear in a EditBox to let him select and copy it to send it manually to the possible player 2 via whats app, sms, email, etc.

The problems: I can't find functions for default sharing or selecting and copying text in an EditBox
Also there seems to be no function to paste copied text into an EditBox.

Is there any way to achieve my goal or do I have to host a master server (which I won't because it's too much effort for such a small game)?

Thanks in advance
Daniel

Yes, I am aware that I sound like a caveman to native english speakers
Lucas Tiridath
AGK Developer
16
Years of Service
User Offline
Joined: 28th Sep 2008
Location: Kings Langley, UK
Posted: 9th Nov 2014 09:13
To be clear, do you actually want players to be able to play against one another over the internet, or would local play over a LAN do? Because if you're happy with just LAN games, you can use broadcasting to pick up the address of one device from the other.

If you need it to work over the internet on the other hand, as you say, there needs to be some kind of server involved. Do you have a website? Because if so, it really wouldn't be much hassle to set up a simple PHP server for your game.

As for copy-paste, I'm not aware of any AppGameKit BASIC commands for accessing the shared clipboard, which is presumably what you'd need if you want to copy the text into an SMS messaging app. I've not used AppGameKit BASIC for a while though so I'm not totally up to date with all the new commands coming out in V2.

Multicoder
AGK Developer
10
Years of Service
User Offline
Joined: 25th Oct 2014
Location: Germany
Posted: 13th Nov 2014 05:51
Thank you for your answer!
I was afraid that would be the only solution to play over the internet :/
Well, I guess that's a "no" for multiplayer in "Pong Clone 2k14" then.

Yes, I am aware that I sound like a caveman to native english speakers
Jo Bach
9
Years of Service
User Offline
Joined: 22nd Dec 2014
Location:
Posted: 5th Feb 2015 21:22
Hi Lucas,

Can you explain more about a simple php server to set up an internet game?

Is there an example on the forum?

Login to post a reply

Server time is: 2024-11-25 16:26:02
Your offset time is: 2024-11-25 16:26:02