Thanks for the thoughts all, I have included a link to an earlier prototype because a picture says more then a thousand words (not to mention 30.000 words a second).
You can see it in action here: http://kirl.nl/pixelfunk.html (click screen to set focus) Controlls: Arrow keys = move and turn Ctrl / LMB = shoot Space = change weapon (gun, fire, water, matter) Hold Shift = drill mode for when you get stuck Alt = generate new random walls
What is the structure of your world (continuous, tile-based, ...)? The world is continuous, I tried adding an underlying grid in an attempt to optimise some stuff, however this hasn't been very succesfull yet...
How large is the world? I'm not sure yet how big the world will be, for now the map doesn't scroll so it's as big as the screen (400x550);
How much burning stuff does it contain? Depends, in theory the entire screen can be ablaze.
How large is one "unit of fire" (if applicable)? One fire unit is a sphere of about 20x20 pixels.
Do burning things stop burning? If so, how fast, and can they burn again or are they scorched? One fire unit continues until a delay (~1-2 seconds), then it removes the underlying material, checks for neighbouring pixels (starts new fires if there are) and removes itself. So the burning material is basically being chipped away by little sphere shaped bites.
Hello, I'm working on a game with destructible and rebuildable environment, which is working great. Fires slowely spread and burn up any material it touches. Now I would like to make the (top-down 2d) map scrollable, but I'm unsure of what to do with things like fire. I can't keep this running these offscreen processes while maintaining performance, but it would be weird if it stops or dissappears after moving offscreen.
Any ideas on how to handle this?
I don't keep track of the fires in an array or something, every fire is it's own little isolated process and checks after a delay wether it is touching material (non transparant pixel) and starts new fires at those locations.
PS: I've been a member of this community for nearly a decade now (Kirl), but I had to re-register because I forgot my password and don't have acces to the mail acount I used at the time I registered.