lennaert's Recent Forum Activity

  • It would require having a browser open with someone logged in.

    You could use some sort of password or special username, which upon trying to connect to a room and becoming host, gets checked.

    Name/pass matches ? allow joining and become host

    Name / pass does not match, disconnect from room.

  • I was hoping C2 has a way

    to connect to a local MySql database?

    Sure, you would need a local webserver too then, wamp or something alike (PHP web-, mysqlserver).

    then you can use construct 2 Ajax with PHP to the web address of you local server.

  • Ahh, sorry yes, I had started your app without the login screen.

    I've gone over your events, and your not settings any peer IDs for objects, which you should.

    Take a look at the template examples, and make sure that in your app the host and newly connected peers get a PeerID.

    For the host side:

    On peer connected: create peerobject, set peerobject.peerID to multiplayer.PeerID

    For the peer Side:

    On peerobject created, set peerobject.PeerID to multiplayer.PeerID

    Then, each player/peer or host has peerobjects with their own PeerID's, which you can use as reference, for Multiplayer.PeerAliasFromID(peerobject.peerid)

  • You actually need to set a player name .... currently in your capx it's playername = ""

    And you also login with that... not sure how that pans out, but it would be wiser to actually set a name

  • lennaert maybe it's not even necessary to sync the text? The position is synced and works but it's the name of the host-player that I want it to show up as

    Just refer to the Multiplayer.PeerAliasFromID(peerobject.PeerID)

  • I think you can only use associate object, per object, per player once.

    i.e. you can have 5 different objects associated with 1 player. As long as they are actually 5 different objects.

    Not 5 times an instance of the same object.

  • Android APK works good. Just build your app in intelxdk, Crosswalk not required.

    I have gotten best results using a plain html5 export and importing that.

  • how can I do an android multiplayer game based on local network and not internet network, just kind of P2P within 4 phones but with 1 server (me),

    You can not.

    Internet is required to connect to the signalling server which informs you who you can connect to.

  • If you enabled/use synced variables they will always be transmitting.

    You could achieve this using manually sending the peerstates when desired/required.

  • If you use syncronised variables, only numbers are allowed.

  • I would relay the target ID (target PeerID) and set the angle for a turret towards that peers X,Y

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You could use a second datastorage which gets polled for information regularly.

    For instance, you use the c2mp to build the rooms, and each player, when in a different room, hosts or is part of that individual room.

    Next to that use something like php/mysql or firebase to store extra information relating to your gaming session/profile.

    Example: you could store messages in a database, intended for another player. The other player polls the database searching for messages directed at him/her.

    To overcome a unique, lasting ID, you could simply create a special ID when a player first connects, based on their IP and Device, and have that ID stored on the users device and in the remote database, and use it to store information or address another player.

    Functionally: This ID should be used/transmitted in the c2mp communication by means of text communication when players interact over the c2mp.

lennaert's avatar

lennaert

Early Adopter

Member since 8 Oct, 2013

Twitter
lennaert has 13 followers

Connect with lennaert

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • x5
    Popular Game One of your games has over 1,000 players
  • Famous Game One of your games has over 10,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • RTFM Read the fabulous manual
  • x2
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

25/44
How to earn trophies