Thanks! But it would be a bit too hard to put the code into the game, since it means I would have to change a lot of things. Any way to put my database(with variables inside) into a textfile and load it later?
If you end up using databases it may be a good idea to use something like Hibernate" to manage your persistence. If you’re going to allow the user to input data that will then get added to the database it’s very important to sanitize the data first as sql injection can be a major issue. Here is an article that gives a good short overview of prevention in Java SQL injection prevention
You get to specify, but they are usually relative from the root directory of the executable (i.e.: the same directory as the .class being run, the .jar, or where the java command was called from). I believe there is a way to stash it into a user’s home directory in a clever way, depending on the OS. That would require some googling.
Though I strongly recommend picking up skills like hibernate or serialization anyway, eventually. _
Hey, do you like games? So do we — that’s what makes Kongregate the best source of free games online. We have thousands upon thousands of free online games, from both one-man indies and large studios, rated and filtered so you can play the best of the best. Read more »