Fusilli Client (Alternative C4A Client)


Ziz

Advanced Member
Joined
Jan 15, 2006
Messages
3,584
Hi,

as some of you may know, I made an alternative way of submitting scores to skeezix c4a network via a library.

However for some use cases C-libraries are not so good, like adding it in a port (system("...") is always so simplest way) or even adding it in python or any other not-C-language.

So I decided to make an staticly linked (you don't need my library) one-file-application like skeezix original spaghetti client, too. Of course I loose some advantages of the library approach (like threading support), but it still has some advantages towards the spaghetti client

  • Time out support built in
  • Precompiled for different targets. At the moment I commit (you don't need to compile it on your own) forPandora
  • X86 Linux (32 Bit)
  • GCW Zero
  • Caanoo
  • Wiz
  • Dingux
  • OpenDingux
  • GP2X with Open2x
  • GP2X with Original Firmware
Furthermore I need to start Windows for a windows built, but that should be easy, too. It just have to do it sometime™.So I don't use the same interface as the spaghetti client. The mode, operation and platform don't make much sense for my approach, so you just have to call
./fc GAMENAME SCORE [TIMEOUT]The Timeout is optional, if you don't pass something 10000 ms will be used for now. However I took the return values of the spaghetti client, so my application is compatible. A bit. ;)
Unfortunately I couldn't test it really yet, because all my applications use the library support, there is no dummy-game, which is never shown to end users I could spam to, so I couldn't test without submitting invalid scores. So if any of you (maybe the porter of DoubleCross?) would like to try my application instead of the spaghetti client, that would help me a lot in finding bugs.

I myself will try to commit some scores later, when I e.g. got a score in one of my games, but didn't submit it yet. In that case, it is not invalid... ;)

(I know I could submit something like 1 point to puzzletube, but this is... ugly)

This is the github: https://github.com/theZiz/fusilli-client (License GPL3)

These are the prebuilt binaries, which are free to download and to republish: https://github.com/theZiz/fusilli-client/tree/master/build

Greetings,

Ziz
 
Last edited by a moderator:
For windows builds, I suggest just setting up a mingw cross compiler. Most distros have one in repo and they make building for windows so much less painful.
 
Hi,

after this this post I thought about improving the fusilli client (respectively sparrowNet) with support for caching scores in the appdata folder of the Sparrow-C4A-Manager and to resend everything unsend, if any other program is using sparrowNetC4A or the fs the next time.

But I had some other idea of feature, which sparrowNet offers, but not the spaghetti client. Especially for the connection to python or other script languages it could be easier to use such a binary instead a library. So I thought about this new features:

  • Adding a module as first parameter. This would break the compatibility, but nobody uses fs for now, so this doesn't matter. The new call for uploading scores would be:
    ./fc push GAMENAME SCORE [TIMEOUT]. Very similar to the spaghetti client. ;)
  • Adding a module for getting the name C4A account informations, e.g.
    Code:
    ./fc info name
    could give the long name,
    Code:
    ./fc info shortname
    the short name or
    Code:
    ./fc info all
    all informations including name, shortname, email adresse, PW and UUID.
  • Adding a module for downloading all possible games like
    Code:
    ./fc pull games [TIMEOUT]
  • Adding a module for downloading the scores of a game like
    Code:
    ./fc pull game GAME [TIMEOUT]
  • Adding a module for downloading only my scores of a game like
    Code:
    ./fc --test-me pull game GAME [TIMEOUT]
  • Adding a module for submitting scores only, if this score isn't uploaded yet from me:
    Code:
    ./fc --test-me push GAMENAME SCORE [TIMEOUT]
  • Furthermore I could add modules for editing the c4a profile if necessary. Or even creating one! Or checking, whether one exist or not. E.g. your application could check, whether a c4a account exists, if not, make an ingame mask for entering the needed data and create it on your own using the fussili client!(I thought about a ready-to-use mask myself, but for this I would need a lot of work, it wouldn't work for everybody (only people using SDL I think) and last but not least, it would probably not fit to your program very well, even if I let you adjust at least the font and the colours)
All this would make only a few work (except caching, which I would need to implement first), but however before I add this to the fusilli client: Is anyone interested in having this features in such a binary and would use it afterwards?
Greetings, Ziz
 
Last edited by a moderator:
Looks nice Ziz.

The pull and other info command, they just give the result to stdout I guess?
Exactly, line by line.
So, if you are interested, please tell me, in what you are interested. Especially the caching isn't trivial and I don't want to do more work than necessary. :p
 
Last edited by a moderator:
Looks nice Ziz.


The pull and other info command, they just give the result to stdout I guess?
Exactly, line by line.

So, if you are interested, please tell me, in what you are interested. Especially the caching isn't trivial and I don't want to do more work than necessary. :p
What is cache? The abality to store score and only send to c4a server when network is on or something like that?
 
Looks nice Ziz.

The pull and other info command, they just give the result to stdout I guess?
Exactly, line by line.
So, if you are interested, please tell me, in what you are interested. Especially the caching isn't trivial and I don't want to do more work than necessary. :p
What is cache? The abality to store score and only send to c4a server when network is on or something like that?
The idea is, if the client is not able to send the score, to cache it and to try it again the next time it is called - doesn't matter who calls him. ;)

The best idea would be of course is central daemon, which resends scores if the network is on again. But such a solution should be made by skeezix or maybe even added to the firmware.

I for myself do a different approach atm for Puzzletube: I save every score in a local highscore, doesn't matter whether it were submitted or not. At start I check for the available scores of mine at skeezix's server and if a score is not available, I commit it. With this I don't need an extra cache (except the local highscore) and I don't need to check, whether a submit worked.
 
I would be interested in using your fusilli client (a great name BTW :D ) for my upcoming C4A support in Squared!

I would at least use pushing and pulling scores.

Pulling account information and testing for an existing account would also be nice.

I would even like to offer complete account editing - though I will probably need quite long for such a feature because my time is severely limited... :(
 
Last edited by a moderator:
I would be interested in using your fusilli client (a great name BTW :D ) for my upcoming C4A support in Squared!

I would at least use pushing and pulling scores.

Pulling account information and testing for an existing account would also be nice.

I would even like to offer complete account editing - though I will probably need quite long for such a feature because my time is severely limited... :(
Okay, I started to implement the new stuff. The help the file itself prints if you start it without parameters should explain, what is possible atm and what not:
Fusilli client Version 1.1.0.0
Built for Personal Computer
Usage: fc [OPTIONS] ACTION [ACTION OPTIONS]
These actions may be:
fc [OPTIONS] push GAMENAME SCORE [TIMEOUT]
* submits the score SCORE for the game GAMENAME using the optional
timeout TIMEOUT (in ms). The default timeout is 10000 ms.
* OPTIONS may only be --test-me atm. In that case a score is only
submitted if the score isn't uploaded at c4a yet for the player.
fc [OPTIONS] pull GAMENAME [TIMEOUT]
* gets all scores of the game GAMENAME using the optional
timeout TIMEOUT (in ms). The default timeout is 10000 ms.
* OPTIONS may only be --test-me atm. In that case a score is only
shown if it is from the owner of the profile.
* Except for using with --test-me no profile file is needed.
* Every score persists of four lines: Player name, short player name,
score and commit unix timestamp. So the output will be a multiple of
four lines long, e.g.
Evil Dragon
EVD
1337
1377323529
Ziz
ZIZ
667
1410088968
fc info ABOUT
* prints informations about the profile of the player
* ABOUT may be longname, shortname, password, email, prid or all.
For "all" all informations are printed linewise in the named order.
For now I uploaded a pandora version here:https://github.com/theZiz/fusilli-client/blob/master/build/pandora/fc/fc?raw=true

I tested it, it seems to work.

Caching I will implement a bit later, first I need to think about it better. However I hope this version already helps you. ;)

I am at work, so I can only provide a pandora version for now. The next days I will upload versions for other systems, too. ;)

Greetings,

Ziz
 
Last edited by a moderator:
Awesome :)

Random rushed thoughts follow..

Why not include some of the same args as the spaghetti-client, so that it'd be easy to drop into existing games without change? (ie: 'so' 'scoreonly' type module reference)

Its slick of you to add the info pulling and such .. that could be handy to a few people; make it easily parsed output for those who are scripting or json-averse.

Definitely a good idea to add a dummy game or two; could add some that are not shown to any of the interfaces (submission test only), but that may or may not be too useful; one that is shown in all the normal interfaces (and thus shown on Milkshake's c4a site, unless he scripts it to hide it) is probably wise as well. "TestGameIgnoreMe" or something.

I've finally got my net connectivity back (man, there was two weeks of hell for a guy who works at home).

Hmm, should almost add a date-of-submission argument to c4a, and thn sc or fc could include that; this would facilitate queueing of scores (ie: especially if they split across month boundaries, such as if you queue a score in one week while away, then come home and submit acores a week later.. shoudl be up to c4a server and game config to decide if it submits to prior month or to current one, perhaps.)

Maybe you want to add a basic queueing option.. ie: if push fails due to network connectivity (and not syntax etc), then drop it into a queue dir; then next push, run the whole queue diorectory worth. (Be it a directory of files, or just a json hash .rcfile or something.)

I'm okay with your client being the priamry one if everyone likes it; use mine as a 'reference' on for testing as I build features, and use yours as production in use, 'better than skeezix lame one' :)

I need to get back onto the c4a server rewrite, document an API, nail down features etc..

jeff
 
Awesome :)

Random rushed thoughts follow..

Why not include some of the same args as the spaghetti-client, so that it'd be easy to drop into existing games without change? (ie: 'so' 'scoreonly' type module reference)

Its slick of you to add the info pulling and such .. that could be handy to a few people; make it easily parsed output for those who are scripting or json-averse.
I thought about doing so. But simultaneously I thought also, that a person, which wants to migrate from sc to fc could also change the parameters a bit. Furthermore I can't stay really compatible at all, because fc is capable of more things than sc. So that's "one way" anyway. And if someone doesn't want to change anything, this person doesn't need fc at all. :)
Furthermore to stay total compatible I would need to support your "./sc MODULE OPERATION GAMENAME PLATFORM SCORE" call. You mentioned the MODULE. Your are right, I could copy that. But in fact I didn't understand, why I need "so" if I specify "push". But of course I could just copy it... Harder is the parameter "PLATFORM". For fc this isn't needed at all. What shall I do? ignore it? Break it at this point? Or even make the GCW submit Pandora scores if it wants? ^^

Definitely a good idea to add a dummy game or two; could add some that are not shown to any of the interfaces (submission test only), but that may or may not be too useful; one that is shown in all the normal interfaces (and thus shown on Milkshake's c4a site, unless he scripts it to hide it) is probably wise as well. "TestGameIgnoreMe" or something.
I think it would be best to just don't show it in curgamelist_1 ;)
I've finally got my net connectivity back (man, there was two weeks of hell for a guy who works at home).
Welcome back. :D
Hmm, should almost add a date-of-submission argument to c4a, and thn sc or fc could include that; this would facilitate queueing of scores (ie: especially if they split across month boundaries, such as if you queue a score in one week while away, then come home and submit acores a week later.. shoudl be up to c4a server and game config to decide if it submits to prior month or to current one, perhaps.)
Uh, you are right. I never thought of this problem...
Maybe you want to add a basic queueing option.. ie: if push fails due to network connectivity (and not syntax etc), then drop it into a queue dir; then next push, run the whole queue diorectory worth. (Be it a directory of files, or just a json hash .rcfile or something.)
That is the idea. However I will see, how exactly I save theses files. I think I will save it binary to avoid script kiddy attacks. So people need at least a hex editor to fake scores. ;) (Furthermore it is smaller...)
I'm okay with your client being the priamry one if everyone likes it; use mine as a 'reference' on for testing as I build features, and use yours as production in use, 'better than skeezix lame one' :)
Oh, I would not advise to do this for now. It needs definitely more testing! As I am using my library all the time, I myself didn't test it very well...

I need to get back onto the c4a server rewrite, document an API, nail down features etc..

jeff
I would love changeable sorting order :p
Greetings, Ziz
 
For info, I used fusilli client in Trosh. So waiting for Caching ;)

As it is, it works fine but is quite heavy on the dependency side...
 
Last edited by a moderator:
For info, I used fusilli client in Trosh. So waiting for Caching ;)
Nice! I will have a look at this the next days. :D
As it is, it works fine but is quite heavy on the dependency side...
Really? SDL_net and SDL are heavy? Most gaming linux system should have them preinstalled... Or am I missing something?
 
I still think you should submit the actual platform; ie: right now, even on Windows or gcw, you're submitting 'pandora', right? Why not paramaterize it and work it out at runtime what the platform is, or something?

(right now the server honestly does not care, it just records it; but someday, things will care, so people can divvy up the reports as to which platforms they wisdh to 'compete' against; and that'll be another procotol version and everything _anyway_, so it might just be a moot point, so feel free to ignore me ;)

jeff
 
For info, I used fusilli client in Trosh. So waiting for Caching ;)
Nice! I will have a look at this the next days. :D
As it is, it works fine but is quite heavy on the dependency side...
Really? SDL_net and SDL are heavy? Most gaming linux system should have them preinstalled... Or am I missing something?
Well, I just used my copy_libs.sh to copy updated libs from codeblocks to the PND and it copied a few things. I was mainly surprised to see SDL beeing copied in fact. But yeah, most of the time SDL is already a depedency of the game.

(I still use a custom built SDL in codeblocks to avoid micro-freeze when using SDL+GLES+GrabMouse)
 
Back
Top