Creating objects at run-time problem !!

  • Hello lennaert,

    Sorry to bug you again, but that crashing issue is appearing again. I have inserted all my images in the loader screen and destroying them on the 'On start of layout'. But still, my game is crashing. I have 15 images with 1920x1080p resolution. What else can I do ??

    Make a sepperte layout, called objectslayout, and place all your images there.

    And dont destroy them.

    The objectslayout never gets adressed, its just a container/placeholder for your images. Dont destroy them.

  • Hello again. Well, at least game is not crashing now. I made a separate layout and dumped all images there. But now the game is running very slow. Slow in the mean of operation. Timing things (like wait for x seconds). runs all right.. What now ??

  • I haven't seen your pictures, but I cant help but wonder why they have to be this big.

    I can imagine big parts of the sprite during the page turning animations stay the same. So probably it would be possible to optimize those.

  • LittleStain: My game is more image based. So there are many images in the game. This is my first HTML5 project and the client demanded the game images to be 1080p. About the page flip animation. there are only 15 images for page turning.

  • When clients demand things that cant be created in the way they like it you should show them alternatives that do work.

    Probably you could make the game run better by optimizeng the images without the client even noticing the images aren't 1080p. The game will be 1080p and all effects will happen at 1080p, but there's no need for every single sprite to be 1080p.

    (btw: you are talking about a client, so I guess you have either a personal or business license? I ask because I thought owners of a license had the medal on their avatar)

  • Check your events which run every tick.

    In a lot of situations a slight impropper use of a loop functions slows everything a lot.

    these events have this green circled arrow before them.

    They are events which run continously.

  • There is no such events in my game. I am now guessing that the page turning animation is taking much usage as this problem started only after adding that effect.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I wouldnt mind having a glance at your capx to look for bottlenecks

  • Sorry but I can't share the project (hope you understand). <img src="smileys/smiley18.gif" border="0" align="middle" /> I will try to negotiate with my client, stating the problem.

    What if I make 2-3 unused layout and distribute images to them instead of only one layout. Will it do any difference ?

  • No problems, I do.

    Im not sure, I dont see the benefit in it apart from good organising.

    generally, the images dont slow your processing at run time, it just takes longer to load. There must be something thats slowing your active performance. Perhaps double check up on the events of the animation.

    you could try and start with the debugger, and see whats happening, .. perhaps you see something thats a miss.

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