How much events do you have?

Discussion and feedback on Construct 2

Post » Wed Dec 16, 2015 11:57 am

How much events do you have on average per game? Is there a maximum amount of events I should have if I want my Android games to work fast?
B
9
S
4
G
3
Posts: 157
Reputation: 2,300

Post » Thu Dec 17, 2015 1:20 am

Well I've got about 2500+ events so far. I'm testing my game with the Cocoon.IO frequently with my HTC One M7. Performance is good, but I'm making quite heavy optimizations with my images by making sure that they are as small as I can make them, without really making a visible difference and by making sure that there are not many objects on the screen.

Just keep developing your game, test it, and keep developing!
Risk Rocket now available on Google Play
Image
B
36
S
15
G
6
Posts: 337
Reputation: 6,300

Post » Thu Dec 17, 2015 2:35 am

We got 9700 events, using plenty of functions and families.
B
66
S
22
G
4
Posts: 360
Reputation: 6,584

Post » Thu Dec 17, 2015 2:46 am

I'm sitting at about 4500 events so far, but I'm not targeting mobile at all. Some of them get a little heavy, of course, but good optimization can help with that.
B
103
S
38
G
19
Posts: 962
Reputation: 17,996

Post » Fri Dec 18, 2015 6:38 pm

You can make a simple game with 100 events, but you can make a complex game with tens of thousands of events. It depends on the project.
B
137
S
33
G
17
Posts: 1,560
Reputation: 20,797

Post » Sat Dec 19, 2015 5:04 pm

it all depends.
if your game is organized nicely you can reduce number of events for your whole game.

for example - if you create a family that has 10 enemies - you need only one trigger where you say - if myfamily.health <0 do ... something (explode, count score etc..)
other way could be : if enemy1.health <0 do... something ( explode, count etc..)
if enemy2.health <0 do... something (explode, count etc...)
.... and so on for each enemy. this means - > 10 events for each enemy instead of 1 where you just drop your sprites to family.
and such "optimizations" could be done to reduce number of events. you can achieve that wih families and functions easily. and creating new levels, spawning and all other things are suddenly super easy :)
Sea Monsters template - Isometric
Also includes 40 pages PDF of optimizations and "how-to" for your games, and how the "sea monsters" template was built. Follow link for details :)

sea-monsters-templates-and-assets_t162705
B
43
S
14
G
12
Posts: 626
Reputation: 9,455

Post » Sat Dec 19, 2015 6:31 pm

I never go above 500. But I make optimizations where I can and very stupid prototypes which dont encompass things like :

UI
Saving and Loading manager
Local storage management (not doing alot of this yet)
B
5
S
1
Posts: 68
Reputation: 515

Post » Sun Dec 20, 2015 10:02 pm

Its not really about how many events you have, it's how many events are actively doing something that will slow you down (the more work they do the bigger the impact). Just make sure that you* aren't running events when you don't need to.

You can do this by enabling/disabling groups or using sub-events from a condition (when variable is set to 1 activate this logic etc).
Last edited by GenkiGenga on Tue Dec 22, 2015 2:10 am, edited 2 times in total.
ImageImage
B
130
S
23
G
7
Posts: 1,078
Reputation: 13,280

Post » Mon Dec 21, 2015 8:14 am

agreed partially. it's actually how much javascript can your CPU run in one second. if you check c2runtime (nonminimized) and data.js, you can notice how things work. if you have seen there how it works, then you can actually predict how much code can you approximatelly run in a second. sadly there is no measures how much linear code can be done in 1 second, but it also depends on the structures used.

anyway if you disable /enable events things should go faster, and using triggers / functions / families = gg
Sea Monsters template - Isometric
Also includes 40 pages PDF of optimizations and "how-to" for your games, and how the "sea monsters" template was built. Follow link for details :)

sea-monsters-templates-and-assets_t162705
B
43
S
14
G
12
Posts: 626
Reputation: 9,455


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 6 guests