EncryptedCow's Forum Posts

  • Televangelist yep, pretty much. I think I'm just going to switch over to a grid based movement system (think FF1), and not require any actual collisions in C2, just grid based collisions which will allow all players to be in their own layout with a relative position of their own map. It's the best I can do with what I have.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • lennart I don't want to have multiple tabs open OR have palyers acting as the server in any way at all. The game isn't specifically for 2 people either. I don't know how many people will be in the game and what maps they will be on.

  • Everade Yes, thats usually what you're supposed to do. But the way that the multiplayer plugin works is that it will set the players position to an exact position on the screen.

    My problem lies within having seperate maps (different layouts) lets say there are 2 players on my server at one time. There are both in the overworld and player A decides to go do a quest. The quest is to go do something in a cave. Normally you would just have the cave on a seperate layout, then when the player enters the cave, you go to that layout. Leave the cave and you go back to overworld layout. However, since player B is still on the overworld I can't just switch layouts. Now the server has a different map loaded with different collisions resulting in player B being able to walk over some walls/not able to walk over empty space.

    One way of solving this is just to make the one layout have all the maps, then set the players position to wherever the "door" is that they went through when they do. My biggest issue would just be trying to handle all of that, keeping track of positions, not letting players show other players and objects not on their map, etc. Then you'll get performance issues on the clients end because they have to have every single map in the entire game loaded at once.

    So either there needs to be some sort of relative position (the server would have every map on one layout, then each player would have them in seperate layouts, the server would then tell the client the offset position relative to their current maps top left vs 0,0 so the client can put them at the correct position), or the multiplayer plugin needs to somehow support different players being on different layouts.

  • I'm not sure if I'm going to continue trying to make a single dedicated server in C2. My first problem was with this, if there's no ways to have large amounts of maps without usinga single layout/a bunch of tabs it seems inpracticle to me. Then I had the problem with peer to peer connections where almost half the people that tried to play couldnt, which Ashley has stated is due to the users network setup, not mine. These two reasons have pretty much compeltely halted my game.

    I was thinking of trying to do more of a grid based game where having the actual map loaded visually on the server would be unnecessary. Positions would be grid based on that specific map so positioning would be done realtive to the users screen, and maps would be loaded client side based on which one the server says the player is on. There is still the connection problems but that's something I (might) be willing to oversee and just tell people they're screwed unless they want to change up their network configuration

  • I'm pretty sure this exists already. do you mean rearranging the tabs for all the layouts and event sheets on the top?

  • Ashley So I take it that those people who can't connect at all will never be able to try out my game? That's pretty unfortunate considering it seems like a lot less than 90% are able to connect.

  • Ashley So is there a way for me to combat this on my end, or suggest to other users if they are unable to connect?

  • I'm currently working a single servre multiplayer games and I'm having some troubles that are starting to make it not worth it. When people try to connect, sometimes it will say they joined the room successfully on the client side but on the server side there are no problems. This does not always happen for everyone however. Some people can connect in Chrome and not Firefox, others can connect in either, and then some people can not connect in any browser. It also seems to be consistent with who cannot connect or can connect with certain methods. The people who can't connect anywhere won't ever be able to connect. The ones who don't have troubles will never have any troubles. Is this a problem on my end, and is there any way to fix it if it is?

  • All though the computer can run really fast, it can not do more than 1 thing at a time. If an event fires 3 times at the exact same moment, they will happen one after another, thus the instance variable can be altered each time and work fine.

  • You do not have permission to view this post

  • Simplified it a whole bunch and put each key into one object. You could change the array.AsJSON to a loop within the array to tell the user exactly which keys they got wrong on each attempt.

    EDIT: Didn't see the second and third page of replies, woops. If this helps at all go ahead and use it, if not just ignore

  • DatapawWolf Yeah I know actually having custom maps won't be an issue. But it's actually loading them and placing them down properly. I dont know if there will be 1 map active, or 100. If that makes sense. And having them created for each player that has their own custom map will end up producing a LOT of new tabs and clients if I also have one for each layout

  • Right now I'm working on a multiplayer game which will eventually require multiple layouts. Pretty much it's an RPG where players can go where they want. The problem is that the host can't be on multiple layouts if 2 players arent on the same layout. I've thoguht of 2 workarounds for this.

    First one is to have every level on one layout, then set the players position to the new map when they change maps. However, even though the collision system is very well optimized I can see there being performance problems with too many players and too many maps. Another issue is if I wanted to add custom maps for players, that would not be possible.

    The second option is to take the load of the player controllers off of the main server and have a new client that controls each map. Each player would be constantly talking to the main host, then depending on the level they are on, they will communicate with the other client which is handling that level. I could break "areas" into cells using the first method, so for example all of the indoor maps of a certain city would be on one layout which is handled by a seperate client. The problem with this method is that I wouldnt not be able to use the built in sync object position with the Multiplayer plugin. I would have to use my own method with instance variables and interpolation. I would also have to have a whole bunch of versions of the game for each set of levels, and have each of them running seperately which would require more resources from my computer.

    So my question is, what is the best option? And are there any othe solutions? I don't think the Multiplayer plugin was really made with multiple layouts in mind, but there's usually workarounds for every problem, I'm just trying to find the best/most effective workaround.

  • Use console logs

  • It probably would actually be easier to have sprites on the host then just make the layers invisible so you dont have to bother with drawing them, yet still keep the advantages of having objects that exist.