Giter Club home page Giter Club logo

axmolengine / axmol Goto Github PK

View Code? Open in Web Editor NEW
725.0 30.0 182.0 90.89 MB

Axmol Engine – A Multi-platform Engine for Desktop, XBOX (UWP) and Mobile games. (A fork of Cocos2d-x-4.0)

Home Page: https://axmol.dev

License: MIT License

PowerShell 0.36% CMake 0.74% C++ 88.64% Objective-C 0.52% C 2.77% Objective-C++ 1.16% Java 1.01% AIDL 0.01% HTML 0.02% GLSL 0.30% HLSL 0.37% Python 0.62% Lua 3.44% Batchfile 0.01% Shell 0.05%
game-engine opengl metal angle d3d cocos2d-x android axmol axmolengine uwp xbox cpp20 cppwinrt

axmol's Introduction

axmol logo

Axmol Engine

A Multi-platform Engine for Mobile, Desktop and Xbox.

Axmol Engine is an open-source, C++ multi-platform engine designed for mobile devices, desktop, and Xbox, well-suited for 2D game development. It was launched in November 2019 as a fork of Cocos2d-x v4.0.

Please visit our Wiki to know more about Axmol.


Build Status

Latest Release LICENSE Codacy Badge cxxstd

issues forks stars GitHub code size in bytes

PRs Welcome Discord awesome-cpp ossinsight

Chinese ver. / 简体中文


⚡️Building

If you have a Cocos2d-x project, migrating to Axmol Engine is easy. We have prepared a Migration Guide.

Learning and docs

General information

Axmol Engine has iterated and improved over the Cocos2d-x v4.0 base. Now is faster and more capable, while staying lightweight. Check a comparative here.

Supported platforms:

  • Mobile: iOS, Android
  • Desktop: Windows, Linux, macOS, tvOS
  • Console: Xbox (Universal Windows Platform)
  • Web: WebAssembly (Preview: Axmol tests / FairyGUI tests)

Languages:

  • C++
  • Lua

Renderer backends:

  • Metal for macOS, iOS and tvOS
  • OpenGL 3.3+ for Linux, macOS and Win32
  • OpenGL ES 2.0+ for Android
  • OpenGL ES 3.0+ for iOS and tvOS
  • ANGLE GLES 3.0+ for Win32 and UWP
  • WebGL 2.0 (OpenGL ES 3.0): WASM

Architectures:

  • iOS/tvOS (x64, arm64)
  • Android (x86, x64, armv7, arm64)
  • Windows (x86, x64)
  • Linux (x64)
  • OSX (x64, arm64)
  • UWP (x64, arm64)
  • Wasm32

Supported 2D physics engines (more info here):

  • Box2D
  • Chipmunk2D

Supported 3D physics engines:

  • Bullet Physics SDK

Included extensions:

More extensions created by our community

Features

Some highlights:

  • New MediaPlayer: render video as texture2D using MediaEngine. More info in our Wiki.
  • Windows video player support (based on Microsoft Media Foundation)
  • WebAssembly support (by @nowasm) - Preview: Axmol tests
  • Universal Windows Platform (UWP) support for Xbox consoles
  • Apple M1 and Android x64 support (by @pietpukkel)
  • Windows x64 build support
  • Improved Windows workflow, supporting linking with engine prebuilt libs. Please read the Windows workflow guide.
  • Refactored AudioEngine, OpenAL for all platforms:
    • OpenAL Soft (pass -DAX_USE_ALSOFT=ON to CMake to force enabling it)
    • OpenAL.framework (if no AX_USE_ALSOFT option specified, cmake script will choose it on OSX/iOS/tvOS, even though it was marked as deprecated is still available)
  • Implemented all .wav formats supported by OpenAL Soft (MS-ADPCM, ADPCM, etc.)
  • Refactored UserDefault with mio
  • Upstream Version License - Third-party:
    • Third-party license overview, for easier publishing of your commercial apps based on Axmol framework.
    • Some links to third party libs which support axmol too.
  • Upstream Version License - Extensions:
    • Extensions license overview, for easier publishing of your commercial apps based on Axmol framework.
  • Reimplemented HttpClient based on yasio for concurrent http requests processing.
  • Modularized all optional extensions, move from engine core folder to an extensions folder.
  • Use Google Angle as default renderer backend on Windows.
  • Using GL loader Glad.
  • Using pugixml
  • Using curl for transferring data with URL syntax
  • Using SAX parser for .plist files
  • ASTC 4x4 / 6x6 / 8x8 support (if hardware decoding is not supported, then software decoding is used)
  • ETC2 RGB / RGBA support (if hardware decoding is not supported, then software decoding is used)

Please read the full list of changes since Cocos2d-x v4.0.

See the Milestones for planned features.

Contributions

How to contribute:

  • Suggestions, bug fixes, and improvements are highly appreciated!
  • Please do not forget to add the topic axmol and axmolengine to any related repository you create!
  • Adding a star on GitHub will help Axmol grow as well. Thank you!

If you find Axmol Engine helpful, please consider donating in Open Collective or in GitHub Sponsors. Thank you very much!

Community

Our community is growing! Please join us at:

In order to see some of our community works, please check our Axmol Showcase: Made in Axmol

Reference links

Axmol Stats

Alt

axmol's People

Contributors

aismann avatar armanhossiny avatar asakuramizu avatar axmol-bot avatar bintester avatar binxiaojiao avatar cocosrobot avatar crazyhappygame avatar danialias avatar delinworks avatar grif-on avatar halx99 avatar iamsanjid avatar iandyhd3 avatar j-jorge avatar joilnen avatar lich426 avatar minggo avatar patricejiang avatar paulocoutinhox avatar rh101 avatar samoongeer avatar smilediver avatar solan-solan avatar theunwisewolf avatar tkzcfc avatar tyelord avatar weiwest avatar wzhengsen avatar yehsam23 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

axmol's Issues

Setup guide, now win32 & ios is ready, put to README.md required.

Now 3rd bin for win32 & ios is ready, after thus, then you can do follow to run cpp-tests:
Win32

python download-deps.py
mkdir build
cmake -A Win32 ..
cmake --build . --config Debug --target cpp-tests

ios xcode:

brew update
brew install git
brew install cmake
brew install autoconf
brew install automake
brew install libtool
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
mkdir build
cd build
cmake .. -GXcode -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos -DCMAKE_C_COMPILER=/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -DCMAKE_CXX_COMPILER=/Applications/Xcode.app/Contents/Developer/usr/bin/g++
cmake --build . --config Debug --target cpp-tests

Android build info: Note: Some input files use or override a deprecated API.

More an info:

Android Studio build
Steps to Reproduce:

Task :libcocos2dx:compileDebugJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

async await

Hi, If you are modifying to latest C++, can consider await asynci instead of callbacks.

Refine audio again, merge sources

  • cocos2d-x version:
  • devices test on:
  • developing environments
    • NDK version:
    • Xcode version:
    • VS version:
    • browser type and version:

Steps to Reproduce:

[SSE] 0xC0000005: Access violation reading location 0xFFFFFFFF.

  • cocos2d-x version:
  • devices test on:
  • developing environments
    • NDK version:
    • Xcode version:
    • VS version:
    • browser type and version:

Steps to Reproduce:

  1. add SSE check at cocos/CMakeLists.txt
check_cxx_compiler_flag("/arch:SSE2" HAVE_ARCH_SSE2)
if(HAVE_ARCH_SSE2)
    target_compile_definitions(cocos2d PUBLIC __SSE__=1)
    message(STATUS "Building with SSE2")
endif()
  1. run cpp-empty-test

Improve StringUtils::format reuseable

  • cocos2d-x version:
  • devices test on:
  • developing environments
    • NDK version:
    • Xcode version:
    • VS version:
    • browser type and version:

Steps to Reproduce:

32:Node:MotionStreak shows heavy artefacts

Windows10/VS2019

Steps to Reproduce:

#define "CC_USE_GLES_ON_DESKTOP 1"

  1. start 32:Node:MotionStreak
  2. see screenshot below => with "CC_USE_GLES_ON_DESKTOP 0" there is the cloud without the gray "arrows/lines"

32_Node_MotionStreak

void DrawNode::setLineWidth(float lineWidth) supports only thickness between 1...7 (and setLineWidth(x) draws a "linewidth x-1"

Windows 10 / VS2019

Steps to Reproduce:

DrawNode::setLineWidth(0); and DrawNode::setLineWidth(1); draws a line width 1

DrawNode::setLineWidth(x); draws a line width x-1

Maybe an hint like the snippet below is usefull?

void DrawNode::setLineWidth(float lineWidth)
{
if (lineWidth <= 0)
{
CCLOG("DrawNode::setLineWidth(%f) is not realy usefull.", lineWidth);
}
else if(lineWidth > 7) // lineWidth > 7 is not correct drawn
{
CCLOG("DrawNode::setLineWidth(%f) is out of supported width 1...7.", lineWidth);
}
_lineWidth = lineWidth + 1.0f;
}

float DrawNode::getLineWidth()
{
return _lineWidth -1.0f;
}

Android/Windows: list of crashing tests

  • cocos2d-x version:
  • devices test on: Pocophone F1 / Windows10

ANDROID only:
Tests chrashing "on start"
6:Chipmunk

ANDROID & WINDOWS:
Test chrashing after press "back" (some test be done)
12:yasio

WINDOWS only:

Unhandled exception at 0x755849C2 in cpp-tests.exe: Microsoft C++ exception: std::out_of_range at memory location 0x00D8E634.

Windows 10 / VS2019

Steps to Reproduce:

  1. Start 38:Node: Physics3D -> press only the right green arrow -> after 5:Physics3D Test => Crashing

Unhandled exception at 0x755849C2 in cpp-tests.exe: Microsoft C++ exception: std::out_of_range at memory location 0x00D8E634.

CCImage.cpp line 815
on bool Image::isCompressed()
{
return Texture2D::getPixelFormatInfoMap().at(_pixelFormat).compressed;
}

This app only has 32-bit [armeabi-v7a] native libraries. Beginning August 1, 2019 Google Play store requires that all apps that include native libraries must provide 64-bit versions. For more information, visit https://g.co/64-bit-requirement

Should be on the roadmap:
This app only has 32-bit [armeabi-v7a] native libraries. Beginning August 1, 2019 Google Play store requires that all apps that include native libraries must provide 64-bit versions. For more information, visit https://g.co/64-bit-requirement

Resouce: "wav-samples/8kadpcm.wav" is missed

engine-x source: _audioID = AudioEngine::play2d("wav-samples/8kadpcm.wav", _loopEnabled, _volume);
v4 source: _audioID = AudioEngine::play2d("background.mp3", _loopEnabled, _volume);

Maybe there is a reason to use "8kadpcm.wav", so I want not send a pull request with "background.mp3"

ASTC ios

  • cocos2d-x version:
  • devices test on:
  • developing environments
    • NDK version:
    • Xcode version:
    • VS version:
    • browser type and version:

Steps to Reproduce:

Improve thirdparty management

Final prupose

  • All prebuilt libs should build from buildware
  • All libs which are not suitable with adxe cmake build system or other reason should be prebuilt
  • win64 support

prebuilt libs arch

  • windows
    • x86
    • x64
  • android
    • armv7
    • arm64
    • x86
  • ios
    • armv7 (DEPRECATED)
    • arm64
    • x64(simulator)
  • macos
    • x64
  • linux
    • x64

prebuilt libs

  • jpeg-turbo (buildware)
  • openssl (buildware)
  • curl (buildware)
  • luajit (buildware)
  • zlib
  • angle (win)
  • glsl-optimizer (ios&mac)

Rename folder

  • external to thirdparty

Roadmap

Notes

ProgramState* ProgramStateRegistry::getProgramState(ProgramType programType, Texture2D* texture)
{
 auto textureFormatEXT = texture ? texture->getTextureFormatEXT() : 0;
 
 char hashMe[sizeof(programType) + sizeof(texture)];
 memcpy(hashMe, &programType, sizeof(programType));
 memcpy(hashMe + sizeof(programType), &texture, sizeof(texture));
 auto key = XXH32((const void*)&hashMe, sizeof(hashMe), 0);

 auto iter = _programStateCache.find(key);
 if (iter != _programStateCache.end())
     return iter->second;

 auto programState = newProgramState(programType, textureFormatEXT);
 if (programState) {
     _programStateCache.emplace(key, programState);
 }
 return programState;
}

Engine core

  • RenderTarget abstract
  • Refactor enums map method, use table instead many much switch case
  • Cache depthstencil state, tsl::robin_map
  • Remove FileUtils::getFileDataFromZip, recommend use ZipFile instead
  • ASTC 4x4/8x8 support
  • ETC2 RGB/RGBA support
  • Improve Image, fast forward compression texels data to GPU
  • Refactor audio engine, OpenAL for all platforms
  • Remove SimpleAudio
  • Remove offthread file operation
  • Explicit convert utf-8 file path to wide-string and call wide win32 file operation APIs
  • Refactor Downloader, curl for all platforms, don't use scheduler to retrieve progress info, make it more reusable
  • minizip-1.2.0
  • ccMessageBox
  • BMP support with stb_image
  • Remove unused libuv
  • Reorder child support
  • Remove tinyxml2 dep, use pugixml instead
  • Use xsxml for SAX parser only
  • Multi meta textures v1.0
  • ProgramStateRegistry
  • ANGLE support.
  • Use curl for HttpClient all platforms
  • Remove xxtea
  • Remove rapidxml dep
  • Fix etc1 alpha test case, content size incorrect
  • Remove fmod for linux
  • Use stat to check regular file exist for android platform
  • Use int64_t as return type for getFileSize
  • ios .ogg support
  • ZipUtils streaming API, support streaming play audio file in android obb
  • Add & Improve play .wav audio at all platforms
  • Remove unnecessary workaround to process audio tail frame at non-apple platforms.
  • Cache ProgramState
  • Remove socket.io websockets, use yasio for socket connection solution
  • Fully streaming play for all media file: .mp4, .mp3, .ogg, .wav
  • Streaming load for .ttf with freetype2
  • Remove CCB(already removed in v4)
  • Purely offthread load texture, use shared gl context
  • Refactor UserDefault with file mapping io with encrypt support
  • msaa
  • Refactor VideoPlayer
  • GPU texture array support
  • OpenGL RenderBuffer for depth stencil buffer D24S8

Thirdparty

  • Use git submodules to manage 3rd libs or marge 3rd repo to main repo
  • Update zlib to 1.2.11

Extensions:

  • move spine, ccs, dragonBones to extensions
  • All extensions should be optional and can disable relax
  • ImGuiEXT
  • FairyGUI
  • spine-3.8
  • cocostudio
  • dragonBones
  • Also move lua binding to extension
  • Also move spine-cpp to extension
  • EncryptSystem
  • particle system: https://github.com/effekseer

Toolsets And build env

  • Use system env for cmake to avoid copy engine sources when create new project
  • lua-template and lua-empty-test needs fix
  • New command line tool
  • GUI Peoject Creator
  • Sence Editor with ImGui

Lua Binding

  • Lua53 compat
  • Use plainlua instead luajit
  • make lua test works well
  • Remvoe luasocket, use yasio for socket connection solution
  • Use sol2 for binding framework instead tolua++

poors of LuaJIT

  • Lack of maintain
  • High crash from game developer
  • Performance(jit==on) slow than planlua without restricts programing (luajit have to many programing restricts)

benefit of lua5.4

  • compat bytecode 32,64bit app without any changes

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.