Hi everyone,
Over the last few days I have been trying to build the example plugin project as outlined on:
http://appcodingeasy.com/Gideros-Mobile/Creating-plugins-for-Android-in-GiderosOf course that guide refers to Eclipse which is no longer supported by Google, as well as being dropped by the Gideros project.
So, I have done a lot of research and resolved a lot of build issues, but I still can't seem to get it working in AS. When I rebuild the project the .so are not built, but there are no build errors. It could be something to do with the Android.mk file or the build system itself. I'm a bit stuck now.
I'm using the latest NDK and the gradle experiemental build v0.9.0-beta4.
Here's the AS project and Gideros project in drop box
https://dl.dropboxusercontent.com/u/40935009/plug-in-example.zipI'm nearly there. I just need a little help/advise from either a Gideros maintainer or a forum user that has already built a plugin.
Many thanks in advance,
Simon
Comments
Maybe if the tutorial can not be updated currently, then the obsolete one at least could be removed?
@simwhi, sorry I can't be of any actual help here
@hgy29, didn't you share some french document recently that was about writing plugins? If you could post it again I'd have a go at converting it since my current project is nearly finished.
Likes: antix
Is there no none on this forum that can assist with this? I think I am close!!!
I, as well as other forum members have been asking for help on this important topic for a long time now. I would like to make some plug-ins as well as contribute, but I do not have the prequisite knowledge to build the projects in Android Studio. The complete build process is overly complicated.
According the the main spiel on the Gideros website;
"You can easily extend the core with plug-ins. Import your existing (C, C++, Java or Obj-C) code, bind to Lua and interpret them directly."
Maybe this should be reworded to: "It is possible to extend the core..." as this is a more precise.
I have found that this is not just an issue with Gideros, but also affects a lot of other game frameworks. The developers seem to gloss over the extensions / plug-ins in favour of game features instead. My research into other frameworks have shown that they either a) have no extensions / plug-ins system or b) have extensions / plug-ins but the documentation is outdated / sparse.
There are some exceptions of course to the above such as Corona, but their plug-in development have restrictions attached (you cannot write an ad provider plug-in).
If you are a hobbyist game developer I suppose this is less of a problem. However, if you are trying to grow a business then extensions start to become more of a main focus. We could of course pay someone to help us create our plug-ins, but in that case we would not be willing to share, or we would share at a cost. I personally would like to share with the community.
In order to grow this community we need to have either an easy Gideros plug-in architecture or real world tutorials.
To summarise what I have done already (based on Eclipse / Gideros plug-in):
1. I have created a basic Gideros project.
2. I Exported to Android Studio project.
3. I added Gideros specific header files etc
4 I added specific java code.
5. I added the blinding C/ C ++ code.
6. I Added Android.mk / Application.mk files.
7. I Configured gradle files to build using Android.mk file.
8. The project builds with errors but no . so files are created.
The above is the extent of my knowledge / experience so far.
Cheers,
Simon
Likes: keszegh, Holonist
"You can easily extend the core with plug-ins. Import your existing (C, C++, Java or Obj-C) code, bind to Lua and interpret them directly."
was always a distinguishing feature of gideros, right from the beginning. so it should be doable, if not easily but at least by someone motivated, which @simwhi definitely seems so.
Likes: antix
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Likes: antix
The gradle build system in Android Studio is configured to use ndk-build.cmd, but it doesn't seem to do anything (well, I haven't seen anything). I have followed multiple tutorials on this, but to no avail. I think one of the problems is that the build system is always changing. I used the experimental build tools as suggested on an Android development site.
Another way to make the .so files would be to use CMake, but I decided against that because I want to stay as close to the old Eclipse tutorial as possible.
Do you think there are any ways to improve / ease plug-in integration?
Regards,
Simon
When building gideros plugins for a release, the build scripts just invoke ndk-build command from within the android side of the plugin source tree, and nothing more: the .so files are build.
Can you try this from a command line prompt ?
Navigate to the folder containing the subfolders jni, libs, src, objs, etc, then just invoke 'ndk-build.cmd' from there.
Note that we use NDK R10, we had trouble using more recent versions of the NDK.
Many thanks.
Sorry for the delay in posting my progress. I've been ultra busy with app updates etc. Anyway, after having a Skype chat with @hgy29 (really appreciate it), I have managed to make some progress. I got the following output from running the ndk-build.cmd from the Android Studio jni folder:
I hope you guys understand.
Cheers
Simon
EDIT- Here are the .mk files.
Application.mk:
Finally got there!!! I just need to write a tutorial with a real world example that the community can add to over time. Special thanks to @hgy29.
Cheers,
Simon
Likes: keszegh, antix, hgy29, pie
So, I've got the simple plug-in working, but I'm still scratching my head on how to get asynchronous calls to work. I've taken a look at the various plug-ins that are part of the Gideros installation, but to be honest I'm lost on how they work. I don't have the prerequisite knowledge in this specific area.
Basically, I want to create a plug-in that uses the Android text-to-speech (TTS) features. I think this would:
a) provide a simple demonstration of a real world situation using asynchronous and non
asynchronous calls between Lua <---> C/C++ <-----> java
b) be fairly easy to follow (I managed to write an Android app in about 10 minutes)
c) The plug-in could be useful to community members.
d) Additional features could be added in the future
Could someone give me some pointers / guidance on where to start?
Cheers
Simon
Just bumping this again to see if anyone can help me with asynchronous callbacks.
Alternatively, we would be willing to pay for someone to develop and document a small plug-in project for our games. The project would be to implement Text To Speech (TTS) plug-in for Android.
If you are interested, please send me a private message so that we can discuss the details further.
Thanks