Supports: Windows, Visual Studio 2019-2022, for Android and iOS Development
This project supports Android and iOS devices Android SDK 21 --> 34 and beyond, iOS 13.5 --> 17.2 and beyond
For Visual Studio All In One (Android and iOS) Project Template: OLC Pixel Game Engine Mobile 2.2.8 Visual Studio for Android and iOS
For Visual Studio Android Only (Windows) Use this project: OLC Pixel Game Engine Mobile 2.2.8 for Android Visual Studio
For Android Studio (Windows/Linux/MAC) Use this project: OLC Pixel Game Engine Mobile 2.2.8 for Android Studio
For Xcode (MAC) Use this project: OLC Pixel Game Engine Mobile 2.2.8 for Xcode
The OLC Pixel Game Engine Mobile Edition is a feature-rich fork of the original OLC Pixel Game Engine.
-
Community Interest:
The mobile edition has garnered attention from programmers who want to create games for Android and iOS platforms.
It’s actively maintained and developed by contributors. -
Cross-Platform Support:
The mobile edition extends the original engine to support Android and iOS.
Developers can create games that run on both desktop and mobile devices. -
Extensions and Features:
The mobile edition includes additional features like mobile input handling, sound, and hardware interfaces.
The mobile edition is built on SIMD/NEON advance vectorizations to ensure the fastest engine to pixel generation.
It’s a versatile tool for prototyping, education, mobile game development and algorithm visualization for both Android and iOS devices. -
Growing User Base:
While not as widely known as the original, it’s steadily gaining popularity.
Developers appreciate its simplicity and flexibility.
Remember that both versions—original and mobile—are valuable tools for game development and learning. If you’re interested in mobile game development, give the mobile edition a try! 🚀🎮
!!SHOUT OUTS!!
THANK YOU to @VasCoder without your testing this would not have been possible!
THANK YOU to @baderouaich for fixing the bug with OnUserDestroy()!
THANK YOU to @Moros1138 for PGETinker Check it out folks!!!
THANK YOU to @Javidx9 for... well everything!
WE NEED YOUR FEEDBACK PLEASE
Thank you for cloning the OLC Pixel Game Engine 2.0 Mobile.
A tremendous amount of work went into getting this engine to work smoothy with Android and iOS so you can create amazing games.
We can see that this repro gets an unbelievable number of unique clones, therefore we want to hear from you!
Please come visit me and all the volunteers at One Lone Coder and join our community.
- Discord: One Lone Coder
- YouTube: One Lone Coder
- Twitch: One Lone Coder
- Website: www.onelonecoder.com
- PGETinker: PGETinker.com
Kind regards
John (aka Johnnyg63)
!!! NOW WITH iOS SUPPORT!!!
Anything you develop for PGE Mobile Android will work on the iOS
Visual Studio Android & iOS template project coming soon.
NOTE: iOS Beta 2.2.8 does not yet support sensors
If you wish to deploy to an iOS device (iPhone or iPad) you will need access to an Apple Mac Computer and an iPhone.
Please follow these steps on how to setup your Mac xCode to work with Visual Studio: https://learn.microsoft.com/en-us/cpp/cross-platform/install-and-configure-tools-to-build-using-ios?view=msvc-170
I don't make the rulez about iOS... Apple does
...however anything you create to work on PGE Mobile Android will work on the PGE Mobile iOS
Please see installation steps for Windows Visual Studio towards the bottom of this page
!!! IMPORTANT NOTICE!!!
There was a step missing from the below instructions, I did not know until today that folks where having issues with the template
Please reach out to us on Discord: One Lone Coder if every you are having issues.
You must accept the Android Terms and Conditions in order to use OLC PGE Mobile STEP 6 Below:
- Windows
- Open Command Prompt in Administrator Mode
- setx -m JAVA_HOME "C:\Program Files\Java\jdk-17"
- Navigate to: "C:\Program Files (x86)\Android\android-sdk\cmdline-tools\11.0\bin"
- Enter: "sdkmanager.bat --update"
- Accept: "Y"
- Linux, MacOS
- Navigate to: "sdk/tools/bin"
- Enter: "sudo ./sdkmanager --licenses"
- Accept: "Y"
!!! Known Issues !!!
Segmentation Fault: Affects some phones
If you see a Segmentation Fault at the start of debugging (can occur up to 4 times, Visual Studio 2019/2022) just change your platfrom to ARM .
Ensure you change your platfrom back to ARM64 when you intent to release your game
!!! Visual Studio Installation !!!
For Android Studio (Windows/Linux/MAC) project can be found here: OLC Pixel Game Engine Mobile 2.2.8 for Android Studio
1: Launch Visual Studio 2022 Installer
2: Click Modify
3: Install Mobile Development with C++
5: Install Java 17: https://www.oracle.com/java/technologies/downloads/#java17
6:Accept Android Terms and condidtions:
- Windows
- Open Command Prompt in Administrator Mode
- setx -m JAVA_HOME "C:\Program Files\Java\jdk-17"
- Navigate to: "C:\Program Files (x86)\Android\android-sdk\cmdline-tools\11.0\bin"
- Enter: "sdkmanager.bat --update"
- Accept: "Y"
- Linux, MacOS
- Navigate to: "sdk/tools/bin"
- Enter: "sudo ./sdkmanager --licenses"
- Accept: "Y"
7: Open Visual Studio -->Tools-->Options-->Cross Platform. Update your SDK, NDK and Java Path as shown
8: Copy the OLCPGEMobileAllInOne228.zip to your Projects Templates folder. Example: C:\Users\your username\OneDrive\Documents\Visual Studio 2022\Templates\ProjectTemplates
9: Put your Android phone into Development Mode and enable USB Debugging.
10: Run Visual Studio 2022 in Admin Mode
11: Select Create Project
12: Select OLC Pixel Game Engine Mobile All In One 2.2.8
13: Give your game a cool name. NO SPACES Do not start your project with a number: i.e. 3DShapes, 4Runner
Please Note: Keep in mind that you need see your device name appear near the solution configuration, if not, it may not build
14: First time build:
The first time you create a project from the template it may take several minutes to build.
This happens because the template needs to download/update all the files you need in order for the PGE Mobile to be successful
15: Connect your phone and rebuild the solution, enjoy OLC Pixel Game Engine Mobile 2.0!
16: For iOS Setup please follow this steps here: Teach me
!!! Release 2.2.8 Support Details !!!
- 2.01: BETA Port code from olcPixelGameEngine.h to olcPixelGameEngine_mobile.h. Thanks @Javidx9
- 2.02: Corrected support for X86
- 2.03: Update EventManager to handle, Touch, Mouse and Keyboard events
- 2.04: Corrected Touch offset, added 1 touch point, unlinked Mouse & Touch Events
- 2.05: Sensors Support added
- 2.06: Multi Touch Support
- 2.06a: Added basic mouse support for Android Emulator
- 2.07: Updated SIMD_SSE for Intel Atom devices, Updated GetTouch() to default to touch point zero
- 2.07a: Corrected two small bugs in main.cpp
- 2.08: Added ClearTouchPoints(int8_t startIndex = 0) for clearing of touch points at index x, some bug fixes too
Added Demos folder with some demos. Just Copy and Paste the code into main.cpp - 2.09: Added Demos folder with some demos
Added: FileManager: for gaining acccess to the Android Assets APK and iOS Zip Packages
app_LoadFileFromAssets()
app_ExtractFileFromAssets()
app_GetInternalAppStorage()
app_GetExternalAppStorage()
app_GetPublicAppStorage()
SmartPtr filehandler
LoadFileFromAssets()
ExtractFileFromAssets()
GetInternalAppStorage()
GetExternalAppStorage()
GetPublicAppStorage() - 2.10: Removed ASensor_getHandle() as it only supports SDK 29 and higher. Updated project to support SDK 21 to SDK32, Thank you @VasCoder
- 2.11: Corrected offset error bug in Drawline,
Added release config to build.gradle.template. Please see: https://developer.android.com/studio/publish/app-signing" and
Please see: https://stackoverflow.com/questions/9081877/how-do-i-debug-an-apk-that-is-signed-for-release for more info
NOTE: You cannot debug or deploy a release app unless you have a signing key (Android Developer Account) - 2.20 Pre-Release! Can now be used in Production Environment, have fun!
Android Keyboard mapping completed for GetKey()
Note if using a MacOS, Linux or Windows for debugging, some keys may not map correctly, directionally keys will be out of sync as Android is mapped to a Direction Pad by default - 2.21 Full Production Release
- 2.22 Better support for the latest Android phones
The Engine will now detect the correct OpenGLES setting for your Android phone and apply the correct settings - 2.23 Now with Sound, supports olcPGE_MiniAudio https://github.com/Moros1138/olcPGEX_MiniAudio/ thanks @Moros1138
Updated EventManager::HandleInput to ensure Volume UP/Down/Mute, Camera and Power Buttons are released back to the OS after execution - 2.24 iOS Beta support. Sensors not supported. Anything you develop for Android will work on the iOS
- 2.25 Corrected Fatal signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault, forgot to take (subtract) the
- 2.26 Updated olc_Configure to set OGLES_20 to use SDK 26->33. A big thanks you to @VasCoder for all his testing!!!!
- 2.27 Removed mutexTouchPoints from main engine thread, the engine will run as fast as possiable now!!!
- 2.28 Correct onUserDestroy so that it is not called every frame. A Big thank you to @baderouaich.
Added OnLowMemoryWarning()