I think Ive the limit of what C2 can handle...

Discussion and feedback on Construct 2

Post » Thu Jun 28, 2012 7:18 am

My project has about 9400 imgs (almost all of em are 2x56) and now that Ive added em all to the project not only does it load slow when I start c2 but it wont preview or run at all when exported. It just sits there forever til eventually I guess it just gives up and the canvas never loads.

You can see the exported version here to see if itll load for you. It hasnt for me at all and Ive been tryin for 2 hours
B
13
S
5
G
2
Posts: 306
Reputation: 3,262

Post » Thu Jun 28, 2012 7:25 am

Try disable all events and preview again. If it's run fine then the problem is from your events, maybe there's an infinite loop in your game or something that doesn't right....
B
19
S
5
Posts: 51
Reputation: 1,883

Post » Thu Jun 28, 2012 7:27 am

theres not. Nothin has changed since I started adding images. It worked fine til I put in 168 different animations with 56 frames each

Its definitely the animations... I just deleted em all but about 40 and its workin again with no issuesaridale2012-06-28 07:40:39
B
13
S
5
G
2
Posts: 306
Reputation: 3,262

Post » Thu Jun 28, 2012 10:14 am

That's crazy! Even a native renderer would struggle with that many images. It's an incredibly inefficient way to design your game.

Why do you need thousands of tiny objects? You should use fewer, larger images instead!
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Thu Jun 28, 2012 11:36 am

o.o what are you making ???
B
48
S
15
G
6
Posts: 795
Reputation: 12,035

Post » Thu Jun 28, 2012 11:42 am

Think about the fact that every image has to be loaded into RAM...
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Thu Jun 28, 2012 12:28 pm

I would suggest making a spritesheet?
B
18
S
4
G
5
Posts: 27
Reputation: 4,132

Post » Thu Jun 28, 2012 12:46 pm

i guess he's just testing. or c2 skyrim maybe? ;)
B
81
S
50
G
10
Posts: 555
Reputation: 13,009

Post » Thu Jun 28, 2012 2:28 pm

the images arent exactly huge... I dont call 2x56 a huge taxing demand on any system. The entire folder is only 1.9meg and thats every img in the project. Your tellin me 1.9meg is too much for c2 to load?

Even the exported version that makes its own sprite sheets (which are still messed up) theres only 6 its made for ALL 168 animations. Thats too much for it to load? 6 512x512 images that are less than 30k each is bringin that example I linked to its knees?

Either somethin is very wrong here or its an internal problem with the loading aspect of c2

As for why it has to be done that way... Theres no other way to display a certain part of a certain image on a certain object without each part being a different texture. Its for the pseudo 3d engine Ive mentioned a few times. The wall textures have to be done that way for em to be displayed.

The only other option is to load an image from url as a sprite strip which I suggested in its own thread yesterday
B
13
S
5
G
2
Posts: 306
Reputation: 3,262

Post » Thu Jun 28, 2012 2:41 pm

It's nothing to do with how big the textures are - GPUs are so efficient they don't really mind whether you use big or small textures. The problem is the overhead of each draw call. Each image must be drawn with four vertices, each vertex taking up 16 bytes, for a total of 64 bytes per image in the vertex buffer. Note vertex buffers are not as well designed to handle vast amounts of data, like textures are designed for. Drawing 9400 images at 60 fps will therefore be 36mb per second through what's supposed to be a lightweight vertex buffer. That seems to be enough to kill it. An ordinary game would probably only be transferring 192kb per second through the vertex buffer (99.5% less).

You have to design your game differently, what you are doing is exactly what will kill graphics hardware. I would guess you can get away with a few hundred images, but 9600 is beyond extreme. It's not really C2's fault or the browser's fault either, it's just you're doing things the hardware was not designed for.Ashley2012-06-28 14:46:12
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 12 guests