Fusilli Client (Alternative C4A Client)


you're submitting 'pandora', right?
Wrong. ;) I commit 'pandora', 'gcw', 'caanoo', 'linux' (for PC... I should fix this for Windows), even 'gp2x'!

You just don't have to pass the system as parameter because the sparrowNet KNOWS on which hardware it runs. ;)
 
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)
Okay, but in fact on the Pandora you don't need to copy any lib for the fusilli client. ;) That is the reason, why I implemented static linking in the first place. Otherwise you would have to carry the libsparrowNet.so with fc and furthermore call it with "LD_LIBRARY_PATH=. ./fc", which would make it way harder to use than necessary. ^^
 
I just realized I never thought about the case, that no c4a-prof is created yet and the Sparrow-C4A-Manager or some random program tries to create one.

How to put the c4a-prof if more than one sd card with pandora/appdata folder exists?

For now I will choose the first one found.

Of course it would make more sense to use the sd card the program is started from.

However it seems not to be too trivial to get this information, so I will come back to this later. For it works...

The biggest problem is, that I don't know, how skeezix's C4A Manager searches the c4a-prof. Does it use it's appdate or does it search with pnd_locate first, too?
 
c4a-manager is clever-dumb; it uses the same appdata as c4a-mame if I recall, so just refers to c4a-prof filename (no path or searching is needed.)

Which is to say, it works with the c4a-prof on the sameSD card as the pnd is on; if you move c4a-maager into NAND, well, not going to be too happy with integration I'm sure :)

Everyone should use pnd_locate, as a consistent way to find it, I imagine :/

jeff
 
I implemented caching.

It seems to work.

Use it with "./fc --cache push …". Of course it does work together with --test-me. It does save a c4a-cache in the same folder as the c4a-prof. If the cache is empty the file will be removed. If some lines of the cache are committed, but some still missing, the committed lines will be removed from the cache. The cache file is a binary, so for "hacking" the system you need at least a hex editor. :)

I tested it with the fusilli client and snowman_easy, because there is no playground for such things. So the user "test" did a lot of very very bad scores in snowman_easy. ^^ Would be nice, if you could remove them, skeezix. ;)

You will find the precompiled binaries as always here:

https://github.com/theZiz/fusilli-client/tree/master/build

hf!
 
Ok sound nice.

So, multiple game will all cache on the same file, and when connection is available, all "cached" score will be submited?
 
So, multiple game will all cache on the same file, and when connection is available, all "cached" score will be submited?
Yes, but only if ANY submit is triggered. No transmission at pulling atm. ;) (But would be an idea)
 
So, multiple game will all cache on the same file, and when connection is available, all "cached" score will be submited?
Yes, but only if ANY submit is triggered. No transmission at pulling atm. ;) (But would be an idea)
Ok that's nice :)
I'll update all my c4a enabled titles with your client, using the --cache option then.
Nice, but PLEASE test it well before doing so! I don't want to break all your c4a enabled titles at once. ;)
 
I will use fc with "Squared!" soon.

But I'm probably much slower than ptitSeb ;) .
It would be nice, if you would port it to other systems like the GCW Zero afterwards. :) Shouldn't be too hard.
 
I fear this is a little beyond my knowledge ATM. :(

I'm using FreePascal/Lazarus for this and I have no idea how to (cross) compile for other handhelds.

But I will probably include the source code when I feel the game is somewhat finished.

Maybe someone else can do a compile for the GCW Zero then (or assist me in trying to do so).
 
I made a new release of the Fusilli client.

With "./fc info cache" it is now possible to see, how many submits are cached and with "./fc emptycache" all submits can be submitted without the need to submit another score.
 
Last edited by a moderator:
Ziz, one quick question:

I quess it's intended behaviour that --cache and --test-me cannot be used at the same time, right?

Not that it's very likely to get duplicate scores in "Squared!" in a real life situation - at least it's not as bad as with "Flappy Bird" :p - so I don't really need that.

I just thought it would be a "cleaner" solution if I wouldn't post a score that is already there...

[EDIT]

Ah, and while I'm still at it - what about new options for the "pull" request?

I would like to get a "filtered" view (only the top score per player, only the scores of the current month).

What do you think about this?
 
Last edited by a moderator:
Hi,

I've been in holidays, that is the reason for the late answer.

Ziz, one quick question:

I quess it's intended behaviour that --cache and --test-me cannot be used at the same time, right?

Not that it's very likely to get duplicate scores in "Squared!" in a real life situation - at least it's not as bad as with "Flappy Bird" :p - so I don't really need that.

I just thought it would be a "cleaner" solution if I wouldn't post a score that is already there...
They can be used at the same time. But the implementation isn't that good at the moment.If you use only --test-me, this happens:

  • fc tries to download the scores of the game. If that fails (e.g. because of a missing internet connection) fc terminates without a score being submitted
  • fc checks, whether the score is already in the download score list. If yes, fc terminates to not send score twice
  • fc tries to submit the score. If that fails (e.g. because of a missing internet connection) fc terminates without a score being submitted
  • fc tries to submit the cached scores.
As you can see: If the score is already at the server the cache is not emptied. I should improve that.
Now for the --cache case:

  • fc tries to submit the score. If that fails (e.g. because of a missing internet connection) fc terminates without a score being submitted, but saves it to the cache!
  • fc tries to submit the cached scores.
No big surprises I think.
And now for the interesting part. --cache and --test-me:

  • fc tries to download the scores of the game. If that fails (e.g. because of a missing internet connection) fc terminates without a score being submitted
  • fc checks, whether the score is already in the download score list. If yes, fc terminates to not send score twice
  • fc tries to submit the score. If that fails (e.g. because of a missing internet connection) fc terminates without a score being submitted, but the score is cached.
  • fc tries to submit the cached scores.
So you can use both parameters. But what happens, if you trust in the --test-me feature and sends every score every program run? I you have network connection, everything is fine. But if not, you will cache duplicates of the same score and submit everyone if the cache is pushed.
So I should improve two things:

  • Clearing the cache even if no score is submitted because of --test-me
  • Testing against the global score AND the cache if --test-me is set
Until I fix this: Don't use both features at once. ^^
[EDIT]

Ah, and while I'm still at it - what about new options for the "pull" request?

I would like to get a "filtered" view (only the top score per player, only the scores of the current month).

What do you think about this?
Shouldn't be too hard. Skeezix server already has the possibility to send only the scores of a specific month (which I implemented in libsparrow3d, too).I will put this to the next version with --test-me and --cache at the same time fixed.

Greetings,

Ziz
 
Thanks for your response and for improving fc.

I didn't manage it to get things ready by now, too.

(Unfortunately not because of holidays but because of beeing extremely busy with real life stuff :( )

I hope to get to it in the next couple of days, though - and thanks to your response I know what to expected - that's great!
 
I uploaded a new version, which fixes a bug in handling big caches.

All users of the fc client, please update this as fast as possible! The old version my freeze forever if the cache is quite large!
 
Back
Top