lennaert's Forum Posts

  • 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.

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • Did a quick check:

    There appears be an issue when there is no position syncing happening. At least from what I can tell.

    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.

    PS

    In the past I ran into this issue a couple times too without narrowing down where it originated from;

    it happened when I tried to make my own position syncing system where I wanted to have the objects automatically created (synced) based on the peers created and maintained on the host side. (just the object amounts)

    This did not work nicely in the past so I made creation and destroy events on peer/host for peers connecting/disconnecting on the host end.

    This manual approach worked well, but required a lot testing and quite some extra events.

  • Disable the group end game at the end of the actions

  • Suggestion:

    Use xp ranges, like 0 to 1000 and 2000 to 3000 etc (or a range you like, and process this in your multilayer room name. I.e. range1k, range2k, range3k etc

    Then, after connecting and searching for available rooms, show or join rooms which has your range in the room name.

    Example:

    Player is in the 2k range xp, upon start it sets the room name to range2k and auto joins it.

    If this happens to all players who are in the 2k range, they will auto join the first available room which starts with range 2k.

    Voila .. No extra server needed

    Ps if a player levels up after a played game simply update the room name to the new range.

    I did a similair thing for countries based room selection where people wanted to join people from the same country. It works.