ZajferX Posted December 21, 2012 Report Share Posted December 21, 2012 well i am not in any way an Android Developer but i will read up on this thread and see what has been said and if i learn to code to Android i'll definitively give it a GO Quote Link to comment Share on other sites More sharing options...
evanssthomas Posted January 22, 2013 Report Share Posted January 22, 2013 (edited) Hi everyone,I thought I'd give the Android build a try once more. Unfortunately the code no longer builds for Android as a lot of rendering code has been added that is not supported by OpenGL-ES. I tried fixing a few errors, but gave up after a while - I don't have any experience with OpenGL. Would there be an effort to clean up the graphics code to make it OpenGL ES compliant?Is anyone still interested in the Android port? I know that 0AD as such might be unplayable on a phone or a tablet. However if the engine supports Android, it might be an attractive proposition for others who might want to make a pure Android mod (Possibly a heavily scaled down version of the game). That would definitely result in much more interest in 0AD. It will not be possible for the team to spend time on an Android port, but would it be possible to simply maintain compatibility, or would that be too much effort? I'd like someone's thoughts on this.Thanks Edited January 22, 2013 by evanssthomas Quote Link to comment Share on other sites More sharing options...
madmax Posted January 22, 2013 Report Share Posted January 22, 2013 What were the errors you were getting ? Quote Link to comment Share on other sites More sharing options...
evanssthomas Posted January 22, 2013 Report Share Posted January 22, 2013 Most of the errors were about missing constants and functions which I assumed were due to OpenGL/OpenGL ES differences. For example:../../../source/graphics/LOSTexture.cpp: In member function 'void CLOSTexture::InterpolateLOS()':../../../source/graphics/LOSTexture.cpp:126: error: 'GL_FRAMEBUFFER_BINDING_EXT' was not declared in this scope../../../source/graphics/LOSTexture.cpp:150: error: 'GL_VIEWPORT_BIT' was not declared in this scope../../../source/graphics/LOSTexture.cpp:150: error: 'glPushAttrib' was not declared in this scope../../../source/graphics/LOSTexture.cpp:153: error: 'GL_QUADS' was not declared in this scope../../../source/graphics/LOSTexture.cpp:153: error: 'glBegin' was not declared in this scope../../../source/graphics/LOSTexture.cpp:154: error: 'glColor4f' was not declared in this scope../../../source/graphics/LOSTexture.cpp:155: error: 'glTexCoord2f' was not declared in this scope../../../source/graphics/LOSTexture.cpp:155: error: 'glVertex2f' was not declared in this scope../../../source/graphics/LOSTexture.cpp:159: error: 'glEnd' was not declared in this scope../../../source/graphics/LOSTexture.cpp:161: error: 'glPopAttrib' was not declared in this scopeWhen I fix the above, I get other errors. Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted January 22, 2013 Report Share Posted January 22, 2013 I tried fixing a few errors, but gave up after a while - I don't have any experience with OpenGL. Would there be an effort to clean up the graphics code to make it OpenGL ES compliant?I doubt there's any such effort, but since it's an experimental port anyway, the usual technique to make it compile has been wrapping the offending code with CONFIG2_GLES macros:#if CONFIG2_GLES#warning TODO: implement this for GLES#else...//GL code that won't compile/run here...#endif // CONFIG2_GLESand then hoping it works Granted nobody has worked on that since Philip, and that was last year. It's even more fun if you try compiling against GLES on Windows, I don't recommend trying that.Is anyone still interested in the Android port?Judging by the activity in this topic, it would appear nobody is both interested in the Android port and willing to spend time making it work. I certainly don't see why effort should be put into maintaining compatibility when nobody tests it anyway (according to Philip, there have been exactly 2 users who succesfully ran the game on Android, and at least one of them was him). I also don't know how wise it would be to try, if myconid is still interested in redesigning the renderer, much of the existing code would change - fixed function would go away, which is relevant.I did try building for iOS and that required solving all the GLES build errors, so perhaps I'll dig up that patch and see if it still applies. I didn't do anything special though, just commented out a bunch of stuff as described above. Quote Link to comment Share on other sites More sharing options...
stwf Posted January 22, 2013 Report Share Posted January 22, 2013 I'm certainly not volunteering to do the work that might be needed to bring up a functioning Android port. But I am about to receive the following two devices from KickStarter backing and they both seem like winners.http://www.kickstarter.com/projects/872297630/gamestick-the-most-portable-tv-games-console-everhttp://www.kickstarter.com/projects/ouya/ouya-a-new-kind-of-video-game-consoleIt could be a brave new world for console games and it would be great to have 0AD there. Lets remember Android really isn't just about mobile gaming anymore... Quote Link to comment Share on other sites More sharing options...
stwf Posted January 23, 2013 Report Share Posted January 23, 2013 Another note, the Gamestick people are offering free GameSticks and dev kits to anyone who has a game to port. So anyone willing to try to port 0ad could at least get some free hardware for the effort... 1 Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted January 24, 2013 Report Share Posted January 24, 2013 Another note, the Gamestick people are offering free GameSticks and dev kits to anyone who has a game to port. So anyone willing to try to port 0ad could at least get some free hardware for the effort...Now that sounds like some incentive I doubt they'd give one to just anybody, it would probably have to be one person associated with 0 A.D. who was trusted to actually produce something. That said, I think it's a much better deal for them than it would be for us. Quote Link to comment Share on other sites More sharing options...
evanssthomas Posted January 24, 2013 Report Share Posted January 24, 2013 After much struggle, I got the game to run on my Galaxy S2. It was with code from Feb of last year, though. The game runs slowly and still gives some run time errors related to shaders. One of the other problems is the resolution - S2's resolution is 800x480. I'm going to try it on a Galaxy Note 2 (resolution 1280x720).By the way, does libpyrogenesis_dbg.so have to be in /data/local? Can't it be run from some other location to which I can copy it to without needing root access? Quote Link to comment Share on other sites More sharing options...
sanderd17 Posted January 24, 2013 Report Share Posted January 24, 2013 By the way, does libpyrogenesis_dbg.so have to be in /data/local? Can't it be run from some other location to which I can copy it to without needing root access?I don't know, but you can make a symbolic link from /data/local to something you can edit I guess: http://www.freebsd.org/cgi/man.cgi?query=ln&apropos=0&sektion=0&manpath=FreeBSD+3.2-RELEASE&format=html Quote Link to comment Share on other sites More sharing options...
evanssthomas Posted January 25, 2013 Report Share Posted January 25, 2013 I don't know, but you can make a symbolic link from /data/local to something you can edit I guess: http://www.freebsd.o...ASE&format=htmlIn any case I would need to write to /data/local and that requires root permissions.The game is surprisingly playable on an S3. Long press instead of right click, pinch to zoom in & out. With some decent effort put it, it could definitely be playable enough for most people. 1 Quote Link to comment Share on other sites More sharing options...
stwf Posted January 25, 2013 Report Share Posted January 25, 2013 Now that sounds like some incentive I doubt they'd give one to just anybody, it would probably have to be one person associated with 0 A.D. who was trusted to actually produce something. That said, I think it's a much better deal for them than it would be for us.I reread the deal more closely, and they are also giving 100% of the revenue for the firs 3 months on purchases if you enter the program, also which doesn't do us much good ;-). I figured this wouldn't get someone to jump in and start developing (the unit only costs $75-$100 anyway) just a nice incentive to someone already working on it. But they do want you to commit to a ship date so it may not be appropriate for us after all... Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted January 25, 2013 Report Share Posted January 25, 2013 The game is surprisingly playable on an S3. Long press instead of right click, pinch to zoom in & out. With some decent effort put it, it could definitely be playable enough for most people.Heh, that's pretty cool, did you enable user feedback reporting for both of them? It might be nice to have data from these rarely used devices Quote Link to comment Share on other sites More sharing options...
WhiteTreePaladin Posted January 25, 2013 Report Share Posted January 25, 2013 Does it really work that well on an S3? What kind of frame rates are you getting? What graphics options work? Quote Link to comment Share on other sites More sharing options...
evanssthomas Posted January 27, 2013 Report Share Posted January 27, 2013 I wouldn't say it's as good as playing on a PC, but it's not as terrible as indicated by earlier posts in this thread. I'd say this is decent considering that the game's UI or controls are not optimized in any way for touch screen input. If there was some effort put in, it'll make it much more playable.I didn't make a note of frame rates, but it's quite smooth on a release build. I disabled shadows because I was getting some errors related to shaders. I also didn't try out a water map so I'm not if sure water renders properly.(The S3 is my friend's so I'll be able to test only when he comes over) Quote Link to comment Share on other sites More sharing options...
mg_andrew_jackson Posted February 2, 2013 Report Share Posted February 2, 2013 After much struggle, I got the game to run on my Galaxy S2. It was with code from Feb of last year, though.Could you provide a link to the code you used from Feb.?I'd like to try and build the GLES version on a Chromebook running Ubuntu.Thanks,James. Quote Link to comment Share on other sites More sharing options...
dajayalol Posted March 4, 2013 Report Share Posted March 4, 2013 (edited) graphics/ShaderProgram.cpprenderer/WaterManager.cpprenderer/ShadowMap.cpprenderer/SkyManager.cpprenderer/TerrainRenderer.cppall contains undeclared GL variable of GL types in their scopebeacuse GLES dont support FBOI followed the instructions http://trac.wildfire...iki/AndroidPort and i finally come to the install apkbut i can't install it since it's missing some certification stuff,My phone is Sony Xperia J ST26i,which has a cortext-a5 Qualcomm MSM7227A processorit works now time to modify .glsl files Edited March 8, 2013 by dajayalol Quote Link to comment Share on other sites More sharing options...
gameboy Posted March 11, 2013 Report Share Posted March 11, 2013 These problems and how to solve: some shader error Android version of this game in the manipulations better some of this? Quote Link to comment Share on other sites More sharing options...
dajayalol Posted March 13, 2013 Report Share Posted March 13, 2013 (edited) sorry i cant upload my apk and libpyrogenesis_dbg.so to the forumso i zipped ithow to install 0ad for android by using my apk1. besure that your drive is rooted2.move and install 0ad.apk to your phone3.download and move libpyrogenesis_dbg.so to /data/local of your phone4.download public.zip of 0ad inside /binaries/data/mods/public/ ,then move to /(your sdcard path )/0ad/data/mods/public of your phone5.extract shaders.zip to /(your sdcard path )/0ad/data/mods/public/shaders6.done ,if your phone got small screen like mine (480 x 854 pixels, 4.0 inches (~245 ppi pixel density)) you got to modify /gui/gamesetup/gamesetup.xmlmine Build version is svn 132420ad for android.tar.7z Edited March 13, 2013 by dajayalol Quote Link to comment Share on other sites More sharing options...
stwf Posted June 2, 2013 Report Share Posted June 2, 2013 OK, thread resurrected! My Ouya has just shipped, I should be getting it in the next week -> month lol. At that point I'm going to try and build this.http://www.ouya.tv/This may also be a good chance to upgrade to SDL2.0 which is still a WIP but their timeline seems to roughly jive with the amount of time the port will take. Anyone with some Android expertise / interest who wants to stay in the loop on this let me know. OF course I'll post here when I am successful. Defeat is not an option! Quote Link to comment Share on other sites More sharing options...
WhiteTreePaladin Posted June 3, 2013 Report Share Posted June 3, 2013 Nice to see android work again. Looking forward to watching your progress. Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted June 3, 2013 Report Share Posted June 3, 2013 This may also be a good chance to upgrade to SDL2.0 which is still a WIP but their timeline seems to roughly jive with the amount of time the port will takeWe already have decent SDL 2.0 support, though I've only tested on Windows and OS X (briefly) so far. I have a patch for using SDL 2.0's color cursors, that fixes a conflict between SDL and our hardware cursor implementation on Windows, I will try to post that soon. Progress has been tracked somewhat on #935. Quote Link to comment Share on other sites More sharing options...
Zeta1127 Posted June 3, 2013 Report Share Posted June 3, 2013 We already have decent SDL 2.0 support, though I've only tested on Windows and OS X (briefly) so far. I have a patch for using SDL 2.0's color cursors, that fixes a conflict between SDL and our hardware cursor implementation on Windows, I will try to post that soon. Progress has been tracked somewhat on #935.So the invisible cursor on Windows 7 issue I brought up has been resolved? Quote Link to comment Share on other sites More sharing options...
stwf Posted June 4, 2013 Report Share Posted June 4, 2013 We already have decent SDL 2.0 support, though I've only tested on Windows and OS X (briefly) so far. I have a patch for using SDL 2.0's color cursors, that fixes a conflict between SDL and our hardware cursor implementation on Windows, I will try to post that soon. Progress has been tracked somewhat on #935.So by support you are saying that switching over to SDL 2.0 may not be that hard? In that case maybe I will look at it (if you don't mind) as part of the Android move. Who knows how many odd issues it may clear up... Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted June 4, 2013 Report Share Posted June 4, 2013 So the invisible cursor on Windows 7 issue I brought up has been resolved?If you mean the issue with an SVN or release version of the game, it may be fixed indirectly by moving to SDL 2.0 on Windows. But I was actually referring to a bug specific to using official SDL instead of our emulation in Windows - which nobody does, so it shouldn't apply to you So by support you are saying that switching over to SDL 2.0 may not be that hard? In that case maybe I will look at it (if you don't mind) as part of the Android move. Who knows how many odd issues it may clear up...I mean you should be able to compile against SDL 2.0 right now with no problems, just set up premake to find the correct libraries Any bugs you find should be fixed, because eventually everyone will have SDL 2.0, but obviously we still support 1.2 in the meantime (there are a bunch of preprocessor macros in the engine to handle the different APIs). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.