[Release] Compo4all MAME - ladder/scoreboard competition for classic arcade games :)


pmprog

DNF (Did Not Finish)
Joined
Apr 25, 2011
Messages
4,150
ii) It originally pulled down scores; heck, prior to that I had it updating the game RAM live to show the current-to-the-second scores, but it really hated that ;) But it became a little problematic to work, so I'll revisit it later -- ie: right now it tries to reset to 0000 sort of score, or to the 'default' of a freshly booted machine; then when you submit a score RAM chunk or file, it breaks it up and compares to the known state sent down to the client .. if it sent position 3 as 1234 and position 4 as 2345, and it sees something else there, it knows theres been a change.. nice and easy. But if its a case when Jim sent up score 1234, and it sends that down to you, and then you submit a score Bob 2345, then it sees new Jim and new Bob, and it has to work out that Jim 1234 is old; or is it you, also? etc.. a lot of cases suddenly, and I found it not perfect all the time.. we ended up with 'looper' scores, where it'd go down to you, abck up and you'd end up with 5 peopel getting the 'same score' ... more accurate to just send down a blank, and then you look online.
If you updated the score file only before loading the game, you wouldn't get any problems which are "new" or "old" that you don't get anyway. Though I do like the zeroing of the scoreboard idea.
.... another bigger problem was .. if you send down a score-table to a game, then the game will only register your score if you beat _those scores_;
Yeah, Asmo also mentioned that, which is a good point
iv) maybe; its possible, but I want you to be able to see the score table, even if you can't play Also, I want to rewrite the client entirely, so dont' want to spend too much time fiddling with it :)

v) Yes, the architecture an handle non-MAME game;s ie: arguments sent to the server include platform and game submitting (pandora and advmame it uses now.) Coudl just as well be something else. I'd like to expand the client and client/server protocols a bit more, have a league-id and so on. ie: I'm intending on havaing a raspberry-pi league, and a desktop-league, and so on; and the online website shoudl let you pick which league, or even cross polinate.. let you compare your scores against a desktop scores, if you wasnted to, etc.
Cool, if there's anything I can help with, give me a prod :)
 

lomaxx

Active Member
Joined
Sep 22, 2008
Messages
747

JePP

Member
Joined
Aug 29, 2005
Messages
366
Location
Germany
Just wondering, will this be forever restricted to MAME games due to technical limitations, or are there actually any other systems out there where it'd be possible to extract high scores or anything similar (certain ingame achievements for example)?
 

ptitSeb

Serial Porter
Joined
Aug 15, 2012
Messages
8,997
Age
48
Location
France, near Lyon
I think skeezix has mentioned in the numerous pages before that it could be integrated to other games, but he was not ready to open that yet (I think). But it was a few pages ago, so maybe it changed.

I would be happy to integrated that in some of the games I ported, beeing opensources like cannonball or closed sources like MiniSlug (if this integration doesn't force it to be open source of course).
 

levi

Still fresh, damnit!
Joined
Oct 6, 2008
Messages
14,781
Location
Somewhere off the coast of the EU
As I understand it, the main problem is that old consoles don't have save data, so you need to dump the whole system RAM and dig through the whole lot to try to determine where the score may be stored which is a lot of work. It's a lot easier for MAME games as the MAME team have already done a lot of that work when they added score saving to MAME.


There are a handful of GB and GBC games with battery backed saves, I believe, and the vast majority of GBA and PS1 games can be emulated well on the Pandora and have flash save systems. Those would be a candidate for simpler addition to c4a, although it would still be a chunk of work for Skeezix to add those emulators to the front end, and to my mind it's questionable whether we need it when we have all these arcade games to play.


As I recall he has expressed an intention to convert the guts of c4a into a library, which could be added to other emulators or native games.
 
Last edited by a moderator:

skeezix

Internal Development
Joined
Mar 11, 2003
Messages
8,064
Website
www.codejedi.com
c4a is multiple parts; theres the client side and the server side; most of the heavy lifting so far is on the server.. the client is dumb, it just sends raw binary up/down with the server, and the server figures out whats in the binary data.

For adding stuff that has a well defined hi-file (sram save, say), its 'just' a function of someone digging through the save binary to find the hi score (or whatever value(s) could be used to measure people in rankings.) I'm not interested in doing all that for various other platforms.. its a lot of work, and time is limited, so I must necessarily keep my focus limited or else thigns will fall apart; that said, _other devs_ could well get in and do that part. I could post up a github of it, and people could add in support for other platforms game by game, and good to go. Need some serious bodies to do it, and we can.

Right now, the 'framework' (its really not very advanced, a prototype really, not seriously well designed) is simple about scores; for games, with all sorts of objectives and measurements, its hard to think how we could make a simple ranking, and how we could 'secure it' in a simple cross platform manner. If we ignore security and just trust people not to hack it and cheat, then a simple ranking system as we have now coudl be put into any old game quite easily .. ie: the game could just post its score, and it could determine the score any way it needs to. The trick is in games that don't have a simple scoring... c4a right now is just score-oriented, whereas many games may have many other metrics.

So ..

To just add simple score-based rankings to homebrew games, not too hard.

Phase 2 or 3, could be to try and support just a centralized data dump from games.. so c4a coudl show games, but not reallly ranking them (unrankable games? or are all games rankable somehow? not all games shoudl be ranked, such as casual just-for-fun games..)

Anyway, if anyone _wants_ their game to be in c4a (Microbes maybe?) and wants to discuss it, I'm certainly game; it shouldn't be too hard.

As is, obviously posting a simple score or score-table to c4a is trivial, and magicly shows up in milkshakes frontend. Or maybe we'd have to implement the 'league id' concept I've mentioned, so one c4a server could host multiple leagues, and one league could be per-indie-game or per-compatible-indie-games; microbes and pandora-outrun in a league could work, say, but a separate league to the mame emulated games? or same league?

Anyway, as you can see, lots of questions, but none of them really hard ones.. just a matter of working through them, and figuring out what the questions are :)

I've been very busy in RL the last few weeks, so not able to hit the boards as much as I like, but hopefully life going back to normal again soon.

If anyone is interested in joining into c4a, I'm certainly game for it as well.

jeff
 

skeezix

Internal Development
Joined
Mar 11, 2003
Messages
8,064
Website
www.codejedi.com
FWIW, the steps are..

i) I publsh a pnd-file that is only a c4a-profile-manager; essentially the existing c4a-mame, minus mame; just a tiny little pnd, that lets you add/edit/create profiles (and eventually, other stuff.) Probably uses the existing c4a-mame appdata dir, jsut to avoid creating confusion for the c4a-mame folks...

ii) pnd-makers pull down my 'sc' client binary ("spaghetti client" .. before I called it c4a publicly, I called it 'spaghetti' and 'spaghetti client' .. hence "sc")

In a pnd, to post a score, its something like: "./sc so push GAMECODE SCORENUM" for a 'score only' type of game. Something like "./sc so push battlejewels 12345".

--> this implicitly tries ot find the active c4a-profile and use it in the push

You could alternatively use wget or curl to form a http post yourself, but 'sc' client makes it pretty easy .. one command line and your'e done.

In a pnd, to pull down a score table in html or json, you can do an http GET (or use wget/curl which are in the firmware already, to save yourself writing any code!), and then display or parse the values, and display them

iii) On server, I need to drop in a conf file; it varies in complexity, but for pure score-only type games, its as simple as doing something like creating a few lines in a file:

./spaghetti-server/gameconf/battlejewels.conf

{

  handler scoreonly

  module n/a

  platform pandora,windows

  shortname battlejewels

  longname "Battle Jewels"

}

.... but you guys don't need to care about that. For arcade games, I have to build a piece of code for the game-specific handling, use various handlers, etc..

jeff
 

ptitSeb

Serial Porter
Joined
Aug 15, 2012
Messages
8,997
Age
48
Location
France, near Lyon
Looks cool ! :) I should be able to add score for minislug easly with that, because there is no no difficulty level in game, and the credit mode does not influance score !!!

For cannonball, I think I would have to create a menu entry "c4a" in game menu, so all parameters (difficulty, trafic, time, rom used) is fixed...
 

skeezix

Internal Development
Joined
Mar 11, 2003
Messages
8,064
Website
www.codejedi.com
OKay, let me get my head straightened out this week, and get a few changes into the client and server, and get a 'sc' build out there for peopel to drop into their pnds ... and then we can go crazy :)

Someone go bug some of our popular homebrew guys, see if we can get a few :)

jeff
 

skeezix

Internal Development
Joined
Mar 11, 2003
Messages
8,064
Website
www.codejedi.com
OKay, I've mostly got the server and client code ready to trial (ie: mostly untested, but seems to work ;)


Anyone who wants to put it into their game? (a score-only situation, where you can rank by a single number. It can be ascending or descending ranked.)


(Descending is for something like a time trial, where 1sec is better than 10sec; normally a game is ascending, so 300pts is better than 10pts)


jeff


(this score-only plugin doesn't support level-numbers or the like.. so you can't do time trial per-level here, say, and have 10 levels each with their own time; this is pure single-number submission. Will add another plugin for multi-table or something, down the road..)
 
Last edited by a moderator:

pmprog

DNF (Did Not Finish)
Joined
Apr 25, 2011
Messages
4,150
Yeah, send me the details. I'm going to make a modified version of Spout :)

Unless, I suppose PokeParadox objects, but he released the code, so I'd be surprised if he did
 
Last edited by a moderator:

klapse

Central Scrutinizer
Joined
Aug 30, 2012
Messages
1,932
Location
Germany
Anybody else remember Gravitar or Space Duel (awesome asteroids sequel by Atari). Both are very zen games. Good for the mind.
Two of my favorite games :) Space Duel broke my head .. play multiplayer with player-versus-player (not assistance) mode.. one guy has a engine, the other guy has a gun, and they're tethered with an elastic band. Its totally mental! One guy trying to ram the other dude into asteroids while he furiously tries to shoot them :eek:
I know. Tethered mode was pretty mental, though I only played in coop. Trying to evade asteroids while *not* dragging your teammember into an asteroid was also great fun!


The other great thing about the game was how playing it well involved seeing the whole screen at once and not just focussing on individual targets. This is what I meant by "zen". Your mind expands beyond linear into a multi-object-tracking orb of awareness.
 

pmprog

DNF (Did Not Finish)
Joined
Apr 25, 2011
Messages
4,150
With the thought of expanding the game base, is now the time to start reconsidering a more complete "Xbox Live"-esque community system? so you can share content (ie, custom maps/levels) as well scores etc.

And this isn't a "will somebody please code me a..." request, because I'm more than happy to write code for the project
 

ptitSeb

Serial Porter
Joined
Aug 15, 2012
Messages
8,997
Age
48
Location
France, near Lyon
Well, the Canonball author is writting a track editor, called LayOut... So may be at some time in the future, a community to share custom tracks for Cannonball may be possible :) It would be very cool to have !!!
 

foxblock

Asleep
Joined
Jun 17, 2009
Messages
1,563
Location
Germany
Anyone who wants to put it into their game? (a score-only situation, where you can rank by a single number. It can be ascending or descending ranked.)
I am interested to integrate this into Project4

There currently is only one mode with a simple integer-based score, so it should work well.

It's a WIP, but online highscore functionality was on the top of my todo anyway.

Scoring might change in the future, but I guess there is no problem in flushing the highscore table every now and then (and if there is I can at least try to privately implement it for development purposes).

In the future this could be expanded (through the mentioned binary highscore files with custom parsing) to submit replay files for each run, too (those files track input during your play and can recreate a session on any device, so another player can watch a run of a certain highscore - can be used to validate stuff or just explore tactics and stuff like that).

I guess open sourcing Compo4All once you feel confident with it will be very beneficial :)

Anyway, thanks for such a great project!
 

skeezix

Internal Development
Joined
Mar 11, 2003
Messages
8,064
Website
www.codejedi.com
Sorry, today got blown up .. I'll try to do some quick additional testing tonight to fix a nit, and then post some details for adding your own games.. tonight ;) (I'm in EST..)

As to code.. yeah, I'm not really happy with it as is, as it was really quick and prototypy.. really lame; it works, but its not as organized as I'd like it :)   am planning a server-side rewrite to do some massive changes (invisibly to users); not sure if I'll post source before or after. I'm just too lazy :) I shoudl just post it, get it done with... but with not enough time to breath, everything is frill :/

pmprog .. not sure _This_ is the time to tackle such a discussion; ie: once we get into building online chat and game join rooms, teaming up, challenging, guilds, etc etc etc massive integration, it becomes a huge project, that will take months to get anywhere. Maybe lets get things stable here and then move onto that while I sit with this and rewrite .. or maybe kick of discussion; need to gather up a pile of devs and get it going. I'm just too blanked out this week to think that far ahead, so .. ducking :)   We need to gather requirements, see what peopel woudl like (in abstract non-code terms), and then after a week or two of that, then start figuring out the actual higher level design..

jeffbrainfried

edit: ah, 2sec fix.. so server and client are good to go for dropping your games in .. I'll post some particulars tonight though. And then its tiem to bust out the osciliscope and ifnd out why my one pcboard is flaking out on me.. (another project I'm working on ;)
 
Last edited by a moderator:

skeezix

Internal Development
Joined
Mar 11, 2003
Messages
8,064
Website
www.codejedi.com
okay, here goes.. adding c4a client to your indie game/port/whatever, for a basic 'score only' leaderboard.

Summary:

- call 'sc'

- send me a conf file :)

Details...

- pull down the current sc client (todays build is http://www.skeleton.org/tmp/c4a_spaghetti_client_20130404.zip )

- 'sc' is the client in the zip; drop it into your pnd somewhere you know how to run it (root of pnd, in a ./bin/ dir, whatever you want)

- invoke sc from your executable or shell script like this:

   ./sc MODE OPERATION GAMENAME PLATFORM SCORE

   example: ./sc so push testpong pandora 123

   'so' is 'scoreonly' plugin for the server

   'push' means 'sending a score up, deal with it'

  'testpong' was a test game I used; it doesn't exist :)

  'pandora' is the platform for you to use for ALL thigns running on the pandora

  '123' is the score I'm submitting to the server .. plaintext, no encryption or binary or funny business for this plugin

... thats it (for now.)

Assumptions:

- player has already used c4a mame (or the upcoming c4a profile editor standalone pnd) to create their profile. 'sc' will auto scan the guys /media/ devices to find a profile in the expected places.

- viewing the online score table can be done...

   .. via online lame text website http://skeezix.wallednetworks.com:13001/links_1

   .. via milkshakes mega awesome website ... I've added some stuff to our protocol, so he can filter in/out indie titles versus arcade titles (or by game genre :) .. up to him to filter or sort how he sees fit, if at all

   .. via your own game! do a curl or wget against something like: http://skeezix.wallednetworks.com:13001/json_1/GAMENAME/    <-- this will get you a JSON dump of the current score table, to display as you see fit!

   .. via your own game lazier .. do a curl or wget against my lames text site, using the links it shows .. this would let you get my lame HTML-formatted version; you could just show _that_ as is, or strip out the <...> bits and show it as text. But parsing JSON is really really easy, especially since its not like I'm doing fancy JSON or nesting much. No need for a fancy JSON library, just parse it yourself. If needed, I can write a C and python parser for you .. doing it in javascript or python ir _trivial_. Doing it in C is an hours work.

Caveat:

- with _current_ c4a-mame client, if we add your game to the server.. it'll show up in c4a-mame as a playable game, that won't do anything when clicked. Don't worry, I'll update c4a-mame soon not to do that :)

Server:

- before your game can have scores registered to it, we need to add a conf-file to my server.. feel free to either:

  a) let me create it for you, just send me the shortname gamename, and the long name, and genre and so on.., or

  B) send me a completed config file attempt, and I'll use it or fix it as needed

The testpong conf looks like this. They're plain JSON btw: g_testpong.conf:


{
    "active": true,

    "plugin": "scoreonly",
    "module": null,
    "alltime": true,

    "platforms": [ "pandora", "windows" ],

    "league": "all",
    "shortname": "testpong",
    "longname": "Test Pong",
    "ordering": "ascending",
    "dispunit": "points",
    "type": "int",
    "field": "indie",
    "genre": "test"
}
 

What that all means is:

    "active": true,      <- make it available to the engine; if false or omitted, the conf file might as well not exist

    "plugin": "scoreonly",    <- needed to make it work (Selects which plugin to handle the scoring)
    "module": null,              <- n/a for now; param to the plugins
    "alltime": true,               <- whethor you want an all-time scoreboard, or just monthlies

    "platforms": [ "pandora", "windows" ],     <- platforms to support the scoreboarding; for now, n/a

    "league": "all",               <- selecting which league(s) this game is supporting; for now, n/a
    "shortname": "testpong",   <- critical: this specifies the name used internally, and for you to submit scores to. Must be unique, one word, lowercase.
    "longname": "Test Pong",  <- critical: the display name for the game .. something people will see
    "ordering": "ascending",   <- not yet used, but will be .. tells order of score; usually ascending, but time-attack scores will be lower-is-better so "descending"
    "dispunit": "points",          <- right now I dont' show a unit, but if I do.. it'd say "points" after the number in the tables
    "type": "int",                      <- type of score submission; right now, always "int"
    "field": "indie",                   <- 'field' .. the type of game. Right now only "arcade" and "indie" are known, but feel free to recommend others. This is so milkshake (say) can provide a drop-down listing types to show.
    "genre": "test"                    <- genre for the game; "platform", "shmup", "runngun", "beatemup", "maze" ... feel free to suggest others

Thats it.

the 'sc' client normally doesn't output damned near anything. I should build the debug version as well, but I dont' have it handy this second. If needed, ask me.. easy build. The debug version will at least say why things are failing.. the release version just fails with error codes. (When I first wrote it, code was part of the emus/games and not interactive at all, not intended to communicate...)

edit; I'd suggest also contacting milkshake about submitting a piece of artwork for the game, since (at least for now) it'll show up on his frontpage for c4a.openpandora.org ... he should put a form on the site to contact him or something ;) or perhaps my server should have the artwork and send links to it, to him... stick it into the conf file..
 
Last edited by a moderator:

Asmo

Advanced Member
Joined
Oct 18, 2008
Messages
2,279
The 'Recent Activity' bit on the main page hasn't been displaying anything today, just FYI in case it's not a sign of stuff being done out of sight ;)
 
Top