Reduction Development Tip

0 favourites
  • 2 posts
From the Asset Store
You can become a REAL game developer. Learn the basics and get resources that will let you get profits from your game!
  • Hey Guys !

    I just want to share some quick easy tips that I think you might see helpful for all beginner developers in Construct 2 and who uses Construct2 free edition

    Minimize and Reduce Codes (EVENTS)

    When I first started game development on Construct2 I was not experienced enough so I started to add wrong events where i can minimize codes for my game. For example I started to make level boxes by cloning, each box will go to a certain level , so if I have 10 levels there will be 10 events. More there are animation. If the level is larger than the level box itself I need to code for each sprite of box it's own event for animation, Which would take another 10 events. So I will have left 80 events and the 20 events are only for clicking to go to a level and change animation. So if I had to make 50 levels the grand total of events would be 50*2=100 !

    Which means nothing left for the rest of the game. sad huh?

    How I managed to fix it?

    Look What I've done to reduce it to only 2 events! I have managed to add one sprite and called it box or level then I made instance variable called ID. Each Level has its own ID. Level 1 has ID 1. So named each level layout the name "Level" with the number.

    I used these events:


    So by looping and instance variable I managed to free much events for later. So I have now 98 events to freely use!


    Use global variables and instances variables

    Use Arrays

    Use loop for smaller codes

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Looks great & efficient. Nice find Naji.

    I will do the same thing just like You do. See over old projects then experiment with existing codes.

    When re-look again to my project, I always thought I can optimize & reduce bunch lines of code.

    At the time I understand how loop & iteration work, everything change in my mind as if I could see every single pattern.

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