很多人曾经疯狂地玩过疯狂的小鸟.中国也曾出现过类似的游戏疯狂过一阵.这些游戏是基于一个叫做Box2D的游戏引擎.在今天的介绍中,我们来介绍如何在Ubuntu平台上开发自己的类似的游戏.不过这个引擎的名称称之为Bacon2D.利用这个引擎,我们可以开发出我们很多有趣的应用.
$git clone https://github.com/kenvandine/Bacon2D.git
$ git submodule update --init
$ mkdir build && cd build $ qmake .. $ make $ sudo make install
install -m 755 -p "imports/Bacon2D/libbacon2dplugin.so" "/usr/lib/x86_64-linux-gnu/qt5/qml/Bacon2D.1.0/libbacon2dplugin.so" strip --strip-unneeded "/usr/lib/x86_64-linux-gnu/qt5/qml/Bacon2D.1.0/libbacon2dplugin.so" install -m 644 -p /home/liuxg/release/Bacon2D/src/PhysicsEntity.qml /usr/lib/x86_64-linux-gnu/qt5/qml/Bacon2D.1.0/ install -m 644 -p /home/liuxg/release/Bacon2D/src/BoxBody.qml /usr/lib/x86_64-linux-gnu/qt5/qml/Bacon2D.1.0/ install -m 644 -p /home/liuxg/release/Bacon2D/src/ChainBody.qml /usr/lib/x86_64-linux-gnu/qt5/qml/Bacon2D.1.0/ install -m 644 -p /home/liuxg/release/Bacon2D/src/CircleBody.qml /usr/lib/x86_64-linux-gnu/qt5/qml/Bacon2D.1.0/ install -m 644 -p /home/liuxg/release/Bacon2D/src/EdgeBody.qml /usr/lib/x86_64-linux-gnu/qt5/qml/Bacon2D.1.0/ install -m 644 -p /home/liuxg/release/Bacon2D/src/ImageBoxBody.qml /usr/lib/x86_64-linux-gnu/qt5/qml/Bacon2D.1.0/ install -m 644 -p /home/liuxg/release/Bacon2D/src/PolygonBody.qml /usr/lib/x86_64-linux-gnu/qt5/qml/Bacon2D.1.0/ install -m 644 -p /home/liuxg/release/Bacon2D/src/Boundaries.qml /usr/lib/x86_64-linux-gnu/qt5/qml/Bacon2D.1.0/ install -m 644 -p /home/liuxg/release/Bacon2D/src/RectangleBoxBody.qml /usr/lib/x86_64-linux-gnu/qt5/qml/Bacon2D.1.0/ install -m 644 -p /home/liuxg/release/Bacon2D/src/qmldir /usr/lib/x86_64-linux-gnu/qt5/qml/Bacon2D.1.0/
$sudo add-apt-repository ppa:bacon2d-team/ppa $sudo apt-get update && sudo apt-get install qtcreator-template-bacon2d
$ apt-get install qtdeclarative5-bacon2d1.0:armhf && exit
:-1: error: security_policy_version_matches_framework (bacon2dtest/bacon2dtest.apparmor): 1.2 != 1.3 (ubuntu-sdk-15.04)
{ "policy_groups": [ "networking" ], "policy_version": 1.3 }