Git Product home page Git Product logo

ant's Introduction

Ant 游戏引擎

Ant 是由灵犀互娱开发的开源游戏引擎。现阶段仅将代码仓库公开,尚未正式发布。文档、示例等均待逐步完善。如有任何问题,可在 Discussions 发帖讨论。Issues 仅用于 Bug 跟踪,请不要在里面提问题。

更新并初始化第三方库:

git submodule update --init

搭建编译环境

MSVC

  • 安装Visual Studio

MINGW

  • 下载并安装msys2

  • 修改镜像服务器

echo "Server = https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/i686/" > /etc/pacman.d/mirrorlist.mingw32
echo "Server = https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/x86_64/" > /etc/pacman.d/mirrorlist.mingw64
echo "Server = https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/\$arch/" > /etc/pacman.d/mirrorlist.msys
  • 把ming64的路径加到环境变量
echo "export MINGW=/mingw64" >> ~/.bash_profile
echo "export PATH=\$MINGW/bin:\$PATH" >> ~/.bash_profile
  • 安装gcc/ninja
pacman -Syu mingw-w64-x86_64-gcc mingw-w64-x86_64-ninja

MACOS

  • 安装xcode, ninja

编译

编译构建工具 luamake

git clone https://github.com/actboy168/luamake
cd luamake
git submodule update --init
.\compile\install.bat (msvc)
./compile/install.sh (mingw/linux/macos)

编译tools

luamake tools

编译runtime

luamake

编译选项

luamake [target] -mode [debug/release] #-mode默认是debug

运行

运行一个最简单的示例

bin/msvc/debug/lua.exe test/simple/main.lua

调试

调试一个简单的示例。目前只支持在VSCode下调试lua代码。

  • 安装VSCode;
  • 安装Lua Debug 插件;

配置一个调试用的配置:

{
    "type": "lua",
    "request": "launch",
    "name": "Debug",
    "luaexe": "${workspaceFolder}/bin/msvc/debug/lua.exe",
    "console": "integratedTerminal",
    "stopOnEntry": true,
    "outputCapture": [],
    "program": "test/simple/main.lua",
    "arg": []
},

关于ant目录结构

  • bin:编译结果,exe/dll/lib等
  • build:编译的中间结果
  • clibs:c/c++代码
  • engine:引擎基础支持代码,包括包管理器、启动代码等
  • pkg:引擎的各个功能包(包与包之间有依赖)
  • runtime:引擎运行时的不同平台支持
  • test:测试工程
  • tools:引擎相关的工具

ant's People

Contributors

junjie020 avatar actboy168 avatar pourtheworld avatar cloudwu avatar aimoonchen avatar ruochenhua avatar kinbei avatar lincolnwty avatar fangcun010 avatar dusthand avatar

Watchers

 avatar

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.