Loading/Storing games

18 views
Skip to first unread message

Uwe Plonus

unread,
Nov 12, 2018, 6:14:53 AM11/12/18
to jDip Developers
Hi all,

while we have to rewrite the code to load and store games the following question occurs to me:

What should be the future format for loading/storing?

What comes into my mind is:

  • Text based format, e.g. XML or JSON
  • Database, e.g. SQLite
What do you think?

Uwe

Uwe Plonus

unread,
Nov 12, 2018, 10:26:19 AM11/12/18
to jDip Developers
After some research I would prefer a text format (XML or JSON).

This is because then an online interface (which I have in mind) is easier to implement as most databases (if not all) need a file on the disk to work for loading saving. Text representations can be easier handled in memory or while streaming.

Any other thoughts or preferences?

Uwe 

Jiri Peinlich

unread,
Nov 12, 2018, 1:05:05 PM11/12/18
to Uwe Plonus, jdip-de...@googlegroups.com
I like yaml a lot. I also like that the export would be zipped. I think a nice readable format that could be a basis for both save/load and also as an DSL for integration tests would be nice.

Jiri

--
You received this message because you are subscribed to the Google Groups "jDip Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jdip-develope...@googlegroups.com.
To post to this group, send email to jdip-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jdip-developers/6bb15030-702e-46b6-bc42-da867895afff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Chris Hughes

unread,
Nov 12, 2018, 1:09:46 PM11/12/18
to jDip Developers
I think I would vote for JSON, to be as universal as possible, but also fairly readable.

Chris

Uwe Plonus

unread,
Nov 12, 2018, 1:27:43 PM11/12/18
to jDip Developers
As the data format is primary for exchange between applications a format like yaml is not necessary. I think JSON is the format to go for save format.

If we would talk about configuration files then yaml or hocon would be the format to choose but for data exchange I would go with JSON.

I will start implementing a save format today and go with JSON for the moment. I will use jackson so a change into another format should be fairly easy if we find a valid reason to do so.

Uwe

Uwe Plonus

unread,
Nov 14, 2018, 5:20:11 PM11/14/18
to jDip Developers
Current state: I'm still writing the code for importing old games. The format is very "interesting", to call it like this.

Every refactoring or extension is likely to break the save game format.

Currently I'm still analyzing the file format. I took the saved file from bug #150 and after formatting it to be readable it had 10 MBytes. A lot of stuff to read.

Uwe

Jiri Peinlich

unread,
Nov 15, 2018, 1:32:34 PM11/15/18
to Uwe Plonus, jdip-de...@googlegroups.com
Good luck :-). I think you took a very hard piece of work to start with :-)

--
You received this message because you are subscribed to the Google Groups "jDip Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jdip-develope...@googlegroups.com.
To post to this group, send email to jdip-de...@googlegroups.com.

Uwe Plonus

unread,
Nov 15, 2018, 1:46:26 PM11/15/18
to jDip Developers
I love challenges ;)


Am Donnerstag, 15. November 2018 19:32:34 UTC+1 schrieb Jiri Peinlich:
Good luck :-). I think you took a very hard piece of work to start with :-)

On Wed, Nov 14, 2018 at 10:20 PM Uwe Plonus <u.pl...@gmail.com> wrote:
Current state: I'm still writing the code for importing old games. The format is very "interesting", to call it like this.

Every refactoring or extension is likely to break the save game format.

Currently I'm still analyzing the file format. I took the saved file from bug #150 and after formatting it to be readable it had 10 MBytes. A lot of stuff to read.

Uwe

Am Montag, 12. November 2018 19:27:43 UTC+1 schrieb Uwe Plonus:
As the data format is primary for exchange between applications a format like yaml is not necessary. I think JSON is the format to go for save format.

If we would talk about configuration files then yaml or hocon would be the format to choose but for data exchange I would go with JSON.

I will start implementing a save format today and go with JSON for the moment. I will use jackson so a change into another format should be fairly easy if we find a valid reason to do so.

Uwe

Am Montag, 12. November 2018 19:09:46 UTC+1 schrieb Chris Hughes:
I think I would vote for JSON, to be as universal as possible, but also fairly readable.

Chris

--
You received this message because you are subscribed to the Google Groups "jDip Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jdip-developers+unsubscribe@googlegroups.com.
To post to this group, send email to jdip-developers@googlegroups.com.

Uwe Plonus

unread,
Dec 2, 2018, 5:36:15 PM12/2/18
to jDip Developers
Finally I have the first rough version of importing old games implemented.

What does NOT work:
  • Importing games with borders (e.g. loeb9)
  • Importing F2F games
  • Explicit moves (whatever this is)
  • Waive orders
  • Convoy routes
The UI does not show the changed orders when moving back and forth in time.

So still some work for the import to do but at least a first version is there ;)

Am Montag, 12. November 2018 12:14:53 UTC+1 schrieb Uwe Plonus:

Jiri Peinlich

unread,
Dec 3, 2018, 1:04:58 PM12/3/18
to Uwe Plonus, jdip-de...@googlegroups.com
This is great. How can I go about trying it out? Do I just try to "open" old save or do i need to do something else?

Jiri

--
You received this message because you are subscribed to the Google Groups "jDip Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jdip-develope...@googlegroups.com.
To post to this group, send email to jdip-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jdip-developers/6e80e4f9-f0b3-48b7-a663-371d638af4ed%40googlegroups.com.

Uwe Plonus

unread,
Dec 3, 2018, 1:41:52 PM12/3/18
to jDip Developers
You need to "Import old game..." which is directly below the load game menu entry.


Am Montag, 3. Dezember 2018 19:04:58 UTC+1 schrieb Jiri Peinlich:
This is great. How can I go about trying it out? Do I just try to "open" old save or do i need to do something else?

Jiri

On Sun, Dec 2, 2018 at 10:36 PM Uwe Plonus <u.pl...@gmail.com> wrote:
Finally I have the first rough version of importing old games implemented.

What does NOT work:
  • Importing games with borders (e.g. loeb9)
  • Importing F2F games
  • Explicit moves (whatever this is)
  • Waive orders
  • Convoy routes
The UI does not show the changed orders when moving back and forth in time.

So still some work for the import to do but at least a first version is there ;)

Am Montag, 12. November 2018 12:14:53 UTC+1 schrieb Uwe Plonus:
Hi all,

while we have to rewrite the code to load and store games the following question occurs to me:

What should be the future format for loading/storing?

What comes into my mind is:

  • Text based format, e.g. XML or JSON
  • Database, e.g. SQLite
What do you think?

Uwe

--
You received this message because you are subscribed to the Google Groups "jDip Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jdip-developers+unsubscribe@googlegroups.com.
To post to this group, send email to jdip-developers@googlegroups.com.

Uwe Plonus

unread,
Dec 30, 2018, 9:43:29 AM12/30/18
to jDip Developers
So, finally I have a version for the import that should cover all possible cases for the import.

Please test with as many games as you have and write (either here or create an issue) if there is anything that does not work with importing old games.

I will now start with implementing the new saving/loading of games.

Uwe
Reply all
Reply to author
Forward
0 new messages