Number
|
Category
|
Translate
| ||
8
|
What?
|
French
|
As we have seen previously, Libgdx can target multiple platforms
such as Windows, Android or Web browser with a single source.
For each platform
there is a backend which is an output stage of an app, and which can produce
the result of the source code implemented in the logic
part.
Libgdx currently supports four backends :
·
LWJGL : Runs on Windows , Linux and Mac OS X,
·
JOGL : also Windows , Linux and Mac OS X.
Currently LWJGL
is preferred because it is more stable, especially when it comes to developing
a full-screen app.
·
Android : Allows Android development.
·
HTML5 : We will not be interested in developing
for this platform .
·
iOS : Enables iOS development
Libgdx consists of 5 modules
Application: To run the app and inform about events that
occur in an apps such as window resizing. It is also the module allow the logging
functions.
File
: This is the
module which allow to read, write, even copy, move and delete files
Input: This is the module that allows us to
detect user input such as mouse events (Desktop) / Touch (Android) and even the
accelerometer.
Audio: This is the module that allows you to play
sound effects and music streaming and allows direct access to the audio device,
and even create sound effects.
Graphics
: Includes
everything concerning the manipulation and adjustment of video and graphics
mode.
Access to the Libgdx modules
Libgdx modules
described above can be accessed through Gdx class , it allows easy
access to the module libgdx, for example :
To access the
audio module we use Gdx.audio
For the File
Module is used Gdx.file
For the
application module is through Gdx.app
Example of source
code:
AudioDevice
AudioDevice GDx.audio.newAudioDevice = ( 44100 , false) ;
Others modules?
There are other
functions that are not considered as the main module and that can be useful:
·
math: We can make various mathematical
calculations using this function.
·
box2d: For physical manipulation in 2D.
·
utils: contains helpers classes, it can also
allow to read and write in JSON format.
Problems ?
If you have any comments or questions please post them in the comments section . Thank you for reading.
See also !
No comments:
Post a Comment