lennaert's Forum Posts

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

  • oh, it stays :o I didnt know that

    Here is a page with reference about memory leaks from javascript, not sure one of the suggestions/solutions work, but perhaps good reading for what your looking in to.

    tut memory leaks javascript

  • ^_^    figured as much

    Great btw on that performance boost :)

    Will make it playable on a lot more devices.

  • Sweeeeeeeet :D

    *assimilates*

  • Did you create/spawn them on the correct layer ?

    If you spawn them on the wrong layer with a different scaling, then it will be out of place.

  • Removing the canvas element doesn't remove all the memory allocations made by the game engine in Javascript. It's designed to be used in an iframe, there's no good way to clean up the whole engine otherwise.

    I think he means, from a webpage where he included a cs2 program, where I mention stuffing it in your own iframe and calling the index.html file of your game.

    Wouldnt loading another page in that iframe clear up the memory used by the cs2 program ? (it should, otherwise browsers be clogging up everywhere)

  • Objects on the dedicated objects layout do no need to get destroyed, in fact, you shouldnt.

    On the other layouts, remove the instances in cs2.

    And then, when you need to have one of the objects which are in the objects layout on any other layout, simply spawn or create a new version of the given object on the required layout, leaving the object on the objects layout in tact.

    You should keep those objects there at all time, throughout your game.

    after you created or spawned your object on another layout and have no more need for it, destroy that object in your layout (not on the objects layout)

  • I tried this on a large map 5x,5x and had a loop generate 100 something by 100 something sprites (black clouds) ....

    when the layout started ... I either had to make the game wait till the sprites were created ... or just go with it that when the game started that it was still building the sprites .... very annoying ..

    Solution:   manually addd the sprites in cs2 where they should go (cover your entire map with the sprites with copy pasting)

    You only need to do it once, but when the game starts ... the fog is there instantly :)

  • Yes, an object from your project tree needs to "exist" on one of your layouts.

    Awnser:

    Nope, all object on layouts will remain unless your events manipulates them.

  • If you have your object on a dedicted objects layout, then there is no need to destroy them.

    Yes it gets loaded with your project, but no more then on any other layout.

    If you have it on an objects layout, and your running your game on another layout, then there is no need to estroy it.

    You can simply spawn or create a new object and it will get its details from the object on the object layout (where you might have given it instance variables for example, or set dimensions. Would you have not placed an object on a layout, these features will lack).

  • I still say we should have gone with a one legged viking with a dog whahahahaha

    Thanks for the comments :)

    I think the SVN and its relating issues swallowed up about half of our time. We could have done so much more ...

    The whole haunting concept (death) wasnt worked out sufficiently,the idea was that when you become a ghost you would be able to do a lot more.

    Effectively giving you another piece of game play.

    The whole alive state of the game was the concept you get only one life ... but you could haunt forever :)

    Idea were such as taunting or helping a living player as a ghost.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Cant you stuff all the form controls in a family and their events below a group?

    Then when the form is not needed, make the family invisible, and disable the group so the events wont fire.

  • you can load the Iframe in a div dynamically just like any other html.

    You could first load a blank page (I think this frees the memory) then simply clear the content of the div holding the iframe :) (load a new iframe of set some text etc)

  • Perhaps through the use of an iframe ? afterwords either remove the iframe or load something else.

  • :o thats pretty sexy *assimilates*