[go: nahoru, domu]

Skip to content

OLC Pixel Game Engine Mobile 2.0 for Android

Latest
Compare
Choose a tag to compare
@Johnnyg63 Johnnyg63 released this 21 Oct 12:40
· 89 commits to master since this release
8e356ea

This is the official release of OLC Pixel Game Engine 2.0 Mobile for Android.
With this release you can easily port over all your amazing OLC PGE 2.0 games and have them running successfully on Android.
All of One Lone Coder YouTube Videos OLC PGE 2.0 examples will work on OLC PGE 2.0 Mobile.
https://www.youtube.com/@javidx9

The file structure is different on the Android so take note of how files are saved, loaded (The demos will help you with test)
Please follow the setup instructions to get your environment up and running.

Please report all bugs to https://discord.com/invite/WhwHUMV or on GitHub: https://github.com/Johnnyg63

Have fun coding!!!!

And thank you to everyone for your help and support with this project


OLC Pixel Game Engine Mobile Android Project 2.2.3

For Android Studio (Windows/Linux/MAC) Use this project: OLC Pixel Game Engine Mobile 2.2.3 for Android Studio

!!! 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 plus keep it simple 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.


Kind regards

John (aka Johnnyg63)


Now with sound support

Supports olcPGEX_MiniAudio.h
https://github.com/Moros1138/olcPGEX_MiniAudio/ thanks @Moros1138

Supports the latest Android Phones and GPUs
SDK 23 --> 33 and beyond

For Android we needed to split the renderer into Renderer_OGLES10 and Renderer_OGLES20. Although most of the code is pretty much the same there maybe updates in the future to support newer & newer Android GPUs coming to the market and I didn't want to end up in a mess of conditional statements... well not yet anyway.

The olc_ConfigureSystem() manages this:
Renderer_OGLES10: Support for SDK 23 - 29 This code better supports ARM devices, however ARM64 will work just fine with it.
Renderer_OGLES20: Support for SDK 30 - 33 and beyond. This code is really for ARM64 and the latest GPUs on the market, also for iOS support.
You can adjust the SDK value in olc_ConfigureSystem() as you require

The Below steps are for Visual Studio on Windows,
For Android Studio (Windows/Linux/MAC) project can be found here: OLC Pixel Game Engine Mobile 2.2.3 for Android Studio

Please follow this steps folks:

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: Open Command Prompt in Administrator Mode, enter: setx -m JAVA_HOME "C:\Program Files\Java\jdk-17"

7: Open Visual Studio -->Tools-->Options-->Cross Platform. Update your SDK, NDK and Java Path as shown

8: Copy the OLCPGEMobileAndroidProjectRelease223.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: https://developer.android.com/studio/debug/dev-options

10: Run Visual Studio 2022 in Admin Mode

11: Select Create Project

12: Select OLC Pixel Game Engine Mobile 2.2.3 for Android

13: Give your game a cool name. NO SPACES Do not start your project with a number: i.e. 3DShapes, 4Runner

14: Connect your phone and rebuild the solution, enjoy OLC Pixel Game Engine Mobile 2.0!

Release 2.2.3 Support Details

  • 2.01: BETA Port code from olcPixelGameEngine.h to olcPixelGameEngine_mobile.h. @OneLoneCoder
  • 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

Apple Platforms will not see these updates immediately
iOS port in progress. Beta release due soon