I'd say he meant difficult. You have to explicitly specify all the info you want to save.
Here is one idea:
http://dl.dropbox.com/u/5426011/examples13/save_load.capx
I use the dictionary object to store the named values for each object. I then insert dictionary.AsJSON into the array for each object. The array now is a snapshot of what I want to save. It is then trivial to save to webstorage with the action:
webstorage: set local key "game_save" to Array.AsJSON
I'd say tokenat() is the bottleneck here.
I replicated your example but used a 610k text file of the english dictionary (60387 words). It was dog slow. I stopped it after 10 seconds and it only had read 1400 words.
So I modified it and used mid() and find() to progressively get the words.
http://dl.dropbox.com/u/5426011/examples13/dict.capx
It read the entire thing in 0.979 seconds.
Then for the fastest possible performance I modified the example above to save the Array to a JSON file. Then I made another capx to load it with the load from JSON action.
http://dl.dropbox.com/u/5426011/examples13/dict_json.capx
The data file is now 905k but loads in 0.039 seconds.
The platform behavior prevents any overlap with "Solid" objects. When the "on collision" event is run the objects are not overlapping so the actions are never run.
The feature already exists, but it is not available for the free version.
http://www.scirra.com/store/construct-2
At least I think that's what "Project Folders" means. Try right clicking in the objects bar and see if a "add subfolder" option is there.
Glad it was useful. You can reduce you event count to 2 by putting all the objects you want to wrap into a family.
I'm curious about the changes to the formulas, namely this:
LayoutWidth-LayoutWidth
Couldn't you just use 0 since it will evaluate to 0 no matter the value of LayoutWidth.
Perhaps the warp behavior does something similar to what you tried with events.
Do it with these two events instead:
X > LayoutWidth+self.Width/2
set X to self.X-LayoutWidth-self.Width
X < -self.Width/2
set X to self.X+LayoutWidth+self.Width
Here's one idea:
http://dl.dropbox.com/u/5426011/examples13/multi_inv.cap
Basically the bags are in a container with an array, so each bag has an array for it's contents. When the player touches a bag the bag's inventory is displayed. The player's inventory is handled the same as the bags, except there is no array for the player's inventory, just the slots. One could be made later if needed.
Here is another way that works pretty well:
http://www.scirra.com/forum/player-cant-jump-on-floating-platforms_topic46067_post288780.html?KW=vertical+platform#288780
Develop games in your browser. Powerful, performant & highly capable.
The increasing ram usage is caused when using webgl. Internally the plugin still uses canvas2d and with webgl a new texture of the canvas is made every frame causing the memory leak. I need to re-write it properly use webgl in an efficient manner.
Re-download the example, I made it a bit more generic.
t will work on spawning objects too, right?
I don't quite get what you're asking. Event 2 does the creation and positioning of the smaller objects. You can put it anywhere in your events where you want to create/spawn the small boxes on the big box.
You can try this plugin:
http://www.scirra.com/forum/plugin-randomplus_topic45261.html
I allows you to set the seed of random so you can get the same sequence of numbers per seed.
Member since 15 Jun, 2009