Page 1 of 1

Gamerzilla

PostPosted: 30 Mar 2020, 00:17
by dulsi
I've decided to implement my idea of a game trophies in Hubzilla. Don't use this initial commit. This is only a really awful UI. There is no way to enter trophy information yet. My plan is to implement a library that will upload results so it is easy for developers to make use of the feature. (I haven't decided if it will be a standalone library or start/communicate with a separate process.)

Documentation for developing hubzilla plugins is bad. It references an older API. (I had hopes when looking at it that I could easily support friendica but it looks like that would probably need separate code.)

https://github.com/dulsi/gamerzilla

Re: Gamerzilla

PostPosted: 30 Mar 2020, 01:23
by Julius
Sorry to be a bit dense, but what exactly are "trophies" in this context? Something like Steamworks Achivements? Or something related to competitive play?

But nice that you chose Hubzilla as a platform, it is a really nice system over all.

Re: Gamerzilla

PostPosted: 30 Mar 2020, 06:20
by dulsi
Playstation has trophies. Steam has achievements. I don't remember what Xbox calls them.

Hubzilla lacks plugin documentation and it hasn't been updated. For example, I'm like to add the achievements to the menu like photos but I haven't found an example that does that. PHP is also not my favorite but I understand that it is easy to deploy in a lot of places.

Re: Gamerzilla

PostPosted: 30 Mar 2020, 12:33
by Lyberta
Achievements are really ruining gaming. Many time I was enjoying game but then wanted to do achievements and it frustrated me so much I just completely hated the game after I got them. I absolutely hate achievements.

Re: Gamerzilla

PostPosted: 31 Mar 2020, 00:14
by Technopeasant
Then don't use them...

Though honestly I do not particularly enjoy them either. A challenge is much more rewarding if it is something you decide to do yourself.

Re: Gamerzilla

PostPosted: 31 Mar 2020, 23:37
by Lyberta
Technopeasant {l Wrote}:Then don't use them...


Yes. I run it single player games under Steam emulator so I don't get achievements. Well, devs got my money, if they label me "pirate" for wanting to play games in sanity they can go F themselves.

For multiplayer games it's much harder. Back in the day I used Steam Achievement Manager to wipe my achievements but then I would get them again during "normal" play. And if I instead use SAM to unlock all achievements at once, people would look at my Steam profile and call me "hacker". Also, SAM itself is a C# application which means running it on Linux would be a royal pain.

So yeah, achievements are one of many cancers that are killing gaming and I'm happy that there is no achievements in FOSS games so far.

Re: Gamerzilla

PostPosted: 06 Apr 2020, 00:32
by dulsi
Started working on the library for games to use. Not usable yet.

https://github.com/dulsi/libgamerzilla

The library will allow the game to store all the information locally and not talk to hubzilla if you want. I don't really expect most programs will want to have a setting screen for hubzilla. Instead it will connect to another process so that only that process would need to be configured. A program like Gnome Games would be ideal for that process. Unlike steam you wouldn't be required to use that program nor would you be required to record trophies anywhere.

I'm not sure how communication will be done. I'm thinking unix domain socket on linux. My concern is what would be best for supporting flatpak and snap. (I personally don't like those packaging method but I understand some do.)

Re: Gamerzilla

PostPosted: 20 Apr 2020, 01:35
by dulsi
Started working on the server implementation in the library. It doesn't do anything yet. I decided to go with abstract unix domain sockets for communication. They are Linux specific which is unfortunate. Microsoft added support for them apparently which leaves Macs and BSD. Of course, issue ticket suggests it doesn't work.

Re: Gamerzilla

PostPosted: 20 Apr 2020, 01:59
by Julius
Hmm, not an expert at all on that topic, but I have seen most non-performance critical apps to use TCP loopback instead? Maybe that works more universally?

Re: Gamerzilla

PostPosted: 20 Apr 2020, 15:35
by dulsi
Julius {l Wrote}:Hmm, not an expert at all on that topic, but I have seen most non-performance critical apps to use TCP loopback instead? Maybe that works more universally?

It probably is more universal.I may end up needing to do that in the end to support most platform. Since only socket creation is different, it wouldn't be hard to code support for both. I was initially going to do TCP loopback and then saw an article about how some security problems have occurred due to people assuming that was safe only to have javascript in the browser connect to the TCP loopback service. (Granted web browsers might have unix domain sockets available or add it and create the same problem.)

Re: Gamerzilla

PostPosted: 30 Apr 2020, 21:32
by dulsi
LibGamerzilla and Gamerzilla plugin have progressed. I now have images for games. Work has progressed on making LibGamerzilla work with a game manager and offline. Readme has a section for game developers to use it although not everything is implemented yet. The API for game managers is still in progress. I have a simple program to relay actions but nothing else yet.
Image

Re: Gamerzilla

PostPosted: 02 May 2020, 01:25
by Sockstah
I really like the idea behind this.
There have been a couple of suggestions and implementations of an "open source Steam" but really what they are are just frontends for downloading open source games. It seems what a lot of people think Steam is is just a storefront, ignoring all the Steamworks infrastructure it provides.
This achievement system could be the first step towards an open ecosystem like that. I'd really like to see that and I think it's something that could help gaming in general become more free (as in freedom) or at least help popularity of open source games. When Steam came to Linux their popularity took a steep decline I'd say (not that I have data to back this up) and I don't just think this is because proprietary games are better, I think it's also because of a lot of the conveniences Steam provides. Open source games and the ecosystem built around them really lag behind in that regard.

Re: Gamerzilla

PostPosted: 04 May 2020, 00:13
by dulsi
I got SWIG running and tried adding support to seahorse adventures. It can work although I just hardcoded giving me the one trophy to try it out. I don't really like the interface.

{l Code}: {l Select All Code}
        gamerzilla.GamerzillaInit(False, os.path.join(data_home, "seahorse-adventures") + "/")
        seahorse = gamerzilla.Gamerzilla()
        seahorse.short_name = "seahorse_adventures"
        seahorse.name = "Seahorse Adventures"
        seahorse.image = "data/gamerzilla/seahorse-adventures.png"
        seahorse.version = 1
        seahorse.numTrophy = 1
        trophy = gamerzilla.GamerzillaTrophy()
        trophy.name = "Defeat Boss"
        trophy.desc = "Defeat all levels and boss in order"
        trophy.maxprogress = 1
        trophy.true_image = "data/gamerzilla/win1.png"
        trophy.false_image = "data/gamerzilla/win0.png"
        trophyArray = gamerzilla.new_GamerzillaTrophyArray(1)
        gamerzilla.GamerzillaTrophyArray_setitem(trophyArray, 0, trophy);
        seahorse.trophy = trophyArray
        gameid = gamerzilla.GamerzillaGameInit(seahorse)

Right now you need to create a trophy array. Then create each trophy and set the value in the array. I think maybe I need a function to add trophies instead. Something like:

{l Code}: {l Select All Code}
        gamerzilla.GamerzillaAddTrophy(seahorse, "Defeat Boss", "Defeat all levels and boss in order", 1,"data/gamerzilla/win1.png", "data/gamerzilla/win0.png")

Re: Gamerzilla

PostPosted: 12 May 2020, 03:54
by dulsi
LibGamerzilla now compiles and works on windows. It uses localhost network connection to communicate with the game manager process at the moment. You may be able to use abstract unix domain sockets on windows 10 but I doubt it is available on other versions additionally the Fedora cross-compiler doesn't support it. So I went with the simple solution for now. I have a little more cleanup to do. Right now it is not encoding everything. A game with an ampersand in the name won't work.

Re: Gamerzilla

PostPosted: 13 May 2020, 00:03
by Julius
Cool. Thanks for sharing the progress. So any games particularly that you would like to integrate it with?

Re: Gamerzilla

PostPosted: 13 May 2020, 04:23
by dulsi
No games in particular. I just want to get as much support as possible in games and game managers. I expect to add it to Ostrich Riders and Shippy 1984. Once it is fully usable I'd like to post about it on itch.io and see if I can even get closed source indie games to adopt it.

Re: Gamerzilla

PostPosted: 18 May 2020, 13:49
by dulsi
The server functionality now fully syncs. It needs a little more to it's interface to be usable. Then I just need to get it into a game manager.

Re: Gamerzilla

PostPosted: 17 Jun 2020, 21:02
by dulsi
I've created a video to explain the basics of Gamerzilla. Plan is to tag a version of libgamerzilla and get it included in Fedora.