TwinBlazar's Forum Posts

  • Problem Description

    There are 2 issues here:

    1. Major concern: after loading the game, "Every x sec" event may stop firing after a long random interval before it fire normally again . ( I have tested this throughly and have provided explanation below )

    2. Tracking values for "every x sec" are not reset in layout restart and layout switching.

    Attach a Capx

    https://www.mediafire.com/?kegmpd3hy85ns4j

    For the 1st issue:

    I am facing a bug in the game I am making: every x sec stops firing. In my game, the issue arises when the game re-loaded the saved checkpoint. (the player returned to checkpoint layout) After I proceed to some other layouts, I see that some "every x sec" stop firing entirely.

    Steps to Reproduce Bug

    To replicate this issue with capx above, please proceed with "debug layout". Please take a look at system time, wall clock time, etc. for this, while following the steps below:

    • 1. Starting in 1st layout. At 5th second of system time, hit "S" to save, and you should see "save complete" text as a confirmation.
    • 2. Now hit "2" to go to the 2nd layout. The 2nd layout has a blue square that will shoot some objects every 0.2 second. Wait until system time is 15th second, hit "L" to load. Your save should now be loaded and you should be back at the 1st layout and see "load complete" text. All the times should now be back when they were saved.
    • 3. Now, hit "2" to go to the 2nd layout. You will see the blue square does not fire every 0.2 sec at all. However, if you wait until the time you load (15th second in this case), the blue square will start firing again.

    I suspect that the value of time used for checking in "every x sec" still uses the old value before loading. However, what is strange is that the red square still fires its object as usual. So I dived in further to assist you in this case:

    There are 3 layouts: Layout 1, 2, and 3.

    There are 4 event sheets:

    • Ev_BoxCtrl is the one with code for spawning the blue balls from the red square.
    • Ev_KeyboardMouse contains all the keyboard codes and save/load.
    • Ev_main simply "includes" Ev_BoxCtrl and Ev_KeyboardMouse above.
    • Ev_Layout2 includes "Ev_main" and contains the code spawning blue balls from blue box every 0.2 sec.

    Layout 1 and 3 uses Ev_main event sheet, while Layout 2 uses Ev_Layout2 event sheet.

    Furthermore, I see that this issue will not occur if I move the code for spawning blue balls from blue box every 0.2 sec to Ev_main event sheet. In the game we are making however, we once see "every x sec" in the "included" event sheets have this issue as well after loading the game.

    This issue is our primary concern right now, and we would like it to be fixed. Could you please investigate?

    For the 2nd issue:

    Observed Result

    The first time you load the layout, the blue ball will be spawned from the red box after 1st sec. Then again in the next second and so on. Now, hit "R" to reset the layout rapidly. You will see that even though the layout got reset, "every 1 sec" will fire in a way like without having the value reset. For example, if you reset the layout at 0.75 seconds after the layout start, "every 1 sec" will fire at 0.25 seconds after the restart.

    Expected Result

    For small values in every x sec, this could be negligible, however, suppose we have something that fires every 60 sec, imagine if you reset the layout, and this time you reset, it fires before the first 60th second of this layout being played.

    I've also tested this by changing layout around. In capx, hit 1, 2, 3 to change to the layout 1, 2, 3 around, you will see that this issue also applies to layout switching.

    Operating System and Service Pack

    Win 7 64 bits

    Platforms

    We have only tried with NodeWebkit and Chrome Version 34.0.1847.116 m.

    Construct 2 Version ID

    R163 64 bits (this issue also occured with R152)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 1. Is "save game" functionality intra-frame or post-frame? Which of the following are correct?

    A. Post-frame: When "save game" action is called, after all events in this frame (or tick, if you prefer) have finished executing, all data in this particular frame are saved.

    B. Intra-frame: When "save game" action is called, all data in this particular frame are saved, right when "save game" is called. This implies, if there is another variable set after "save game", that variable will not have this value in the saved data. However, when "load game" is called, the actions and events after "save game" action will be executed, along with "on load complete" trigger in the next frame.

    C. None of the above.

    2. I am curious about internal working of "save game" functionality. Is the following paragraph correct?

    When "save game" action is called, a separate thread is created. Since saving might not be complete in one game frame, and to ensure that there is no hiccup, a copy of all data is created right on the frame that "save game" is invoked. This halts the game execution until all data are copied. The thread for "save game" then write everything down with the copy of all data, and call "on save complete" afterward.

  • ggibson1, there are no correct answer for your question. Because this depends on the machines you run on.

    No matter what size of your tiles or sprites are, you must test on the devices you will exported to, to ensure that such devices can run your app satisfactorily according to your standard.

  • Fuged Yes indeed it is possible to do that, but if you see some Japanese indie folks, who simply develop games for their hobby, you will see some of them write this in their readme:

    "Q: I want to use Joystick.

    A: Please use JoyToKey."

    This way, they can save a bit of time without putting all joystick stuff in. Beside, joystick's button mapping is all different for each joystick. Try grab yourself XBOX joystick and Logitech Joystick, their "button 1" is different button.

    So if the player must map all these button presses anyway, let's have something more simple for the programming side.

    Hence, this topic. ;)

  • Win7 64 bits here.

    I am having the same issue. I've tried downloading both directly and from torrent. Both sources yield identical result.

    "The procedure entry point could not be located in the dynamic link library ole32.dll"

    Back in r152, I used to have similar problem but it's gdiplus.dll instead. I solved the problem by keep on re-downloading and re-installing and then I see that the installation exe that works has different file size.

    Not sure whether this is related, but Ashley, could you provide some sort of checksum for this?

  • LittleStain ever heard the term "no country for old men"?

    For those who have been with joysticks for decades will know what am I talking about.

    Here: mogaanywhere.com physical joystick for niche market. They do exist but as a niche. Some people like me can't really game without joystick.

  • LittleStain The keyword is "keyboard", my friend. I will NOT be using touchscreen at all.

  • How about separate GUI on to a different topmost layer?

  • JoyToKey on windows is a program that maps your joystick to your keyboard. You can config your joystick all you want. Heck, you can even type document with it.

    So the thing is this, I got myself some C2 games, but all of them are pretty much "programmed" to keyboard input right now. But we got some physical joystick add on and what not for smartphone, etc. (For example, mogaanywhere.com )

    So do we have something like JoyToKey that allows the user to map the add on joystick to keyboard input on the smartphone? While I can create some more events for the joystick, I would like to know some methods out there to see if I can save some more time.

  • What do I mean by Sticky Key? I mean : en.wikipedia.org/wiki/StickyKeys

    Whenever the player presses Shift 5 times quickly, the sticky key menu will pop up, and will hijack the game's window's focus.

    While you can easily disable it, by Google around, this could be problematic, for casual users.

    So is there a way to disable sticky keys right when the game starts?

  • Is your "Player wins 1 life" or whatever, simply "global variable life + 1" or something?

    Elaborate more or we cannot help you. You provide us with so little information.

  • HOld on... if that does not work, how do you increment number_Stars ?

  • Right click on the your event, and you should see "add --> add else"

  • +1 for Minecraft.

  • But this means, we will have to keep track of the backward/forward in the events ourselves.