Posted February 10, 2014
HiPhish: I'm still curious abut this part:
How are you going to keep the app up to date? Do you have someone constantly update a database or is there a form of official API you can hook up to?
HiPhish:
OK, there are a couple of things at work here: How are you going to keep the app up to date? Do you have someone constantly update a database or is there a form of official API you can hook up to?
1. GOG is pretty good about storing everything relevant in the Windows Registry. You don't actually need to keep track of much. Which games are installed, where they are installed, how to launch them... you can get all that from the registry.
2. That contains the supportlink ID... the link title. Unfortunately, these are sometimes missing from old installers. For that, I'd keep things simple. A simple text file for each game id on my servers that contains the support link as a fallback.
3. You can also do stuff like searching, querying the available games and so on via the AJAX api supplied at http://www.gog.com/games/ajax . For example [url=http://www.gog.com/games/ajax?a=search&f={%22sort%22:%22added%22}&p=1]http://www.gog.com/games/ajax?a=search&f={%22sort%22:%22added%22}&p=1[/url] gives you a neat list of all games available (the p=# is the page number).
For example, I'm using the search right now as a fallback for games without a support id.
4. A few things are not available via the AJAX API. For example the cover art or this neat list of news items (you can however use the RSS feed, but the one on the page is just nicer). For that you can use the DOM API (remember, XULRunner is a browser at heart) to extract and display the relevant information (as I am currently doing for cover art and news items).
5. For everything else, there's SQLITE, which is hard-baked into XULRunner and works wonderfully for small, local databases. For example, I'm using it right now for a caching mechanism.
In my opinion one of the most under-appreciated tools around. WebKit is nice, but it's so much easier getting started with XULRunner. You just create a couple of config files, a XUL or HTML page and voilà: Your first alpha release is ready. And you can access all the Mozilla internal functions (which do stuff like file access, registry access and so on), as well as any other DLL via JS-CTypes. You want to manage memory manually? Fine, just import malloc and free. You want Joystick support? Well, you can try the COM interface, but I'd suggest simply loading the SDL DLL...
Daniel Ruf: awesome
XULRunner looks interesting.
If I understand it correctly, you want to make it a C app? Why not Java? You can also make a local webserver with it and use an embedded database like H2. But this was just an idea from me.
What are your plans for future releases?
I actually want to make it a Javascript app. I think it's simply the most awesome language around, with a lot more flexibility than Java. C is great, but I actually like the DocumentObjectModel and well... accessing the DOM from C is always a pain. XULRunner looks interesting.
If I understand it correctly, you want to make it a C app? Why not Java? You can also make a local webserver with it and use an embedded database like H2. But this was just an idea from me.
What are your plans for future releases?
About the database: SQLite is really more than enough. We're not talking about Gigabytes of data here :)
Post edited February 10, 2014 by hansschmucker