The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Let's make this working on Android
onager Offline
Junior Member

Posts: 5
Threads: 2
Joined: Mar 2020
Reputation: 0
#1
Let's make this working on Android

Good evening everybody!
I am planning to do a big rework of HPL1 and Penumbra: Overture code.
As my final goad I would like to get Penumbra: Overture running on Android; this requires a lot of work and I'm not sure if it's even possible at this point.
I see this this way: code from Github should be compilable with Android Studio/NDK, but game will run only if game assets from bought game are put in correct place during build so they are copied during build in resulting APK file, similarly as it is done currently for other platforms.

I managed to compile game on older Xubuntu 12.04 (Virtualbox VM), I have the following problems:
1. In fullscreen mode mouse is kinda hypersensitive, mostly stuck at edge screen, not playable
2. In windowed mode mouse behaves better in menu so you can actually start the game, it is not always aligned properly, like it doesn't account for the fact that window may not be at top left corner.
In actual game it is also crazy.
3. If shader setting is anything above "Very low", everything becomes blue
4. When I inspect things in the beginning scene, image does strange things, like super zoomed in.
5. Both Angelscript and game has to be compiled with AS_MAX_PORTABILITY, otherwise it crashes. I believe this means lower performance, but I don't care about performance at this point.

Note that most of these problems also reproduce on latest Steam version.
It was compiled by newer gcc than originally used, it can be seen from this:
objdump -s --section .comment penumbra.bin
Output mentions gcc 4.4.7, 4.0.2 and 4.1.1.

I've chosen to start with Linux version because it uses CMake (build system that also can be used for building native code for Android) and is in general closer to Android than others.

Here is the list of risky items for the purpose of making this game runnable on modern Linux and then on Android:
* Sound, OpenAL - should not be a problem, can be paired with OpenAL Soft which supports Android (I've seen a couple of warnings about using deprecated API, should not be a problem, also not sure about ALUT)
* FLTK - can be easily removed
* SDL1 - kinda supports Android, but option to port to SDL2 can be considered. API changes are significant though.
* Graphics, GLee - I would like to fix current issues with OpenGL first. Android supports OpenGL ES only, so no GLee (this library can't even be downloaded from official site anymore), and, more importantly, no Cg (it is a moderately risky item because Cg shaders for the game were not open sourced, but we can call Cg compiler at build time to prepare GLSL versions of those shaders, no idea if it would work though).
Interesting thing is Mesa (library responsible for OpenGL on Ubuntu) also supports OpenGL ES and EGL, so we may use that for testing.
* Angelscript - moderately risky item because of crashes that I experienced before, but portable mode gives hope. Port to use newer version is available in this fork (https://github.com/ArchyInf/HPL1Engine)
* Newton - IMO the most risky item. I contacted Julio Jerez, developer of this library, apparently source of the original version was lost. Port to use Newton 2 is also available, but the oldest versions of Newton are around revision 800 (year 2013) which is still significantly newer.

At this moment I would like to finish configuration of my Ubuntu 18.04 VM and try to build game there (easier to use because it's newer), after that fix the mouse. This will give some freedom to play with physics and actually play the game.

As you probably guess, amount of work to accomplish porting to Android is enormous, so any kind of help and contribution is very welcome. As you can see, there are many items here that can be done in parallel.
I'm open to your suggestions, opinions and any other help.
Will try to keep you informed.
03-29-2020, 09:33 PM
Find


Messages In This Thread
Let's make this working on Android - by onager - 03-29-2020, 09:33 PM



Users browsing this thread: 1 Guest(s)