El Constructorr's Forum Posts

  • Thanks R0J0hound and Thank you oosyrag

    This gives me a lot of tricks to try.. I really like the idea to not sync at all until at the end, and/or if necessary sync at key intervals, perhaps on landing?.. I'm going to try these improvisations.

    Thanks again!

  • Ribis The concept of Room is exactly same as you described, in Among Us. So one person can Create a Room, set settings like: Set max players, allow re-join, etc. And other players can join until the room is full.

    Photon manages all the Rooms, and even the Lobby system. Also, it has an option to set userID's as "Friends" so you could find Friends online, etc. But I didn't quite explore the Lobby/Friends system as I use Firebase myself to handle User data etc.

    It also has an option for sqlLobby, again, I'm not sure what that is, maybe you'll understand it better.

    Here's a portion of Events and Actions of Photon plugin, which should give you a good idea on what all you can do with it:

    Oh and I agree, you must avoid sending 'inputs' to manage positions, because, as you said, there are a number of factors that can affect the 'actual' position of the sprite (e.g. framerate differences in collisions, temporary lag, etc). Unless it's a Sliding Puzzle game where nothing can go wrong, it's advisable to use sync exact absolute positions X,Y. It's not really much of data if you think about it. You're sending all in one event. You can look into BinaryData as well to make a large game more memory efficient.

    Anyway, this should give you enough information to get started and begin exploring yourself! that's how you'll fill the missing pieces on things that you still don't understand. Start with something simple. Good luck!

  • El Constructorr: I don't know how to mention your special username.

    Sebastian Ribis Ah yeah! The space is the middle doesn't let us refer. But just figured out, this button does the job!

    Ribis First, learn how Multiplayer works, the concept, how to communicate with other players. Once you know this, it would be easy to add Multiplayer events in an existing game too. (But first, learn by making a simpler Multiplayer game from scratch, that's my advice).

    I've prepared some basic examples for you to understand how Multiplayer works. Here's a VERY minimal working example, using Photon plugin in C3, on how two players can connect, and share their names with each other:

    I presume if you read along the events, everything should be self-explanatory! Notice the first two events got you connected to a Room. (In C3 Multiplayer plugin, this alone takes you several events to do so).

    The idea in Multiplayer game development is to Send signals/messages to communicate with other players. This can be done by "Raise Event" action. Example, in Event 3 above, the player sends a message with Code 1, and has his Name as the data sent. Likewise, Event 4 triggers whenever a Code number 1 is received, if so, it would display its data!

    So if you run this on two browsers, both players will get to see each others name & Connected!

    Similarly, if one player Solves a Puzzle (for example), and you want the other player to know that, you can do this:

    If you got the idea, or understood everything I've said so far, you can continue reading. So sometimes, you need to send a LOT of data together, instead of creating many Events, you can type in the data separated by a Character. Then on receive, just decode it by splitting the data.

    For example, if Player 1 wants to send their position (X,Y) every tick, they can Raise Event like this:

    Notice, the # symbol is used as a separator (you can use a comma, or anything). This is how Player 2 would decode it and set Player 1's position on his screen:

    The 0 and 1 above is the index. 0 to fetch the first portion of the data separated by "#", and so on.

    Anyway! That's all from me.

    All of that I just explained is not just to get you started, but it's literally everything you need to know to make a complete Multiplayer game! (Of course, there are more features, some really handy events and actions you must look into when exploring Photon).

    Hope this helps!

  • Hi !

    Context: A real-time 1-on-1 Multiplayer game, imagine Golf.

    Player 1 hits, both players see the ball projectile at the same time. So, ball is synced. I'm using Photon, so I'm doing the syncing manually. Player 1 sees the actual motion, and Player 2, as long as both connections are decent, I could sync the ball nicely, and even interpolate x,y and add velocities to smooth out the motion near-perfectly.

    Problem: Often, players lag a little too much and it starts to glitch/skip. I want to get rid of lag-based problems completely by showing Player 2 an imitation (a projectile) of what Player 1 has hit.

    Although it's a real-time turn-by-turn game, but there could be a couple of seconds delay, which is fine as long as it looks smooth!

    Question: How can I re-create the exact same projectile of the Ball on the other end? There are many factors, especially after it lands and rolls on grass (the decrease in velocities, etc.). I assume there is no way to make the ball stop at the exact same position, twice, despite the same initial impulse/location.

    I was thinking is there any other way to improvise? e.g. I would do an Object-time scale and see exactly what happens in the future (within just 1 second). But how to re-create that on the other end?

    Or any other ideas?

    Thanks!

  • Yes. You're using it wrong. I already told you how to use it.

    You posted the same screenshot again.

    This is what you need to do:

    Action:

    LocalStorage: Get Item "currentLevel"

    Condition:

    LocalStorage: On Item Get: "currentLevel"

    Compare two values: int(LocalStorage.itemValue)

  • Possible? Yes. Definitely... but not easy.

    You'll need to work with Physics revolute joints, have them restrain correctly, use Force to balance, and impulse to push. Will require a lot of time to perfect the mechanics. But yeah, it's do able.

  • Problem is, you cannot use LocalStorage 'like' WebStorage, unfortunately.

    You're using the right expression, LocalStorage.itemValue

    but, to get that itemValue in that expression, you'll first need to use a separate action:

    LocalStorage: Get item: "currentLevel"

    Then use a separate event of LocalStorage: On Get Event ("currentLevel") and then use Compare two values as its sub-condition. Then LocalStorage.itemValue will contain the value of "currentLevel".

    I know, I miss webStorage too.

  • Is that true that there is no way to transfer the host to another peer using the multiplayer plugin if the host disconnect?

    Ribis Jase00 Yes. That's right. Unless you're willing to keep a separate PC/device running 24/7 acting as a Host of each Room, essentially creating a Master Server yourself, then it is possible to achieve Among Us style game. But then again.. Considering the connectivity issues, you'll also need a paid dedicated Cloud based server on top of that to let everyone be able to connect.

    Too much hassle really, which is why I'd not recommend C3 Multiplayer plugin for such games.

    By the way, Photon does allow sending messages to only selected / Targeted people. eleanorjmorel hasn't explored it enough.

    Cascade Games

    There are multiple. The free one allows 20 players at a time. The next one is $95 for 3 months that allows up to 100 simultaneous players playing. And after that is $95 per month that allows 500+ players at a time.

    Note: Imagine having up to 20 players playing SIMULATENOUSLY in your Multiplayer game, not all the time but regularly, every day. What it means is before you'll require upgrading (or paying), you'd already be earning $100+ per month easily. So for a $95 for three months that allows 100 players, you wouldn't even think twice.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • First time I see that too.

    Obviously we could only help if you let us see what's behind the error :)

  • Jase00 Yes. Massive difference. My advice: Switch to Photon, Scirra's Multiplayer will drive you crazy sooner or later.

    Main differences:

    1. Scirra's Multiplayer is simply a Peer-to-Peer connection, where one of the peers is hosting the server. If that "host" leaves, the game basically ends! No more communication possible between peers, whereas, Photon has a Master server which is hosting the room on Cloud (not at any players' end), so if any player leaves, or even all of them leave, they can join back and continue. Game continues.
    2. Second main difference: Scirra's Multiplayer has Firewall/NAT connectivity issues. So basically, you'll be reaching out to 50% to 60% of the audience, rest won't be able to connect. (I made a really cool game, and found out, I could not connect myself when I changed my network provider). And many other players complained they cannot connect. Photon connects literally 100% of the time! Very stable and reliable.
    3. Third main difference: Photon is far easier to use, set-up, and understand (even as a complete beginner) than C3 Multiplayer. No need to "Sync" objects beforehand. Just "Connect to server" and "Connect to a Room", then start communicating/send messages/data. etc.

    The only con of Photon, the Free version allows maximum 20 simultaneous connections (players) to be connected at a time. For more CCUs, there are paid packages.

    But ! I'll tell you what, if you're getting 20 players at a time regularly in your game (that has Ads/inApps), that means you're definitely earning enough to cover for the paid package that allows 100+ simultaneous players. So that's also not really a drawback.

    AnConstructerBro Among Us style game can easily be made through Photon, but as Sebastien said, I agree, first learn C3 (non-Multiplayer games) thoroughly before jumping into making a Multiplayer game.

    I agree with

    What annoys me is that if the Founder is least bothered or motivated to solve a bug, then why/how should we be?

    Ashley not knowing a bug was fine, but NOW he knows. posted a minimal example of a Behaviour clearly NOT working, and Ashley did see that. An expected response from Ashley would have been: "Oh. Yeah, that doesn't seem right at all, Let me forward this to my team, they'll have a look!"

    I mean, what would he do to file a Bug Report? Post the exact same thing there? It's already clearly narrowed down! So technically, even Ashley or developer can file a bug report now. But would they?

    It's exactly the same nonsense as when you Rate/Review an app/game reporting a problem, no matter how clear you are, and yet you get a copy-pasted response saying: "We're sorry, can you please email our support team to describe your issue.." bla bla.. Oh well, by that time the user has already uninstalled their app/game, and don't give a S. Similarly, if the developers of C3 are not keen on listening here on the Forum, then soon we won't give a S either, especially if we're paying Annually.

  • Hey guys! I just released my own .io game on Android ! Took me over 1 year to make this.

    Cricket fans are 100% likely to love this game, others probably too?

    Cricket.io

    Link: https://play.google.com/store/apps/details?id=com.cricket.iogames

    It's a 1 on 1 real-time multiplayer game, you can play with Friends or random players Online.

    I made it using Photon plugin (for Multiplayer) and Firebase plugin (for User accounts and Live Leaderboards).

    I'd really appreciate some feedback! Thankss!

    Link: https://play.google.com/store/apps/details?id=com.cricket.iogames

  • You do not have permission to view this post

  • For Scroll-to to work, you must have one of these:

    1) Bigger Layout so the camera can move around

    --AND/OR--

    2) Un-bounded Scrolling 'checked' in the Layer properties, so that the camera is allowed to go outside Layout.

  • I've taught 8 to 14 years old Construct 3. They've always enjoyed it.

    However, it may not be called a Programming course. They may not learn 'Programming language' in this course, nor would they understand or write a syntax-based programming after this course. BUT. this course is rather a pre-requisite to programming for them in the future.

    Construct can greatly help them get excited about Programming / coding / Mathematics as they directly learn: Problem-solving skills, logical thinking, understand how events are handled, trouble-shooting, variables, data types, if/else, loops, functions, etc.

    If they can learn that (above) in a fun way, which thanks to Construct 3 they will for sure, then they're all set to becoming a programmer of future, whether you tell them or not. They'll love programming, or learning a programming language in the future themselves.

    So, I think the course could be "Game Development for Kids" with all its learning outcomes related to programming as Construct 3 does develop all the skills required for Programming.