lennaert's Recent Forum Activity

  • You can test with multiple windows by yourself as well; use chromes' incognito mode. You can open as manny as you like.

    Chrome options:

    "Open new window in incognito mode"

    Then manually browse to your preview addres.

  • Here's an example of what I had in mind:

    https://www.dropbox.com/s/dszf5pcewxgpv ... .capx?dl=0

  • Tried with 2 and 3 windows, worked decently at first glance.

    But when there are more then 2 players, you have a slight issue with the nozzle flame, it appears on more then 1 tank if 1 of the players fire.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Simple approach:

    Use an image that is wider on the bottom and thinner on the end.

    Have the origin at the bottom of the rod (thick part) and place the rod's origin in the bottom center of the screen.

    Then simply set the angle towards where you clicked.

  • Sounds like you could use AJAX for this:

    The ajax could make post requests to a php file that checks a database for: register/login/authentication/user (game) details.

    Also, for the login you could use the google/facebook plugins do to logins/authentication of user, even save and retrieve scores for the respective login systems.

    Scores would be related to the respective plugins/login systems too. However, if you store and retrieve scores from your own database, then the scoreboard could be universal, regardless of login system.

    As for multiple games, any uploaded game is able to get loaded on a unlimited amount of end users. (with or without logged in system)

    You could add checks by means of events in a game to see if a user is logged in, and then allow or disallow access.

  • If you do it everything online, than include in the price an easy way to instantly publish and share the app, but so that it stays online when you close the editor.

    Sounds like your asking for a "export to FTP location".

  • The PHP file requires the line with the access control.

    The tag value is used in c2 to identify the request/post, for like when its done.

    The data entry should have the key/values in it.

    i.e.

    data: "key=value&otherkey=othervalue"

    Also, in your console log, when testing the game, you can see the details of the post action (Ctrl + Shift + J , then select the network tab)

  • You can reconnect to the room when the host disconnects, and become host; if you kept track of the peerids you can swap out the game state variables after the previous host reconnects as peer.

    If the previous host got a new ID but was able to reconnect to the previous room ending up with the same peer (which is now host) it can inform the new host of its presence and they can swap out game states and the new host can update the peerids on the objects of the previous host. (This assuming the previous host also preserved game state of various objects, such as peerid of the peers.)

    You can keep track of objects and states in various ways, like saving an objects state asJson in an array or other variable, and build a new object based on that info after successful reconnecting with the known peer.

  • update:

    Irrelevant now

  • You can create a system where the peer becomes the host if the current host leaves.

    you just need to make sure all the details of the game states are preserved on the peer end.

    Mind you, these approaches are quite advanced.

  • > Without position syncing for the test objects and peer objects (as in the given example above) one of the peer objects vanishes here on my system for the peer. (object count for peer)

    >

    > When I enable position syncing for both objects, the object counts are as they are supposed to be.

    >

    > This issue arises also arises when I just have the peer object with position synced and the test object without position synced.

    >

    >

    So then Multiplayer Sync Object (none) pretty much totally breaks multiplayer whenever there's any significant amount of latency. That sounds like a bit of an issue.

    Not sure its due to the latency, with position syncing more information is passed along, potentially causing more lag/latency.

    But seeing as the this scenario appears reversed here (more syncing works better) I am guessing there is a glitch somewhere in peer creation/count when no position syncing is used.

  • Subevents of event 71:

    There you try to work out peer movement by means of the inputs bits determined by peerstate, but the angle you use for directional movement is based on a touch input.

    This can not work, as the host does not know where the actual touch is taking place, seeing as the touch is occurring on the peer end.

    This results in the peer's angle of movement on the host using several 0 values, making it move towards the top left.

    Try and set the X and Y of the peer's touch (upon touch) in a peerstate or send as message to the host, to update it on the host side in a variable on the peer's object in question.

    Use those X,Y's in determining the angle of movement.

    As a result, for example, action for angle of event 72 could look like:

    angle(Everytouch.X,Everytouch.Y,Players.xtouch,Players.ytouch)

    I noticed a couple more discrepancies in your approach, but the above is most vital and should get you on your way.

    The general thought of such mechanics is like:

    Peer wants to move, and performs a control action (touch or mouse click) the variables of these (the x and y) need to be conveyed to the host, which then processes the movement with the given variables (the x and y).

    And, with position synced objects, the hosts movement of the peers object is then reflected back to the peer automatically.

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