Game development: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
No edit summary
 
(34 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{mininav| [[Development]] }}
{{mininav| [[Games]] {{l2| [[Development]] }} }}


{{notice|Kodi-Game branch has not been merged into Kodi mainline. As such, this is a work in progress, and many things are subject to changes.}}
This page is about Kodi-Game branch of Kodi which tries to implement a gaming environment for Kodi. The goal is to start, stop and play video games like you can currently play video files. Kodi-Game constist of several addons and subsystems which should be described on this page to minimize confusion. The current [[development builds]] are based on Kodi 17 (Krypton) and introduces a lot of changes, and for this reason the information you can find on the forum and here in the wiki might be outdates and may not apply. Official repository is on [https://github.com/kodi-game github].  
{{incomplete}}


This page is about Kodi-Game branch of Kodi which tries to implement a gaming environment for Kodi. The goal is to start, stop and play video games like you can currently play video files. Kodi-Game constist of several addons and subsystems which should be described on this page to minimize confusion. The current version based on Kodi 15alpha2 introduced a lot of changes for this reason information for 13.2 or previous versions you can find on the forum may not apply. Official repository is on [https://github.com/kodi-game github].
== FAQ ==
Answers to some questions you may have.
=== Is it possible to support system X on platform Y ===
RetroPlayer uses [http://www.libretro.com/ libretro] to emulate systems. The current support matrix can be found at [[Game add-ons]]:
{{:Game add-ons}}
=== mupen64plus (n64) is not working ===
Mupen64plus and some other emulators (PSP, Dolphin) requires OpenGL / OpenGL ES rendering extensions to libretro which is currently not implemented in the current upstream kodi-game branch. See [https://github.com/a1rwulf/xbmc a1rwulf's] repository for his "retrogl" implementations if you would like to help the work being done for these systems.


== End-users (non-programmers) ==
== End-users (non-programmers) ==
Line 23: Line 10:


== Developers (programmers) ==
== Developers (programmers) ==
If you are a C/C++ developer and like to help then great! Please checkout the [[Compiling Kodi-Game]] article to get started. Currently this build instruction is for Linux operating-systems on x86/x86-64 based hardware only.
If you are a C/C++ developer and like to help then great! Please checkout the [[Compiling Kodi-Game]], and [[Porting_Libretro_cores_to_game_add-ons|Porting Libretro cores to Game Add-ons]] articles to get started. Currently this build instruction is for Linux operating-systems on x86/x86-64 based hardware only.


You should be proficient in [http://en.wikipedia.org/wiki/Programming_language C/C++ programming language], and although not really required knowledge of [http://en.wikipedia.org/wiki/OpenGL OpenGL] or other [http://en.wikipedia.org/wiki/Multimedia multimedia] programming is a plus, as well as prior [http://en.wikipedia.org/wiki/Multi-platform cross-platform] or [http://en.wikipedia.org/wiki/Porting porting] development experience.
You should be proficient in [http://en.wikipedia.org/wiki/Programming_language C/C++ programming language], and although not really required knowledge of [http://en.wikipedia.org/wiki/OpenGL OpenGL] or other [http://en.wikipedia.org/wiki/Multimedia multimedia] programming is a plus, as well as prior [http://en.wikipedia.org/wiki/Multi-platform cross-platform] or [http://en.wikipedia.org/wiki/Porting porting] development experience.


== Who is who ==
== Technical Overview ==
Kodi Game is the project name for all infrastructure changes which need to be made in the Kodi source code. This work also includes a highly modified input system ready for gaming requirements.
 
=== RetroPlayer ===
=== RetroPlayer ===
Project name for all infrastructure changes which need to be made in the Kodi source code and cannot be delivered as addons. This work also includes a highly modified input system ready for gaming requirements
RetroPlayer is a new player core for Kodi Entertainment Center. It is similar to the video player and audio visualizer, but it plays games instead of movies and music. Player core that plays games using game add-ons. Despite its name, it can play all types of games, not just retro ones. Games can be paused, fast-forwarded, and rewound in realtime. Save states are created similar to bookmarks, allowing for quick browsing of the game's play history. 3D support (for N64, etc) is being worked on.
 
===  Game API ===
Game API ?


=== Libretro ===
=== Game Add-ons ===
A well defined interface to handle the communication between a frontend (Kodi with RetroPlayer) and an Emulator Core (e.g. nestopia).  
Stand-alone games or emulators that does not use the Libretro API. Possible examples could be, Nvidia GameStream via Limelight or WINE capture could possible through the Game API.


=== Emulator Core ===
=== Libretro API===
An Emulator Core does the actual work of emulating a system. Due to the Libretro interface it is possible to re-use good working and well tested emulators for the RetroPlayer platform. Every emulator that supports libretro can easily be integrated.  
:{{Main|Libretro}}
Libretro is a C-based interface between user-facing frontends and emulator backends. This frontend and backend concept allow several different (non-Kodi) frontend projects to use the same Libretro core emulators.<ref>http://forum.kodi.tv/showthread.php?tid=292270</ref>


=== Input addon ===
Kodi's Game API has Libretro Wrapper which is 1:1 compatibility with the libretro API, so all libretro cores are valid game add-ons. Libretro itself is a well defined interface to handle the communication between a frontend (Kodi with RetroPlayer) and an Emulator Core (e.g. nestopia).


An input addon is used to map the buttons/axis on your physical input device, to the buttons/axis of your virtual system. This is necessary because different retro systems usually have different button layouts. (game.controller.<platform>)
By ultilizing libretro, the Kodi Game project will also become a part of the larger software ecosystem based around libretro, this a other third-party projects use libretro as well as all to some degree collaborage and share code with upstream libretro.


== Subsystem Information ==
==== Libretro Cores ====
*[[Game API]] - ?
An Emulator Core for Libretro API ([http://www.libretro.com/ www.libretro.com]) that does the actual work of emulating a system. Due to the common Libretro API interface it is possible to re-use good working and well tested emulators for the RetroPlayer platform. Every emulator that supports libretro will be relatively easily to integrate once the project matures.
**[[Game Client Addons]] - ?
 
**[[Libretro Wrapper]] - ?
=== Peripheral API ===
*[[Hardware API]] - ?
A way to interface DIY hardware with Kodi. Currently game controllers, and in the future also media readers for cartridge adapters.
** [[Input API]] - ?
 
** [[Media Readers API]] - ?
=== Peripheral Add-ons ===
*[[RetroPlayer]] - ?
The peripheral add-ons provides access to many joystick and gamepad interfaces across various platforms. An input addon is used to map the buttons/axis on your physical input device, to the buttons/axis of your virtual system. This is necessary because different retro systems usually have different button layouts. A controller configuration utility is also in the works.
** [[RetroPlayer Savegames]] - ?
 
== Subsystem Architecture ==
<!--[[File:RetroPlayerTransparent.png|400px|right]]-->
*Game API - ?
**Game Client Addons - ?
**Libretro Wrapper - ?
*Hardware API - ?
** Peripheral API - ?
*** Peripheral Add-ons - ?
*** Peripheral Buses - ?
*** Input Library - ?
** Media Readers API - ?
** Input API - ?
*RetroPlayer - ?
** RetroPlayer Savegames - ?
====Architecture development discussions:====
* [http://forum.kodi.tv/showthread.php?tid=195552 Fitting RetroPlayer into Kodi]
* [http://forum.kodi.tv/showthread.php?tid=225126 Peripheral Input Documentation]
* [http://forum.kodi.tv/showthread.php?tid=224328 Porting Libretro cores to Kodi]
* [http://forum.kodi.tv/showthread.php?tid=211138 New input API discussion]


== Game add-ons ==
== Game add-ons ==
{{See|Game add-ons}}
* [[Game add-ons|Existing ported Game Add-ons]]
* [[Porting_Libretro_cores_to_game_add-ons|Porting Libretro cores to Game Add-ons]]
** [[Libretro]]


== Communication: ==
== Communication: ==
Line 58: Line 72:
*kodi forum: http://forum.kodi.tv/forumdisplay.php?fid=194
*kodi forum: http://forum.kodi.tv/forumdisplay.php?fid=194


==See also==
== FAQ for Kodi-Game branch==
*  [[Development]]
Common questions and answers regarding testing and development of Kodi-Game branch.
** [[Linux development]]
 
=== Mupen64plus (n64) is not working ===
Mupen64plus and some other emulators (such as PSP, Dolphin) requires OpenGL / OpenGL ES rendering extensions to libretro which is currently not implemented in the current upstream kodi-game branch. See [https://github.com/a1rwulf/xbmc a1rwulf's] repository for his "retrogl" implementations if you would like to help the work being done for these systems.


==External Links==
=== Is it possible to support system X on platform Y ===
* ?
Kodi Game branch includes a wrapper for [http://www.libretro.com/ libretro] to emulate multiple systems via emulator cores for its common libretro API. The current support matrix can be found in the [[Game add-ons]] wiki article.
 
=See also=
* [[Games|Gaming in Kodi]] - Index of game related articles
** [[Game management]] - A guide to managing game files for and in Kodi
*** [[Game playback controls]] - A guide that describes the player controls and menus for gaming in Kodi
*** [[Game controllers]] - Guides for configuring gamepads and jooystick controllers in Kodi
**[[Game add-ons]]
*** [[Porting Libretro cores to game add-ons]]
**** [[Libretro]]
** [[Game development]] - A guide to developing games for Kodi
** [[Compiling Kodi-Game|Compiling Kodi with RetroPlayer]]
 
=External Links=
* [http://www.libretro.com/ Libretro]


[[Category:Development]]
[[Category:Development]]
[[Category:RetroPlayer]]
[[Category:RetroPlayer]]
[[Category:Gaming]]
[[Category:Gaming]]
== References ==
<references/>

Latest revision as of 10:15, 19 July 2020

Home icon grey.png   ▶ Games
▶ Development
▶ Game development

This page is about Kodi-Game branch of Kodi which tries to implement a gaming environment for Kodi. The goal is to start, stop and play video games like you can currently play video files. Kodi-Game constist of several addons and subsystems which should be described on this page to minimize confusion. The current development builds are based on Kodi 17 (Krypton) and introduces a lot of changes, and for this reason the information you can find on the forum and here in the wiki might be outdates and may not apply. Official repository is on github.


End-users (non-programmers)

You are probably reading this because you would like to download a finished Kodi application or complete OpenELEC image with nice out-of-the-box experience. We are sorry but such build does not yet exist at the moment. This page will be updated with links to available builds if and when such release become available.

You can help still help if you are a more experienced computer user and are able to compile Kodi-Game branch yourself, please see the developers sections below. Also, spread the word about this project to your friends and family, we are sure they will enjoy it too as it matures.

Developers (programmers)

If you are a C/C++ developer and like to help then great! Please checkout the Compiling Kodi-Game, and Porting Libretro cores to Game Add-ons articles to get started. Currently this build instruction is for Linux operating-systems on x86/x86-64 based hardware only.

You should be proficient in C/C++ programming language, and although not really required knowledge of OpenGL or other multimedia programming is a plus, as well as prior cross-platform or porting development experience.

Technical Overview

Kodi Game is the project name for all infrastructure changes which need to be made in the Kodi source code. This work also includes a highly modified input system ready for gaming requirements.

RetroPlayer

RetroPlayer is a new player core for Kodi Entertainment Center. It is similar to the video player and audio visualizer, but it plays games instead of movies and music. Player core that plays games using game add-ons. Despite its name, it can play all types of games, not just retro ones. Games can be paused, fast-forwarded, and rewound in realtime. Save states are created similar to bookmarks, allowing for quick browsing of the game's play history. 3D support (for N64, etc) is being worked on.

Game API

Game API ?

Game Add-ons

Stand-alone games or emulators that does not use the Libretro API. Possible examples could be, Nvidia GameStream via Limelight or WINE capture could possible through the Game API.

Libretro API

Libretro is a C-based interface between user-facing frontends and emulator backends. This frontend and backend concept allow several different (non-Kodi) frontend projects to use the same Libretro core emulators.[1]

Kodi's Game API has Libretro Wrapper which is 1:1 compatibility with the libretro API, so all libretro cores are valid game add-ons. Libretro itself is a well defined interface to handle the communication between a frontend (Kodi with RetroPlayer) and an Emulator Core (e.g. nestopia).

By ultilizing libretro, the Kodi Game project will also become a part of the larger software ecosystem based around libretro, this a other third-party projects use libretro as well as all to some degree collaborage and share code with upstream libretro.

Libretro Cores

An Emulator Core for Libretro API (www.libretro.com) that does the actual work of emulating a system. Due to the common Libretro API interface it is possible to re-use good working and well tested emulators for the RetroPlayer platform. Every emulator that supports libretro will be relatively easily to integrate once the project matures.

Peripheral API

A way to interface DIY hardware with Kodi. Currently game controllers, and in the future also media readers for cartridge adapters.

Peripheral Add-ons

The peripheral add-ons provides access to many joystick and gamepad interfaces across various platforms. An input addon is used to map the buttons/axis on your physical input device, to the buttons/axis of your virtual system. This is necessary because different retro systems usually have different button layouts. A controller configuration utility is also in the works.

Subsystem Architecture

  • Game API - ?
    • Game Client Addons - ?
    • Libretro Wrapper - ?
  • Hardware API - ?
    • Peripheral API - ?
      • Peripheral Add-ons - ?
      • Peripheral Buses - ?
      • Input Library - ?
    • Media Readers API - ?
    • Input API - ?
  • RetroPlayer - ?
    • RetroPlayer Savegames - ?

Architecture development discussions:

Game add-ons

Communication:

FAQ for Kodi-Game branch

Common questions and answers regarding testing and development of Kodi-Game branch.

Mupen64plus (n64) is not working

Mupen64plus and some other emulators (such as PSP, Dolphin) requires OpenGL / OpenGL ES rendering extensions to libretro which is currently not implemented in the current upstream kodi-game branch. See a1rwulf's repository for his "retrogl" implementations if you would like to help the work being done for these systems.

Is it possible to support system X on platform Y

Kodi Game branch includes a wrapper for libretro to emulate multiple systems via emulator cores for its common libretro API. The current support matrix can be found in the Game add-ons wiki article.

See also

External Links

References