I’ve been working on integrating a save/load feature using SimpleSQL .
The Problem:
I’m trying to read from Database and use the retrieved data to instantiate objects in the game. It sounds straightforward, but for some reason, I can’t get it to work correctly. The primary function is to save the game state, including the properties and positions of units, and load them when required.
Here’s a brief overview of my approach:
I’m trying to read from the SimpleSQL database to fetch saved unit data.
Using the fetched data, I aim to load the units back into the game scene at their saved positions, with their saved states.
The core issue seems to be in the integration between the database and the instantiation of the game objects in Unity.
If you can post the code (and not a zip file) on Github that’d go a long way to help in reviewing the code.
This is not an answer to your question, but knowing more about your game could really help with solutions.
Is the database on the client or on a centralized server? Without seeing the code I’m guessing you’re trying to have a centralized database (maybe cloud-hosted?) to store game state for all players. Yeah? If you’re just storing game state on the client/player’s device then things get real easy. However, if you’re building an online game with one or more game servers that the client is connecting to, then things get real hard and very time consuming.