I have a problem

  • When I launch the game, which is in French, everything goes well during the first scenes, then as soon as I get to "Cartedejeu", it crashes and nothing works. Whenever there is a change of scene for "gamecard", it crashes.

    My game : drive.google.com/open

    Thank you

  • Open browser console (F12) before you get to the point when it crashes. Maybe you'll some error message in the log.

    What happens when it crashes?

    You need to find a short and reliable way to reproduce this problem, maybe then we'll be able to help, because currently going through all your hundreds of events in French is an impossible task.

  • Like Dop2000 says it's impossible to tell without getting more specific information. Plus you don't give the exact steps to reproduce the problem.

    I've looked at your project quickly. There are several BIG things you need to do in order to get a cleaner project:

    - learn to use the "Else" condition to avoid triggering events by mistake

    - avoid nesting "On Start of Layout" triggers below other events. Put them at the top and then state your conditions from there. All the events triggering on start will be better sorted and then it's easier to track where something is going wrong.

    - you're doing almost everything "every tick". This is going to be very CPU intensive and lead to errors. For example you're setting some texts and opacities every tick, it is just wrong to do it this way. Try using more functions and triggers. You're also setting "Fullscreen Scaling to High Quality" every tick. Useless.

    - do NOT "wait for signal" every tick because this will stack up. If the signal comes ten ticks later, it will trigger ten times !

    - similarly do NOT use the "Wait" action every tick. For example if every tick you say : "wait 1 second" then "create an object" il will indeed wait 1 second then it will create an object EVERY frame after that.

    If something does not work, try disabling / enabling part of your code, it will show you where you must work. Here I couldn't launch the CarteDeJeu layout, the screen remained black and nothing happened (construct froze because no event was happening after a certain point). I disabled several groups and noticed when I disabled only the group "Menu Pause" it worked, so there is definitely one problem in there. I then disabled parts of the code in this group and I identified that the problem came from this block :

    Disabled even more and apparently the problem is not the actions, but the conditions.

    Somehow this is fine :

    This is not :

    I don't know why. Maybe construct loses the scope somehow.

    I'll let you or someone else check for the rest.

    First thing first you should try to adopt the best practices I've listed above.

  • I don't recommend trying to fix this code it will only keep breaking at different parts later. Open up a new project, start fresh, and follow Sam's tips.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This might be scary, but it's part of the process of learning. The game looks fun otherwise!

    By limiting as much as possible "Every Ticks" events and using triggers and functions, your code will be much MUCH more efficient and stable. You will be happy after you've done it. Bon courage, ne désespère surtout pas ! We all went through this phase :)

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