[Solved] Images Loaded by URL don't Persist Properly

Get help using Construct 2

Post » Sat Oct 22, 2016 12:47 pm

Hey guys

So I'm working on my ProcJam entry already, and I've got a lovely way of generating 3-dimensional worlds in slices. This is all well and good and running with a minimum of CPU overhead - I'll document it once I'm done. Essentially it just generates the slices on start one by one, exporting each to a sprite animation frame using canvassnapshot. Again, all well and good.

What breaks it is using save/load functions. If the window is closed, and the game loaded again, the slices are missing, and the animation frames have returned to their greybox placeholders.

Any suggestions on how to retain the generated artwork in-between sessions? I don't want to go the long way round, storing all saveable data separately so that I can re-generate a level from a save array - as I know this will be a bit of a 'mare.

Much love.
Last edited by mrtumbles on Sat Oct 22, 2016 1:20 pm, edited 1 time in total.
The LEVEL GENERATOR TOOLKIT



24 functions dedicated to producing randomly generated terrain for all kinds of games.
B
25
S
7
Posts: 242
Reputation: 2,306

Post » Sat Oct 22, 2016 1:19 pm

Update: Got it - on generation I push all the canvassnapshots to a Dictionary. I save the Dict.AsJson in a LocalStorage value. Works just fine - although loading them takes a while, and will need to be concealed. Marking solved.
The LEVEL GENERATOR TOOLKIT



24 functions dedicated to producing randomly generated terrain for all kinds of games.
B
25
S
7
Posts: 242
Reputation: 2,306


Return to How do I....?

Who is online

Users browsing this forum: ditocruz, mcscooter, TRMG, Yahoo [Bot] and 27 guests