Kodi Community Forum
Games Library (Game & Emulator database + launcher) development project, help wanted! - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
+---- Forum: RetroPlayer Development (https://forum.kodi.tv/forumdisplay.php?fid=194)
+---- Thread: Games Library (Game & Emulator database + launcher) development project, help wanted! (/showthread.php?tid=40715)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20


- Lugaidster - 2009-04-28

I have a question. Is something like Steam Overlay possible? That would be a great way to keep in touch with XBMC while playing games without "breaking the magic" and leaving the game.

Not that I'm suggesting to dedicate resources right now for this. I think the right thing to do would be to get a Game/Emulator launcher for one and for all. But it would still be nice in a not so far future.

I might even try to do something like that if I knew how the overlay works.


- leo2 - 2009-04-28

Lugaidster Wrote:I have a question. Is something like Steam Overlay possible? That would be a great way to keep in touch with XBMC while playing games without "breaking the magic" and leaving the game.

Not that I'm suggesting to dedicate resources right now for this. I think the right thing to do would be to get a Game/Emulator launcher for one and for all. But it would still be nice in a not so far future.

I might even try to do something like that if I knew how the overlay works.
Can you explain exactly what is the "Steam Overlay" that you suggesting?


- EMK0 - 2009-04-28

steam overlay is basically a menu the goes on top of the steam games. so you could for example press a button and it shows a menu on top of the game with options like your friends list options and so on.

this is an example

Image

while in game you press a binded button and that screen shows up ontop of the game so you don't need to minimize to access those things like friends/servers and so on.


- spiff - 2009-04-28

quite likely support code in the games....


- EMK0 - 2009-04-29

yea that's probably true for steam but for Xfire defently not they manually make the overlay work for there games. one other example that the games don't support a overlay in there code is http://www.gameoverlay.com/.


- Lugaidster - 2009-04-30

Steam overlay works on steam games and on non-steam games. I read a bit on it and they use (probably) dll-injection to inject code in directx calls to EndScene then they render the overlay and then they call DirectX's EndScene. I read somewhere that this works for DX9 games I don't know how they do it for DX10 games or OpenGL games. I haven't tried any ID game on steam as of yet so I don't know.

Steam overlay even works for Gears of Wars, and that is relevant because Gears of Wars is quite nasty when it comes to modded files or whatever.

Edit:

As a proof consider Crysis (which is not made by Steam):

Image

Edit2:

Steam overlay is confirmed to work with OpenGL (tested with quake III demo), DX9 and DX10 (tested with crysis in dx10 mode, I set it through the command line option).

This should be simpler to implement in linux since AFAIK there's only OpenGL in there. Windows is a whole other beast since you have DX7-10 (with each version having it's own perks) and OpenGL.

Last Edit (I promise):

I found a link from steam saying that their overlay works with every version of dx (7 to 10) and opengl also. Not working with directdraw though.


- EMK0 - 2009-04-30

i had an idea about this would it be possible to have an overlay that can load python scripts? this way it would make it much easier to mod the overlay for specific options for different emulators/games?


- Lugaidster - 2009-05-01

the issue here isn't to control xbmc through the overlay but to create a way to draw that overlay no matter what api the game uses and what os you are in.


GameLibrary UI Thoughts - leo2 - 2009-05-01

I'm currently working on the GameLibrary branch, and I have some unsolved issues that I would like to share with you:

1. What type of Directory would the user add as a source? will it be the Games folder (with folders)? will it be the "Start Menu" folder (with shortcuts)? both of them?

2. What happens when the user clicks on a scanned game directory ? will the files in the folders will be displayed? will the game executable will run? what if there are more than one executable in the directory, how would XBMC should know which one is the game executable?

3. In the "Library Mode" you can browse by Genre, Platform, etc.. but how should the other software be accessed (for e.g firefox), it's not a game, and it has no info from games database, so it won't be in the library at all...

4. will the user be able to add a single executable into the database or only it's folder?


- Rand Al Thor - 2009-05-01

Quote:I'm currently working on the GameLibrary branch, and I have some unsolved issues that I would like to share with you:

1. What type of Directory would the user add as a source? will it be the Games folder (with folders)? will it be the "Start Menu" folder (with shortcuts)? both of them?

2. What happens when the user clicks on a scanned game directory ? will the files in the folders will be displayed? will the game executable will run? what if there are more than one executable in the directory, how would XBMC should know which one is the game executable?

3. In the "Library Mode" you can browse by Genre, Platform, etc.. but how should the other software be accessed (for e.g firefox), it's not a game, and it has no info from games database, so it won't be in the library at all...

4. will the user be able to add a single executable into the database or only it's folder?

Hey leo! First off, I just wanted to say that I really appreciate what you are doing. This is an amazing project! I can't wait to see this in action. Now, let me take a stab at some of these and let you know how I personally would like to see them function.

Quote:1. What type of Directory would the user add as a source? will it be the Games folder (with folders)? will it be the "Start Menu" folder (with shortcuts)? both of them?

I think there should be an option when adding a folder to this section of the library. "Add Single Folder" or "Add Root Folder." If you have a bunch of games in their own folders under c:/Games/ then you add the root folder and it scans recursively. If you just want to add firefox you add single folder C:/Program Files/Firefox/

This is pretty similar to what they use in the movies library. They have an option for "scan recursively" although I think that "single folder" and "root folder" are better explanations IMHO.


Quote:2. What happens when the user clicks on a scanned game directory ? will the files in the folders will be displayed? will the game executable will run? what if there are more than one executable in the directory, how would XBMC should know which one is the game executable?

I think it should run the executable. Opening up the context menu should give you an option to "set game options" Here you should be able to add parameters for launch ie "-f" etc. Either that or have a box for launch parameters when you first setup the game folder.

I don't see any reason why there should be more than one .exe in a single folder.

Quote:3. In the "Library Mode" you can browse by Genre, Platform, etc.. but how should the other software be accessed (for e.g firefox), it's not a game, and it has no info from games database, so it won't be in the library at all...

I think that instead of a "games library" the entire project should be named something like "programs library" and games will be just a subsection of the project.

How about having another option when adding a folder to specify what you are adding? You would choose "Program" or "Game." Then when you navigate to the "Programs Library" the hierarchy would be as such:

Program Libraray/
Programs/
firefox.exe
handbrake.exe
Games/
Genres/
Platforms/
Title/

So there would be two top level choices from the programs library. Games or programs. I don't really see a need to separate programs into genres so they can just be listed. Then the skinner can have a button on the home screen called "games" that links to the games node or one called "programs" that links to the programs node. To deal with how programs show up in the library, you could have it default that any Program gets added to the library as "Programname" and uses the default icon. If the user really wants to get fancy they could use an .nfo if you really wanted to give information about what firefox does and have a folder.jpg in the firefox folder to change the icon. Just like the movies library.

Quote:4. will the user be able to add a single executable into the database or only it's folder?

I think for simplicity sake we should limit it to a folder. It just seems like you might have to deal with way too many variables if someone has a bunch of .exe's in a single folder and they have some added as single .exe's some as the root folder etc etc.




On a final note, using an overlay as suggested before, would add a lot to the implementation of programs and games into XBMC. It would keep the transition from fullscreen XBMC to Game and back as seamless as possible so you don't "break the magic." That way you could also pause a game and fade in XBMC to queue some music, then seamlessly fade back to your game. Then while playing your game, bring up the player controls to skip a song. Even if we decide that only a very small bit of xbmc can actually be overlayed on the games/programs, like playercontrols, it will still be an amazing addition.

Cheers,
Rand


- marlboroman1 - 2009-05-01

I've checked out your branch and it's very impressive I'm really glad you have stepped up and really got to grips with this. As for me at least the is the last major component that is still missing form the ports.

I think that it would be more intuitive if the executives or shortcuts could be added as a source directly. Currently as it stands .exe .link are not recognised as valid extensions in add source UI adding these extensions would greatly increase usability. I found that adding the desk top folder as source work quite well as would adding any folder filled .link extensions so both methods have there advantages.

The disadvantages adding folders from the start menu and program files leads to you having unnecessary sub folders files visible in GUI. The other issue with adding directory's as sources to the program window is that when you enter the programs window I want find programs ready to launch not a folder called programs.

I personal don't use library mode in xbmc but if wanted normal apps in the library could use the "set content" determine category ie audio, video, security, creative, office, net and then scan them in using the name only. if you wanted to try retrieve info then perhaps apps "Read me" could used or an .info (user created). As a final thought could info be pulled form Softpedia they must index the majority of apps in existence.


- GeoLoLJ - 2009-05-02

Leo, this games/programs branch sounds very interesting and promising. Very good job and ideas you have there. Thank you for contributing your time for such a great project.
Rand's points are good.

Quote:1. What type of Directory would the user add as a source? will it be the Games folder (with folders)? will it be the "Start Menu" folder (with shortcuts)? both of them?

I am not a coder/programer myself, so I don't know anything that could help you. So, I am asking if there is a problem with the folders finding the correct executable, wouldn't be possible to have all the executables we want to add in the library in a shortcuts folder?
"Add Single Folder" and "Add Root Folder" also sounds handy.

I don't have any problem "writing" the info for the games by hand or copy-paste from some sources if the online source is not possible to have.
The games/programs collection that we have I believe is not that huge comparing to music/movie/series collection, so that wouldn't be a problem I think.

Quote:2. What happens when the user clicks on a scanned game directory ? will the files in the folders will be displayed? will the game executable will run? what if there are more than one executable in the directory, how would XBMC should know which one is the game executable?

This would be nice if it would work like the movies do. Like having a Play/Run button which would launch the desired application. Or clicking on an executable would pop up a window saying something like "You have chosen to run %application. Proceed? Yes-No"
This way you could avoid the missclicks.

Quote:3. In the "Library Mode" you can browse by Genre, Platform, etc.. but how should the other software be accessed (for e.g firefox), it's not a game, and it has no info from games database, so it won't be in the library at all...

For the programs, as Rand said, users can always make an nfo with the information inside if that is possible.
As for the overlay, sounds very nice, but won't something like that "consume" more resources? Or am I wrong? Rofl

I really hope your project to be released :>
Do not hesitate to contact me if you need any kind of help (well, apart from coding that is Laugh )


- sho - 2009-05-02

If the plan is to go beyond games/emulators (which would be the way to go IMHO), then setting contents is probably unavoidable.
Categories could be (but not limited to):
-Programs
would read metadata from the binaries, name, icon etc. OR nfo file plus tbns, local Fanart etc.
(similar to the Music Video nfo scraper)
-Games, would allow scraper selection. I assume native games and emulators could benefit from different scrapers.


- leo2 - 2009-05-02

Thanks for your replies, here's the suggested idea based on your tips:
1. There should be a support on nfo files, so user can add manually information to a file.
2. The scraper will have to supply a type attribute "Game" or "Software"
3. There will be a scraper for games (from allgames) and a scraper for software (from softpedia)
4. The main library items will be "Games" and "Software"
5. The next level will be the Genre of the game or software.
6. The third level will be the games/programs themselves.
7. In the Library mode, the game/program will launch when clicking on it.
8. In the Directory mode, the game/program will launch when clicking on the executable. (clicking on folder will show the executables in it)
9. Recursive scan will search for executables but will use the folder names (optional) to get the info of them.
10. In that case, if more than one executable found in the same directory, the user will be prompted to choose one of them, and it will be saved for later use. (there should be an option to replace default executable after being set)
11. There will be an option to recursivly scan the folder and get info for each one of the executables even if it's in the same folder.
12. There will be add a single file to the directory and get info for it.
13. There should be an option to limit the platform of a games directory to a single platform so the automatic information lookup will be more accurated.


- Rand Al Thor - 2009-05-02

That sounds pretty awesome Leo2! The only suggestions I would make is to use "Programs" rather than "Software." Also, for the submenu of the "Programs" section you have listed that it will go to genres first, then the actual executables. Unlike games, programs don't have established genres. I suggest either scraping the info straight from the .nfo (that is how I make "custom" genres with my movies, anytime a new genre is found it is automatically added to the library, even if that genre does not appear on IMDB or any of the other scraper sites), or if you are adding a program manually (without an .nfo) have a set genre dialog where you can manually enter a genre that will be added to the library.


Cheers,
Rand