Polling on D for Android

H. S. Teoh hsteoh at qfbox.info
Fri Apr 14 17:40:17 UTC 2023


On Fri, Apr 14, 2023 at 03:57:12PM +0000, Hipreme via Digitalmars-d wrote:
> Hello Guys.
> I have been implementing complete automatizations on my Game Engine
> for actually building easily for any platform. i.e: You don't need to
> set it up, you just run my script, select the platform you want and it
> will handle all the pesky details.
> 
> I have done that already for MacOS and WASM, and right now I'm
> finishing one for Android which basically tries to find your SDK and
> NDK, if doesn't find, it auto installs and set it up for you and also
> let you build your D code for it (currently only my engine is
> targeted).
> 
> And this is something I would like to ask: Is there anyone more
> wanting to use D for Android here? I could try making the code a
> little more flexible (not that much). I know that nowadays working D
> for Android requires quite a lot of reading and that is pretty bad and
> time wasting.

I'd love to have a nicer D interface to Android.  I like to install the
SDK/NDK by hand, so it would be nice if it was possible to point your
script to a custom installation location.


> So, that being said:
> 
> 1. What would you like to do between Android and D? I personally don't
> recommend anyone actually dealing with Android interface from D
> because this is a ground not yet explored by me (i.e: I don't use
> native activity, it is pretty painful).
>
> 2. What would you need? Currently my engine has a module that supports
> binding to java functions, it supports logging, those are the useful
> things.  It is not as complete as arsd.jni. This part I don't really
> intend to develop for the community but it would be good to know what
> you need.
[...]

It would be nice to have:

(1) An easy way to create a text window for displaying log messages /
debug messages for development. It's possible to do this manually of
course, but it's just an extra barrier (you have to debug the debug
window before you can debug the program!).

(2) An easy way to create window and get a GL / GLES rendering context /
canvas from it, that D code can use for further operations. I have an
Android project (currently on the backburner) that does this manually,
and it's just a lot of fiddly boilerplate. Would be ideal if a single
function call or two could do it all for me.

(3) An easy way to render text on a GLES canvas. There's a system
libfreetype on Android but it's not very accessible to user code the
last time I checked, you have to ship your own version of libfreetype,
etc., etc.. It's just a lot of manual work, and mostly just boilerplate.
Some way of automating this away would be very nice.


T

-- 
If it breaks, you get to keep both pieces. -- Software disclaimer notice


More information about the Digitalmars-d mailing list