axmol/README.md

165 lines
6.6 KiB
Markdown
Raw Normal View History

2020-02-23 23:00:14 +08:00
# engine-x
2020-02-23 22:31:31 +08:00
[![Build Status](https://travis-ci.com/c4games/engine-x.svg?branch=master)](https://travis-ci.com/c4games/engine-x)
[![Windows Build Status](https://ci.appveyor.com/api/projects/status/4936wev2r2ot606s/branch/master?svg=true)](https://ci.appveyor.com/project/halx99/engine-x)
2019-11-25 14:59:33 +08:00
2019-11-25 10:23:47 +08:00
This is another more radical fork of cocos2d-x game engine, use opanal for all platforms, single texture multi gpu texture handler, c++17...
2020-02-23 23:00:14 +08:00
The readme of cocos2d-x v4: https://github.com/simdsoft/engine-x/blob/master/README.ccv4.md
2019-11-25 10:23:47 +08:00
2019-11-25 10:22:58 +08:00
### Goals summary:
1. C++17
2. forcus on native game dev only
3. Remove unnecessary sources
2020-02-23 23:00:14 +08:00
4. Fix bugs ASAP
5. Review PR ASAP
6. If you have any other excellent goals, welcome
7. Excellent PRs from any guys are welcome, I will review & merge ASAP
2019-11-25 10:22:58 +08:00
2019-11-25 10:24:20 +08:00
### preprocessors notes:
2019-11-25 10:22:58 +08:00
2019-11-25 10:24:20 +08:00
```txt
2019-11-25 10:22:58 +08:00
CC_STATIC
_USRDLL
_USEGUIDLL
_USREXDLL
_EXPORT_DLL_
_USRSTUDIODLL
_USRSTUDIOPDLL
2019-11-25 10:24:20 +08:00
```
2019-11-25 10:22:58 +08:00
### Refactor core & extensions libs
2020-02-23 23:00:14 +08:00
- [ ] engine-x-core.dll(node tree, multi-renderer-backends, filesystem, audio, platform spec, and other):
2019-11-25 10:22:58 +08:00
- [x] 1. Refactor audio engine, OpenAL for all platforms.
- [x] 2. Remove SimpleAudio
- [ ] 3. Remove offthread file operation
2019-11-25 10:28:17 +08:00
- [x] 4. Remove getSutiableFOpen, avoid reduce performance, there is another better solution for support: ```just doesn't convert path to utf-8 in FileUtils manually implementation```
2019-11-25 20:08:29 +08:00
- [x] 5. Refactor CCDownloader, curl for all platforms, don't use scheduler to retrive progress info, make it more reuseable
2020-02-23 23:00:14 +08:00
- [ ] 7. Refactor engine-x-3rd, all compile as vs2019 MSVC 19.22.27905.0
2019-11-25 10:22:58 +08:00
- [x] 8. minizip-1.2.0
- [x] 9. ccMessageBox
- [x] 10. BMP support with stb_image
- [x] 11. Remove unused libuv
- [ ] 12. Reorder child support
- [x] 13. Remove tinyxml2 dep, use pugixml instead
- [x] 14. Use xsxml for SAX parser only
- [x] 15. Multi meta textures v1.0
- [x] 16. ProgramStateRegistry
- [ ] 17. Optimize CCFileUtils
- [ ] 18. ANGLE support.
- [x] 19. Use curl for HttpClient all platforms
- [ ] 20. AES encrypt system
- [x] 21. Remove xxtea
- [x] 22. Remove rapidxml dep
- [x] 23. fix etc1 alpha test case, content size incorrect
2020-07-10 13:53:53 +08:00
- [ ] 24. Since we use fully c++11 feature which the compiler must support u8 prefix, so remove getSuitableFopen, you should always add u8 prefix at program when your path contains non ascii charactors.
2020-02-15 21:20:22 +08:00
- [x] 25. ASTC 4x4, 8x8 support for all platforms.
- [x] 26. Refine backend sources.
- [x] 27. Refactor UserDefault based on file mapping with aes-cfb encrypt support.
- [x] 28. Fix OpenGL error 0x501 when load incorrect & unused shader.
- [x] 29. Fix OpenGL error 0x501 when use compressd texture on device, caused by backend TextureGL: initWithZeros
2019-11-25 10:22:58 +08:00
- [ ] XX1. Cache ProgramState or use object_pool
- [ ] XX2. Remove socket.io websockets, use yasio for socket connection solution
- [ ] XX3. Fully streaming play for all media file: .mp4, .mp3, .ogg, .wav
- [ ] XX4. Streaming load for .ttf with freetype2
- [x] XX5. Remove CCB(already removed in v4)
- [ ] XX6. Sync 3rd bin
- [ ] XX7. Purely offthread load texture, use shared gl context
2019-11-25 13:08:46 +08:00
- [ ] XX8. Use git submodule to manage 3rd libs.
2019-11-25 10:22:58 +08:00
- [ ] Upgrade 3rd stubs to latest stable edition for all platforms
- [ ] zlib to 1.2.11
--------------------------------------------------------------------------
2020-02-23 23:00:14 +08:00
- [ ] engine-x.ui.dll: The original v3-ui framework may remove in the future
- [ ] engine-x.ext.lib: old GUI ui(could be remove), physics-nodes, pu3d
- [ ] engine-x.dragonbones.lib
- [ ] engine-x.ccs20.dll: x-studio
- [ ] engine-x.ccs21.dll: x-studio
- [ ] engine-x.xs.dll: x-studio
- [ ] engine-x.spine.lib
2019-11-25 10:22:58 +08:00
----------------------------------------------------------------------------
2020-02-23 23:00:14 +08:00
- [ ] engine-x-lua.lib:
2019-11-25 10:22:58 +08:00
- [x] Lua53 compat
- [ ] make lua test works well
- [ ] Remvoe luasocket, use yasio for socket connection solution
---------------------------------------------------------------------------
!!! Custom APK support, don't compress .mp4, .mp3, .ogg, .wav, .ttf
---------------------------------------------------------------------------
!!!! future of future:
- [ ] Use sol2 for binding framework instead tolua++
- [ ] Use bgfx for multi renderer backend support
2020-02-04 21:42:43 +08:00
### 快速开始
#### windows
安装CMake要求3.6以上<br>
根据安装的 Visual Studio 版本,执行下面的命令,解决方案就生成在 build 目录下了。<br>
打开cpp-tests.sln编译运行。<br>
```
2020-02-23 23:00:14 +08:00
cd engine-x\tests\cpp-tests
2020-02-04 21:42:43 +08:00
cmake -S .\ -B .\build -G “Visual Studio 14 2015 Win32”
or
cmake -S .\ -B .\build -G “Visual Studio 16 2019” -A Win32
```
#### android
安装 Android Studio (推荐3.5.3),打开 SDKManager安装下列工具。<br>
2020-02-23 23:00:14 +08:00
打开project目录在engine-x\tests\cpp-tests\proj.android<br>
2020-02-04 21:42:43 +08:00
等待Gradle sync完成后Build APKs安装运行<br>
```
LLDB 推荐3.1
CMake 推荐 3.10.2
NDK 推荐 20.1
```
2020-04-20 12:10:21 +08:00
如果报缺少Ninja, 从https://github.com/ninja-build/ninja/releases下载 拷贝Ninja.exe到Cmake的bin目录即可
2020-02-04 21:42:43 +08:00
2020-02-06 12:52:13 +08:00
#### ios
确保最新版xcode已安装
安装brew: ```/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"```
brew安装完成后确保如下工具安装:
```sh
brew update
brew install git
brew install cmake
brew install autoconf
brew install automake
brew install libtool
```
执行如下命令确保cmake能成功生成xcode工程:
2020-02-08 21:55:36 +08:00
```sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer```
2020-02-23 23:00:14 +08:00
生成xcode工程, 进入engine-x根目录执行如下命令:
2020-02-06 12:52:13 +08:00
```sh
mkdir build
cd build
2020-02-08 21:55:36 +08:00
cmake .. -GXcode -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphonesimulator
2020-07-21 20:13:44 +08:00
# for simulator64
# cmake .. -G Xcode -DCMAKE_TOOLCHAIN_FILE=../cmake/ios.toolchain.cmake -DPLATFORM=SIMULATOR64 -DENABLE_ARC=0 -DENABLE_BITCODE=0
# for (armv7, armv7s, arm64)
# cmake .. -G Xcode -DCMAKE_TOOLCHAIN_FILE=../cmake/ios.toolchain.cmake -DPLATFORM=OS -DENABLE_ARC=0 -DENABLE_BITCODE=0
# for device 64
# cmake .. -G Xcode -DCMAKE_TOOLCHAIN_FILE=../cmake/ios.toolchain.cmake -DPLATFORM=OS64 -DENABLE_ARC=0 -DENABLE_BITCODE=0
2020-02-06 12:52:13 +08:00
```
2020-02-11 21:03:22 +08:00
之后就可以用xcode打开, 选择cpp-tests编译运行其他targets目前均无法编译或运行
2020-02-06 12:52:13 +08:00
2020-06-19 18:26:24 +08:00
### QQ交流群
点击链接加入群聊【engine-x交流群】https://jq.qq.com/?_wv=1027&k=nvNmzOIY
2020-07-21 20:13:44 +08:00
FAQ
Q1: -lnsl -lsocket -lrt找不到
A1: 删除
Q2:
Showing Recent Messages
: Targeted OS version does not support use of thread local variables in __ZN12_GLOBAL__N_19ThreadCtxD1Ev for architecture x86_64
A2: 修改iOS Deploymement Target to iOS 9.3
Q3: _programState inherited from Node should care about managment.