-
gxclark changed their profile photo
-
SimPlot - Importance of replay and movement tracks
Hello Kevin, OK, I've created a sqlite3 database, created these two tables, and populated a Chinese sub moving in the South China Sea from one of my SimPlot games. I've tried to comment the attributes of these tables, so it is clear how they map to the object and attribute model. Please take a look and let me know what you think. We haven't really got to the replay part of this, but I wanted to make sure this part makes sense up to now. create_sample_tables_mk1.sql SimPlot2_mk1.db3 populate_sample_tables_mk1.sql
-
SimPlot - Importance of replay and movement tracks
Hi Kevin, Yes, this object orientation for Unit class and subunit classes, I think identified by Track Number (TN), works quite well in terms of storing the data in a database table. Basically, each class is a logical "entity", and this can be stored in a table. Certain attributes of a Class or Entity only apply to a specific kind of Class (subclass). For example, only a submarine might have a "maximum depth" attribute. There could be a Unit table, and a Unit History table to store changes to the Unit over time, which are not related to movement, such as remaining damage points. So, yes, I think your suggestion is a good way to approach it, I think the FutureWaypoints and PastWayPoints can be combined into a child table to Unit, perhaps called UnitWaypoints. This would be logically unique based upon Track Number and Waypoint Timestamp. The difference between Past and Future is driven by comparison with the current turn. This is what makes sense to me, so that as the player might want to slide the current turn timestamp around back and forth, no data has to move around. I'll spend a few min to draft some sqlite tables, maybe send you a sqlite backup file.
-
SimPlot - Importance of replay and movement tracks
Hello Kevin, Sorry for the delay in getting back to you. Let me take a crack at these two questions. 1) Can a game be run from database inquiries? Yes, I think sqlite is robust and performant enough to permit this kind of architecture. If you can get the proper information about "AS-WAS" at any point in time, then "AS-IS" is just a filtered set of "AS-WAS" for the current time. Reading and writing to sqlite at the scale of a H5 game, even a big one, should be OK. 2) How can we deal with security, so players do not cheat? Well, I did a bit of research on this. I'm used to user permissions in a database like postgres or mysql, but sqlite is much less capable in terms of users, permissions, etc. But I did find a way to basically encrypt the whole darn database, which seems to match what you are doing with the JSON files anyway. Please see link below. https://stackoverflow.com/questions/1381264/password-protect-a-sqlite-db-is-it-possible I'm happy to collaborate with you on this, I am not a software developer, but I am a database designer, and a command line hack with some experience. For example, one of my current tasks is to generate Simplot2 compliant JSON files for using SQL from a master Postgres database that contains all of the details on weapons, sensors, etc. So, dealing with the whole schema of the turns seems rather straight-forward. What I might do is take our current H5 game in Simplot2, and ingest the Referee.json files over several turns into Postgres, to model some tables for "AS-IS" and "AS-WAS" and the export the result to sqlite. I can send you that file and the documentation of how the metadata in JSON is mapped to the tables and columns in the sqlite database, if this helps you. Regards, Geof
-
SimPlot - Importance of replay and movement tracks
Hello Kevin, I'm a Harpoon player, and Simplot user. I'm also a consultant in the IT industry. I would say that the turn replay is a wonderful feature that most if not all users will appreciate if they have played the game to any reasonable extent. Given that you will need to store the game history as it unfolded, and you are needing to store things "as it was at the time" in order to "time travel" back and render the replay, what you have is a problem very similar to a data warehouse problem, but limited in scope to only the current game. I would suggest that you consider storing data into a SQLite database, with tables designed to store the versions of the different objects (like a unit formation) as of a particular turn timestamp. This type of thing is my specialty, so I can assist if you are interested in taking this approach.