-
Notifications
You must be signed in to change notification settings - Fork 0
Contributing
Contributing to libgdx is easy:
- Fork libgdx on http://github.com/libgdx/libgdx
- Learn how to Work with the source
- Hack away and sent a pull request on Github!
If you modify a public API, or add a new one, make sure to add these changes to the CHANGES file in the root of the repository. In addition to the CHANGES file, such modifications are also published on the blog and on Twitter to reach all of the community.
If you want to poll the brains of other devs, either send a pull request and start a conversation on Github, or start a new thread in this sub-forum. You will need special forum permissions, write an e-mail to contact at badlogicgames dot com and tell me your forum id. You should also subscribe to that forum via e-mail, there's a button at the bottom of the page. You can also drop by on IRC (irc.freenode.org, #libgdx), where most core devs are lurking.
Libgdx is licensed under the Apache 2.0 license. Before we can accept code contributions, we need you to sign our contributor license agreement. Just print it out, fill in the blanks and send a copy to [email protected], with the subject [Libgdx] CLA
.
Signing the CLA will allow us to use and distribute your code. This is a non-exclusive license, so you retain all rights to your code. It's a fail-safe for us should someone contribute essential code and later decide to take it back.
If you work on libgdx code, we require you to use the Eclipse formatter located in the root directory of the repository.
Failure to use the formatter will result in Nate being very upset.
If you are using IntelliJ IDEA, you can still make use of the eclipse code formatter: see: this article
Libgdx does not have an official coding standard. We mostly follow the usual Java style, and so should you.
A few things we'd rather not like to see:
- underscores in any kind of identifier
- Hungarian notation
- Prefixes for fields or arguments
- Curly braces on new lines
If you modify an existing file, follow the style of the code in there. Curly braces may be omitted if it does not hurt readability.
If you create a new file, make sure to add the Apache file header, as seen here.
If you create a new class, please add at least class documentation that explains the usage and scope of the class. You can omit Javadoc for methods that are self-explanatory.
If your class is explicitly thread-safe, mention it in the Javadoc. The default assumption is that classes are not thread-safe, to reduce the amount of costly locks in the code base.
Libgdx is meant to run on both desktop and mobile platforms, including browsers (JavaScript!). While the desktop HotSpot VM can take quite a beating in terms of unnecessary allocations, Dalvik and consorts don't.
A couple of guidelines:
- Avoid temporary object allocation wherever possible
- Do not make defensive copies
- Avoid locking, libgdx classes are by default not thread-safe unless explicitly specified
- Do not use boxed primitives
- Use the collection classes in the com.badlogic.gdx.utils package
- Do not perform argument checks for methods that may be called thousands of times per frame
- Use pooling if necessary, if possible, avoid exposing the pooling to the user as it complicates the API
Most of the libdgx team members are Git novices, as such we are just learning the ropes ourself. To lower the risk of getting something wrong, we'd kindly ask you to keep your pull requests small if possible. A change-set of 3000 files is likely not to get merged.
We do open new branches for bigger API changes. If you help out with a new API, make sure your pull request targets that specific branch.
Pull requests for the master repository will be checked by multiple core contributors before inclusion. We may reject your pull requests to master if we do not deem them to be ready or fitting. Please don't take offense in that case. Libgdx is used by thousands of projects around the world, we need to make sure things stay somewhat sane and stable.
-
Developer's Guide
- Introduction
- Goals & Features
- Community & Support
- Contributing
- Games Built with Libgdx
- Prerequisites
- Gradle Project Setup, Running, Debugging and Packaging
- Project Setup, Running & Debugging
- Third Party Services
- Working from Source
- Using libgdx with other JVM languages
- The Application Framework
- A Simple Game
- File Handling
- Networking
- Preferences
- Input Handling
- Memory Management
- Audio
-
Graphics
- Configuration & Querying Graphics ??
- Fullscreen & VSync
- Continuous & Non-Continuous Rendering
- Clearing the Screen
- Take a Screenshot
- OpenGL ES Support * Configuration & Querying OpenGL ?? * Direct Access ?? * Utility Classes * Rendering Shapes * Textures & TextureRegions * Meshes * Shaders * Frame Buffer Objects
- 2D Graphics * SpriteBatch, TextureRegions, and Sprite * 2D Animation * Clipping, with the use of ScissorStack * Orthographic camera * Mapping Touch Coordinates ?? * Viewports * NinePatches * Bitmap Fonts * Distance field fonts * Using TextureAtlases * Pixmaps * Packing Atlases Offline * Packing Atlases at Runtime * 2D Particle Effects * Tile Maps * scene2d * scene2d.ui * Skin
- 3D Graphics * Quick Start * Models * Material and environment * 3D animations and skinning * Importing Blender models in LibGDX * Perspective Camera ?? * Picking ??
- Managing Your Assets
- Utilities
-
Math Utilities
- Interpolation
- Vectors, Matrices, Quaternions
- Circles, Planes, Rays, etc.
- Path interface & Splines
- Bounding Volumes ??
- Intersection & Overlap Testing ??
- Physics
- Tools
- Extensions
- Deploying your Application
- Building Libgdx ??
- Known Issues
- Articles
- Deprecated (May be outdated)