1 decade ago by Seeders
Hey everyone,
I'm running into a bit of an issue. I have a procedurally generated open world game in Impact, where i have a tile grid anywhere from 300x300 to 600x600. If I try to create a map much bigger, the browser starts throwing errors about an unresponsive script. If you click Wait, it might eventually finish, but this is not acceptable behavior. If I try to do 1000x1000, the browser will just crash completely (probably more of a memory issue though).
I'd like to do a lot of processing to set up the world. After generating the terrain, I want to spawn the monsters, towns, roads, destructibles, etc. Ideally I would use something like a webworker so that the browser doesn't lock up. However, I'm not sure if that is possible with Impact. It seems webworkers have no access to the DOM or the ig object.
I've been playing with spawning a few monsters each frame, but that leads to a longer set up time, and the world is completely empty for awhile.
Does anyone else have any other ideas?
I'm running into a bit of an issue. I have a procedurally generated open world game in Impact, where i have a tile grid anywhere from 300x300 to 600x600. If I try to create a map much bigger, the browser starts throwing errors about an unresponsive script. If you click Wait, it might eventually finish, but this is not acceptable behavior. If I try to do 1000x1000, the browser will just crash completely (probably more of a memory issue though).
I'd like to do a lot of processing to set up the world. After generating the terrain, I want to spawn the monsters, towns, roads, destructibles, etc. Ideally I would use something like a webworker so that the browser doesn't lock up. However, I'm not sure if that is possible with Impact. It seems webworkers have no access to the DOM or the ig object.
I've been playing with spawning a few monsters each frame, but that leads to a longer set up time, and the world is completely empty for awhile.
Does anyone else have any other ideas?