[wade_1.3.2/wade.iso_1.1.2 ] No objects in cell after calling wade.loadScene(...)
robert.irmler

Hi,

 

I'm currently trying to add save/load functionality to my game.

In my game I have created some objects (wade.iso.createObject()) and used wade.exportScene() to write to a JSON file - works and the JSON file looks good.

When I restart my game and call wade.loadScene() - everything appears to be fine - I can see my previously created objects.
But when I click on my objects they don't seem to be recognized as such. Instead, wade.iso.getObjectsInCell() returns an empty array.

What am I missing? Any help would be appreciated.

Thanks
Robert

All 3 Comments
Gio
Hi

The saving/loading functionality at the moment only works for "plain" WADE scenes, unfortunately it doesn't extend to the state of the isometric (or physics) plug-ins.

This is something that we are looking to add to the next versions of the plug-ins. So for an isometric game you will be able to do wade.iso.saveMap() and this will generate some json map data in the same format as the one that you can currently load via wade.iso.init().

ETA: a couple of weeks
robert.irmler

Thanks for the info. Looking forward to the next version :D
In the meantime I think I'll try parsing the json file myself and call my create-functions...

Best
Robert

 

EDIT: Thought I'd share my (little clumsy) solution: When I first create my objects now, I add their cell position as an additional property (as wade.exportScene() only saves the position as world(?) coordinates).
Therefore I can later search the json file for that cell-position-property and (re)create my objects. Not very nice, but works for now...

Gio

Just so you know (although you may have implemented your own solution now) wade.iso.exportMap() has now been added to the isometric plug-in.

Post a reply
Add Attachment
Submit Reply
Login to Reply