You are browsing the archive for pascal.

Hedgeroid update!

November 26, 2011 in C++, Games, JNI, NDK, Qt framework

[ED: interesting concept for a game Frontend in qt C++ , engine in pascal and lua

you can check the code here ]

Hello,

today a new version of Hedgewars for Android hit the Market!

https://market.android.com/details?id=org.hedgewars.hedgeroid

For users who are updating: please download the additional package again. (Hit download and click on Full data Package)

The last version had a lot of crashes while in the game, the reason for this was because we used 22khz sounds, and sdl didn’t go well with that, I’m still trying to find out exactly why. To prevent the game from crashing that ofter I’ve gone back and used 44khz.

I’ve also changed the way you can download new content, right now only two packages are on there but there might be more soon enough :)

Plus there were some tweaks in the UI mostly hardly noticable.

Xeli

New FreePascal OpenGL Android Example

November 14, 2011 in NDK, Tutorials

There is a new Android NDK example in the Lazarus CCR. The most important thing that this example adds is that there are precise step-by-step instructions for the entire process and also a full project structure for building it. The instructions cover from configuring the cross-compiler up to installing the APK in the telephone:

http://wiki.lazarus.freepascal.org/Android_Interface/Android_Programming#Build_the_NDK_OpenGL_example

The example itself is very simple, and just processes some touch screen inputs and draws some colors in the screen.

It uses JNI and the NativeActivity so it runs on all phones with Android 2.3+ (because the cross-compiler uses soft-float). In this example there is zero Java source code, the NativeActivity does everything that we need. This method is fully sponsored by Google, so applications built like that are really on the safe side.

I am no OpenGL expert, so I don’t know yet much about this part, so I just reused older examples for that, but what really amazed me is that I was able to create a project which correctly links to Android native libraries from the NDK, so I gained some knowledge here which I tought people might find useful:

1> Copying .so libraries from the device to link to them is not required, just link against the .so files which are in the NDK
2> Specifying the path to the .so files with -Fl works nicely as described in the example instructions
3> I previously heard from someone that FPC had some initialization issues in Android libs, but I haven’t found any in this project (I still have to check if it doesn’t appear if I added more units to the uses clause)
4> It is possible to write an application which uses OpenGL and touch screen input with zero Java code =D
5> You need at least ant 1.8 to use the latest Android SDK, so you might need to upgrade your Linux (I had to upgrade from Mandriva 2010 to Mageia 1 for this)

I hope you enjoy,

First steps of LCL-Android (Lazarus Component Library) are ready

October 1, 2011 in Frameworks

I am happy to announce that the basic infra-structure for a LCL-Android widgetset is done

Image:First_lcl_android_app.png

 

and this includes:

* An example LCL-Android application is located inside the Lazarus sources in lazarus/examples/androidlcl/androidlcltest.lpi
* An application which automatically generates bindings for the Android SDK
* Basic widgetset implementation for TForm and TButton

To create new LCL-Android applications one should first make sure that he can compile the example application and install and run it. Then copy it, modify all the ANT build files to the new project, change the Java files package name, add an icon, application name, etc, and it is should be ready. Of course, not much is implemented in the LCL-Android at this moment, so one will need to send patch for the LCL-Android to get things running =)

The LCL-Android uses native widgets at the moment, but complex widgets without a compatible Android equivalent will be implemented using an OpenGL surface and a control from the Custom Drawn Package.

Basically I just though it would be good to anounce that the LCL-Android achieved a milestone and that at this point it is rather easy for people to contribute to this project because the basic infrastructure is ready. Basically this means that contributors are welcome ;)