Puppeteer
Emperor
When I spill the contents of my brain it helps me organize it, but clearly I mislead people in the process.
Surprisingly I have had one Linux box or another running for nearly 20 years now; in 1994 I wanted to learn Unix to qualify for a job, and after looking at expensive options and a cheap training book with a rudimentary Unix emulator (just a simple preprogrammed response to certain inputs) I stumbled across a free Unix clone that worked amazingly well. I had been toying with OS/2 2.1 and was jazzed about the 32-bit command line, and here was a free one downloaded as a stack of Slackware floppy disk images over my 28.8kps modem. (Or maybe it was 9600bps or even 1200bps back then; I don't recall.) I got the job, but the need for Unix was kind of a sham because the only thing I ever did with HP UX was to tell the person on the phone what was happening on the screen. Well, we did do some scripted updates on an Irix video training system later. Mainly my career has been Windows desktops and servers, but I always have a Linux box around for my ad-hoc and tinkering needs.
Python, however, I have not used for 20 years. In fact I'm not sure I've actually written in Python before, although I know I've poked at it here and there when looking at Zope, Plone and Civ 4. More recently I have interest in it for Gstreamer and Twisted, but I got sidetracked onto this project. I'm really not a developer; I did some programming back in college and occasionally dabbled in this or that and have used various scripting languages for work. But I know some of the basics of programming and can read Google and Stack Overflow, and I seem to have clicked with Python so far.
I see two uses for my game save parser and HTML viewer:
Since I have both of those visions I tend to dump ideas for either of them in this thread.
The project I would post back to the top of this thread would be the Civ3 Show-And-Tell and would work somewhat like this:
[Web Browser] <--> [My Web Server or someone else who wants to use my program]
|
-------> [ Python App Server ] <----> [Anywhere a .SAV is web-reachable]
|
--------> [ Possible secondary data source for annotation ]
So, in one case say I've got the project working and up, and you're reading an SG that sounds interesting, but nobody has posted a screenshot in weeks. You could copy the URL of the save file posted to the SG thread, paste into the map browser, and it would then ask (via AJAX) the Python app server which would look at the URL, decide if it's already seen and cached this URL before, fetch and parse the save game file if needed and return the desired non-spoiling game and map data to the browser which would turn it into a map and summary of the game. (Difficulty level, map size, barb settings, random seed, etc.) This would not require any login or ID of any sort.
In another case, somebody is posting a story thread with a save and includes the link to
open the save using my program ( http://example.tld/getmap?url=http://forums.civfanatics.com/attachments?id=12345 ) so that viewers can look at his situation with a simple click.
It is my vision--although I don't yet know if I can pull it off--that the story teller or SG participant could mark the generated map with proposed city sites or other callouts and annotations which would require additional data storage. This is the part where I was babbling about IDs and logins. My original thought was to provide a file they could upload, but that's just not going to work as I wouldn't expect to depend on an average user getting the links, urls and data files all lined up online to work like I want. To pull this off I would have to store the annotation on the app server, and I don't like the idea of unauthenticated creation of data on the app server, but I don't want to maintain a userbase, so that's why I thought of the API logins like OpenID, Twitter and Facebook. Using one of those I wouldn't have to maintain a user database, but users could create annotations in their own scope without fear of conflicting with another user, and if there were abuse (such as a script building garbage data on my server) I could lock out by ID.
The enhancer/helper/analyzer program wouldn't necessarily need internet connectivity (or a login). However one of my ideas for the helper would be the ability to launch enhanced content. For example, you mod a new Great Wonder, make a video to play when the player build the wonder and then post it to YouTube (or wherever). I would like the helper/enhancer program to be able to launch enhanced content upon noticing that a wonder was just built by the player, a new tech age was just entered, and any other game events (as witnessed via the latest save file) that might be useful for mod scenarios. Naturally if you're putting enhanced game content on YouTube you would need the internet while playing. But there would be no logins or anything for this.
I know it's confusing for me to mix talk about the two (or more) visions for completed products, but where I'm working now (reading save files) is applicable to bringing each vision to fruition.
Surprisingly I have had one Linux box or another running for nearly 20 years now; in 1994 I wanted to learn Unix to qualify for a job, and after looking at expensive options and a cheap training book with a rudimentary Unix emulator (just a simple preprogrammed response to certain inputs) I stumbled across a free Unix clone that worked amazingly well. I had been toying with OS/2 2.1 and was jazzed about the 32-bit command line, and here was a free one downloaded as a stack of Slackware floppy disk images over my 28.8kps modem. (Or maybe it was 9600bps or even 1200bps back then; I don't recall.) I got the job, but the need for Unix was kind of a sham because the only thing I ever did with HP UX was to tell the person on the phone what was happening on the screen. Well, we did do some scripted updates on an Irix video training system later. Mainly my career has been Windows desktops and servers, but I always have a Linux box around for my ad-hoc and tinkering needs.
Python, however, I have not used for 20 years. In fact I'm not sure I've actually written in Python before, although I know I've poked at it here and there when looking at Zope, Plone and Civ 4. More recently I have interest in it for Gstreamer and Twisted, but I got sidetracked onto this project. I'm really not a developer; I did some programming back in college and occasionally dabbled in this or that and have used various scripting languages for work. But I know some of the basics of programming and can read Google and Stack Overflow, and I seem to have clicked with Python so far.
I see two uses for my game save parser and HTML viewer:
- A website that will let you quickly and easily view the map and info for a save game somebody has posted to the internet, for example here on the forum in a help request ("help I'm losing this game what's wrong?") or succession game.
- A turn-by-turn assistant/enhancer that runs on the game PC and displays info in a same-machine web browser or a same-LAN web browser such as a tablet or smart phone.
Since I have both of those visions I tend to dump ideas for either of them in this thread.
The project I would post back to the top of this thread would be the Civ3 Show-And-Tell and would work somewhat like this:
[Web Browser] <--> [My Web Server or someone else who wants to use my program]
|
-------> [ Python App Server ] <----> [Anywhere a .SAV is web-reachable]
|
--------> [ Possible secondary data source for annotation ]
So, in one case say I've got the project working and up, and you're reading an SG that sounds interesting, but nobody has posted a screenshot in weeks. You could copy the URL of the save file posted to the SG thread, paste into the map browser, and it would then ask (via AJAX) the Python app server which would look at the URL, decide if it's already seen and cached this URL before, fetch and parse the save game file if needed and return the desired non-spoiling game and map data to the browser which would turn it into a map and summary of the game. (Difficulty level, map size, barb settings, random seed, etc.) This would not require any login or ID of any sort.
In another case, somebody is posting a story thread with a save and includes the link to
open the save using my program ( http://example.tld/getmap?url=http://forums.civfanatics.com/attachments?id=12345 ) so that viewers can look at his situation with a simple click.
It is my vision--although I don't yet know if I can pull it off--that the story teller or SG participant could mark the generated map with proposed city sites or other callouts and annotations which would require additional data storage. This is the part where I was babbling about IDs and logins. My original thought was to provide a file they could upload, but that's just not going to work as I wouldn't expect to depend on an average user getting the links, urls and data files all lined up online to work like I want. To pull this off I would have to store the annotation on the app server, and I don't like the idea of unauthenticated creation of data on the app server, but I don't want to maintain a userbase, so that's why I thought of the API logins like OpenID, Twitter and Facebook. Using one of those I wouldn't have to maintain a user database, but users could create annotations in their own scope without fear of conflicting with another user, and if there were abuse (such as a script building garbage data on my server) I could lock out by ID.
The enhancer/helper/analyzer program wouldn't necessarily need internet connectivity (or a login). However one of my ideas for the helper would be the ability to launch enhanced content. For example, you mod a new Great Wonder, make a video to play when the player build the wonder and then post it to YouTube (or wherever). I would like the helper/enhancer program to be able to launch enhanced content upon noticing that a wonder was just built by the player, a new tech age was just entered, and any other game events (as witnessed via the latest save file) that might be useful for mod scenarios. Naturally if you're putting enhanced game content on YouTube you would need the internet while playing. But there would be no logins or anything for this.
I know it's confusing for me to mix talk about the two (or more) visions for completed products, but where I'm working now (reading save files) is applicable to bringing each vision to fruition.