Fitting Retroplayer into XBMC
#1
Something I've been meaning to ask for a while.

How does Retroplayer fit in with the rest of XBMC?

Things like scrapers, add-ons, controllers ect

Do you have a brief overview of how these things work?
Reply
#2
there will be an improved controllers API, a games library, scrapers (AFAIK based on heimdall), a generic games addon API, a dedicated games extension point, ...
Reply
#3
Right now the RetroPlayer branch has been stripped of almost everything to focus on the player. It fits together like follows:

Image

Across the 9,700 lines of code that make up that diagram (excluding the joystick API), only 40 lines of XBMC code have been touched. The joystick API touches some XBMC code, but the API itself doesn't change significantly - only the implementation.

The RetroPlayer branch also includes a bare-bones My Games window that mimics the My Videos window. Sources can be added, and Python add-ons specifying "game" as their type will show up under "Game Add-ons".

There are also some modifications to the python/json interfaces so that RCB can better integrate with games, but these modifications won't be part of the initial pull request (for reviewability).
Reply
#4
Excuse my ignorance regarding development procedures - but is it possible these additions could be merged into future 'official' builds of XBMC?
Reply
#5
Thanks garbear, excellent explanation as always!

@speeko, yes it will be merged into the official development builds at some point. But only when its ready Wink Big projects like this take time.
Reply
#6
So excited with this!
Reply
#7
(2014-05-19, 12:57)da-anda Wrote: there will be an improved controllers API, a games library, scrapers (AFAIK based on heimdall), a generic games addon API, a dedicated games extension point, ...

To expand on da-anda... RetroPlayer is a small part of the upcoming game experience. The vision is a "hit enter and it works" experience similar to videos. To do that, we'll need the following components beyond RetroPlayer:

Controller API on steroids
the first step (~75% finished) is to re-implement the existing but limited Joystick API. The next step is a new API that can support button combos and context-sensitive (per-emulator) configuration, ultimately via Python script

Games library
waiting on finding an ORM library. I wrote a proof-of-concept picture library using a homebrewed ORM layer, so once we get a not-sucky ORM this will be a piece of cake.

Shaders
I'm not a rendering guru, so I'll need some help with these.

Heimdall
unfortunately, XML scrapers don't fit into this vision. Why not? games pose several challenges over videos - multiple platforms, series, regions, versions/mods/hacks, homebrew, etc. While a realistic accuracy here may be ~80%, let's (optimistically) assume we can write a scraper with close to 99% accuracy. Now torrent 10,000 ROMs. Shouldn't take more than a day. As accurate as our scraper is, we still have over 100 titles that need to be individually corrected. XML scrapers simply don't scale.

When the time comes for me to focus on Heimdall, accuracy will be engineered directly into the scraper. I'll probably aim for four 9's (99.99% accuracy). I have a couple extra terabytes lying around, it's just a matter of building a corpus of several hundred thousand ROMs that heimdall can be tested/trained against until this accuracy is reached.

PyRomInfo
Will provide game data to Heimdall extracted directly from the ROM itself. A proof-of-concept has been finished and supports about 10 platforms currently.

Scraping from python plugins
RetroPlayer can play public domain roms directly from web servers, so scraping from Python plugins lets us ship a game library pre-populated with thousands of ROMs on the web, many of which are clones of popular titles.

Save state compression
What if every frame of every game ever played in XBMC was recorded, and you could perform random seeks to any place in a game's history? Advanced compression algorithms make this problem tractable.

Exposing save states to Python
Write-access allows for trainers. Read-access allows extended info to be exposed to XBMC, like player health, rupee count, game progress, etc. On that note...

Trainer add-ons
Please yes.

quick edit: how could I forget about multiplayer??


While I've made progress on some of these items, the rest are still a twinkle in the corner of my eyes (and not critical to the vision). Developing this stripped-down featureless RetroPlayer is kind of a drag because I've been looking at much of the same code for a year and a half, but I'm working hard to get it out the door so I can hack on some of these more challenging features.

And I omitted a secret feature because it completely and utterly smashes the vision, particularly the "hit enter" part (don't worry, the "and it works" part stays). It would blow too many minds if I announced it now. Once people finally acclimate to an emulator where you "hit enter and it works", I'll re-evaluate whether the world is ready for my expanded vision.
Reply
#8
Garbear, this is awesome! Thanks so much for the amount of work you have put in thus far. Save-state compression would be absolutely ridiculous!!

Is there an easy way of rapidly building Retroplayer on/for OpenELEC, without having to reinstall/rebuild OpenELEC? I would like to build/test against the environment it will be used in, and be able to keep up to date with the latest patches, whilst allowing others to still use the HTPC.

Is there a list of smaller discrete jobs that you can hand out to people in order to lighten your load? I am not a python expert (yet), but would love to help out if I knew where to start. Being able to rapidly build/patch for OpenELEC would help in this. I know a couple of people in a similar position.

I also have a couple of thoughts about what the unannounced earth-shattering feature might be:
- ROM streaming from the internet from some sort of archive.
- Internet/LAN multiplayer
Reply
#9
(2014-05-22, 04:27)garbear Wrote: While I've made progress on some of these items, the rest are still a twinkle in the corner of my eyes (and not critical to the vision). Developing this stripped-down featureless RetroPlayer is kind of a drag because I've been looking at much of the same code for a year and a half, but I'm working hard to get it out the door so I can hack on some of these more challenging features.

Brilliant stuff Smile

Having seen many open source features come and go in my time, I'd definitely say treat it in single stages.
Reply
#10
having the generic game API I'd not call the player itself "retroplayer" but maybe "gameplayer" or something else more generic. Really looking forward to this.
Reply
#11
@garbear - input the number "42" and it plays the game you have in your mind? ^^
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#12
(2014-05-22, 04:27)garbear Wrote: And I omitted a secret feature because it completely and utterly smashes the vision, particularly the "hit enter" part (don't worry, the "and it works" part stays). It would blow too many minds if I announced it now. Once people finally acclimate to an emulator where you "hit enter and it works", I'll re-evaluate whether the world is ready for my expanded vision.

Probably completely off here, but my hope is that it's piping video/audio data from other applications into XBMC, so that desktop games/applications could be viewed/exited in a remote-friendly environment. Imagine the possibilities that would open up if you could launch your Steam library and run the output into an XBMC "AppPlayer" add-on. Big Grin One can dream!
Reply
#13
(2014-05-22, 22:20)maruchan Wrote: Probably completely off here, but my hope is that it's piping video/audio data from other applications into XBMC, so that desktop games/applications could be viewed/exited in a remote-friendly environment. Imagine the possibilities that would open up if you could launch your Steam library and run the output into an XBMC "AppPlayer" add-on. Big Grin One can dream!

Uh, woah! That'd be awesome, but I can't even fathom how that'd work!
Reply
#14
little update on how retroplayer fits in with XBMC:


Image



this is the current layout of the retroplayer project. it is centered around two APIs, the Game API (connects retroplayer to game clients) and the Hardware API (connects game clients to input). the Hardware API moves all of the joystick code out of XBMC and into binary add-ons. i have also started working on support for the Retrode and retrode-like devices through the media reader sub-API.
Reply
#15
Quite the adjustment! Any particular reason for the changes or just learning by doing?
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
Fitting Retroplayer into XBMC00