Libgdx 1.8.0 發布,跨平臺游戲開發框架
Libgdx是一個跨平臺的開發框架。它目前支持的平臺有Windows,Mac OS X,Android,IOS和HTML5。
Libgdx允許你可以將代碼不經任何修改的部署到多個平臺。而不是修改你的代碼適應不同的平臺或者直接編譯到HTML5。你可以在一個桌面開發環境中迅速部署你的代碼。你可以使用所有的Java生態系統中的開發工具。
Libgdx可以在底層進行操作。可以讓你直接訪問文件系統,輸入設備,輸出設備,音頻設備和通過統一的OpenGL ES接口訪問OpenGL。
基于這些底層的操作,Libgdx建立了強大的API幫助你完成常見的開發任務。比如渲染精靈,繪制文本,構建用戶界面,播放聲音效果和音樂流,線性代數和三角計算,解析JSON和XML數據等。
在必要時,Libgdx可以通過本地代碼追求更好的性能。所有這些功能隱藏在Java API函數中,所以你不用為為不同平臺交叉編譯本地代碼而擔心。Libgdx的很多部分可以運行在已知的平臺中,所以你不用擔心。
Libgdx旨在成為一個框架而不是一個引擎,世上沒有一勞永逸的事。相反,Libgdx強大的抽象可以讓你編寫出你想要的游戲或者應用。
Libgdx是一個Java框架,它為編寫游戲和實時應用提供了一個跨平臺的API。Libgdx提供了以下的功能:
常規:
1、 支持Windows、Linux、OSX、IOS、Android和HTML5的跨平臺的開發環境。(支持64位)
2、 基于JOGL、LWJGL、Angle,Android API函數、iOS API函數 andWebGL/HTML5 API函數的后端。
3、 在桌面編寫和測試應用,無縫的部署在Android,IOS,JavaScript,Applet,Webstart或普通桌面。
圖形:
1、 通過OpenGL ES進行渲染。
2、 支持JNI綁定。
3、 底層:
1) 頂點數組
2) 頂點緩沖區對象
3) 紋理
4) 紋理地圖集
5) 易于使用、靈活的網格類
6) 幀緩沖對象
7) 著色器
8) 立即模式渲染器類(用于測試)
9) 自動處理OpenGL環境損失(紋理等)
4、2D:
1)批處理和精靈渲染
2)點陣字體
3)粒子系統
4)TMX地圖渲染
5)操作位圖的自定義2D圖形庫
6)成熟的具有補間動畫的二維場景圖
5、3D:
1)高級三維
2)OBJ和MD5模型加載器
3)關鍵幀和骨骼動畫
4)投影和透視
音頻:
1、 流媒體和音效播放(WAV、MP3、OGG)
2、 通過一個JNI橋到KissFFT的快速傅里葉變換
3、 音頻解碼
4、 對于簡單回放和錄制的直接接口
文件I/O:
1、 抽象層
2、 易于存儲小數據
輸入:
1、 基于事件的訪問觸摸屏、鼠標和鍵盤
2、 訪問羅盤和加速度計
3、 Vibrator的支持
物理:
1、 box2d
數學:
1、 向量和矩陣
2、 四元數
3、 邊界形狀
4、 交叉和重疊測試
5、 Catmull-Rom插值
公用:
1、 自定義集合
2、 排序
3、 JSON
Libgdx是什么:
一個作為引擎和游戲基礎的高性能,跨平臺的游戲開發框架。這個框架允許我們我們專注于基礎而不是游戲引擎的新的特性。它具有很棒的靈活性。
Libgdx 1.8.0 發布,此版本更新內容如下:
-
API Change: Rewrote FreeType shadow rendering (much better).
-
Added spaceX/Y to FreeType fonts.
-
Higher quality FreeType font rendering.
-
Hiero updated to v5, now with FreeType support and other new features!
-
GlyphLayout now allocates much, much less memory when processing long text that wraps.
-
Added LWJGL 3 backend, see https://github.com/libgdx/libgdx/issues/3673 for more info.
-
Added Graphics#getFramebufferWidth and Graphics#getFramebufferHeight for HDPI handling
-
API Change: Added HdpiUtils. Instead of calling GL20#glViewport and GL20#glScissor yourself
please use HdpiUtils instead. It will ensure that you handle HDPI monitors correctly when
using those OpenGL functions. On HDPI monitors, the size reported by Gdx.graphics
getWidth/getHeight is in logical coordinates as dictated by the operating system, usually half
the HDPI resolution. The OpenGL drawing surface works in backbuffer coordinates at the full
HDPI resolution. If you pass logical coordinates to glViewport and glScissor, you only
affect a quarter of the real backbuffer size. Use HdpiUtils instead, it will do the right thing, while letting you continue to work in logical (aka returned by Gdx.graphics.getWidth/getHeight) coordinates. -
API Change: Graphis#getDesktopDisplayMode() has been renamed to Graphics#getDisplayMode() and
returns the current display mode of the monitor the window is shown on (primary monitor on
all backends except LWJGL3, which supports real multi-monitor setups). -
API Change: Graphics#getDisplayModes() return the display modes of the monitor the monitor
the window is shown on (primary monitor on all backends except LWJGL3 which supports real
multi-monitor setups). -
API Change: Graphics#setDisplayMode(DisplayMode) has been renamed to
Graphics#setFullscreenMode(). If the window is in windowed mode, it will be switched
to fullscreen mode on the monitor from which the DisplayMode stems from. -
API Change: Graphics#setDisplayMode(int, int, boolean) has been renamed to
Graphics#setWindowedMode(int, int). This will NOT allow you to switch to fullscreen anymore,
use Graphics#setFullscreenMode() instead. If the window is in fullscreen mode, it will be
switched to windowed mode on the monitor the window was in fullscreen mode on. -
API Addition: Graphics#Monitor, represents a monitor connected to the machine the app is
running on. A monitor is defined by a name and it's position relative to other connected
monitors. All backends except the LWJGL3 backend will report only the primary monitor -
API Addition: Graphics#getPrimaryMonitor() returns the primary monitor you usually want
to work with. -
API Addition: Graphics#getMonitor() returns the monitor your app's window is shown on,
which may not be the primary monitor in >= 2 monitor systems. All backends except the
LWJGL3 backend will report only the primary monitor. -
API Addition: Graphics#getMonitors() returns all monitors connected to the system. All
backends except the LWJGL3 backend will only report the primary monitor. -
API Addition: Graphics#getDisplayMode(Monitor) returns the display mode of the monitor
the app's window is shown on. All backends except the LWJGL3 backend will report the
primary monitor display mode instead of the actual monitor's display mode. Not a problem
as all other backends run on systems with only a single monitor so far (primary monitor). -
Added option to include credentials on cross-origin http requests (used only for GWT backend).
-
Added option to specify crossorigin attribute when loading images with AssetDownloader (GWT), see #3216.
-
API Change: removed Sound#setPriority, this was only implemented for the Android backend. However, Android itself never honoured priority settings.
-
API Change: cursor API has been cleaned up. To create a custom cursor, call Graphics#newCursor(), to set the custom cursor call Graphics#setCursor(), to set a system cursor call Graphics#setSystemCursor(). The Cursor#setSystemCursor method has been removed as that was not the
right place. Note that cursors only work on the LWJGL, LWJGL3 and GWT backends. Note that system cursors only fully work on LWJGL3 as the other two backends lack a means to set a specific system cursor. These backends fall back to displaying an arrow cursor when setting any system cursor. -
API Addition: Added Lwjgl3WindowListener, allows you to hook into per-window iconficiation, focus and close events. Also allows you to prevent closing the window when a close event arrives.
下載:https://github.com/libgdx/libgdx/archive/1.8.0.zip
來自: http://www.oschina.net/news/69690/libgdx-1-8-0