Serious concern as my game grows bigger and bigger

Discussion and feedback on Construct 2

Post » Wed Aug 19, 2015 10:28 pm

**UPDATE**
It actually loads perfectly when exported and runs at a solid framerate when exported to my ipod touch. So really the question now is, what is the most efficient way to preview a project that has a lot of sprites? Or any way to decrease preview times?

This thread is meant for those that have huuuuuuge projects and I want to get insight on how they deal with preview times. Like i'm talking, HUGE projects.

I've been working on this project for a good two months now, it's a fighting game.
Ultimately that means several, SEVERAL sprites. I wanted to get all the fighter's images complete before I proceeded in doing anything else in construct 2 to see if it can even handle them. As I added them, the preview times became worse and worse.

When I finally completed importing every character's sprites, the preview time was unbearable, but it still worked.

Now, today, I started doing the stages. Before then I had one stage, but today I completed two. After I finished this second stage and previewed, it finally happened. I now get a red loading bar and it always hangs at 97%. I hear the fans of my computer going off and then shortly after it gets to 97%, they stop, which I assume says that its not even going to bother to finish loading whatever the remaining 3% is.

Now, I CAN refresh it and it will eventually load normally, but the atrocious load time is still there.
I don't have an exact count of how many images I have, but when I copied my project folder and pasted it somewhere else, it said copying 7,095 items.....yyyeaahh....

I don't want to give anyone a link to the files to try and test it themselves because I simply do not trust anybody and don't want anyone stealing what I have soaked numerous hours in (55 hours for the fighters alone). I don't want to show it yet because I want it to be a surprise too.

What i've come up with is that I'm going to have two project folders, Engine, and then STAGE TESTING. In the stage testing capx, I've deleted every fighter besides one, and now the load time is obviously much better and I can test stages faster and then paste the new code from the stage testing to the original engine capx.

Is there anyway that I can have it so that instead of loading everything at once, I can load things only when I call for them? Like going from a main menu then to somewhere else it goes to a loading screen?

Better question is there just anything I can do to prevent a red preview bar?

My project is designed to work for mobile devices, specifically the Ipod Touch 6th generation (1136 x 640) with its 64bit processor, but with this kind of preview load time I feel like i'm going to be end everything real soon if it won't load on a cocoonjs export. Thanks for reading, very frustrated, very upset, already punched a hole in a wall i'm dead serious. Help if you can, I know I probably won't get much help when i'm not offering any links to my project but hey, how can you blame me with something this big.
Last edited by Basilboy on Wed Aug 19, 2015 11:19 pm, edited 1 time in total.
B
11
S
2
Posts: 91
Reputation: 1,017

Post » Wed Aug 19, 2015 11:12 pm

It may very well be that your game is out of the scope of Construct 2. 7000 images is a LOT for this engine. I've been struggling with preview times recently and I have maybe ~750 images.
If most of your images are small, and all part of long animations, you may fare better on export as they will be packed into spritesheets. This doesn't help with the preview issue, however.

I believe @Aurel did something like you mentioned, having multiple project files which you combine from time to time.

Ultimately HTML5 with its automated loading/unloading may not be the best choice for a project like this - some fine grained control over what's loaded/unloaded could go very far.
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,679

Post » Thu Aug 20, 2015 12:27 am

Have you already exported with CocoonJS and tested your game to see what happens?
Risk Rocket now available on Google Play
Image
B
35
S
15
G
6
Posts: 337
Reputation: 6,275

Post » Thu Aug 20, 2015 1:46 am

Usman Haq wrote:Have you already exported with CocoonJS and tested your game to see what happens?


Yes, and surprisingly it loads almost immediately and without any issues, so really the only problem here are preview times.
B
11
S
2
Posts: 91
Reputation: 1,017

Post » Thu Aug 20, 2015 2:37 am

Hmm it could be the fault of so many large images. My Animations folder in Windows Explorer says I have 5,000 files (and C2 tells me I have 4,000 events). My project is an RPG, so some of that is understandable, but I also generally have smaller objects than you might in a fighting game.

On preview with chrome closed:
9 seconds on "Starting Preview" in C2
29 seconds on the loading bar in Chrome.

So it takes me 38 seconds to run a preview, but for the size of my game, that seems pretty understandable. I never get a red bar, though.
B
103
S
38
G
19
Posts: 962
Reputation: 17,986

Post » Thu Aug 20, 2015 2:38 am

Pretty sure Ashley is working on editor spritesheeting for C3 so that will drastically improve preview times. Until then, however...
Image
B
242
S
29
G
13
Posts: 1,787
Reputation: 18,685

Post » Thu Aug 20, 2015 10:11 am

The Windows operating system itself has a limit of 10,000 graphics objects (i.e. images) per process. Apparently Microsoft think 10000 is enough for anyone :P

This kind of thing (including the sometimes slow preview times for very large projects) is extremely difficult to work around at this stage since it would require extensive re-architecting to solve. This work is being done for C3. However it is unlikely C2 will ever be improved in this regard. We neither knew about this limit when starting C2s development, nor expected that anybody would create projects with that many images either!

The techniques described in the blog post Remember not to waste your memory probably help. Although it's geared at reducing memory use, it probably helps reduce the image count too. Also exporting the project will build spritesheets for all the images which significantly reduces the image count and should help ensure it actually runs. Unfortunately exporting can be quite slow, but it gives you at least some way to run the game, and if you disable image recompression and minification it should be quicker than usual. I'd recommend trying to reduce the image count though, since that will have general performance benefits across your project as well.
Scirra Founder
B
387
S
230
G
87
Posts: 24,249
Reputation: 192,240

Post » Thu Aug 20, 2015 11:13 pm

The other option is to perhaps use something like spriter or spine for the characters perhaps?

One image/atlast per character
B
83
S
40
G
15
Posts: 987
Reputation: 16,847

Post » Fri Aug 21, 2015 12:00 am

The best solution is not having all characters in one place.
You can have as many layouts as you like, noone including the machines care if some of those are duplicates.
Image ImageImage
B
168
S
50
G
163
Posts: 8,224
Reputation: 105,067

Post » Fri Aug 21, 2015 12:03 am

newt wrote:The best solution is not having all characters in one place.
You can have as many layouts as you like, noone including the machines care if some of those are duplicates.


I do have a layout that just contains every object that gets spawned by events, so all the fighters are in this layout however this layout isn't ever to be accessed unless ran through a preview.
B
11
S
2
Posts: 91
Reputation: 1,017

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 7 guests