Methuselah's Recent Forum Activity

  • Thank you for your response. No matter what I try as the action, "leave room," Room "disconnect," or Signaling "disconnect," I still end up with the same thing. I do include the asynchronous "on Room/Signaling disconnected," but I still cannot create a new room as the old host of the previous room. Here are some pics:

    Host on the left, peer on the right

    The two play a game

    The peer disconnects/closes the game, which prompts host to disconnect OR leave room OR disconnect from room (I've tried all three), and upon completion of "on disconnected" for those, the host gets sent back to the login layout to ready another game

    The host is now stuck on either the "signaling logging in" step or the "signaling joining room" step (in this case, the "signaling logging in" step)

  • I'm having trouble allowing players to rejoin a game without closing out the game window entirely.

    What I'd like to happen: in a two-player game (like pong), if Player A leaves by clicking a back button or closing the game window, the game stops. Player B is informed that Player A disconnected, and then Player B is sent back to the login layout after disconnecting from the current room. Player B can then go back to the game layout through the login layout, becoming the host for a new game. Player C joins, and the two play as normal.

    This works well if Player A is the host and closes the game window: Player B can then basically make a new room as the host and play Player C.

    However, if Player A is the peer and leaves, the host can not create a new room. They get stuck on the "Joined Room" step. However, a Player C can join and create a new room just fine, and they'll be the new host of that room.

    Attached is an example of what's happening with just a slightly-modified pong example file: dropbox.com/s/icaz3edmv56hrun/pong%20reconnect%20example.c3p

    To reproduce, open two preview windows, allow both "players" to connect and begin the game, and then close the peer window. The host will see that the peer has disconnected and then get sent back to the login layout after disconnecting from the signalling server. After trying to start a new game, the host will get stuck.

    Any ideas as to how to solve this? In theory I would want to have a system like for a chess game or something: you connect with an opponent, play until one of you wins, and then you both get kicked back to the login page to play again against different opponents. Any help is appreciated! Thanks!

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello, I was wondering if you guys could help me with a weird problem I'm having? I have a ton of minigames that are deployed in iframes as HTML5 games that I built in Construct. In many of them I'm having a problem with audio when played on iOS: any music that I have playing is extremely loud, loud enough that it seems to be ignoring the volume settings I made. Even if I set the volume to something very low, like -35dB, it sounds like it's boosted the audio as if the volume is set to 10dB or higher. Has anyone had a problem like this with iOS? The same games in the same settings on web or Android are not experiencing this problem; in fact, they're playing very softly since I turned their volume down to account for the iOS volume. Is there something that I can do about this to make sure that iOS uses the correct volume setting? Thank you for any help you can give!

  • Thanks for the reply, I was hoping there would be some common error that people knew about. I just ran the example file and it works...frustratingly.

    Here's my c3p:

    https://drive.google.com/file/d/1U2mbak1Bv3-feF6AZXa_sUaoG5PuEnrN/view?usp=sharing

  • In order to learn the tutorials better, I tend to follow them line by line and rewrite them. I am 99% sure that I have made the game the same, and for the host the game works perfectly, but the peer somehow sets both paddles' peerid variables to the peer's own id. So on the host side, the paddles move separately and the scoreboard shows up the same, but on the peer side, both paddles move at the same time (since both paddles have the peer's MyID) and the scoreboard is messed up (since it can't find a paddle with the HostID). What gives? Any help is appreciated!

    Host:

    Peer:

    Host:

    Peer:

    Tagged:

  • Hi pirulitao,

    I think I see what the problem is. So a lot of events are checked every tick, or every 1/60 of a second. This includes your first two events: 1. Is the mouse over the door? and 2. Is the mouse not over the door? Basically, every sixtieth of a second, the computer is looking for where the mouse is.

    Now compare that to your "Click on the door" event: it is a triggered event. Notice the green arrow next to the event that the "mouse hover" events lack. This means that it is looking for the click, and only then will that event fire. Once it does, it's done until the next mouse click.

    Finally, rethink about how events are thought of: every sixtieth of a second, the events sheet goes down the list, top to bottom, checking each event and then making an action if any event is true.

    So! The instant you click on "Open Door," the three events in question fire in their order: Is the mouse hovering over the door? Then, is the mouse not hovering over the door? (One of those will always be true while the other is false) Then, did the mouse click "Open Door?" True! Set the animation to Door2 (the open door animation). This is good!

    NOW, the next tick (1/60 of a second later), the sheet cycles through the events again: Is the mouse hovering over the door? Then, is the mouse not hovering over the door? Note that one of those will always be true! So one of those events will trigger, and the door animation will flip to either closed or highlighted. Then, did the mouse click "Open Door" this tick? It didn't! It did last tick, but not this one, so that doesn't fire.

    Hopefully this makes sense: with your current code, you get the desired open door for 1/60 of a second before it resets itself.

    To fix it, I think you should add a global variable! Name it something like "doorOpen," keep it as a number, and then when you are checking the mouse hover (your first and second events), also check if doorOpen is 0. When the mouse clicks on "Open Door," set the animation like you have, but then also set the variable doorOpen to 1. Finally, add another two actions to that event: first, Wait 1.0 seconds, and then set the variable doorOpen to 0. Both the set global variable and Wait actions are in System. All in all, this should set the door to Door2 animation for 1 second, and then close it again.

    Hope this helps! Let me know if you have any more questions.

  • Hello, I have a game made in Construct 2 that has music imported into the music folder, as usual. However, while the game works great on Android devices (I exported as html5), the music breaks down on iOS devices. The command I use for the actual playing of the music is simple as well:

    On start of layout > Audio: Play "file" looping at -10db (tag "bgmusic")

    But about a minute into the song, even while doing nothing in the game, the music starts to sputter and eventually breaks down entirely. I have a video on Youtube that might help illustrate the problem, and in the interest of getting help quickly, here is the modified link (please replace * with .):

    https://youtu*be/03bxRP6h8cA

    Any ideas? Is it this particular iPad I'm testing that's making the audio suffer? Is it something about how I uploaded the music (used C2's sound importer to convert from wav to m4a and ogg)? Is it the amount of stuff being called at any given time/a slowdown problem? Thanks for any ideas.

    Tagged:

  • OKAY... this is going to sound a little crazy, and it's a long story.

    So basically, I'm recreating a game from another engine. This game uses tilemaps, which is cool. It used specific .layer files to generate its levels, but these files are little more than big CSV files: each space in the tilemap has the appropriate number for the tile sheet grid. I'd like to import this CSV into Construct 2, but it seems that tilemaps only work with .tmx files, using Tiled.

    Upon downloading Tiled, I can't find any place to import a map file, although there are tons of ways to export files. I figured the best way to get around this would be to create a dummy .tmx file, copy the CSV info into the appropriate section, save this new .tmx file, and import that. However, I get the "Check this file is a valid .tmx file" error message when I try to import it into C2.

    I guess I have two questions:

    1. Is there a way to easily import a CSV into Tiled so that I can export a valid .tmx file from Tiled and bring that into C2?

    2. If there isn't, what constitutes a valid .tmx file? How can I manipulate a .tmx file correctly so that it will be grabbed by C2?

    The main thing I'm trying to avoid is doing the same work twice. I have the numerical tilemap data, I want to use it!

    Tagged:

  • Also, I got my "horizontal" and "vertical" backwards in my OP, so oops.

    But thank you both! R0J0hound, that is exactly the thing I was looking for. brunopalermo, your example is totally what I want to have in my game. Thanks again!

    Hello all,

    First of all, if this is not the right place, please let me know and I will move this question elsewhere.

    Second, I am having a bit of an issue with a new computer. I recently bought a new laptop with an i7 core, 16GB of RAM, GTX 1060, 4k monitor, the works. It runs Windows 10. It's a bit more powerful than my home desktop (except for the RAM)! However, I use quite a few plugins for my work. On my home desktop, the 50+ plugins don't impede C2's performance at all; it loads up quickly, no slowdowns over time, totally a breeze. On this new laptop, though, having all those plugins in made C2 load super slowly. Right-clicking would show a blank rectangle for up to 15 seconds before it was populated with the correct text, start times were over a minute, etc. Note that this is not the games themselves that are slow, but C2 itself. I have since removed all of the plugins and done a complete reinstall, and it loads pretty well, but certainly not on the same level as my desktop.

    Things I have tried: running as admin, reinstall of the plugins, updating my graphics drivers, setting C2 priority higher. These did not have any effect on the startup and run speeds of C2. The only current fix is to not use any special plugins, which are needed for my work.

    Are there fixes for this? Can I set something up that would give C2 more RAM on startup? Is it software? Let me know your thoughts. Thank you in advance.

  • Hey all, I have a quick question. I'm trying to make a card game that will have a hand of cards with between 0 and...let's say 30 cards. The hands would probably average between 4 and 6 cards in it at any given time. I am familiar with a wonderful little tool in Adobe Illustrator that allows one to select several objects and arrange them evenly in an area, much like this:

    I start with five randomly-placed squares:

    And then I use the "Horizontal Align Center" command:

    And then i use the "Vertical Distribute Center" command:

    This last step is what I'm after. I would love to have events that count the number of cards in hand and vertically distribute them so that they are evenly spaced and easy to read. Is there an event action that can make this happen? Thanks for your help!

Methuselah's avatar

Methuselah

Member since 22 Feb, 2017

None one is following Methuselah yet!

Trophy Case

  • 7-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

9/44
How to earn trophies