Request for Help Regarding Layout Change Crashes

This forum is currently in read-only mode.
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Hello there.

    Me and a friend of mine is currently working on a game using Construct and so far everything have gone relatively well. However we have encountered a problem that we just cant get around, thereoff the need for some help.

    The problem is as the topic says; on change/reload of a layout the game crashes. Its a regular platformer and we do change between layouts a lot. Though the problem only appears when the character "dies" and we reset the current layout or want to go to the main menu.

    The crash itself rarely give any information and when it does its totally insane like "problem in instance 48327239 (of 1)" so cant provide with anything else then this description and the cap files.

    The whole game (as much as we have made so far)is made in 0.99.84

    We are grateful for any sort of help (also help not regarding this issue is welcome as we are new to this program and have probably not done a good job optimizing, also bugs that are found is good to know aswell ofcourse )

    Thanks for your time.

  • Heard that the OR condition seem to be bugged so tested to remove all those from the project and got most of the crashes to dissapear

    Though i still cant return to the main menu from any other layout, anyone have any ideas?

  • I couldn't get it to crash. I went back to the main menu from several layouts and it worked fine. Although, I did get some buggy behavior such as the player dissapearing sometimes when returning from the main layout (hitting start game again).

    What are the exact steps you did to get it to crash?

  • Hmm that is strange, i have tested on a couple of computers and on all of them, with that version, the game crashes everytime i try to reload a layout with 'C' after dying... After removing OR conditions i got it to reload fine though but not changing back to the main menu.

    Maybe can be something hardware related then?

    And yes i noticed the bug when starting a new game and have fixed that, thanks though And thanks for taking your time to look at it.

  • Ok, I am getting the crashes from hitting C to restart the layout when I die (is this the bug you already fixed?). No helpful messages for me so it would take awhile to troubleshoot. If you have more bugs send out a new .cap and I'm sure someone will take a look at it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yes i think i fixed it. Now im getting random crashes when testing to move around layout sheets but instead the 'go back to menu' crash seem to be gone, sometimes atleast. Im going to test a few things tomorrow and if it dosnt help i will reuppload a newer version.

    Else then the crashes does everything looks okay or do you see anything at all that could be a possible crash source? ill test any ideas thanks

  • Right off the bat, I didn't see anything that stood out being wrong but your code is somewhat messy. It might help if you cleaned things up a bit and maybe any errors might pop out more.

    For example, some things that would simplify your events:

    1. In the Pause event sheet. Event 5 (the second else) is redundant and can be removed. Events 7 and 8 can be combined into one event. Plus 7 is blank on the condition.

    2. In the item event sheet, Event 14 (the always event is not necessary). Just make sure all of the other comparisons are not in the start of layout and they will always run each tick.

    3. All of the actions in the item event sheet under the global "item picked" equal 0 and 1 comparisons can be drastically simplified with one or two Functions. You have 4 out of the 6 actions that are duplicate and belong in a Function. The others that are different can then be normal actions or they can be paramters to the function. This will remove 70% of the actions on that sheet.

    4. The wall jump event sheet is super messy. I have got to imagine that the wall jump functionality can be alot simpler than that, but I don't have any immediate pointers without spending more time to determine why so many events were used.

    5. Animation event sheet. You don't need always in event 2, the second condition will be checked each tick. If event 4 is the only possibility then make it an Else. You are constantly checking if value dead is not equal to zero. It sounds like all of these event belong in a Group that is active if Dead is not equal to zero. Event 24 appears to be a duplicate of one of the wall jump events. Sounds like you could replace all of that with a common function. Events 64 and 65 are mostly duplicates, only check the duplicates once, put the unique conditions in a subevent. On the whole this event sheet was really complex, and I'm not sure it needs to be so.

    6. In the pod_control event sheet. Events 2&3 and 6&7 don't need to be subevents of the Always condition.

    7. Camera event sheet. You don't need the Always condition. Hopefully, you know that you don't need an Always with other conditions. You only need an Always when you have actions that need to run each tick. For example, your Pod actions that is a good example of when to use Always.

    btw.. The game is looking pretty cool and played around a little and mostly got electrocuted, but it looks like it will be fun.

  • Yeah you're right, im gonna clean that up. Most of the things you pointed at were made at the start of the project and is full of noobiness

    Will post a link when the game is done

  • Have spent some time now on cleaning up the events and fixing bugs. The 'Go back to main menu' from both death screen and pause screen is still crashing the game however and i have no clue what to test now.

    Its working fine from s0 and s1 but the rest of the layouts does not. Anyone that has any idea whatsoever of what i could test?

    The file is updated to the latest version:

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)