Hello,
I am having trouble with my game but is not exactly C2 related. I currently have a mostly working prototype that with it I plan to move my game into a Alpha state. The Game is a browser based game with a navel table top war game esq play style. I also have a lot of customizing ability mostly with choosing a crew with attributes to man each ship. Also a mostly working custom character maker. The game will have a multiplayer function to. Which will allow the players to play each other with their fleets. I also will at some point incorporate a persistent war element where players play matches to claim territory.
Anyway
The issue I have right now is that I can not find a way to save the player data so when they relaunch the game they will be able to access their game data. I have been using JSON with the webstorage but am having trouble getting it to stick. The custom character maker for an example. I am trying to save that to somewhere and then come back to it after relaunching. I have a sprite with empty frames and when I click a button to save it the game will take a screenshot of the character and then set the frame of the sprite to that screenshot. Then it is suppose to save that sprite to local storage with a key called "(PlayerName)MyCharacters" and have it be the JSON of that sprite.
When you go into a MP match on a different layout, it will call that sprite and display it. So your crewman "Bobby" will then now be playable and can even face off with your opponents "Sally". Having just one sprite store all your custom made crew just with a different face on each frame will greatly save time and how much resources are needed. I did start with trying tilemaps but I could not find a way to change the image of just one tile, but this will do, hopefully.
So seeing as I cant get the JSON to save how should I approach the problem? I do at some point want to host my own website that will securely store all the data. I do not want the player to keep the files. However I really don't want to build the website in parallel to the game, least this prototype so I am mostly looking for a patch so I can move on.
Which brings up another but separate point, C2 allows for exporting to a number of hosting sites but those are not built for what I have in mind for this project. Is it even feasible to take my C2 game and host it myself. I know the basics of HTML and a pinch of CSS so actually building the site is not really a issue just how to marry C2 and the Website.
All of which brings back to storage. Do I slap a Website together and then go back to the game? If so than how do you store data on 3rd party web server? Or is there a way that I can keep it small scale and still get my data to play nice.
Thank You,
CrazyVulcan