iiYO Community

Full Version: Can different games share same save file?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello WebStory Engine team.

First, I'd like to say that I'm appreciate WebStory Engine so much. I plan to use it for my own online VN. I taught a class on basic animation using flash and I show WebStory as alternative technology. Students love it because it is so easy to use.

Now, I'd like to ask you a question.

Can different games share a same save file? If it can, where the save file is?

My requirement is that I will have an online VN which contains choices. Each chapter will be completely separated and upload weekly to bi-weekly on different pages. I want to bring the choices player (each of their own) have chosen to affect the following chapters. For example, on 1st Jan I upload chapter 1 and on 15th Jan I upload the second. Both chapter has their own WSE folder on the host. On the second chapter, I want to bring in the name of the player and the choice that player chose on chapter 1 to chapter 2.

Does current WebStory Engine provide a tool for such task?

Thank you for your answer.

Guest

Hi Prisma_Dominatus!

Thanks for your kind words. Smile Will your online VN be viewable by the general public?

To answer your question: Unfortunately, there are no savegame files. I have the idea to provide an export mechanism in future versions of the engine, so that you can save your game data as a real file and import it back in again on another browser or device.

What this means for your VN is that you basically have the following choices to accomplish what you want:

1) Instead of writing a new WebStory for each chapter, you could use one WebStory and add new chapters incrementally. This way you could use global variables to remember whether the player reached a certain point in the game and only provide a button to the new chapter when the condition is met. I would probably use a choice menu at the beginning of the WebStory to enable the player to jump to the chapters that are already unlocked.
This solution requires no additional programming but may not be optimal in terms of appearance (additional menus).

2) You could write an extension to the engine that hooks to the save and load events and saves the variables inside a "global" JSON object and stores them inside the browser's localStorage or similar storage solution. This solution requires you to have all the WebStories on the same host (e.g. http://wse.example.com) for the localStorage data to be shared across the WebStories (so that the Same Origin Policy of JavaScript (https://developer.mozilla.org/en-US/docs...JavaScript) is not violated).
This solution requires only a little amount of client-side programming.

3) Another option you have which is a little more difficult is to write a little script on the server side and an extension to the engine for the client side (browser) like in solution 2. The extension could be hooked to the save and load events of the engine and send the savegame data to the server on each save, too, instead of just saving it inside the browser. When the player starts a new WebStory, your extension would connect to the server and ask for the savegame data. The extension could then extract the variables from the savegame data and put them into the currently running WebStory so that the choices of the player in other WebStories will be remembered.
The script on the server would need to differentiate between different users, that is, provide an authentication mechanism of some sort. The script would get all the variables from the client-side extension and add them to a file on the server. I would probably use a JSON file for this purpose. There would be one file per user that stores all variables across all WebStories.
This solution requires programming in a server-side language of your choice and on the client-side, too. The client-side only extension in solution 2 is probably the better choice here, imho.


If you want to go with solution 2 but are not comfortable writing JavaScript, I could develop the client-side extension for you. I guess other users would benefit from it, too.

Good luck with your visual novel!

Guest

Hi C7N

Thank you for your comment, I'll try them out. My priority will be 2nd and 3rd then 1st. If I success in any implementation, I'll contribute to WebStory engine team.

Yes, my VN will be viewable by general public (free). It will be in Thai language. I've tested it and found that WebStory engine works real well with Thai. I also tried Japanese which works well too.

Thanks