#Save/load system for java

15 messages · Page 1 of 1 (latest)

tough silo
#

i have multiple classes setup to run a simple game, and wanted to make a saving feature so that when a user is playing they dont loose their files, ive tried searching the internet but have not found one that worked, i am still new to java, just coming from python

zenith badgerBOT
#

This post has been reserved for your question.

Hey @tough silo! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

restive atlas
#

I suspect that it's not particularly simple to do in Python?

tough silo
#

its actually very simple in python, just import a library and then do some magical code drops and boom a save/load feature is created

restive atlas
#

Ah well it's the same in Java, just import a library and do the magical code it wants

#

Like Gson or Jackson

tough silo
#

ok how would i do that or is there a website you can send me off to?

restive atlas
#

There's this fantastic websites that searches the web for relevant pages when you give it words you're interested in

#

Goodle or something

tough silo
#

google smh

#

although ive tried that and came up pretty short or i would have to rework the whole structure in a way that is confusing to understand

restive atlas
#

You mean while mentioning doing it with Gson or Jackson?

#

I suppose as Python is not statically typed, it is more free to pollute the data model to save.
In a statically typed world, you'd force yourself to design data models that are likely to be usable by reasonable libraries, or you'd convert it to another model before/after save/load, or you'd make a more complicated mechanism

tough silo
#

using gson