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

0 favourites
From the Asset Store
A cool way for kids to write and practice English Alphabets
  • 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

  • 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....

  • 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 issues

  • 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!

  • o.o what are you making ???

  • Think about the fact that every image has to be loaded into RAM...

  • I would suggest making a spritesheet?

  • i guess he's just testing. or c2 skyrim maybe? ;)

  • 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

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Your missin somethin here each img isnt being drawn all the time... infact in that export I linked NONE of them. Not a single one of the new 168 animations are being used in it. Theyre just present in the project. Not a single one is in use on any object in the layout its tryin to load

  • OK, well the point was it's far beyond the range of an ordinary game, so it's not surprising it doesn't work. I guess you're hitting some other limit. The point is you need to redesign your game to use less images.

  • so can you tell me why its not workin? Is there some kinda limit internally that would stop it from even loadin? Like I said the exported version only has 6 images for all of those animations from where it made the automatic sheets. How come it doesnt load?

  • I can't really tell I'm afraid, could you share a .capx so I can investigate?

  • It loaded for me eventually (5-10 mins I'm not sure, I was alt-tabbed) with GL_OUT_OF_MEMORY errors.


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