Is there a way to speed up actor spawning?

Hi,
I'm working on a mining sort of game and I'm trying to use a table to spawn terrain actors that will be destroyed when mined. The problem is that I have thousands of these terrain actors and the spawning is taking forever.

Comments

  • BoomshackBarryBoomshackBarry Member Posts: 712
    Thousand of actors sounds like it might be slowing down GS a bit - it's not really made to deal with thousands of actors on a scene so you'd probably get a whole lot of slowdown with the engine, or memory related crashing.

    A solution to your issue could be to place the tiles in the scene editor rather than spawning them at load time. Although this would probably make your level take quite a while longer to load.

    Either way I think you're always going to have performance problems if you're trying to show thousands of actors on screen, GS just isn't made for that kind of heavy lifting.
  • DanielDoeDanielDoe Member Posts: 307
    thousands? my similar project crashes always when I have 900 plain objects or 200 textured one...
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    I suppose you could also 'hide' the spawning by putting some kind of image (instructions, credits, story, something that makes sense) over the spawning tiles and then eliminate that cover image once the spawning is done. Kind of like a custom load screen/image.

    But 'thousands' of actors does sound like an awful lot for the engine to handle...
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    If you decide you do need to spawn actors quickly, do a search on the forums for hyper loop, fast loop, study of loops, etc. Those three will give you threads where members posted solutions for the fastest possible loop.

    But be prepared... the logic in those demos is not for the faint of heart!

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.