Save lua state with game saves.
#1
Posted 04 April 2012 - 03:36 AM
#2
Posted 04 April 2012 - 05:02 PM
#3
Posted 05 April 2012 - 07:27 PM
So program has a chance to save some vital info in the right moment, not after each action.
#4
Posted 06 April 2012 - 01:35 PM
#5
Posted 06 April 2012 - 06:42 PM
#6
Posted 07 April 2012 - 06:27 AM
#7
Posted 19 March 2013 - 10:48 PM
#8
Posted 20 March 2013 - 12:40 AM
#9
Posted 20 March 2013 - 02:37 AM
#10
Posted 20 March 2013 - 03:40 AM
#11
Posted 20 March 2013 - 03:48 AM
#12
Posted 20 March 2013 - 03:53 AM
#13
Posted 20 March 2013 - 03:59 AM
#14
Posted 20 March 2013 - 07:43 AM
Cloudy, on 20 March 2013 - 03:59 AM, said:
You just add it to the "things not to ask" post.
Sebra, on 05 April 2012 - 07:27 PM, said:
Whats wrong with saving after each action?
#15
Posted 21 March 2013 - 04:56 PM
1) Open a file
2) Write the data onto a hard drive (Real hard drive)
3) Close the file.
I'm not sure if server would like that, especially when 64 turtles do that each second. May be I'm wrong, though.
Actually, would that work? is there a chance that world would shutdown before the file closes?
#17
Posted 21 March 2013 - 08:09 PM
1) Move the turtle
2) Update its coordinates
3) Save the data
#18
Posted 21 March 2013 - 08:24 PM
PonyKuu, on 21 March 2013 - 08:09 PM, said:
#19
Posted 21 March 2013 - 08:38 PM
I mean...
- turtle 1 moves
- turtle 13 does something
- turtle 2 does something else
- turtle 32 does other stuff
- Server shuts down before turtle 1 had a chance to save its state
#20
Posted 21 March 2013 - 08:44 PM
PonyKuu, on 21 March 2013 - 08:38 PM, said:
I mean...
- turtle 1 moves
- turtle 13 does something
- turtle 2 does something else
- turtle 32 does other stuff
- Server shuts down before turtle 1 had a chance to save its state
- turtle 1 changes its pos in file and then moves
- turtle 13 does something
- turtle 2 does something else
- turtle 32 does other stuff
- Server shuts down
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











