I am learning a little bit about OpenGL and this is a repository to put in practice my knowledge. I am trying to create a simple brick breaking game.
You can build a Android version using Android Studio or a desktop version building it using CMake on Linux.
- java # to run gradle wrapper
- g++
- cmake
- libglfw3-dev
- libgles2-mesa-dev
- xorg-dev
- adb
- Android sdk version 30
- Android Studio # to download the SDK, still don't know how to make gradle download it before the build
- First you need to have the Android sdk install somewhere.
- Then clone the project.
- Now manualy create a
local.properties
file in the root of the project with the Android sdk directory like this:sdk.dir=/home/<User>/Android/Sdk
, NOTE: replace with your username. - Finally you can run the build script
build-linux.sh
to build and run the app.
git clone https://github.com/simonppg/Break_it_all.git ~/Break_it_all
cd Break_it_all
touch local.properties
echo "sdk.dir=/home/<User>/Android/Sdk" >> local.properties
./build-linux.sh
If everything when well, the app should start running, and a new window will show a "sandbox scene".
- Handle window resize.
- Cursor position change detection.
- Key press detections only for ESC, W, A, S, D and L keys.
- Touchscreen detection (Android only).
After running the build script build-linux.sh
you should have a Break_it_all/linux-build
directory, there you can run make
commands. So you can recompile again without waiting for cmake
configurations.
cd Break_it_all/linux-build
make run
This commands would build and run the app on your Android phone and then show the logcat on the console.
./gradlew run
or if you want to change the filters, connect to you phone running a shell session using adb and then run logcat with different options.
./gradlew runApp
adb shell
logcat libNative:I *:S
Other useful gradle tasks:
./gradlew installDebug
./gradlew runApp
./gradlew clearLogcat
./gradlew run
If non of that works, you still can build with Android studio.
- Android studio of course.
- cmake
- Android sdk version 30
- Android ndk
You can install Android studio with this commands:
sudo add-apt-repository ppa:maarten-fonville/android-studio
sudo apt update
sudo apt install android-studio
Then just click on the run button I guess 🙈.
TODO: finish this part of the docs.