tunepunk's Forum Posts

  • Not yet, but I'm planning to as I'm getting close to release.

  • Maybe a stackable?

    Bread»Ham»Cheese»Bread - Sandwich 100points.

    Bread»Tomato»Cheese»Mushrooms. Pizza 150points.

    Fish»Cucumber»Strawberry»Onion » Fail - Game over.

    haha

  • Scirra game jam? :3

    Nice!. So tiny graphics. is it for smartwatch?

  • I have some objects scattered around the map. I want to save these positions to an array, so that it can be read later.

    I want to save the positions and the angles of several objects as they spawn to an array and load them on a function call.

    I also need to be able to delete entries from the Array, as these objects can be picked up, and should no longer be present in the array.

    * I was thinking to use. On created. then Array>Push to add the objects in the list. (something like that)

    * As an object is picked up (Destroyed) i want to delete a whole row of X.

    * As a function is called. I want to spawn (Create) objects according to the array in the correct positions.

    I don't need to save them as they are created. Another solution would also be to Save all the positions on a function call, which ever is better.

    My array would look something like this.

    Would this work?

  • I didn't say private player created rooms are a thing of the past. Just that the whole technology of the host-peer setup is kind of dated in my point of view. And not really desirable in some cases, depending on what type of game you're creating. Maybe there are some benefit in terms of ping times, and maybe better in LAN gameplay or whatnot. I guess photon cloud as a technology can have the same features as host-peer games. First one to join room - Set Player.Host=True ... and close the room if he leaves. Private rooms would also be doable i guess... but anyway. You're rigth depends on the project. But messing around with Photon cloud for a week i can see it's quite versatile.

  • tunepunk,

    Going to check it out - thxs. It looks promising.

    For me it was a no-brainer. My main concern with Peer to Peer or Hosted games, was what if host disconnects or decides not to play/ragequit, there is no game anymore. Those kind of things completely ruins multiplayer gameplay in my view. Hosted games with player created rooms are a thing of the past.

  • tunepunk

    Can you pass on the link to this photon plugin.

    How is this plugin different from the regular multiplayer?.

    Does it make one of the peers as the host if the original host leaves, or it just leaves the room unclosed, which means it'll only work in games where the multiplayer logic is running on the peers also, and not only the host.

    It's quite different from the regular multiplayer as this one uses some sort of "cloud server". There are no hosts or peers per say. Every event sent from your client will pass through the Photon Cloud server, and are sent to the other clients. You don't have to set any host or anything like that. All the actions you do you just transmit them through the photon server, and anyone in the same room will see the updates and you will see theirs as you recieve their events while connected to the room. Even if you are the first one to join the room, you're not really the host, as you can exit any time, and rejoin the room with a new ID. Rooms will stay open as long as there are players inside.

    I didn't check all the details yet, and only been messing with it for a week or so. I just downloaded the examples and learned from that, but it's pretty straight forward, and far easier to comprehend and use than the regular Multiplayer plugin. Basically works like this.

    1. Connect

    2. Join a room (If there is any open with available slots, otherwise there will be one created)

    3. Player1 press move button. (player1 moves 6 pixels in that direction)

    4. Send event to Photon server. (Event usually contain your ID and anything you want other users to get, like: Player1 move 6 pixels in that direction)

    5. Photon sends the event containing the information to all other users in the room.

    6. Recievers catch the event, and applies the on their end changes that are sent through the event. (Ex: Player1 move 6 pixels in this or that direction)

    That's basically how it works. Without dedicated servers, and no hosts. It's GENIOUS!!!

    https://www.scirra.com/forum/plugin-photon-cloud_t125222

  • I'm developing a realtime multiplayer game at the moment, but I'm using Photon Plugin instead. So far so good... The regular Multiplayer plugin didn't really meet my criteria, as i wanted rooms to stay open as long as there are players inside. I didn't want the game to end if host left the game, and i didn't want to be setting up a server. So far i didn't notice any lag either so I still have my hopes up that Photon will do the trick.

    But yet to see how well it performs when i try to make an app out of it. So far it's performing really well, and I be launching a pre-alpha playtests in the next few weeks or so for people to try it out.

  • > Never mind. I got it working. Works great! Another question though. Is there any good way dealing with lag compensation?

    >

    Neither plugin nor Photon js SDK have special features for lag compensation (but some other Photon SDKs do have built-in ping measurement and server time updates).

    You may try to implement lag measurement by yourself sending event to "All" receivers (such event goes to sender as well) and calculate round trip time in event receive handler. Note that every event goes to the server first and then broadcasted by server to all destinations.

    Thanks for the reply.

    The approach you mentioned. As I understand... If i fire a bullet, It won't actually fire until the server recieved the message and sent it back to me? So i could be experiencing a small delay. On the other hand, the recievers would probably also have a small delay, in best case, around same as mine.

    I managed to work around some of the stuff. I'm now sending the XY position of an object in one event every 0.2 second while the object is moving, but managed to get the receiving result smooth by using lerp expression to get rid of the choppy movement. And did some final adjustments to the XY position when the object stopped moving. If it stopped anytime between those 0.2 second intervals, it will now display the correct end position.

    I guess sending event data every tick isn't optimal and would generate too many messages being sent i suppose?

  • would something like: set frame to round(player.angle/45) work?

    Ahhh! Makes sense! Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have a sprite animation of 8 frames. Is there any neat easy way to set the frame number depending on an angle? and what would the best way be to do that?

    I guess i could do it manually by adding 8 events. 1 for each of the angle spans, that I want to use, but is there any smarter, or more neat way to do it?

    Player.Angle 0-45 > Set animation frame 1.

    Player.Angle 45-90 > Set animation frame 2. and so on.

    It doesn't look very good in my event sheet.

  • Never mind. I got it working. Works great! Another question though. Is there any good way dealing with lag compensation?

  • I checked the examples and tried the plugin and everything seems to work great. But I'm a bit stuck on one thing. What is the best way to continuously track the positions and rotation adn bullets of 4 players? As i can tell from the The Pool example it only sends events on click... Some more examples or tutorials would be awesome.

    So far i tried to send the rotation every 0.2 seconds of one character (ActorNr1) using Photon Set Actor Photon.MyActorNr custom property "Rotation" "player.Angle" wich seems to work fine. As ActorNr2 can see the changes in rotation if i read the property change.

    Or are there any better way to sync positions and rotation in realtime without sending to many messages/events?

  • Divide the duties. One does the Construct stuff, one does the artwork/sound/music/animations or anything that's outside of construct.

  • Looks interesting. I was thinking each level could have several win conditions or "missions/quests" so to speak? That would give some variety. Ideas for different mission types could be.

    *kill all enemies.

    *protect resource - enemies will keep moving towards one point that you have to protect.

    *delivery - bring something from point A to B

    *sneaky - go from point A to B undetected.

    *find something. Scout the map. Hidden item is not revealed until you are 2 tiles away.

    Maybe something like that would be fun gameplay?