Difference between revisions of "Development"
(→Compiling Software) |
(libpnd git times are out of sync because skeezix uses a wm, now you know) |
||
(13 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
+ | == General Game development == | ||
+ | Just start basic. Follow the Jump'n'Run tutorial (or any of the others). Copy their code. Change bits. Break it.. fix it. Write it over and over until you know what is happening where and why. Get a pandora or GP2X and cross-compile it for those platforms. Run your little creations on other devices (Android phones and iPhones are great). Little milestones like this will keep you motivated to continue learning. | ||
+ | |||
+ | Making a game, or programming a whole project is a massive undertaking. Be prepared to fail the first few attempts... quit at least 5 times only to come back and give it another go... and even then you might have only programmed Mahjong. If, at the end of all this, you are still keen, you can step it up to 3D graphics and start working on "bigger projects". | ||
+ | |||
+ | Remember.. no one can learn to program in a day... and I wouldn't expect anyone who started programming tomorrow to be able to produce a Mario clone, let alone quake 4 in a month. | ||
+ | |||
+ | ==Porting and Writing Software== | ||
+ | * If porting existing software, try the [[porting guide]]. | ||
+ | * If creating new code, then the [[development tutorials]] may be useful. | ||
+ | |||
+ | ==Distributing Software== | ||
+ | * [[Make and run simple PND]] - Quickly learn how to make PNDs (using Linux) for your software. | ||
+ | * Learn more about the [[Libpnd hub|PND file format]] that is used for distribution. | ||
+ | |||
==Kernel and Firmware== | ==Kernel and Firmware== | ||
* [[Development_Tools | Pandora kernel and Firmware reference information]] including SD card booting | * [[Development_Tools | Pandora kernel and Firmware reference information]] including SD card booting | ||
* [[http://bugs.openpandora.org/ Pandora Bug Tracker]], [[Reporting bugs]] instructions | * [[http://bugs.openpandora.org/ Pandora Bug Tracker]], [[Reporting bugs]] instructions | ||
− | * | + | * Learn more about [[Ångström#Submission_Workflow|submitting patches]] and getting involved in firmware and library development |
==Compiling Software== | ==Compiling Software== | ||
* [[Setting up a cross-compiler|Set up a cross-compiler]] to compile code for the Pandora on your PC. | * [[Setting up a cross-compiler|Set up a cross-compiler]] to compile code for the Pandora on your PC. | ||
− | * | + | * [[compile on the Pandora]] |
+ | |||
+ | == development tutorials == | ||
+ | == PND Quickstart == | ||
+ | See [[Introduction to PNDs]] for a nice and welcoming intro. | ||
+ | [http://www.gp32x.com/board/index.php?/topic/58363-two-tutorials/page__p__935745 quick make pnd tutorial] | ||
+ | For common tasks, see the [[PND Cookbook]]. | ||
+ | |||
+ | |||
+ | === GLBasic === | ||
+ | |||
+ | There is a [http://www.glbasic.com/ GLBasic] [[GLBasic tutorial|tutorial on this wiki]] which is still a work in progress, but should get new parts fairly frequently. More information can be found on the [http://www.glbasic.com/forum/ GLBasic forums]. | ||
+ | |||
+ | == SDL on Pandora == | ||
+ | |||
+ | [[SDL]] is NOT a game engine, but it will provide you with the foundations for putting stuff on the screen, getting keyboard and controller input and making sounds. All of these are basics in programming games. | ||
+ | |||
+ | You can locate a lot of SDL specific information at [http://www.libsdl.org] | ||
+ | |||
+ | === Getting started with SDL on the Pandora === | ||
+ | (This portion assumes you already have a dev environment ready) | ||
+ | |||
+ | First, you need to grab the SDL libraries, you can either compile them yourself or grab some pre compiled libs. | ||
+ | You can get the sources for SDL [http://www.libsdl.org here] and compile it yourself. | ||
+ | |||
+ | Or | ||
+ | |||
+ | You can get the pre compiled libraries [http://www.angstrom-distribution.org/unstable/feed/armv7a/base/ here] (they are named libSDL... etc). | ||
+ | These are ipk files so windows user might need 7zip in order to open them. | ||
+ | You will need both the 'normal' lib and the -dev library. | ||
+ | You might want to get the SDL_image, SDL_mixer and other SDL_* libraries, since these add to general functionality of SDL. | ||
+ | |||
+ | === Basic Pandora specific SDL Information === | ||
+ | |||
+ | See [[SDL Controls]] | ||
+ | |||
+ | === SDL Tutorials === | ||
+ | |||
+ | These tutorials assume you know the basics of C++ programming, and know your way around a C++ compiler. | ||
+ | |||
+ | * [http://www.gp32x.com/board/index.php?/topic/58490-yactfeau/page__view__findpost__p__940518 Getting started with SDL on pandora] | ||
+ | * [http://www.lazyfoo.net/SDL_tutorials/index.php Lazy Foo's Tutorials]. Not Pandora specific, but a good guide to getting your programming environment set up, along with many SDL tutorials. | ||
+ | * [http://iki.fi/sol/gp/ Sol's Graphics for beginners]. Not Pandora specific, but a good place to get started with SDL graphics coding. | ||
+ | * [http://jnrdev.72dpiarmy.com/ 2D Jump'n'Run Tutorial]. (Page not loading since at least 03/03/2011. Still available on [http://replay.web.archive.org/20090523104747/http://jnrdev.72dpiarmy.com/? archive.org]) | ||
+ | * [http://gpwiki.org/index.php/Category:All_SDL_articles The Game Programming Wiki's tutorials] | ||
+ | |||
+ | ==OpenGL on the Pandora== | ||
+ | *[[Porting_to_GLES_from_GL]] | ||
+ | *[[OpenGL ES 1.1 Tutorial]] | ||
+ | **[[Combining OpenGL ES 1.1 and SDL to create a window on the Pandora]] | ||
+ | *[[GLES]] | ||
+ | |||
+ | == The Kernel == | ||
+ | * [[Kernel build instructions|Compiling the Kernel from Git]] | ||
+ | * [[Kernel interface|Kernel Interface]] | ||
+ | |||
+ | == The Chipset == | ||
+ | * [http://www.peter-cockerell.net/aalp/ ARM Assembly Language Programming (1987)] | ||
+ | * [[Floating Point Optimization]] | ||
+ | * [[Assembly Code Optimization]] | ||
+ | |||
+ | == development tools == | ||
+ | ==Official Pandora Source Code Repository== | ||
+ | |||
+ | The [http://git.openpandora.org official source] is under GIT revision control; EvilDragon is the admin, but the repo has a web based browser built in.=== | ||
+ | |||
+ | The actual GIT repository is here: [http://git.openpandora.org/cgi-bin/gitweb.cgi] It is recommended that you read the [[Kernel_status#openpandora.org_git_structure | git structure]] information before going too far. | ||
+ | |||
+ | For ''stable'' released images, see other OpenPandora support pages. E.g. official forum [http://boards.openpandora.org/index.php/forum/41-pandora-os-superzaxxon-gnulinux/ software - pandora OS] news. | ||
+ | |||
+ | ==Pandora Specific Libraries== | ||
+ | |||
+ | ===libpnd - the Pandora Library=== | ||
+ | |||
+ | [[Libpnd hub]] is a collection of utilities that Pandora developers may find useful, as well as including the daemons and tools for creating and working with PXML.xml based applications (pnd files or unpacked application directories.) | ||
− | + | It is hoped the '''community will continue to expand this library''' over time! | |
− | == | + | Some stubs are included as hints .. for instance, the first dev to build a clean /dev/gpio based input library should slip it into libpnd so that others may benefit as well, avoid fragmentation and application bugs. |
− | * If | + | |
− | * | + | Continue into the main [[libpnd_hub|libpnd documentation hub]]. |
+ | |||
+ | ===Notaz SDL - improved SDL for Pandora=== | ||
+ | [[SDL]] on this wiki<br> | ||
+ | [http://boards.openpandora.org/index.php?/topic/6231-improved-sdl-for-pandora/Notaz enhanced SDL thread, on the boards] | ||
+ | |||
+ | This library is very very useful for SDL-based ports and new games / apps. | ||
+ | |||
+ | * hardware scaling support (up and down) | ||
+ | * doublebuffering support (can eliminate tearing) | ||
+ | * vsync support (can give smooth scrolling if done right) | ||
+ | * keymap change with a config file (porting aid) | ||
+ | |||
+ | ==Tentative Library Environment== | ||
+ | |||
+ | ===Information=== | ||
+ | |||
+ | '''Please note, that this information is hearsay/guesswork, and is yet to be confirmed on a production unit.''' | ||
+ | |||
+ | For Pandora [http://en.wikipedia.org/wiki/Out_of_the_box (Out-Of-The-Box)] | ||
+ | * [http://www.gnu.org/software/libc glibc] (at a guess, version 2.6.1 or whatever is compatible with OpenEmbedded) | ||
+ | * [http://www.libsdl.org/ libSDL] (also a guess, latest available version of 1.2) | ||
+ | |||
+ | For those interested in creating libraries, or needing more low-level access, read about the | ||
+ | [[kernel interface]]. | ||
+ | |||
+ | ==Tools for Pandora Software Development== | ||
+ | |||
+ | * OpenEmbedded cross-compile environment (and Angstrom distro) [http://www.elinux.org/BeagleBoard#OpenEmbedded] | ||
+ | * CodeSourcery gcc[http://www.codesourcery.com/gnu_toolchains/arm] | ||
+ | ** [http://www.codesourcery.com/gnu_toolchains/arm/portal/release313] - NB: OpenEmbedded uses the CodeSourcery 2007q3 to build the kernel, but uses gcc 4.3.1 to compile everything else. | ||
+ | * TI CodeComposer Studio: Free Evaluation Tools[http://focus.ti.com/dsp/docs/dspsupportaut.tsp?sectionId=3&tabId=416&familyId=44&toolTypeId=30] | ||
+ | * TI c6x Codegen tools for Linux[https://www-a.ti.com/downloads/sds_support/targetcontent/LinuxDspTools/download.html]; License [https://www-a.ti.com/downloads/sds_support/targetcontent/LinuxDspTools/doc/c6x/TILAW-%23180394-v1-Compiler_Clickwrap_For_OS_Community-2.html]; TI account required; this is *only* for Open Source development | ||
+ | * Das U-boot: The Universal Bootloader[http://www.denx.de/wiki/DULG/WebHome] | ||
+ | * Git - Fast Version Control System [http://git-scm.com/]; Good tuto: [http://www.trinitydesktop.org/wiki/bin/view/Developers/GIT] | ||
+ | |||
+ | ===Kernel Source=== | ||
+ | |||
+ | * A read-only GIT repository for the [[kernel_status|kernel]] source has been made available (November 2008); the note from ED is: | ||
+ | |||
+ | <blockquote>If anybody wants to take a sneak peek at the current kernel, we've got a read-only GIT setup which features the most recent version of the MK2 OpenPandora Kernel. | ||
+ | The git is: [git://git.openpandora.org/pandora-kernel.git] | ||
+ | Use the '''pandora-27-omap1''' branch for the moment, there will soon be a 2.6.28.</blockquote> | ||
+ | * [[Kernel_build_instructions|Kernel build instructions]] | ||
+ | |||
+ | ===OpenGL and ES=== | ||
+ | |||
+ | * [[GLES]] 2.0 emulator for PC[http://www.imgtec.com/powervr/insider/sdkdownloads/index.asp#GLES2] ''This works both on Linux and Windows. One needs to register with imgtec before downloading.'' | ||
+ | ** To build the applications a few environment variables need to be set (tested on Ubuntu Gutsy). Note that to run them, you do need an OpenGL 2.0 compliant gfx card. | ||
+ | *** LD_LIBRARY_PATH needs to be set to the folder holding the important libraries, such as libEGL.so ($SDK_PATH/Builds/OGLES2/LinuxPC/Lib might be enough) | ||
+ | *** To run the makefiles in the Training section you need to set a PLATFORM variable to either LinuxPC or LinuxGeneric. I have had success with LinuxPC. | ||
+ | *** See [http://pastebin.com/f3f9f159f] for a script that you can run to set these for you. | ||
+ | * [http://www.imgtec.com/powervr/insider/powervr-pvrtextool.asp PowerVR Texture creation tool] | ||
+ | ** "PVRTexTool enables conversion of standard bitmap files (e.g. BMP, JPG, PNG, TGA, etc.) to any texture type supported by POWERVR MBX or POWERVR SGX hardware including PVRTC, DXT and ETC compressed formats. Both a GUI and command line version are supplied for Windows and Linux. There are also plug-ins for Autodesk 3ds Max, Maya and Adobe Photoshop." - requires imgtec registration. | ||
+ | ** ''Note, this is part of the main SDK'' - (Linux path to it is /SDKPackage/Utilities/PVRTexTool/) | ||
+ | |||
+ | ===Packaging=== | ||
+ | (See also [[Make and run simple PND]] and [[Libpnd_hub#PXML.xml_and_.pnd_files|the PND package format]]) | ||
+ | |||
+ | *[[Libpnd_hub#pnd_make.sh|pnd_make.sh]] - a straightforward shell script to build PND files from a prepared directory. Included with libpnd and, therefore, in all Pandoras | ||
+ | *[http://www.gp32x.com/board/index.php?/topic/58587-pndbuilder/ PNDbuilder] - a graphical tool to build PNDs. Can be used [http://freedomdown.squarespace.com/storage/PNDbuilder.zip in Windows] or [http://freedomdown.squarespace.com/storage/pndb.pnd on the Pandora]. | ||
+ | *[http://www.gp32x.com/board/index.php?/topic/57350-distpnd/ distPND] - an extension to [http://docs.python.org/distutils/index.html Python's Distutils] designed to make PND files from Python source quickly and easily. | ||
− | |||
− | |||
− | |||
− | == | + | ===Profiling=== |
− | + | If you need performance analysis, you can find a compiled version of the "perf" tool there : http://boards.openpandora.org/index.php?/topic/9809-profiling/#entry181954<br> | |
+ | Just unzip the tool somewhere and launch it with LD_LIBRARY_PATH set.<br> | ||
+ | <br> | ||
+ | See https://perf.wiki.kernel.org/index.php/Main_Page to learn how to use it and happy optimizations! | ||
+ | [[Category:Operating system]] | ||
[[Category:Development]] | [[Category:Development]] | ||
+ | [[Category:FAQ]] |
Latest revision as of 07:52, 31 October 2013
Contents
- 1 General Game development
- 2 Porting and Writing Software
- 3 Distributing Software
- 4 Kernel and Firmware
- 5 Compiling Software
- 6 development tutorials
- 7 PND Quickstart
- 8 SDL on Pandora
- 9 OpenGL on the Pandora
- 10 The Kernel
- 11 The Chipset
- 12 development tools
- 13 Official Pandora Source Code Repository
- 14 Pandora Specific Libraries
- 15 Tentative Library Environment
- 16 Tools for Pandora Software Development
General Game development
Just start basic. Follow the Jump'n'Run tutorial (or any of the others). Copy their code. Change bits. Break it.. fix it. Write it over and over until you know what is happening where and why. Get a pandora or GP2X and cross-compile it for those platforms. Run your little creations on other devices (Android phones and iPhones are great). Little milestones like this will keep you motivated to continue learning.
Making a game, or programming a whole project is a massive undertaking. Be prepared to fail the first few attempts... quit at least 5 times only to come back and give it another go... and even then you might have only programmed Mahjong. If, at the end of all this, you are still keen, you can step it up to 3D graphics and start working on "bigger projects".
Remember.. no one can learn to program in a day... and I wouldn't expect anyone who started programming tomorrow to be able to produce a Mario clone, let alone quake 4 in a month.
Porting and Writing Software
- If porting existing software, try the porting guide.
- If creating new code, then the development tutorials may be useful.
Distributing Software
- Make and run simple PND - Quickly learn how to make PNDs (using Linux) for your software.
- Learn more about the PND file format that is used for distribution.
Kernel and Firmware
- Pandora kernel and Firmware reference information including SD card booting
- [Pandora Bug Tracker], Reporting bugs instructions
- Learn more about submitting patches and getting involved in firmware and library development
Compiling Software
- Set up a cross-compiler to compile code for the Pandora on your PC.
- compile on the Pandora
development tutorials
PND Quickstart
See Introduction to PNDs for a nice and welcoming intro. quick make pnd tutorial For common tasks, see the PND Cookbook.
GLBasic
There is a GLBasic tutorial on this wiki which is still a work in progress, but should get new parts fairly frequently. More information can be found on the GLBasic forums.
SDL on Pandora
SDL is NOT a game engine, but it will provide you with the foundations for putting stuff on the screen, getting keyboard and controller input and making sounds. All of these are basics in programming games.
You can locate a lot of SDL specific information at [1]
Getting started with SDL on the Pandora
(This portion assumes you already have a dev environment ready)
First, you need to grab the SDL libraries, you can either compile them yourself or grab some pre compiled libs. You can get the sources for SDL here and compile it yourself.
Or
You can get the pre compiled libraries here (they are named libSDL... etc). These are ipk files so windows user might need 7zip in order to open them. You will need both the 'normal' lib and the -dev library. You might want to get the SDL_image, SDL_mixer and other SDL_* libraries, since these add to general functionality of SDL.
Basic Pandora specific SDL Information
See SDL Controls
SDL Tutorials
These tutorials assume you know the basics of C++ programming, and know your way around a C++ compiler.
- Getting started with SDL on pandora
- Lazy Foo's Tutorials. Not Pandora specific, but a good guide to getting your programming environment set up, along with many SDL tutorials.
- Sol's Graphics for beginners. Not Pandora specific, but a good place to get started with SDL graphics coding.
- 2D Jump'n'Run Tutorial. (Page not loading since at least 03/03/2011. Still available on archive.org)
- The Game Programming Wiki's tutorials
OpenGL on the Pandora
The Kernel
The Chipset
development tools
Official Pandora Source Code Repository
The official source is under GIT revision control; EvilDragon is the admin, but the repo has a web based browser built in.===
The actual GIT repository is here: [2] It is recommended that you read the git structure information before going too far.
For stable released images, see other OpenPandora support pages. E.g. official forum software - pandora OS news.
Pandora Specific Libraries
libpnd - the Pandora Library
Libpnd hub is a collection of utilities that Pandora developers may find useful, as well as including the daemons and tools for creating and working with PXML.xml based applications (pnd files or unpacked application directories.)
It is hoped the community will continue to expand this library over time!
Some stubs are included as hints .. for instance, the first dev to build a clean /dev/gpio based input library should slip it into libpnd so that others may benefit as well, avoid fragmentation and application bugs.
Continue into the main libpnd documentation hub.
Notaz SDL - improved SDL for Pandora
SDL on this wiki
enhanced SDL thread, on the boards
This library is very very useful for SDL-based ports and new games / apps.
- hardware scaling support (up and down)
- doublebuffering support (can eliminate tearing)
- vsync support (can give smooth scrolling if done right)
- keymap change with a config file (porting aid)
Tentative Library Environment
Information
Please note, that this information is hearsay/guesswork, and is yet to be confirmed on a production unit.
For Pandora (Out-Of-The-Box)
- glibc (at a guess, version 2.6.1 or whatever is compatible with OpenEmbedded)
- libSDL (also a guess, latest available version of 1.2)
For those interested in creating libraries, or needing more low-level access, read about the kernel interface.
Tools for Pandora Software Development
- OpenEmbedded cross-compile environment (and Angstrom distro) [3]
- CodeSourcery gcc[4]
- [5] - NB: OpenEmbedded uses the CodeSourcery 2007q3 to build the kernel, but uses gcc 4.3.1 to compile everything else.
- TI CodeComposer Studio: Free Evaluation Tools[6]
- TI c6x Codegen tools for Linux[7]; License [8]; TI account required; this is *only* for Open Source development
- Das U-boot: The Universal Bootloader[9]
- Git - Fast Version Control System [10]; Good tuto: [11]
Kernel Source
- A read-only GIT repository for the kernel source has been made available (November 2008); the note from ED is:
If anybody wants to take a sneak peek at the current kernel, we've got a read-only GIT setup which features the most recent version of the MK2 OpenPandora Kernel.
The git is: [12]
Use the pandora-27-omap1 branch for the moment, there will soon be a 2.6.28.
OpenGL and ES
- GLES 2.0 emulator for PC[13] This works both on Linux and Windows. One needs to register with imgtec before downloading.
- To build the applications a few environment variables need to be set (tested on Ubuntu Gutsy). Note that to run them, you do need an OpenGL 2.0 compliant gfx card.
- LD_LIBRARY_PATH needs to be set to the folder holding the important libraries, such as libEGL.so ($SDK_PATH/Builds/OGLES2/LinuxPC/Lib might be enough)
- To run the makefiles in the Training section you need to set a PLATFORM variable to either LinuxPC or LinuxGeneric. I have had success with LinuxPC.
- See [14] for a script that you can run to set these for you.
- To build the applications a few environment variables need to be set (tested on Ubuntu Gutsy). Note that to run them, you do need an OpenGL 2.0 compliant gfx card.
- PowerVR Texture creation tool
- "PVRTexTool enables conversion of standard bitmap files (e.g. BMP, JPG, PNG, TGA, etc.) to any texture type supported by POWERVR MBX or POWERVR SGX hardware including PVRTC, DXT and ETC compressed formats. Both a GUI and command line version are supplied for Windows and Linux. There are also plug-ins for Autodesk 3ds Max, Maya and Adobe Photoshop." - requires imgtec registration.
- Note, this is part of the main SDK - (Linux path to it is /SDKPackage/Utilities/PVRTexTool/)
Packaging
(See also Make and run simple PND and the PND package format)
- pnd_make.sh - a straightforward shell script to build PND files from a prepared directory. Included with libpnd and, therefore, in all Pandoras
- PNDbuilder - a graphical tool to build PNDs. Can be used in Windows or on the Pandora.
- distPND - an extension to Python's Distutils designed to make PND files from Python source quickly and easily.
Profiling
If you need performance analysis, you can find a compiled version of the "perf" tool there : http://boards.openpandora.org/index.php?/topic/9809-profiling/#entry181954
Just unzip the tool somewhere and launch it with LD_LIBRARY_PATH set.
See https://perf.wiki.kernel.org/index.php/Main_Page to learn how to use it and happy optimizations!