Save and Load disk

For questions about using Classic.

Post » Wed Sep 13, 2017 11:46 pm

can someone tell me if there are other ways to save everything besides save / load disk, and then load again
My games download Free
http://gamejolt.com/@GamersBR/games

My channel you can find video releases of my games and lots of fun subscribe
Https://www.youtube.com/channel/UCQ35OG ... subscriber
B
13
S
6
Posts: 47
Reputation: 1,189

Post » Thu Sep 14, 2017 4:27 pm

Basically you'd store all the info you want to save (positions, variables, .. etc) in something that can saved to disk. Offhand the array object could be used. Then when you load the file later you can to take that info in the array and recreate and re position everything. That's the general idea, but really it can become as thorough as you want.

So for example a save event would do this:

Code: Select all
Set array size to (0, 10, 1)

for each sprite
--- array: push 0 to back
--- array: set (array.width-1, 1) to "sprite"
--- array: set (array.width-1, 2) to sprite.x
--- array: set (array.width-1, 3) to sprite.y

array: save to file


Then the loading would be something like:
Code: Select all
Array: load file
sprite: destroy

array: for each x
array at (array,currentX, 1) equal to "sprite"
--- system: create sprite at (array(array,currentX, 2), array(array,currentX, 3))


It's a starting point anyway. If it doesn't make sense then I think it explains why I'm on here less and less.
B
94
S
33
G
114
Posts: 5,357
Reputation: 73,775

Post » Fri Sep 15, 2017 4:43 am

R0J0hound wrote:Basically you'd store all the info you want to save (positions, variables, .. etc) in something that can saved to disk. Offhand the array object could be used. Then when you load the file later you can to take that info in the array and recreate and re position everything. That's the general idea, but really it can become as thorough as you want.

So for example a save event would do this:

Code: Select all
Set array size to (0, 10, 1)

for each sprite
--- array: push 0 to back
--- array: set (array.width-1, 1) to "sprite"
--- array: set (array.width-1, 2) to sprite.x
--- array: set (array.width-1, 3) to sprite.y

array: save to file


Then the loading would be something like:
Code: Select all
Array: load file
sprite: destroy

array: for each x
array at (array,currentX, 1) equal to "sprite"
--- system: create sprite at (array(array,currentX, 2), array(array,currentX, 3))


It's a starting point anyway. If it doesn't make sense then I think it explains why I'm on here less and less.


I tried but I could not. I just do not know how to use the array plugin. Could you give me another example .cap mode?
My games download Free
http://gamejolt.com/@GamersBR/games

My channel you can find video releases of my games and lots of fun subscribe
Https://www.youtube.com/channel/UCQ35OG ... subscriber
B
13
S
6
Posts: 47
Reputation: 1,189

Post » Mon Sep 18, 2017 4:53 am

I can't be much help since i don't have Construct classic installed and would need to re-familiarize myself with it. Aka figure out how many parts of it works, identify crashing points, and working around it.

There is this old discussion with some examples and such. I fixed my links, i'm not sure about the others.
saving-layouts_p1009275?#p1009275

Also maybe look at Jayjay's example kit in his signature. It may have something useful.
B
94
S
33
G
114
Posts: 5,357
Reputation: 73,775

Post » Mon Sep 18, 2017 5:37 am

R0J0hound wrote:I can't be much help since i don't have Construct classic installed and would need to re-familiarize myself with it. Aka figure out how many parts of it works, identify crashing points, and working around it.

There is this old discussion with some examples and such. I fixed my links, i'm not sure about the others.
saving-layouts_p1009275?#p1009275

Also maybe look at Jayjay's example kit in his signature. It may have something useful.


Thank you for sharing. I'll see what I can learn more.
My games download Free
http://gamejolt.com/@GamersBR/games

My channel you can find video releases of my games and lots of fun subscribe
Https://www.youtube.com/channel/UCQ35OG ... subscriber
B
13
S
6
Posts: 47
Reputation: 1,189


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 6 guests