Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: DF Stat facebook app?  (Read 2968 times)

daysanew

  • Bay Watcher
    • View Profile
DF Stat facebook app?
« on: March 30, 2010, 08:28:09 am »

So I have an idea floating around in my head of a facebook app that can read your game like Dwarf Therapist or monitor and post stats to facebook. It seems to be a popular idea to create such apps that display boxes on your wall for everyone to see.
Of course it could go beyond simple stats, in fact a whole online achievement system could be created, where other people's forts. being compared etc etc. Either way its just an idea floating around in my head.
But does anyone know how difficult it is to get such info from memory like therapist does, or better yet does someone have a resource they can point me too.
Right now its just at the idea phase, and idea I'd like to look into.
Logged

Salabasama

  • Bay Watcher
  • Cyber-elf
    • View Profile
Re: DF Stat facebook app?
« Reply #1 on: March 30, 2010, 08:33:39 am »

I think they all use the same library.  It was called DFHack or something.  Though, Facebook is not very dwarfy.
Logged
I keep thinking glacier fortress would be fun, but it always ends up as cave layer fortress.

daysanew

  • Bay Watcher
    • View Profile
Re: DF Stat facebook app?
« Reply #2 on: March 30, 2010, 09:18:23 am »

Well, then we  can make it dwarfy. Not actually sure if that is suppose to mean facebook app for DF would just be pointless because no self suspecting dwarf would use it (though the DF page with 2k fans my say different), or that using a facebook app itself couldn't pull it off....

Though I'd probably go with a desktop program that uploaded stats to a mysql database I'm using for another app, then have the app access the database to post sites to facebook itself.
Its mainly just a fun like idea I'm thinking of, using it as a learning experience for myself (I need more coding experince), and do my part to spread the true path of salvation through fun of DF.
Logged

Salabasama

  • Bay Watcher
  • Cyber-elf
    • View Profile
Re: DF Stat facebook app?
« Reply #3 on: March 30, 2010, 09:36:00 am »

Well, you'll have a little while to wait I suppose.  I'm skill 0 in these types of things, and so may be saying the wrong words for the wrong ideas, but I assume that the new version coming out soon will outdate the offset library thing.  I'm not even sure if that is what you'd need, but here's the link stolen from the Dwarf Therapist thread for your pleasure anyway:  http://github.com/peterix/dfhack/raw/master/output/Memory.xml

edit: If that is even what I was thinking of...
« Last Edit: March 30, 2010, 09:37:32 am by Salabasama »
Logged
I keep thinking glacier fortress would be fun, but it always ends up as cave layer fortress.

Petr Ga

  • Bay Watcher
    • View Profile
Re: DF Stat facebook app?
« Reply #4 on: March 30, 2010, 09:46:14 am »

From my knowledge about fb apps (i created one already)

- you need web resource to read data from
- you need something to feed that resource

In very basic, this could work:
1. someone creates dfstats.exe to read PC memory and send it to webserver/db
2. someone creates web to serve pages with stats. This pages includes fb code (FBML or other)
3. someone creates fb app to display this pages on fb

Possibilities goes beyond this:
- with fb connect, one can create content right on website, with all that fb stuff like "a ladder amongst your friends"
- or there can be something very strange like df via term but with fb output. strange but FUN
- or vizualization

dfstats.exe should definitely be based on dfhack tool
Logged
2: Give RMs a gas syndrome that causes RMs only to breed profusely.

daysanew

  • Bay Watcher
    • View Profile
Re: DF Stat facebook app?
« Reply #5 on: March 30, 2010, 09:55:56 am »


In very basic, this could work:
1. someone creates dfstats.exe to read PC memory and send it to webserver/db
2. someone creates web to serve pages with stats. This pages includes fb code (FBML or other)
3. someone creates fb app to display this pages on fb

Possibilities goes beyond this:
- with fb connect, one can create content right on website, with all that fb stuff like "a ladder amongst your friends"
- or there can be something very strange like df via term but with fb output. strange but FUN
- or vizualization

dfstats.exe should definitely be based on dfhack tool

2 and 3 would be easy as it wouldn't be anything too fancy, at least not right away.
I haven't used the FB API all that much expect to check login information via PhP, though plenty of documentation on that front.

As for the .exe desktop program,not sure how tough it will be until I take a closer look at dfHack or someone can comment on it.
Logged

Petr Ga

  • Bay Watcher
    • View Profile
Re: DF Stat facebook app?
« Reply #6 on: March 30, 2010, 10:01:29 am »


In very basic, this could work:
1. someone creates dfstats.exe to read PC memory and send it to webserver/db
2. someone creates web to serve pages with stats. This pages includes fb code (FBML or other)
3. someone creates fb app to display this pages on fb

Possibilities goes beyond this:
- with fb connect, one can create content right on website, with all that fb stuff like "a ladder amongst your friends"
- or there can be something very strange like df via term but with fb output. strange but FUN
- or vizualization

dfstats.exe should definitely be based on dfhack tool

2 and 3 would be easy as it wouldn't be anything too fancy, at least not right away.
I haven't used the FB API all that much expect to check login information via PhP, though plenty of documentation on that front.

As for the .exe desktop program,not sure how tough it will be until I take a closer look at dfHack or someone can comment on it.

I think peterix could be handy as he wants to spread dfhack usage.
as for 2 - I count here interface for incoming data from dfstats. something like REST or webservices. Can be plain php, too. User management and authentizatrion would be on fb side but one need at least store some attributes

which comes me to question: how will dfstats authenticates? fb username and secret pin set in website ui?
Logged
2: Give RMs a gas syndrome that causes RMs only to breed profusely.

daysanew

  • Bay Watcher
    • View Profile
Re: DF Stat facebook app?
« Reply #7 on: March 30, 2010, 10:29:20 am »

I think peterix could be handy as he wants to spread dfhack usage.
as for 2 - I count here interface for incoming data from dfstats. something like REST or webservices. Can be plain php, too. User management and authentizatrion would be on fb side but one need at least store some attributes

which comes me to question: how will dfstats authenticates? fb username and secret pin set in website ui?

Well as I said I'm not familiar with the fb API, and my web programming to date is mainly centered around PhP and mysql. Now I'm not sure if there is a way to make a fb app auto update itself without a person running that app, basically if a person wants to update their info (ie they expanded their fort) displayed on their wall, can it be done with making them log into FB. As for updating the main stat page, it could be done every x min./hours using cron jobs. Of course that is just using straight php, and if the app itself ever grew, I know straight php wouldn't be the best choice.
I could personally bite the bullet expand my knowledge on just X language to use something like webservices, I'd have to view my options though with my current web server I use (I wanna learn C#, maybe that is a choice). Then use PhP to just display the page. Once again for me, this would be new water, but something I want and need to learn.

As for authentication, yea I think FB username (I believe fb allows that to be stored, or can use username to get their fb id, and that can be stored), and maybe a secret key, or they can use a separate password (hopefully most wouldn't use their fb password), if that doesn't violate something on facebook's side.

Logged

daysanew

  • Bay Watcher
    • View Profile
Re: DF Stat facebook app?
« Reply #8 on: March 30, 2010, 10:34:50 am »

I like the visual idea. Maybe even get someone to do one of the 3D rendering programs I've seem floating around. Of course I'd want to be careful. Right now I"m using a basic cloud service (a one free year one).

Well I need to get some sleep, though I like where this is heading, and of course if this is an idea that can work, I'd be happy to accept any help.

Logged

Petr Ga

  • Bay Watcher
    • View Profile
Re: DF Stat facebook app?
« Reply #9 on: March 30, 2010, 10:46:22 am »

I am familiar with fb somewhat so count with me on fb side

fb sends you user identificator.
basic idea is : user registers with his fb login via facebook connect, then chooses his/her name and pin for dfstats
Logged
2: Give RMs a gas syndrome that causes RMs only to breed profusely.

daysanew

  • Bay Watcher
    • View Profile
Re: DF Stat facebook app?
« Reply #10 on: March 30, 2010, 11:08:33 am »

Well one this is for sure, and was mentioned before.
Plenty of time get proof of concept (40d19 version?) and planning before they perfect the new version.
Logged

Scarpa

  • Bay Watcher
    • View Profile
Re: DF Stat facebook app?
« Reply #11 on: March 30, 2010, 11:34:42 am »

As a proof of concept how about a simple image server that can be linked to in a sig or avatar on this forum? I expect that would get much more rapid uptake as well.

The components that gather DF statistics and put them on a web/app/db server would be unchanged. Just instead of publishing to a fb app create a small image and/or banner that summarizes the stats.
Logged

Salabasama

  • Bay Watcher
  • Cyber-elf
    • View Profile
Re: DF Stat facebook app?
« Reply #12 on: March 30, 2010, 01:14:08 pm »

Also, got to consider that lots of people run multiple games.  Need to think of what to do if someone is running multiple copies of the same version of the game, or if they abandon.  Might conjure up some weirdness in the stat display thing.
Logged
I keep thinking glacier fortress would be fun, but it always ends up as cave layer fortress.

Aklyon

  • Bay Watcher
  • Fate~
    • View Profile
Re: DF Stat facebook app?
« Reply #13 on: March 30, 2010, 02:07:08 pm »

Facebook is not very dwarfy.
Its not Dwarfy at all. what kind of dwarf enjoys outside farms?
Logged
Crystalline (SG)
Sigtext
Quote from: RedKing
It's known as the Oppai-Kaiju effect. The islands of Japan generate a sort anti-gravity field, which allows breasts to behave as if in microgravity. It's also what allows Godzilla and friends to become 50 stories tall, and lets ninjas run up the side of a skyscraper.

daysanew

  • Bay Watcher
    • View Profile
Re: DF Stat facebook app?
« Reply #14 on: March 30, 2010, 09:08:10 pm »

I like the concept idea of creating a profile pic.
I'm gonna take sometime to try and figure out dfhack tools, hopefully I can get it figured out and draw up a plan of getting some basic stats
Logged
Pages: [1] 2