4. libgdx application framework and libgdx Application Framework
(Original: http://www.libgdx.cn/topic/29/4-libgdx%E5%BA%94%E7%94%A8%E6%A1%86%E6%9E%B6)
Module
As the core, libgdx provides six interfaces to interact with the operating system. These interfaces are implemented based on the backend of each operating system.
Application: run an Application and notify an API client of Application-level events, such as window change size. Provides log systems and query methods, such as memory usage.
Files: exposes the underlying file system. Provides a series of abstraction for file operations.
Input: user Input. Such as mouse, keyboard, touch and sensor. Both round robin and event-driven are supported.
Net: provides cross-platform access to resources through HTTP/HTTPS. You can create a TCP server and client sockets.
Audio: provides methods for playback of sound effects and music, and provides direct access to the device to play PCM.
Graphics: the OpenGL ES 2.0 is exposed.
Startup class
For each platform, the startup class is required. The startup class of each platform implements the backend Application interface of each platform. For desktop applications, use Lwjgl backend as follows:
public class DesktopStarter {public static void main(String[] argv) {LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();new LwjglApplication(new MyGame(), config);}}
For Android, the startup class is as follows:
public class AndroidStarter extends AndroidApplication {public void onCreate(Bundle bundle) {super.onCreate(bundle);AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();initialize(new MyGame(), config);}}
Access Module
The module can be accessed through the static method provided by Gdx class.
For example, the audio module can be accessed through the following methods:
AudioDevice audioDevice = Gdx.audio.newAudioDevice(44100, false);
(Www.libgdx.cn is copyrighted. If you need to reprint it, indicate the source)
What do I do according to the "use of android game development framework libgdx (12)" example?
Stage. act (Gdx. graphics. getDeltaTime (); tileMapRenderer. render (c); --------------- error code line stage. draw ();
What is the prospect of the Libgdx game engine? Will the author continue to update? Help
First, let's clarify one problem. Strictly speaking, Libgdx is only a rendering framework, but it cannot be regarded as a game engine. As for the prospects of the subject, I think the subject is more concerned with finding a job. Aside from gaming companies, Libgdx also has a very wide range of uses for developing something special. The author's GitHub account is very active. Find the Project hosted on GitHub and check the submitted record of the author. View Original post>
Accept