Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest WME version: WME 1.9.1 (January 1st, 2010) - download

Pages: 1 2 [3] 4 5 ... 7

Author Topic: Any Linux developers out there?  (Read 86645 times)

0 Members and 1 Guest are viewing this topic.

HCDaniel

  • Regular poster
  • ***
  • Karma: 8
  • Offline Offline
  • Posts: 168
    • View Profile
Re: Any Linux developers out there?
« Reply #30 on: June 02, 2013, 05:54:08 PM »

Quote
* I removed boost dependency.
Let me check whether Linux/Android still works.

Quote
* I added dependency on libtheoraplayer. That's a big one, I'm afraid. I guess it will complicate the Linux/Android build. Perhaps I could add a preprocessor switch to disable video functionality so that the engine builds without the video libraries?
For the moment that would be a good idea. I can enable it once I have integrated it.

Quote
* For the iOS project I added a DejaVu font. It gets copied to the app bundle and the engine will use it as a fallback if loading a TrueType fails. Perhaps the Android version should do the same?
Yes, I already added a callback to retrieve a path for searching fonts. Probably its not yet working, but at least I'm prepared :)
Logged

HCDaniel

  • Regular poster
  • ***
  • Karma: 8
  • Offline Offline
  • Posts: 168
    • View Profile
Re: Any Linux developers out there?
« Reply #31 on: June 04, 2013, 08:02:55 PM »

Removing boost worked for Linux and Android as well. No more boost dependency :)

The libtheoraplayer looks quite difficult, so I did a quick-and-dirty #ifdef to disable it temporarily, so that the builds are working again.

What do you think about merging the changes from the src/ subdirectory of the fork to your main repo? I can do that if you're fine with that. I would also like to add the linux/ and android/ subdirectory. Then I could delete these from the fork, and keep the fork itself just for compiling the dependencies.

Do you have an Android device and are interested in testing the current state of the port?
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Any Linux developers out there?
« Reply #32 on: June 04, 2013, 08:32:48 PM »

Removing boost worked for Linux and Android as well. No more boost dependency :)
Yeah :) boost is nice, but was probably bit of an overkill for this project.

The libtheoraplayer looks quite difficult, so I did a quick-and-dirty #ifdef to disable it temporarily, so that the builds are working again.
libtheoraplayer comes with a CodeLite project. At least for Linux it might help?

What do you think about merging the changes from the src/ subdirectory of the fork to your main repo? I can do that if you're fine with that. I would also like to add the linux/ and android/ subdirectory.
Sure go ahead!

Do you have an Android device and are interested in testing the current state of the port?
No, unfortunately all my mobile toys are iOS :) But it should be possible to run in an Android emulator... somehow, right?
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Nihil

  • Supporter
  • Addicted to WME forum
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 528
  • Fear me! I'm evil!
    • View Profile
    • Order of Dagon
Re: Any Linux developers out there?
« Reply #33 on: June 04, 2013, 11:21:26 PM »

I have 2 Android devices I can test on, one running Android 4.2 and one with 2.3.something - if you tell me what to do I'm happy to test :-)

HCDaniel

  • Regular poster
  • ***
  • Karma: 8
  • Offline Offline
  • Posts: 168
    • View Profile
Re: Any Linux developers out there?
« Reply #34 on: June 05, 2013, 06:30:53 PM »

I tried 2 versions of codelite which both denied to load the libtheoraplayer project :( I'll have to investigate whats going wrong there.

I merged my changes into the repo now, now I'll have to do some cleanup to be able to package all Android dependencies into one .zip like for the other platforms. For LInux things are different, distributions package (almost) all dependencies already, except for SDL2, which is easy to install from source.

I have uploaded a sample Android app into the BitBucket wmelite project (https://bitbucket.org/MnemonicWME/wmelite/downloads/SDLActivity-debug.apk). If you want to test it, please install the app and put your data files in "/mnt/sdcard" (which hopefully exists on most devices and has enough space - and sometimes it is even identical to the physical SD card).

I have not worked with the emulator a lot - if you actually have a device, it is far more convenient to quickly upload the app onto it for testing & debugging. But I don't want to stop you from trying, just download the Android SDK (and NDK if you want to compile from source). After installing at least one platform incl. ARM system image, you can setup & run the emulator.
Logged

2.0

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 217
    • View Profile
Re: Any Linux developers out there?
« Reply #35 on: June 05, 2013, 06:56:46 PM »

Tried to test on my "china-made" ARM6 Android phone with 480*800 resolution. Application (1024*768) runs at portrait mode, scene is placed at the bottom of the screen, scaled to fit the width. But to move the cursor it was necessary to touch the top part of the screen. And it seems that clicks on GUI elements is works, but clicks on entities - is not.

Update: When I turned "on" auto-turn of the screen, the application was able to start in the landscape mode. Some shift between touch and cursor position is present. When application goes to exclusive mode (when it opens some windows) it seems that it lost controls (cursor hides).

data.dcp file was placed at the root of the SD card.

Performance on the 600-800 Mhz CPU is good.

Generally beginning quite nice :)
« Last Edit: June 05, 2013, 07:52:40 PM by 2.0 »
Logged

Nihil

  • Supporter
  • Addicted to WME forum
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 528
  • Fear me! I'm evil!
    • View Profile
    • Order of Dagon
Re: Any Linux developers out there?
« Reply #36 on: June 05, 2013, 08:13:42 PM »

Yep, I get the same results here on both 2.3 and 4.2.2 - game starts in portrait mode in the lower third of the screen, and the touch area is in the top. Performance is good, sound is working fine

Really a great start!

piere

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Posts: 302
  • Sorry for any bad english in my posts. Game on !
    • View Profile
Re: Any Linux developers out there?
« Reply #37 on: June 06, 2013, 04:08:32 AM »

My game company may be interested in working with someone that could help us port WME titles to linux and android. PM me is interested.
Logged

HCDaniel

  • Regular poster
  • ***
  • Karma: 8
  • Offline Offline
  • Posts: 168
    • View Profile
Re: Any Linux developers out there?
« Reply #38 on: June 06, 2013, 08:11:12 PM »

I have uploaded a new build which forces the app to go to landscape mode independent of the screen orientation. Please test if you like.

I also added some debugging output to understand problems with touch offset. Please look for lines like these in the output of "adb logcat" (resp. in "/mnt/sdcard/wme.log" if you have debugging enabled):

V/org.libsdl.app(20467): 21:05:54: Orig w=1024 h=600 Transformed w=800 h=480 ratiox=0.78 ratioy=0.78
V/org.libsdl.app(20467): 21:05:54: BorderLeft=0 BorderRight=0 BorderTop=5 BorderBottom=6

The last line looks already suspicious to me, I will need to look into this.
Logged

2.0

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 217
    • View Profile
Re: Any Linux developers out there?
« Reply #39 on: June 07, 2013, 12:28:55 AM »

I don't understand correctly how to get wme.log? I.e. how to enable debugging? When I add wme.ini in the root of SD card (near to data.dcp) - is no result.
Default landscape mode is working.
Logged

HCDaniel

  • Regular poster
  • ***
  • Karma: 8
  • Offline Offline
  • Posts: 168
    • View Profile
Re: Any Linux developers out there?
« Reply #40 on: June 07, 2013, 08:25:05 AM »

I'm sorry for not checking this in advance. It is currently indeed difficult to get wmelite on Android to find and use the wme.ini file.

Mnemonic, is there any reason why you chdir() to the directory where wme.ini resides (in CBPlatform::Initialize) instead of supplying the full path to CBRegistry::SetIniName?

I also saw that actually reading values from that file is #ifdef __WIN32__ only. For other platforms you probably had a settings.xml in mind. Do you have a template for that? Or is this not the place that is meant to enable debug mode?

In CBRegistry::CBRegistry the settings.xml is tried to be loaded from the local directory. Is it safe to call CBRegistry::LoadValues(false) afterwise, even if there were already settings loaded during constructor call?

Yes, this is quite a confusing collection of questions :o In the end I just want to find out how to get a wme.log file for people who are not familiar with the Android developer tools, and even if they are, the logging ringbuffer of Android doesn't have an endless capacity ;D so having a log file functionality handy would be nice.
Logged

2.0

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 217
    • View Profile
Re: Any Linux developers out there?
« Reply #41 on: June 07, 2013, 09:42:14 AM »

But maybe for the first time you can make logging unconditional by defult? I.e. in sources set corresponding flag to true?
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Any Linux developers out there?
« Reply #42 on: June 07, 2013, 02:46:36 PM »

Mnemonic, is there any reason why you chdir() to the directory where wme.ini resides (in CBPlatform::Initialize) instead of supplying the full path to CBRegistry::SetIniName?
That's a good question. I... don't know :) I suppose it's to support running the game from sources (when developing the game). The individual game files are referenced using relative paths, so the executable's current path must be set properly for the relative paths to work.

I also saw that actually reading values from that file is #ifdef __WIN32__ only. For other platforms you probably had a settings.xml in mind. Do you have a template for that? Or is this not the place that is meant to enable debug mode?
Yes, wme.ini is Windows-only. The "portable" way is using settings.xml. WME Lite is using this file instead of Windows registry. The main settings.xml file is stored in user's settings directory (platform specific), but you can create a second settings.xml file in the game's folder. To enable debug mode, the file would look like this:

Code: [Select]
<?xml version="1.0" encoding="UTF-8"?>
<Settings>
  <Debug>
    <DebugMode>1</DebugMode>
  </Debug>
<Settings>


In CBRegistry::CBRegistry the settings.xml is tried to be loaded from the local directory. Is it safe to call CBRegistry::LoadValues(false) afterwise, even if there were already settings loaded during constructor call?
I think it's intentionally being called early on to avoid the chdir() you mention above.


Yes, this is quite a confusing collection of questions :o In the end I just want to find out how to get a wme.log file for people who are not familiar with the Android developer tools, and even if they are, the logging ringbuffer of Android doesn't have an endless capacity ;D so having a log file functionality handy would be nice.
Take a look at PathUtil::GetSafeLogFileName. If the log file cannot be created in current directory, this path will be used instead. Perhaps it could be changed to always use this "safe path" on some platforms.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

HCDaniel

  • Regular poster
  • ***
  • Karma: 8
  • Offline Offline
  • Posts: 168
    • View Profile
Re: Any Linux developers out there?
« Reply #43 on: June 08, 2013, 08:50:09 AM »

I uploaded a new build which unconditionally logs into "/mnt/sdcard/wme.log" for the moment. Please try if you have time.

Unfortunately, enabling debug mode itself is not a good idea - the engine will only run with 0,00000001 fps ;) probably due to the amount of font rendering in debug mode.

Mnemonic, what do you think about separating logging to file from debug mode? Currently you can't have one without the other, but it's not optimal for Android at least.
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Any Linux developers out there?
« Reply #44 on: June 08, 2013, 02:41:18 PM »

If the log should be always enabled, then I'd vote for replacing the old log for each new session. Currently the log is appended to the file, so the log file can grow considerably (which is fine for development but probably not so fine for production code).

The iOS build has log always enabled too, but it doesn't write to a file but only to the console output, so it's only visible when the debugger is attached.

I'm surprised to hear the performance is bad when the debug mode is enabled. There shouldn't be much of a difference.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave
Pages: 1 2 [3] 4 5 ... 7
 

Page created in 0.043 seconds with 20 queries.