SuperTuxKart for Android?

Re: SuperTuxKart for Android?

Postby deve » 06 Feb 2017, 12:38

Hi jymis,

It looks great, thanks a lot! I sent you an email with few questions.

Btw. I already improved the fire button, so that now it displays the powerup icon and the "+" character if there is more than 1 item. And it's not displayed at all when there is no powerup, as you suggested.
deve
 
Posts: 166
Joined: 23 Jan 2014, 13:45

Re: SuperTuxKart for Android?

Postby jymis » 07 Feb 2017, 23:46

Here are the files :)
Attachments
android_ui.zip
(292.98 KiB) Downloaded 23 times
User avatar
jymis
 
Posts: 137
Joined: 28 May 2012, 12:00

Re: SuperTuxKart for Android?

Postby deve » 11 Feb 2017, 01:38

I already added your icons to the game. Here are the screenshots:
screenshot.png

screenshot-nopowerup.png


Btw. turning left/right using accelerometer is already done either. Though at this stage you need to manually enable it in options, because it's not possible to get default device orientation using NDK functions. So it's unknown if we should use X or Y axis, and thus user must choose if he needs "phone" or "tablet" accelerometer. Most probably the only way for fully working solution is to use java code.
deve
 
Posts: 166
Joined: 23 Jan 2014, 13:45

Re: SuperTuxKart for Android?

Postby QwertyChouskie » 11 Feb 2017, 01:49

Get default device orientation using NDK functions: http://irrlicht.sourceforge.net/forum/v ... =9&t=50206
User avatar
QwertyChouskie
 
Posts: 84
Joined: 29 Jun 2016, 14:57

Re: SuperTuxKart for Android?

Postby Worldblender » 11 Feb 2017, 19:01

Pushed a newer build compiled on 2/10/2017, replacing the previous one. See my Dropbox link for the new build.
User avatar
Worldblender
 
Posts: 32
Joined: 15 Aug 2014, 18:46

Re: SuperTuxKart for Android?

Postby Worldblender » 24 Feb 2017, 21:28

I pushed another build from 2/24/2017, replacing the 2/10/17 build. New in this build are updated icons in the race screen, accelerometer support (it comes disabled by default, but can be enabled in the config screen for the touchscreen. I also included all of the assets, including the karts, tracks, challenges, and grand prixes, like as if it was the desktop distribution (save for a few experimental tracks), so the file size is somewhat larger. I hope the new changes here bring a better experience for all of you!
User avatar
Worldblender
 
Posts: 32
Joined: 15 Aug 2014, 18:46

Re: SuperTuxKart for Android?

Postby deve » 25 Feb 2017, 00:35

The current version should also look much more similar to the original OpenGL 3.x renderer. It's not too dark anymore. There are also other minor fixes such as fixed a square below a kart when the kart shadow texture is missing, fixed a nitro gauge misplacement in multiplayer games etc...

If you have some crashes, it would be nice to get a backtrace, so that I can look at this and maybe fix some things before a release. The easiest way to get complete log is to connect a device to usb port and run command:
adb logcat | grep "SuperTux\|Irrlicht\|DEBUG"
The Adb is available in ubuntu repositories.

One known issue is that legacy pipeline (GLES 2.0) is currently broken. It at least doesn't work anymore on my tablet and on android emulator. I will see if it can be easily fixed, but the legacy pipeline is not officially supported anyway.
deve
 
Posts: 166
Joined: 23 Jan 2014, 13:45

Re: SuperTuxKart for Android?

Postby GreenMonkeyGames » 26 Feb 2017, 08:02

Its, a very fun Mario-ish game with its own style, there are many users created worlds available. my only issue is with the performance.
GreenMonkeyGames
 
Posts: 1
Joined: 26 Feb 2017, 07:53

Re: SuperTuxKart for Android?

Postby QwertyChouskie » 28 Feb 2017, 00:21

Yes, I think the APK might be being built in debug mode. @Worldbender can you compile an APK using "RelWithDebInfo"?
User avatar
QwertyChouskie
 
Posts: 84
Joined: 29 Jun 2016, 14:57

Re: SuperTuxKart for Android?

Postby Worldblender » 28 Feb 2017, 00:26

QwertyChouskie {l Wrote}:Yes, I think the APK might be being built in debug mode. @Worldbender can you compile an APK using "RelWithDebInfo"?

I haven't learned how to compile APKs in release mode yet, as I don't have a lot of experience with creating Android packages yet, but I'm open to learning more. I did only what I could figure out without requiring a lot of time to be spent learning things.
User avatar
Worldblender
 
Posts: 32
Joined: 15 Aug 2014, 18:46

Re: SuperTuxKart for Android?

Postby QwertyChouskie » 28 Feb 2017, 00:38

@deve maybe that should be added to the Android readme.md?
User avatar
QwertyChouskie
 
Posts: 84
Joined: 29 Jun 2016, 14:57

Re: SuperTuxKart for Android?

Postby deve » 28 Feb 2017, 06:32

Ok, some good news. I made some fixes for legacy pipeline, so that people with Android >= 4.4 that have only GLES 2.0 GPU can still play the game.

I also made a version that should work on older android versions (tested with 4.2) by commenting out a lot of GLES 3.0 code:
https://github.com/deveee/stk-code/tree/android-4.2
I needed it to see how STK works on a phone, but you can compile it for your own use if you want :)

And I wonder why do you need accelerometer support, because on 5" phone the on-screen buttons are still more comfortable for me :-P Maybe I just got used to it...

STK as a shared library is compiled with -O3 -g -DNDEBUG, so it's something like release mode with some basic symbols. It's just the apk itself is in debug mode, so that it will report a crash backtrace to the console. You can change 'android:debuggable="true" ' in AndroidManifest.xml and 'ant debug' to 'ant release' in make.sh. But in this case you have to manually sign the apk with your key.
deve
 
Posts: 166
Joined: 23 Jan 2014, 13:45

Re: SuperTuxKart for Android?

Postby deve » 25 Mar 2017, 22:52

Cocoa Temple at highest settings (without shadows and GI). But don't ask abot fps :-P
screenshot.jpg
deve
 
Posts: 166
Joined: 23 Jan 2014, 13:45

Re: SuperTuxKart for Android?

Postby menu261 » 01 May 2017, 15:13

I've successfully installed the apk build by Worldblender. It's amazing :cool: STK for Android :-) I love it
I've tested with both OnePlus 3T (OOS) and Android TV by Sony

Every thing does work perfectly

But I have a little question:

On my Android TV I have two Logitech controller connected - how can I make them work? They work on other Apps (for example the settings app) but once I'm on the stk app they don't show any functionality

Thank you :)
menu261
 
Posts: 2
Joined: 01 May 2017, 15:06

Re: SuperTuxKart for Android?

Postby deve » 02 May 2017, 20:55

I'm glad that it works :)

Atm. there is no gamepad/joystick support. The problem is that Android C/C++ API provides only basic functionality and a lot of things are missing (i.e. no unicode characters, no auto-detection of screen orientation for accelerometer etc). It looks that some work can be done (I see some AINPUT_SOURCE_GAMEPAD or AINPUT_SOURCE_JOYSTICK in Android NDK), but I can't really check it because I don't have any controller that I could use. Maybe I will also make some work using java vm, that allows to execute java functions inside C++ application, but probably after stable release.
deve
 
Posts: 166
Joined: 23 Jan 2014, 13:45

Re: SuperTuxKart for Android?

Postby QwertyChouskie » 02 May 2017, 21:24

@deve Did you see my previous post with the link to the post about how to get the default orientation? If not, here's the link again: http://irrlicht.sourceforge.net/forum/v ... =9&t=50206
User avatar
QwertyChouskie
 
Posts: 84
Joined: 29 Jun 2016, 14:57

Re: SuperTuxKart for Android?

Postby deve » 12 May 2017, 08:43

@QwertyChouskie This is what I meant by using java vm. It's not just for screen orientation. It's also for better keyboard support (detect if we have physical keyboard connected, allow to write national characters), allow to hide navigation buttons when playing, probably also get gamepad count and names, get information about android version, user name, default language etc... Maybe I will make some work after STK 0.9.3.

@menu261 Proper gamepad support is not trivial to do, but you can easily make some hacks if you have enough skills. I mean assign some key codes to irrlicht keys in CIrrDeviceAndroid.cpp. Gamepads seem to usually use AKEYCODE_BUTTON_1-16, AKEYCODE_BUTTON_A,B,C,X,Y,Z, AKEYCODE_BUTTON_START etc. So that you can assign it to for example KEY_KEY_1, KEY_KEY_2 etc. The directional pad is a bit more complicated because the events are received as mouse events. But you can just send left/right/up/down irrlicht key event using postEventFromUser() (though this will probably break mouse support).
deve
 
Posts: 166
Joined: 23 Jan 2014, 13:45

Re: SuperTuxKart for Android?

Postby menu261 » 12 May 2017, 15:13

Okay I'll try :think:
Where is the source code found (GitHub?) And where is this file you told? I'm new to stk development - sorry for this stupid question :p
First of all I need to understand how to compile the code - next I'll :!: try :!: to add the functionality :? :think:

Edit:
I've found it https://github.com/supertuxkart/stk-cod ... ndroid.cpp

I have a new idea: I like to add another "controller":
I like to write an Android app as the controller - so you can pear the device with the Game - maybe via something like a nodejs server with socket io
Can you please tell me which files I need to edit to add a new kind of controller I would need years to search all the files

Maybe I'll also add a new entry to the options/controller settings
I wonder if you could tell me where I can find all those files
menu261
 
Posts: 2
Joined: 01 May 2017, 15:06

Who is online

Users browsing this forum: No registered users and 1 guest