El Constructorr's Forum Posts

  • As AllanR suggested, you should use an Array as json data to store only the required parameters that needs to change, for example 'pos', 'sizex', 'sizey', 'text'.

    Then (to be more organized) create a Function that takes in all these four parameters, that function does all the Three actions you have. Position, Size, and Text.

    Then have a For Loop that runs through the array, and calls the Function with the parameter data.

    Since you're used to Excel, you can also use a csv file to store all the data, and convert that as json.

  • One of the many ways to do this could be to have a Global variable (boolean) called, let's say, canRestart

    So by default, canRestart is False

    On gameover event: Wait 3 seconds, set canRestart to True

    On any Touch Start and canRestart is set: Restart layout

  • I'm assuming that when the player hits the ground you spawn the dust particles... See if you're spawning to layer 1 or 2 ?

    If that's correct, then the position that you're setting your dust particle, needs to be referenced from an object in the same layer. Because X and Y are different because of scaling in each layer.

  • Good question. I had the exact same issue. This is how I did it:

    Instead of System -> Go to Layout, I created a function called GoToLayout, and I type in the layout name. What it does is it fades in a Black screen first (0.5 seconds), then shows a nice "Loading..." text then immediately (0.05 seconds later) you do System -> Go to Layout (that layout name as in Function's parameter). This way, it will get stuck yes, but at the Loading... text. An extra thing I did, on every start of every layout a Black screen first fades out. To make it look natural.

    By the way, you cannot have an animated Loading text or logo, because it really will always get stuck.

    For the black screen, I had a small 100x100 black sprite, that fills in from "-1 to ViewportWidth(0) + 1" for both width and height, and a Fade behavior.

    Let me know if that works, or if you need more help.

  • Thanks. Btw I forgot to mention, it will be an Android game. But I assume the same applies for mobile.

    Thanks for your feedback.. I do plan to keep it least disruptive. More like "Now that was intense.. Let's take a 30 seconds break before we continue!" (Video Ad shows) .. or.. "Next session is live in 30 seconds, until then watch this video.." etc.

    More responses and opinions are welcome..

  • Hi. My game have two rounds/sessions, I was wondering if I show a Video ad in between rounds, but not sure if the players would disconnect from the server? And what if they click on the Ad and return?

    I don't know if it would be the best place for an Ad (since the players would want to finish the game), or the worst as it might defy the purpose of the Ad. Clicks/CPM might be low? Clicks could disconnect?

    Has anyone done something similar? Any suggestions?

    Tagged:

  • There isn't any built-in swipe action, but you can make it manually, in a couple of minutes!

    There could be various factors you'll need to consider: e.g. is it touch and swipe, is it hold-already and swipe, how far to swipe, speed of swipe.

    How I do it is simple. The logic is:

    • On Any Touch Start: Create four invisible objects (squares)
    • Set Position for each top, bottom, left and right (e.g. Touch.X + 150, Touch.Y + 150, etc.)
    • Is Touching Right and Trigger Once: Swipe right actions/function (do this for each object)
    • On Any Touch End: Destroy all four objects

    It's quite quick and easy, plus it gives you enough control on how much to swipe (by setting a good distance between the object and Touch start).

  • 'Destroy shadow' destroys all shadows because you haven't picked the right/wrong one yet. You have only checked for a condition which is True, and it destroys (all).

    Instead of that condition, you should use System -> Pick by comparison -> Select shadow and add that condition (peerid =/= myID). See if that works.

    And if that doesn't work for some reason, try setting ALL of the shadows to Invisible. Then: System -> Pick by Overlapping point -> Overlapping with player -> Set Visible

  • Alright so I had made a game, which doesn't use any dt functions, never realized the need for it (until now). So my game is frame-rate dependent, and for the first time when I played it on a 90Hz display mobile, it's totally unplayable.

    The game is huge, and it's almost impossible to go through every action to modify things with dt functions, I was thinking if I could simply change the Time-scale once I know what Hz is the user playing on?

    For example:

    if 90Hz display, then set time scale to 1/1.5 (and so on).

    I tried set time scale dt*60, but that didn't help either. But I'm really hoping there could be a quick solution (improvisation) to solve this problem? Is there a way to detect or measure the phone's display Hz?

    Please help, thanks!

  • There is no need to do all of that to achieve what you want.

    All you need to do is keep a computer/device ON 24/7 that is programmed to:

    1) Have a lobby (as a Host) and join a ROOM when up to 8 other players gather up.

    2) Since above will make the signalling server device get occupied in the game, you need some way to start another tab, and run another version of the game with Signalling server to search for another set of players.

    3) As a game ends, the running tab should close.

    That's how I think it can be done easily.

  • At half way through my multiplayer game, I require the Host and Peer to switch. So, I disconnect them from the Room and Server, send them again to the Login layout, this time with a different common GAME_NAME and ROOM. The previously peer enters that layout first, which should now become a Host.

    Both players do log in to Signalling correctly, however, this time, Auto-join never happens. Players are not joining the room. I can't figure out why.

    Possible issue: I had synced 2 objects. I am assuming as I disconnected both, the syncs would also go away. And the Login layout would re-sync the objects appropriately again?

    What am I missing? Or what should I try?

    Thanks!

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi, so some of the old search results tells me it has something to do with NAT restrictions and one of the workarounds is using TURN servers.

    Is there any other workaround? Or any updates since then? Any FREE solutions to this? (I assume all TURN servers are paid subscription based) ?

    Please help. Thanks!

  • The answer is no. Unfortunately. I wish there was. I am facing a very similar problem and only Disable Sync could have helped. I am sure this feature must be possible to create ford the developers.. even if it is bound by other things, they can at least reduce the latency to not slow down the game play and still have a hidden object synced. I mean why not!

  • Umm.. Wouldn't re-sizing the text box accordingly help? It will wrap it automatically, wouldn't it?

  • ..or you can simply change your two conditions:

    Mouse button is down

    Mouse is on Object (Food)

    to just one:

    On Object Clicked (Food)

    This way, even if cursor goes over another banana, it won't get selected, because now, only "On Clicked" will pick a food.