Re: [android-developers] Re: New OpenGL ES 2.0 Game Engine Option
Hi Bob, You're looking at the SDK documentation, which is used to write an application in C++. You don't need any of that to evaluate the engine, but should you choose to use it later and build the engine for Android, the end product is an .so which is all of the compiled SDK and Engine C++ code and is used by the included Java files for the engine project. Please find the engine documentation at www.batterytechsdk.com/engine-documentation Thanks Robert Green DIY at http://www.rbgrn.net/ On Fri, Jan 18, 2013 at 2:32 PM, bob b...@coolfone.comze.com wrote: Ok, thanks. BTW, I'm confused about something. I'm looking at the project named batterytech here: http://www.batterytechsdk.com/sdk-documentation/group___eclipse_setup.html Can you tell me what the end product is of building that? Is it a .so file or .jar or something? How do the other projects link to the batterytech project? On Monday, January 14, 2013 1:29:05 PM UTC-6, Robert Green wrote: Hi Bob, The SDK is the lower-level C++ platform and the engine is a game engine written on top of the SDK that provides all the high level things a game developer would want like animation, scripting, resource management, etc Robert Green DIY at http://www.rbgrn.net/ On Mon, Jan 14, 2013 at 11:17 AM, bob b...@coolfone.comze.com wrote: Okay. By the way, what is the difference between BatteryTech SDK and BatteryTech Engine? Thanks. On Thursday, January 10, 2013 4:20:55 PM UTC-6, Robert Green wrote: The mobile builds and projects are only available in the purchased version. The free dev kit is just Windows and OSX. If it works in your desktop build, it'll work on the device with the exception of non power-of-two images. On mobile you're just testing performance and multitouch input before you're ready to release or integrate any 3rd party products. Robert Green DIY at http://www.rbgrn.net/ On Thu, Jan 10, 2013 at 1:12 PM, bob b...@coolfone.comze.com wrote: Thanks. Can you tell me where to find the .so file? I don't see it in your two zip files. On Thursday, January 10, 2013 1:20:31 PM UTC-6, Robert Green wrote: If you don't want to modify the engine itself you can just copy the .so files and you don't need NDK. If you want to change any of the C/C++ code in the engine, you'll need NDK to rebuild it for Android. When you're just developing your game, before device testing, you don't need anything for Android. It runs standalone on Windows and OSX. Robert Green DIY at http://www.rbgrn.net/ On Thu, Jan 10, 2013 at 8:50 AM, bob b...@coolfone.comze.com wrote: Thanks. I'll try to take a look at them when I get a chance. BTW, do you pretty much need the NDK to use your engine? On Thursday, January 3, 2013 12:20:09 PM UTC-6, Robert Green wrote: Hi Bob, There are a number of games already available using BatteryTech Engine that show off some of the basic capabilities, then we do include an APK of our demo in the engine download so that you can try it out on your device. We'll be posting that to the market next week as well, but it is available now in the archive. Here are a few games using it if you want to take a peek at them: Slyon Ball - https://play.google.com/**stor** e/apps/details?id=com.**slyonstu**dios.slyonballhl=enhttps://play.google.com/store/apps/details?id=com.slyonstudios.slyonballhl=en The Digits: Fraction Blast - https://play.google.com/**stor** e/apps/details?id=com.**watchthe**digits.fractionblast**hl=enhttps://play.google.com/store/apps/details?id=com.watchthedigits.fractionblasthl=en Slyon Street Tuner - https://play.google.com/**stor** e/apps/details?id=com.**slyonstu**dios.streettunerhttps://play.google.com/store/apps/details?id=com.slyonstudios.streettuner NSCRA Tuner Challenge - https://play.google.com/**stor** e/apps/details?id=com.**powerrev**racing.nscrahttps://play.google.com/store/apps/details?id=com.powerrevracing.nscra Robert Green DIY at http://www.rbgrn.net/ On Thu, Jan 3, 2013 at 12:10 PM, bob b...@coolfone.comze.comwrote: Cool. Maybe you could put an app in the Android Market that demos your new engine? This would make it easier for us to see what it can do. On Tuesday, January 1, 2013 11:57:53 AM UTC-6, Robert Green wrote: Thanks bob! That game was from before BatteryTech and was the reason we built a proper game engine. Robert Green DIY at http://www.rbgrn.net/ On Mon, Dec 31, 2012 at 7:38 PM, bob b...@coolfone.comze.comwrote: Thanks. By the way, I tried your Deadly Chambers game. It is impressive. I like how the guy's name is Chambers. Very funny. On Saturday, December 29, 2012 12:46:49 PM UTC-6, Robert Green wrote: Yes, texture mapping is fairly standard and is very well supported. BAI means Binary Asset Import and is a compact memory-safe format of the internal structure of the open asset importer library. We did create
Re: [android-developers] Re: New OpenGL ES 2.0 Game Engine Option
Hi Bob, The SDK is the lower-level C++ platform and the engine is a game engine written on top of the SDK that provides all the high level things a game developer would want like animation, scripting, resource management, etc Robert Green DIY at http://www.rbgrn.net/ On Mon, Jan 14, 2013 at 11:17 AM, bob b...@coolfone.comze.com wrote: Okay. By the way, what is the difference between BatteryTech SDK and BatteryTech Engine? Thanks. On Thursday, January 10, 2013 4:20:55 PM UTC-6, Robert Green wrote: The mobile builds and projects are only available in the purchased version. The free dev kit is just Windows and OSX. If it works in your desktop build, it'll work on the device with the exception of non power-of-two images. On mobile you're just testing performance and multitouch input before you're ready to release or integrate any 3rd party products. Robert Green DIY at http://www.rbgrn.net/ On Thu, Jan 10, 2013 at 1:12 PM, bob b...@coolfone.comze.com wrote: Thanks. Can you tell me where to find the .so file? I don't see it in your two zip files. On Thursday, January 10, 2013 1:20:31 PM UTC-6, Robert Green wrote: If you don't want to modify the engine itself you can just copy the .so files and you don't need NDK. If you want to change any of the C/C++ code in the engine, you'll need NDK to rebuild it for Android. When you're just developing your game, before device testing, you don't need anything for Android. It runs standalone on Windows and OSX. Robert Green DIY at http://www.rbgrn.net/ On Thu, Jan 10, 2013 at 8:50 AM, bob b...@coolfone.comze.com wrote: Thanks. I'll try to take a look at them when I get a chance. BTW, do you pretty much need the NDK to use your engine? On Thursday, January 3, 2013 12:20:09 PM UTC-6, Robert Green wrote: Hi Bob, There are a number of games already available using BatteryTech Engine that show off some of the basic capabilities, then we do include an APK of our demo in the engine download so that you can try it out on your device. We'll be posting that to the market next week as well, but it is available now in the archive. Here are a few games using it if you want to take a peek at them: Slyon Ball - https://play.google.com/**store/apps/details?id=com. **slyonstudios.slyonballhl=enhttps://play.google.com/store/apps/details?id=com.slyonstudios.slyonballhl=en The Digits: Fraction Blast - https://play.google.com/**stor e/apps/details?id=com.**watchthedigits.fractionblast**hl=enhttps://play.google.com/store/apps/details?id=com.watchthedigits.fractionblasthl=en Slyon Street Tuner - https://play.google.com/**stor e/apps/details?id=com.**slyonstudios.streettunerhttps://play.google.com/store/apps/details?id=com.slyonstudios.streettuner NSCRA Tuner Challenge - https://play.google.com/**stor e/apps/details?id=com.**powerrevracing.nscrahttps://play.google.com/store/apps/details?id=com.powerrevracing.nscra Robert Green DIY at http://www.rbgrn.net/ On Thu, Jan 3, 2013 at 12:10 PM, bob b...@coolfone.comze.com wrote: Cool. Maybe you could put an app in the Android Market that demos your new engine? This would make it easier for us to see what it can do. On Tuesday, January 1, 2013 11:57:53 AM UTC-6, Robert Green wrote: Thanks bob! That game was from before BatteryTech and was the reason we built a proper game engine. Robert Green DIY at http://www.rbgrn.net/ On Mon, Dec 31, 2012 at 7:38 PM, bob b...@coolfone.comze.comwrote: Thanks. By the way, I tried your Deadly Chambers game. It is impressive. I like how the guy's name is Chambers. Very funny. On Saturday, December 29, 2012 12:46:49 PM UTC-6, Robert Green wrote: Yes, texture mapping is fairly standard and is very well supported. BAI means Binary Asset Import and is a compact memory-safe format of the internal structure of the open asset importer library. We did create it ourselves but it's simple, easy to maintain and extend and fully compatible with version 2 of that library, which is why you can easily add more formats to the engine. On Friday, December 28, 2012 2:24:49 PM UTC-6, bob wrote: Thanks. Also, Does it support texture-mapped models? And, is the BAI format your own invention? On Friday, December 28, 2012 11:28:48 AM UTC-6, Robert Green wrote: Out of the box it supports OBJ for static geometry and Collada (DAE) for static and animated models. We have a utility that will convert either of those to a binary format called BAI to go to production because it's smaller and loads faster. The engine uses a library called Open Asset Import which supports 30+ formats, so if you want more formats supported, all you have to do is add in the format support files to either the engine or the BAI conversion utility. I think the only format that isn't supported by Open Asset Importer is FBX, but autodesk has good FBX to DAE
Re: [android-developers] Re: New OpenGL ES 2.0 Game Engine Option
If you don't want to modify the engine itself you can just copy the .so files and you don't need NDK. If you want to change any of the C/C++ code in the engine, you'll need NDK to rebuild it for Android. When you're just developing your game, before device testing, you don't need anything for Android. It runs standalone on Windows and OSX. Robert Green DIY at http://www.rbgrn.net/ On Thu, Jan 10, 2013 at 8:50 AM, bob b...@coolfone.comze.com wrote: Thanks. I'll try to take a look at them when I get a chance. BTW, do you pretty much need the NDK to use your engine? On Thursday, January 3, 2013 12:20:09 PM UTC-6, Robert Green wrote: Hi Bob, There are a number of games already available using BatteryTech Engine that show off some of the basic capabilities, then we do include an APK of our demo in the engine download so that you can try it out on your device. We'll be posting that to the market next week as well, but it is available now in the archive. Here are a few games using it if you want to take a peek at them: Slyon Ball - https://play.google.com/**store/apps/details?id=com.** slyonstudios.slyonballhl=enhttps://play.google.com/store/apps/details?id=com.slyonstudios.slyonballhl=en The Digits: Fraction Blast - https://play.google.com/** store/apps/details?id=com.**watchthedigits.fractionblast**hl=enhttps://play.google.com/store/apps/details?id=com.watchthedigits.fractionblasthl=en Slyon Street Tuner - https://play.google.com/**store/apps/details?id=com. **slyonstudios.streettunerhttps://play.google.com/store/apps/details?id=com.slyonstudios.streettuner NSCRA Tuner Challenge - https://play.google.com/** store/apps/details?id=com.**powerrevracing.nscrahttps://play.google.com/store/apps/details?id=com.powerrevracing.nscra Robert Green DIY at http://www.rbgrn.net/ On Thu, Jan 3, 2013 at 12:10 PM, bob b...@coolfone.comze.com wrote: Cool. Maybe you could put an app in the Android Market that demos your new engine? This would make it easier for us to see what it can do. On Tuesday, January 1, 2013 11:57:53 AM UTC-6, Robert Green wrote: Thanks bob! That game was from before BatteryTech and was the reason we built a proper game engine. Robert Green DIY at http://www.rbgrn.net/ On Mon, Dec 31, 2012 at 7:38 PM, bob b...@coolfone.comze.com wrote: Thanks. By the way, I tried your Deadly Chambers game. It is impressive. I like how the guy's name is Chambers. Very funny. On Saturday, December 29, 2012 12:46:49 PM UTC-6, Robert Green wrote: Yes, texture mapping is fairly standard and is very well supported. BAI means Binary Asset Import and is a compact memory-safe format of the internal structure of the open asset importer library. We did create it ourselves but it's simple, easy to maintain and extend and fully compatible with version 2 of that library, which is why you can easily add more formats to the engine. On Friday, December 28, 2012 2:24:49 PM UTC-6, bob wrote: Thanks. Also, Does it support texture-mapped models? And, is the BAI format your own invention? On Friday, December 28, 2012 11:28:48 AM UTC-6, Robert Green wrote: Out of the box it supports OBJ for static geometry and Collada (DAE) for static and animated models. We have a utility that will convert either of those to a binary format called BAI to go to production because it's smaller and loads faster. The engine uses a library called Open Asset Import which supports 30+ formats, so if you want more formats supported, all you have to do is add in the format support files to either the engine or the BAI conversion utility. I think the only format that isn't supported by Open Asset Importer is FBX, but autodesk has good FBX to DAE conversion utilities that work, so there is that option. On Thursday, December 27, 2012 10:54:07 PM UTC-6, bob wrote: Looks interesting. What 3d model formats does it support? On Thursday, December 27, 2012 5:24:59 PM UTC-6, Robert Green wrote: Hi All, I'm a long time contributor of this group (over 400 posts I think), developer of Deadly Chambers, Antigen and several other Android games and just wanted to, in good will, let you know about the game engine that we've been developing for the past 2 years. It's called BatteryTech Engine and is available at http://www.batterytechsdk.com . It's full OpenGL ES 2.0 and was designed around Android so that it would work really well across over 1000 devices, maybe more. It's free to develop but does require a license to deploy. The license gets you full engine source code which is something you don't see often from comparable engines. We completely integrated Box2D and everything is bound to Lua to make it really easy to script out game logic. You can also deploy on other platforms, but it works great specifically for Android too. Please let me know what you think, either here, privately or otherwise
Re: [android-developers] Re: New OpenGL ES 2.0 Game Engine Option
The mobile builds and projects are only available in the purchased version. The free dev kit is just Windows and OSX. If it works in your desktop build, it'll work on the device with the exception of non power-of-two images. On mobile you're just testing performance and multitouch input before you're ready to release or integrate any 3rd party products. Robert Green DIY at http://www.rbgrn.net/ On Thu, Jan 10, 2013 at 1:12 PM, bob b...@coolfone.comze.com wrote: Thanks. Can you tell me where to find the .so file? I don't see it in your two zip files. On Thursday, January 10, 2013 1:20:31 PM UTC-6, Robert Green wrote: If you don't want to modify the engine itself you can just copy the .so files and you don't need NDK. If you want to change any of the C/C++ code in the engine, you'll need NDK to rebuild it for Android. When you're just developing your game, before device testing, you don't need anything for Android. It runs standalone on Windows and OSX. Robert Green DIY at http://www.rbgrn.net/ On Thu, Jan 10, 2013 at 8:50 AM, bob b...@coolfone.comze.com wrote: Thanks. I'll try to take a look at them when I get a chance. BTW, do you pretty much need the NDK to use your engine? On Thursday, January 3, 2013 12:20:09 PM UTC-6, Robert Green wrote: Hi Bob, There are a number of games already available using BatteryTech Engine that show off some of the basic capabilities, then we do include an APK of our demo in the engine download so that you can try it out on your device. We'll be posting that to the market next week as well, but it is available now in the archive. Here are a few games using it if you want to take a peek at them: Slyon Ball - https://play.google.com/**stor**e/apps/details?id=com.** slyonstu**dios.slyonballhl=enhttps://play.google.com/store/apps/details?id=com.slyonstudios.slyonballhl=en The Digits: Fraction Blast - https://play.google.com/**stor** e/apps/details?id=com.**watchthe**digits.fractionblast**hl=enhttps://play.google.com/store/apps/details?id=com.watchthedigits.fractionblasthl=en Slyon Street Tuner - https://play.google.com/**stor** e/apps/details?id=com.**slyonstu**dios.streettunerhttps://play.google.com/store/apps/details?id=com.slyonstudios.streettuner NSCRA Tuner Challenge - https://play.google.com/**stor** e/apps/details?id=com.**powerrev**racing.nscrahttps://play.google.com/store/apps/details?id=com.powerrevracing.nscra Robert Green DIY at http://www.rbgrn.net/ On Thu, Jan 3, 2013 at 12:10 PM, bob b...@coolfone.comze.com wrote: Cool. Maybe you could put an app in the Android Market that demos your new engine? This would make it easier for us to see what it can do. On Tuesday, January 1, 2013 11:57:53 AM UTC-6, Robert Green wrote: Thanks bob! That game was from before BatteryTech and was the reason we built a proper game engine. Robert Green DIY at http://www.rbgrn.net/ On Mon, Dec 31, 2012 at 7:38 PM, bob b...@coolfone.comze.com wrote: Thanks. By the way, I tried your Deadly Chambers game. It is impressive. I like how the guy's name is Chambers. Very funny. On Saturday, December 29, 2012 12:46:49 PM UTC-6, Robert Green wrote: Yes, texture mapping is fairly standard and is very well supported. BAI means Binary Asset Import and is a compact memory-safe format of the internal structure of the open asset importer library. We did create it ourselves but it's simple, easy to maintain and extend and fully compatible with version 2 of that library, which is why you can easily add more formats to the engine. On Friday, December 28, 2012 2:24:49 PM UTC-6, bob wrote: Thanks. Also, Does it support texture-mapped models? And, is the BAI format your own invention? On Friday, December 28, 2012 11:28:48 AM UTC-6, Robert Green wrote: Out of the box it supports OBJ for static geometry and Collada (DAE) for static and animated models. We have a utility that will convert either of those to a binary format called BAI to go to production because it's smaller and loads faster. The engine uses a library called Open Asset Import which supports 30+ formats, so if you want more formats supported, all you have to do is add in the format support files to either the engine or the BAI conversion utility. I think the only format that isn't supported by Open Asset Importer is FBX, but autodesk has good FBX to DAE conversion utilities that work, so there is that option. On Thursday, December 27, 2012 10:54:07 PM UTC-6, bob wrote: Looks interesting. What 3d model formats does it support? On Thursday, December 27, 2012 5:24:59 PM UTC-6, Robert Green wrote: Hi All, I'm a long time contributor of this group (over 400 posts I think), developer of Deadly Chambers, Antigen and several other Android games and just wanted to, in good will, let you know about the game engine that we've been developing for the past 2 years. It's called
Re: [android-developers] Re: New OpenGL ES 2.0 Game Engine Option
Hi Bob, There are a number of games already available using BatteryTech Engine that show off some of the basic capabilities, then we do include an APK of our demo in the engine download so that you can try it out on your device. We'll be posting that to the market next week as well, but it is available now in the archive. Here are a few games using it if you want to take a peek at them: Slyon Ball - https://play.google.com/store/apps/details?id=com.slyonstudios.slyonballhl=en The Digits: Fraction Blast - https://play.google.com/store/apps/details?id=com.watchthedigits.fractionblasthl=en Slyon Street Tuner - https://play.google.com/store/apps/details?id=com.slyonstudios.streettuner NSCRA Tuner Challenge - https://play.google.com/store/apps/details?id=com.powerrevracing.nscra Robert Green DIY at http://www.rbgrn.net/ On Thu, Jan 3, 2013 at 12:10 PM, bob b...@coolfone.comze.com wrote: Cool. Maybe you could put an app in the Android Market that demos your new engine? This would make it easier for us to see what it can do. On Tuesday, January 1, 2013 11:57:53 AM UTC-6, Robert Green wrote: Thanks bob! That game was from before BatteryTech and was the reason we built a proper game engine. Robert Green DIY at http://www.rbgrn.net/ On Mon, Dec 31, 2012 at 7:38 PM, bob b...@coolfone.comze.com wrote: Thanks. By the way, I tried your Deadly Chambers game. It is impressive. I like how the guy's name is Chambers. Very funny. On Saturday, December 29, 2012 12:46:49 PM UTC-6, Robert Green wrote: Yes, texture mapping is fairly standard and is very well supported. BAI means Binary Asset Import and is a compact memory-safe format of the internal structure of the open asset importer library. We did create it ourselves but it's simple, easy to maintain and extend and fully compatible with version 2 of that library, which is why you can easily add more formats to the engine. On Friday, December 28, 2012 2:24:49 PM UTC-6, bob wrote: Thanks. Also, Does it support texture-mapped models? And, is the BAI format your own invention? On Friday, December 28, 2012 11:28:48 AM UTC-6, Robert Green wrote: Out of the box it supports OBJ for static geometry and Collada (DAE) for static and animated models. We have a utility that will convert either of those to a binary format called BAI to go to production because it's smaller and loads faster. The engine uses a library called Open Asset Import which supports 30+ formats, so if you want more formats supported, all you have to do is add in the format support files to either the engine or the BAI conversion utility. I think the only format that isn't supported by Open Asset Importer is FBX, but autodesk has good FBX to DAE conversion utilities that work, so there is that option. On Thursday, December 27, 2012 10:54:07 PM UTC-6, bob wrote: Looks interesting. What 3d model formats does it support? On Thursday, December 27, 2012 5:24:59 PM UTC-6, Robert Green wrote: Hi All, I'm a long time contributor of this group (over 400 posts I think), developer of Deadly Chambers, Antigen and several other Android games and just wanted to, in good will, let you know about the game engine that we've been developing for the past 2 years. It's called BatteryTech Engine and is available at http://www.batterytechsdk.com . It's full OpenGL ES 2.0 and was designed around Android so that it would work really well across over 1000 devices, maybe more. It's free to develop but does require a license to deploy. The license gets you full engine source code which is something you don't see often from comparable engines. We completely integrated Box2D and everything is bound to Lua to make it really easy to script out game logic. You can also deploy on other platforms, but it works great specifically for Android too. Please let me know what you think, either here, privately or otherwise. Would love feedback and am always happy to support. Thanks everyone!! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-d...@**googlegroups.com To unsubscribe from this group, send email to android-developers+**unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/**group/android-developers?hl=enhttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email
Re: [android-developers] Re: New OpenGL ES 2.0 Game Engine Option
Thanks bob! That game was from before BatteryTech and was the reason we built a proper game engine. Robert Green DIY at http://www.rbgrn.net/ On Mon, Dec 31, 2012 at 7:38 PM, bob b...@coolfone.comze.com wrote: Thanks. By the way, I tried your Deadly Chambers game. It is impressive. I like how the guy's name is Chambers. Very funny. On Saturday, December 29, 2012 12:46:49 PM UTC-6, Robert Green wrote: Yes, texture mapping is fairly standard and is very well supported. BAI means Binary Asset Import and is a compact memory-safe format of the internal structure of the open asset importer library. We did create it ourselves but it's simple, easy to maintain and extend and fully compatible with version 2 of that library, which is why you can easily add more formats to the engine. On Friday, December 28, 2012 2:24:49 PM UTC-6, bob wrote: Thanks. Also, Does it support texture-mapped models? And, is the BAI format your own invention? On Friday, December 28, 2012 11:28:48 AM UTC-6, Robert Green wrote: Out of the box it supports OBJ for static geometry and Collada (DAE) for static and animated models. We have a utility that will convert either of those to a binary format called BAI to go to production because it's smaller and loads faster. The engine uses a library called Open Asset Import which supports 30+ formats, so if you want more formats supported, all you have to do is add in the format support files to either the engine or the BAI conversion utility. I think the only format that isn't supported by Open Asset Importer is FBX, but autodesk has good FBX to DAE conversion utilities that work, so there is that option. On Thursday, December 27, 2012 10:54:07 PM UTC-6, bob wrote: Looks interesting. What 3d model formats does it support? On Thursday, December 27, 2012 5:24:59 PM UTC-6, Robert Green wrote: Hi All, I'm a long time contributor of this group (over 400 posts I think), developer of Deadly Chambers, Antigen and several other Android games and just wanted to, in good will, let you know about the game engine that we've been developing for the past 2 years. It's called BatteryTech Engine and is available at http://www.batterytechsdk.com . It's full OpenGL ES 2.0 and was designed around Android so that it would work really well across over 1000 devices, maybe more. It's free to develop but does require a license to deploy. The license gets you full engine source code which is something you don't see often from comparable engines. We completely integrated Box2D and everything is bound to Lua to make it really easy to script out game logic. You can also deploy on other platforms, but it works great specifically for Android too. Please let me know what you think, either here, privately or otherwise. Would love feedback and am always happy to support. Thanks everyone!! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: New OpenGL ES 2.0 Game Engine Option
Yes, texture mapping is fairly standard and is very well supported. BAI means Binary Asset Import and is a compact memory-safe format of the internal structure of the open asset importer library. We did create it ourselves but it's simple, easy to maintain and extend and fully compatible with version 2 of that library, which is why you can easily add more formats to the engine. On Friday, December 28, 2012 2:24:49 PM UTC-6, bob wrote: Thanks. Also, Does it support texture-mapped models? And, is the BAI format your own invention? On Friday, December 28, 2012 11:28:48 AM UTC-6, Robert Green wrote: Out of the box it supports OBJ for static geometry and Collada (DAE) for static and animated models. We have a utility that will convert either of those to a binary format called BAI to go to production because it's smaller and loads faster. The engine uses a library called Open Asset Import which supports 30+ formats, so if you want more formats supported, all you have to do is add in the format support files to either the engine or the BAI conversion utility. I think the only format that isn't supported by Open Asset Importer is FBX, but autodesk has good FBX to DAE conversion utilities that work, so there is that option. On Thursday, December 27, 2012 10:54:07 PM UTC-6, bob wrote: Looks interesting. What 3d model formats does it support? On Thursday, December 27, 2012 5:24:59 PM UTC-6, Robert Green wrote: Hi All, I'm a long time contributor of this group (over 400 posts I think), developer of Deadly Chambers, Antigen and several other Android games and just wanted to, in good will, let you know about the game engine that we've been developing for the past 2 years. It's called BatteryTech Engine and is available at http://www.batterytechsdk.com . It's full OpenGL ES 2.0 and was designed around Android so that it would work really well across over 1000 devices, maybe more. It's free to develop but does require a license to deploy. The license gets you full engine source code which is something you don't see often from comparable engines. We completely integrated Box2D and everything is bound to Lua to make it really easy to script out game logic. You can also deploy on other platforms, but it works great specifically for Android too. Please let me know what you think, either here, privately or otherwise. Would love feedback and am always happy to support. Thanks everyone!! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: New OpenGL ES 2.0 Game Engine Option
Out of the box it supports OBJ for static geometry and Collada (DAE) for static and animated models. We have a utility that will convert either of those to a binary format called BAI to go to production because it's smaller and loads faster. The engine uses a library called Open Asset Import which supports 30+ formats, so if you want more formats supported, all you have to do is add in the format support files to either the engine or the BAI conversion utility. I think the only format that isn't supported by Open Asset Importer is FBX, but autodesk has good FBX to DAE conversion utilities that work, so there is that option. On Thursday, December 27, 2012 10:54:07 PM UTC-6, bob wrote: Looks interesting. What 3d model formats does it support? On Thursday, December 27, 2012 5:24:59 PM UTC-6, Robert Green wrote: Hi All, I'm a long time contributor of this group (over 400 posts I think), developer of Deadly Chambers, Antigen and several other Android games and just wanted to, in good will, let you know about the game engine that we've been developing for the past 2 years. It's called BatteryTech Engine and is available at http://www.batterytechsdk.com . It's full OpenGL ES 2.0 and was designed around Android so that it would work really well across over 1000 devices, maybe more. It's free to develop but does require a license to deploy. The license gets you full engine source code which is something you don't see often from comparable engines. We completely integrated Box2D and everything is bound to Lua to make it really easy to script out game logic. You can also deploy on other platforms, but it works great specifically for Android too. Please let me know what you think, either here, privately or otherwise. Would love feedback and am always happy to support. Thanks everyone!! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] New OpenGL ES 2.0 Game Engine Option
Hi All, I'm a long time contributor of this group (over 400 posts I think), developer of Deadly Chambers, Antigen and several other Android games and just wanted to, in good will, let you know about the game engine that we've been developing for the past 2 years. It's called BatteryTech Engine and is available at http://www.batterytechsdk.com . It's full OpenGL ES 2.0 and was designed around Android so that it would work really well across over 1000 devices, maybe more. It's free to develop but does require a license to deploy. The license gets you full engine source code which is something you don't see often from comparable engines. We completely integrated Box2D and everything is bound to Lua to make it really easy to script out game logic. You can also deploy on other platforms, but it works great specifically for Android too. Please let me know what you think, either here, privately or otherwise. Would love feedback and am always happy to support. Thanks everyone!! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] HDMI Mirroring multiple surface layers not working
We have 2 layers, 1) SurfaceView with MediaPlayer attached to play video 2) Translucent GLSurfaceView for interactive 3D on top of video The configuration is really pretty simple: MyGLSurfaceView glView = new MyGLSurfaceView (this); ((GLSurfaceView)glView ).setZOrderMediaOverlay(true); ((GLSurfaceView)glView ).setBackgroundColor(getResources().getColor(android.R.color.transparent)); SurfaceView videoView = new SurfaceView(this); videoView.getHolder().setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); setContentView(videoView, new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT)); addContentView((GLSurfaceView)glView, new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT)); This works normally on tons of devices, but when I connect an Asus Transformer tablet up via HDMI, it only shows the video layer and nothing from OpenGL. Basically it's not compositing the surface layers before pushing it to HDMI. Shouldn't it be or is there something I'm missing? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] SurfaceView-backed MediaPlayer crashing on some devices in stagefright
I need to play MP4 videos from assets and external files without built-in video controls. This code works fine on a number of devices but there are some that are crashing in stagefright. I'm following the instantiate, prepare, play lifecycle correctly I believe and have attached the mediaplayer to a surfaceview after the surface was successfully created. Has anyone experienced this exact problem and solved it? Thanks! I'm using the following basic code to play: @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); setVolumeControlStream(AudioManager.STREAM_MUSIC); videoView = new SurfaceView(this); videoView.getHolder().addCallback(this); setContentView(videoView, new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT)); } @Override public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { Log.i(TAG, surfaceChanged); if (width 0 height 0) { loadVideo(big_buck_bunny.mp4); } } public void loadVideo(String assetName) { Log.i(TAG, loadVideo); try { Log.i(TAG, PlayVideo - attempting to load + assetName); if (player != null) { player.stop(); player.release(); } player = new MediaPlayer(); if (assetName.startsWith(file:)) { player.setDataSource(assetName.substring(5)); } else { AssetFileDescriptor afd = getAssets().openFd(assetName); player.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); // should we be calling afd.close()? } // videoView.getHolder().setFixedSize(640, 480); player.setDisplay(videoView.getHolder()); playerReady = false; playerComplete = false; player.setOnPreparedListener(new OnPreparedListener() { public void onPrepared(MediaPlayer mp) { playerReady = true; playVideo(false); } }); player.prepare(); // player.prepareAsync(); } catch (Exception e) { Log.e(TAG, Error initializing video for + assetName + , + e.getMessage()); } } public void playVideo(boolean loop) { Log.i(TAG, playVideo); if (player != null) { player.setLooping(loop); if (playerReady) { Log.i(TAG, PlayVideo - starting); player.start(); } else { Log.i(TAG, PlayVideo - not prepared, waiting); player.setOnPreparedListener(new OnPreparedListener() { public void onPrepared(MediaPlayer mp) { playerReady = true; Log.i(TAG, PlayVideo - starting); player.start(); } }); player.setOnCompletionListener(new OnCompletionListener() { @Override public void onCompletion(MediaPlayer mp) { playerComplete = true; } }); } } } And when I run that, I get the following log and crash: I/MyActivity( 4370): PlayVideo - attempting to load big_buck_bunny.mp4 I/wpa_supplicant( 4175): [CTRL_IFACE]SIGNAL_POLL I/wpa_supplicant( 4175): [CTRL_IFACE]SIGNAL_POLL I/WindowManager( 142): MediaPlayer.isPlayingVideo I/OMXCodec( 4006): [OMX.google.h264.decoder] AVC profile = 66 (Baseline), level = 30 I/OMXCodec( 4006): [OMX.google.h264.decoder] video dimensions are 320 x 240 I/OMXCodec( 4006): [OMX.google.h264.decoder] Crop rect is 320 x 240 @ (0, 0) I/ActivityManager( 142): Displayed com.example.videotest/.MyActivity: +5s342ms I/MyActivity( 4370): playVideo I/MyActivity( 4370): PlayVideo - starting I/OMXCodec( 4006): [OMX.google.h264.decoder] video dimensions are 640 x 360 I/OMXCodec( 4006): [OMX.google.h264.decoder] Crop rect is 640 x 360 @ (0, 0) W/SoftAAC ( 4006): Sample rate was 44100 Hz, but now is 22050 Hz F/SoftwareRenderer( 4006): frameworks/base/media/libstagefright/colorconversion/SoftwareRenderer.cpp:81 CHECK(mConverter-isValid()) failed. F/libc( 4006): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1) I/DEBUG ( 84): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** I/DEBUG ( 84): Build fingerprint: 'BRONCHO/crane_a710/crane-a710:4.0.3/IML74K/20120320:eng/test-keys' I/DEBUG ( 84): pid: 4006, tid: 4386 /system/bin/mediaserver I/DEBUG ( 84): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadbaad I/DEBUG ( 84): r0 deadbaad r1 0001 r2 4000 r3 I/DEBUG ( 84): r4 r5 0027 r6 0168 r7 0280 I/DEBUG ( 84): r8 0004 r9 0280 10 0168 fp I/DEBUG ( 84): ip sp 41c77918 lr 400bef01 pc 400bb660 cpsr 6030 I/DEBUG ( 84): d0 6d284b4345484369 d1 65747265766e6f6c I/DEBUG ( 84): d2 6c615673693e2d65 d3 6166202929286464 I/DEBUG ( 84): d4 6e6f69737265766e d5 72617774666f532f I/DEBUG ( 84): d6 657265646e655265 d7 31383a7070632e72 I/DEBUG ( 84): d8 d9 I/DEBUG ( 84): d10 d11
[android-developers] Re: OpenGL lockups in 2.2
We just did a big profiling, optimizing and tuning session on our engine and found that we had LOTS of redundant Shader and Geometry binds and unbinds. We found that we never need to unbind from shaders or disable vertex attributes because they are automatically all disabled when switching shaders - then we made it so that glGetError is only called when we have our debugging flags on... Result? The game that was crashing instantly on the EVO now runs without any problems until the battery dies. So - just another thing to look into. Run your code in the Adreno profiler with glFinish() on, remove all the redundant state changes and unnecessary unbinds like texture, shader or vbo binds to 0 or anything like that and see how it goes. This worked for us. On Apr 12, 10:59 am, cybice istar...@gmail.com wrote: Please look athttps://developer.qualcomm.com/forum/qdevnet-forums/mobile-gaming-gra... i have no rooted phone, so please anybody who affected this bug, send to Qualcomm a stack trace (using gdb) of all the threads of the system_server process -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] GL-related Crash on Xoom/Tab 10.1 requiring removal of battery or shell reboot?
Isn't this that really awful GL-related bug I've been talking about for nearly 2 years? I can't believe this still exists in honeycomb, worse yet that it's nearly unrecoverable to tablet users that can't remove their battery and don't have enough technical knowledge to use ADB. http://code.google.com/p/android/issues/detail?id=7432 IMO this should be upgraded to severe. It's been plaguing Android devices since 2.1 W/SharedBufferStack( 136): waitForCondition(LockCondition) timed out (identity=3, status=0). CPU may be pegged. trying again. W/SharedBufferStack( 78): waitForCondition(ReallocateCondition) timed out (identity=9, status=0). CPU may be pegged. trying again. W/SharedBufferStack( 78): waitForCondition(LockCondition) timed out (identity=5, status=0). CPU may be pegged. trying again. W/SharedBufferStack( 381): waitForCondition(LockCondition) timed out (identity=7, status=0). CPU may be pegged. trying again. W/SharedBufferStack( 136): waitForCondition(LockCondition) timed out (identity=3, status=0). CPU may be pegged. trying again. ... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Logs not appearing in 3.1?
Ever since my tab 10.1 got upgraded to 3.1, I no longer see my application's log in logcat. Does anyone know the reason for this and how I can see it again? Thanks! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Logs not appearing in 3.1?
Scratch that - I'm seeing the logs (in the midst of a bazillion other real-time logging statements) but it wasn't printing a stack trace on a crash for me. Anyone have an idea on that? On Jun 29, 7:05 pm, James Wang jameswangc...@gmail.com wrote: I do not see this problem. r u sure your app is up? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: In Android, how to get the keyevent of 'home Key' ?
Think of home like alt-tab in windows. You never need to capture it. You just need to handle onPause()/onStop() in a way that makes sense for the user temporarily leaving your app. You'll get onFinish() when your app is to be actually destroyed. If you have a need to actually kill off the whole thing when home is pressed, call finish() in onPause()/onStop() and you shall receive the touch of the droid reaper, making for a clean start next time the user tries to enter the activity. On Jun 8, 10:31 am, Indicator Veritatis mej1...@yahoo.com wrote: Your blog post IS the best explanation I have seen to date of what the Home key really means. I thought it was particularly interesting that it emphasized something I have been dimly aware of but keep forgetting: unlike the Back key, pressing Home does NOT cause finish() to be called. I assume from your description that it triggers only one lifecycle callback, onPause(). It doesn't even itself trigger onStop(), which may or may not follow. But shouldn't it trigger onStop() too? After all, the application is no longer visible. And what about the Activity Stack? Doesn't pressing Home put the least recently used Activity on that stack? In fact, when I put Log.d statements in my main Activity for both onPause() and onStop(), I see both get called when I press the Home key. On Jun 8, 5:13 am, Mark Murphy mmur...@commonsware.com wrote: On Wed, Jun 8, 2011 at 7:20 AM, Mark Murphy mmur...@commonsware.com wrote: On Wed, Jun 8, 2011 at 2:31 AM, Droid rod...@gmail.com wrote: I need to know when the home button is pressed too (otherwise my app returns to visibility again and again for ever). Then fix your bug. (Please don't tell me I need to design my app 'properly', I have been Android dev for over a year now) Tough. Design your app properly. I just wrote up a blog post about why you should not care about the HOME button and how better to solve this problem: http://commonsware.com/blog/2011/06/08/please-ignore-home-button.html -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android 3.0 Programming Books:http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Scaling text up to be relative to screen pixels
I'm a long time Android developer (Been here since pre 1.0). My focus is on games, so I don't care too much about the apps side of things. Generally I want a game to just consume the screen and everything to just scale up as a percentage (a button should always be 50% of the screen, etc). I even want that on 10 tablets and whatever size future devices, because without scaling up, I have no other content so there will just be more blank space and a less predictable UI. I can work it out for buttons and such but how do I scale up text on my menus? Saying, use a surfaceview is awesome for the game itself but all my legacy games have multiple activities for menus and use standard Android UI components. They worked great on all screens before honeycomb/tablets, which are quickly becoming a major headache for me. Usually I just want 5 or so buttons laid out linearly vertically either in the center or on the right side of the screen (portrait/ landscape) and I want the text on the buttons to scale up with the screen so it looks exactly the same at 1280x800 vs 480x320. Am I missing something or is this not possible to do without adding additional layouts for larger screens (and potentially making even more layouts for even bigger screens later, etc)? Best practices to achieve this, anyone? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] aspect-correct image scale-up
What's the right way to scale an arbitrary-sized image up to consume all of one axis while maintaining aspect ratio using an ImageView/xml? For instance, I have a 300px x 300px image I'd like to stretch up to fill the screen while keeping aspect. That means on a 480x800 screen, it should be 480x480. On a 1280x800 screen, it should be 800x800. Is there an easy way to do that or do I need to make my own custom view that's smart about it? I can, it just seems like something that should be trivial to do without. Yes, I have RTFM'd already and tried things like making the ImageView fill one axis or the other while trying different scaleTypes like fitCenter.. Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Scaling text up to be relative to screen pixels
Not possible, eh? On May 26, 1:03 pm, Robert Green rbgrn@gmail.com wrote: I'm a long time Android developer (Been here since pre 1.0). My focus is on games, so I don't care too much about the apps side of things. Generally I want a game to just consume the screen and everything to just scale up as a percentage (a button should always be 50% of the screen, etc). I even want that on 10 tablets and whatever size future devices, because without scaling up, I have no other content so there will just be more blank space and a less predictable UI. I can work it out for buttons and such but how do I scale up text on my menus? Saying, use a surfaceview is awesome for the game itself but all my legacy games have multiple activities for menus and use standard Android UI components. They worked great on all screens before honeycomb/tablets, which are quickly becoming a major headache for me. Usually I just want 5 or so buttons laid out linearly vertically either in the center or on the right side of the screen (portrait/ landscape) and I want the text on the buttons to scale up with the screen so it looks exactly the same at 1280x800 vs 480x320. Am I missing something or is this not possible to do without adding additional layouts for larger screens (and potentially making even more layouts for even bigger screens later, etc)? Best practices to achieve this, anyone? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Text scaling properly on two different mdpi devices (Evo, and Galaxy Tab 10.1)
I also want to do this exact same thing. I don't want my text to be the same physical size - I want it to be bigger when there are more pixels regardless of density (yes it means super big text on a 10 screen). Since Android made compatibility mode a postage stampish kind of mode on tablets instead of just magnifying (like I really, really think it should have) it broke all my legacy games (they look like crap on the tablets) and now I have lots more updating work to do, but since I was stupid about it and used text views for games like Wixel (which used to sound like a good idea for what kind of game it was but now I'm regretting using anything other than a single custom view that I have control over) I have a ridiculous amount of scaling around of things that probably will need additional work later as different screens come out... On May 25, 11:49 am, Mike michaeldouglaskra...@gmail.com wrote: OK. Having a day or so to think about this, I think I asked the wrong question. So, let me try again: Is there way to do fontscalingsimilar to the way you can assign percentages to a layout? I realized that with my existing portrait mdpi layout, I was inadvertently relying on the height of some of my text to affect the placement of Views that came below the text. This looks great on a myTouch, but crappy on a Galaxy Tab 10.1 since there are so many remaining vertical pixels (even with the fontscalingusing dp units.) Regards, - Mike On May 23, 4:46 pm, Dianne Hackborn hack...@android.com wrote: The font size should be the same on those two devices (myTouch and Galaxy Tab 10.1) because they have the same density. What is bringing you to think they should be different? On Mon, May 23, 2011 at 3:34 PM, Mike michaeldouglaskra...@gmail.comwrote: Hi Dianne, Thanks for the quick reply. I understand density to be a function of native resolution versus physical display size. So, the new Galaxy Tab 10.1 which has a native resolution of 800 x 1280 pixels and a physical display size of 10.1 diagonal ends up being a mdpi device. When I populate a DisplayMetrics for the Galaxy Tab 10.1, it gives me a density of 1.0 and a density dpi of DENSITY_MEDIUM which confirms this. I misspoke with regard to the Evo. I apologize. It is indeed an hdpi device. In any case, I believe I still need to address this issue since a device such as the myTouch (320x480 native resolution) is an mdpi device as well. Even though the myTouch and Galaxy Tab 10.1 have drastically different native resolutions as you point out. I've been having difficulty using device independent units for my text size to make the font look appropriate on both devices since they map to the same layout file. - Mike On May 23, 4:16 pm, Dianne Hackborn hack...@android.com wrote: Evo and Galaxy Tab are both hdpi (though the Tab technically should probably be mdpi... hdpi is okay though, it is just a design decision for the device to make the overall UI larger). Also density != higher res. It is REALLY REALLY important to understand this. The Xoom is mdpi but much higher resolution than the hdpi phones. It just has a bigger screen, but as a result is lower density. If all you care about is the screen resolution (that is you don't care really about having your UI size remain about the same across devices), then don't use density which will pick resources based on *screen density* not resolution. You could instead use -nodpi and just do your own resource selection based on how many pixels you have to use. On Mon, May 23, 2011 at 2:35 PM, Mike michaeldouglaskra...@gmail.com wrote: I've started work to get my games to scale nicely for the higher-res displays like the Xoom and Galaxy Tab devices. I've made use of the ldpi/mdpi/hdpi/xhdpi folder naming convention for my resources which works nicely for layouts and graphics, but not so much for text sizescaling. The problem is that an Evo and a Galaxy Tab 10.1 are both mdpi devices and will map to the same layout file. Yet, I need to scale the text size differently for these two devices. (I'm using text size units of dp.) Any ideas on something obvious I might be missing or any suggestions would be much appreciated. - Mike -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to
[android-developers] Re: Multi-touch pointer ids on Sony Xperia Play spurious ACTION_DOWN events
Testing on my xperia play shows that it goes up to Pointer ID 15 and then starts over again! Why 15? No clue... This is inconsistent behavior when compared to all other multitouch Android devices. I'm going to end up implementing the same remapping solution for all my multitouch games and frameworks. On May 17, 5:51 am, Mario Zechner badlogicga...@gmail.com wrote: So, i wondered why we had that assumption. Back in 2009/early 2010 when 2.0 came out and the Droid blew away the world this group was full of multi-touch related topics. Dianne Hackborn answered ALL our questions back then, a feat that probably took up all her work time :P. She also explained how pointer ids are handed out by the system. original message:http://groups.google.com/group/android-developers/msg/2786021d43ae196d quote: If finger A goes down, then finger B, then finger A is released, you will see pointer #0 going up and the following movements will have only pointer ID #1 (at index 0 because that is the only active pointer). When the next finger goes down, it is given the first available pointer ID (there is no way to know which finger this is, so we assume the first available), thus you see a new pointer ID 0 going down. So, the first available pointer id is chosen. That was our assumption as well. There are a few more threads on the group that go into pointer ids and how they are generated. It seems theXperiabreaks this assumption. Would be nice to hear an official word on this. On 17 Mai, 04:25, Michael Leahy mleahy@gmail.com wrote: It looks indeed as if Sony was brewing their own special kind of 'fragmentation' I've come to a succinct definition of fragmentation at least from a developer perspective as unfortunately this term is widely misused and abused in the press and sometimes twisted in definition by organizations that produce it. Fragmentation is what happens when OS and device differentiation fails to honor standards and contracts of developer APIs. This covers faults in various OS versions and various ODM faults as well at least from a developer perspective. OS / device differentiation should be celebrated; fragmentation as defined above... not so much. --Mike On Mon, May 16, 2011 at 7:08 PM, Mario Zechner badlogicga...@gmail.comwrote: I don't have direct physical access to anXperiamyself so i can't comment on the button issues Robert discovered. It looks indeed as if Sony was brewing their own special kind of fragmentation. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Multi-touch pointer ids on Sony Xperia Play spurious ACTION_DOWN events
The regular buttons fire key events (up/down/left/right/sony shapes/L/ R/select/start) so that is good but then there are these two magical analog pads that are a lot like the analog sticks on a PS3 controller and IIRC they are only accessible via a native library (though I haven't dug for the code to access them so I don't know yet how to use them). Perhaps they will be supported as part of the peripherals in future Android APIs but for now I can only imagine that a person will need to link to a sony library and access via native so that means some JNI for Java-side support. On May 17, 12:38 pm, MichaelEGR foun...@egrsoftware.com wrote: On May 17, 12:25 pm, Robert Green rbgrn@gmail.com wrote: Testing on my xperia play shows that it goes up to Pointer ID 15 and then starts over again! Why 15? No clue... WHAT? You mean you don't use your toes? ;P This is inconsistent behavior when compared to all other multitouch Android devices. I'm going to end up implementing the same remapping solution for all my multitouch games and frameworks. Yeppers.. doh.. meh... I suppose it's not the end of the world, but yep I've got things isolated so I can just load a custom input filter component for my event system to do the remapping just for this device. Can you please enlighten on the button matter for Java API support? I recall you mentioning something about them only accessible on the native side? It would be nice if they generated key events; please say it's so! BTW happy bday Rob! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Multi-touch pointer ids on Sony Xperia Play spurious ACTION_DOWN events
Actually, it's not just native, but requires a native activity... http://developer.sonyericsson.com/cws/download/1/921/870/1297178992/Accessing_Touch%20Events.pdf I don't plan on supporting it until they can provide a normal native lib or header or Java access. On May 17, 2:10 pm, Robert Green rbgrn@gmail.com wrote: The regular buttons fire key events (up/down/left/right/sony shapes/L/ R/select/start) so that is good but then there are these two magical analog pads that are a lot like the analog sticks on a PS3 controller and IIRC they are only accessible via a native library (though I haven't dug for the code to access them so I don't know yet how to use them). Perhaps they will be supported as part of the peripherals in future Android APIs but for now I can only imagine that a person will need to link to a sony library and access via native so that means some JNI for Java-side support. On May 17, 12:38 pm, MichaelEGR foun...@egrsoftware.com wrote: On May 17, 12:25 pm, Robert Green rbgrn@gmail.com wrote: Testing on my xperia play shows that it goes up to Pointer ID 15 and then starts over again! Why 15? No clue... WHAT? You mean you don't use your toes? ;P This is inconsistent behavior when compared to all other multitouch Android devices. I'm going to end up implementing the same remapping solution for all my multitouch games and frameworks. Yeppers.. doh.. meh... I suppose it's not the end of the world, but yep I've got things isolated so I can just load a custom input filter component for my event system to do the remapping just for this device. Can you please enlighten on the button matter for Java API support? I recall you mentioning something about them only accessible on the native side? It would be nice if they generated key events; please say it's so! BTW happy bday Rob! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: 3d engine advices
It's not an engine but it's worth mentioning - www.batterypoweredgames.com/batterytech This is a shameless plug. I wrote it, use it and advocate it :) On Apr 13, 10:40 am, Peter Eastman peter.east...@gmail.com wrote: As a note; The game was better than I expected to see :). Thank you. :) You should consider using a different license though, LGPL and Android don't mix well due to the dex format Yes, other people have mentioned that to me. I'm planning to switch to BSD in the next version. And if you want to use it now, let me know and I'll go ahead and check in the changed headers on all the source files listing the new license. Peter -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: OpenGL ES 2.0 Shader Access Client Memory
You can do lots of interesting tricks with memory with shaders, particularly pixel shaders. Many implementations put all types of wild data into textures that aren't images and access that with a swizzle in the pixel shader as whatever 32 bit values they needed. You need to learn GLES2 to understand better. You can basically only pass uniforms, vertex attributes and texture samplers to shaders. Everything you can do must be through that API. Yes you can draw a quad from 4 verts. You just need to either do 2 indexes triangles if drawing multiple 4-vert quads in one draw batch or you can do it as a single draw using trianglefan or trianglestrip. On Apr 5, 3:19 pm, Jonathan jonat...@minescape.ca wrote: From what I understand, the GPU in Android devices uses shared memory-RAM. So I'm thinking it must be possible to have a shader access client memory directly. The ideal would be to be able to pass an array pointer to the shader and be able to access a value in that array using that pointer, in the shader. If this is not possible I would still like to know the best way of doing something like this. (I also have another small question: would it be possible to draw a quad from only 4 vertices in OpenGL ES 2.0?) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Do OpenGL ES 2.0 phones also support ES 1.1?
Right now - yes, they do. AFAIK, most GLES 1.0/1.1 implementations on 2.0-standard chips are always using 2.0 internally but the driver has 1.1-compatibility shaders that it uses behind the scenes to implement fixed-function emulation. for your problem - if those are two totally different chips, you may have done a few strange things that you thought were fine because they worked on your test device but the other device didn't like them. Correctly-implemented GLES should (in theory) work on all devices unless they have bugs. If it's not working, you probably did something to make it angry. On Apr 4, 8:27 am, GJTorikian gjtorik...@gmail.com wrote: Given that the APIs for OpenGL ES 2.0 and 1.1 are incompatible, I was wondering if there is always some inherent support for both in Android, or if it was on a per phone basis. I am developing an ES 1.1 game. On my phone, a nearly two year old model, the game drew quite well, visually. On my friend's newish Droid 2, all I saw were choppy polygons. I know my phone can't do ES 2.0 and I assume his can. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Where to start with simple video games?
If all you want is canvas drawing, just use a surfaceview. If you want OpenGL, use a GLSurfaceView. Those are all you need. On Mar 28, 5:53 pm, Toby t...@tobiah.org wrote: I'm finishing up my first app for my company, so I am getting more comfortable with android. I'd like to do a personal project now, something like a spacewar game. I figured that there would be a canvas widget somewhere, and that given canvas.plot(x, y) I'd be on my way. It seems that there is a large selection of surfaces to draw on. I find it confusing. Is there a decent guide to two dimensional game writing on android? Thanks, Tobiah -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Open GL texture is shown on emulator but not on the mobile
What resource directory is your bitmap in? drawable-nodpi? On Mar 25, 10:23 am, MobileVisuals eyv...@astralvisuals.com wrote: I tried to run a OpenGL tutorial project http://obviam.net/index.php/texture-mapping-opengl-android-displaying... on a Samsung Galaxy, but only a white rectangle is shown instead of the texture. The texture is shown on the emulator, but not on the Samsung Galaxy. What do I have to do to see the texture on the device? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: OpenGL texture display properly on my phone. But 'white box' on some device?
Debug the actual bitmap dimensions after you decode it. It could be getting scaled if you don't have it in drawable-nodpi. I also remember something about clamp vs repeat with non-square power- of-two textures on some chips, but that may be for something else. I see you're not using mips here but if you do, remember they must be square, not just PoT. What dir is the texture file you're loading in? On Mar 17, 11:41 am, Kakyoin lgmc...@gmail.com wrote: *** Update *** Today I just updated my Motorola Milestone to Android 2.2 and this bug is now happening on my device !! The texture was displaying fine when my Milestone was Android 2.1 yesterday. I hope this piece of info will greatly help solving this problem. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: OpenGL texture display properly on my phone. But 'white box' on some device?
It's usually either NPOT or not handling texture IDs and bindings correctly :) I've seen code where people made their own texture IDs incrementally as they didn't know to use glGenTextures - and it works on many drivers but certainly breaks on some. On Mar 17, 2:25 pm, String sterling.ud...@googlemail.com wrote: Looking at your code, it appears that the source image is in res/raw, which is a good practice for textures. It should insure that they don't prescale. Nonetheless, Robert's advice is good: debug into it and check the actual dimensions. In my experience, non-power-of-two dimensions is almost always the reason behind the dreaded white box. String -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] 24 bit color for GL surface?
I remember that early Android devices were all 16 bit color (RGB_565) but read something about 24 bit color support on newer devices? I'd like to enable it in a safe way if possible for my surface/pixelformat for GL but I'm not getting a valid egl config back. I've tried: setEGLConfigChooser(8, 8, 8, 0, 16, 0); // 24 bit color, no alpha, 16 bit depth buffer, no stencil buffer getHolder().setFormat(PixelFormat.TRANSLUCENT); // supposedly makes it use On a galaxy s and no dice. So my questions are: Do any devices support high color and if so, is there a good way to use it when available but fall back to 16 bit when not for OpenGL? I found this snippet somewhere, but haven't tried doing this in combo with the pixelformat: public class MyActivity extends Activity { @Override public void onAttachedToWindow() { super.onAttachedToWindow(); Window window = getWindow(); window.setFormat(PixelFormat.RGBA_); } } Does anyone have experience with this? Thanks! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: 24 bit color for GL surface?
Thanks Romain, So what's the correct, complete solution? Set the window to RGBA then use 8 8 8 8 for the egl config chooser or is translucency preferred? I just want something that won't be finicky and break on future chips/devices/oem impls. On Mar 16, 3:05 pm, Romain Guy romain...@android.com wrote: RGBA should be supported on all devices, but you are asking for RGBX which may not be supported. On Wed, Mar 16, 2011 at 10:04 PM, Robert Green rbgrn@gmail.com wrote: I remember that early Android devices were all 16 bit color (RGB_565) but read something about 24 bit color support on newer devices? I'd like to enable it in a safe way if possible for my surface/pixelformat for GL but I'm not getting a valid egl config back. I've tried: setEGLConfigChooser(8, 8, 8, 0, 16, 0); // 24 bit color, no alpha, 16 bit depth buffer, no stencil buffer getHolder().setFormat(PixelFormat.TRANSLUCENT); // supposedly makes it use On a galaxy s and no dice. So my questions are: Do any devices support high color and if so, is there a good way to use it when available but fall back to 16 bit when not for OpenGL? I found this snippet somewhere, but haven't tried doing this in combo with the pixelformat: public class MyActivity extends Activity { @Override public void onAttachedToWindow() { super.onAttachedToWindow(); Window window = getWindow(); window.setFormat(PixelFormat.RGBA_); } } Does anyone have experience with this? Thanks! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: 24 bit color for GL surface?
So are you saying the correct way is to set translucency and write a custom config chooser that picks ? On Mar 16, 4:03 pm, Romain Guy romain...@android.com wrote: Setting translucency will pick RGBA. You still have to choose the proper config though. On Wed, Mar 16, 2011 at 3:43 PM, Robert Green rbgrn@gmail.com wrote: Thanks Romain, So what's the correct, complete solution? Set the window to RGBA then use 8 8 8 8 for the egl config chooser or is translucency preferred? I just want something that won't be finicky and break on future chips/devices/oem impls. On Mar 16, 3:05 pm, Romain Guy romain...@android.com wrote: RGBA should be supported on all devices, but you are asking for RGBX which may not be supported. On Wed, Mar 16, 2011 at 10:04 PM, Robert Green rbgrn@gmail.com wrote: I remember that early Android devices were all 16 bit color (RGB_565) but read something about 24 bit color support on newer devices? I'd like to enable it in a safe way if possible for my surface/pixelformat for GL but I'm not getting a valid egl config back. I've tried: setEGLConfigChooser(8, 8, 8, 0, 16, 0); // 24 bit color, no alpha, 16 bit depth buffer, no stencil buffer getHolder().setFormat(PixelFormat.TRANSLUCENT); // supposedly makes it use On a galaxy s and no dice. So my questions are: Do any devices support high color and if so, is there a good way to use it when available but fall back to 16 bit when not for OpenGL? I found this snippet somewhere, but haven't tried doing this in combo with the pixelformat: public class MyActivity extends Activity { @Override public void onAttachedToWindow() { super.onAttachedToWindow(); Window window = getWindow(); window.setFormat(PixelFormat.RGBA_); } } Does anyone have experience with this? Thanks! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Yarrr the pirates be on facebook sharin' yer paid apps
http://www.facebook.com/profile.php?id=1113885654 using site http://mobilesat.blogspot.com/ to syndicate files from mediafire. He's posting to all of the device fan pages with links to his site which is full of commercial APKs for free. Please report this person for spam/scam if it affects you and also report the blogspot violation if possible. Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Small game develop
Have one big custom surface view for your game. Use canvas to draw stuff to it. Keep fields that are the position. Process input to change the position. Draw the ball where the position is on your surface (using canvas). See the examples that come with Android SDK for more info on using surfaceview. On Mar 9, 10:36 pm, Justin Anderson magouyaw...@gmail.com wrote: * can anyone give me suggestion ??* ummm code? Thanks, Justin Anderson MagouyaWare Developerhttp://sites.google.com/site/magouyaware On Mon, Mar 7, 2011 at 10:11 PM, JackeyChan a397420...@gmail.com wrote: I only want the ball can move with user input: up , down, left, right. now , the ball is created by extend the View class and draw it on the canvas, then set this to be default activity view. but i don't know how to handle user input for re-draw it. can anyone give me suggestion ?? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: opengl textures
If not mipmapping, you can do rectangular powers of two (512x256, 1024x512) but if using mips, you need to keep it square (256x256, 512x512). Some devices can do non power of two, but a good rule of thumb is to always use it. If you have some reason not to, you can check the extensions for the NPOT extension and if it's present, you can use any dimensions under 2k I believe. On Feb 7, 10:23 am, Marcin Orlowski webnet.andr...@gmail.com wrote: On 7 February 2011 19:22, Marcin Orlowski webnet.andr...@gmail.com wrote: On 7 February 2011 18:57, bob b...@coolgroups.com wrote: Do opengl textures on Android have to be a width and height that is a power of 2? In general: yes as some devices will won't handle your textures otherwise. It applies to width (for quite obvious reasons), yet I am not sure about height and can't check now. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android SDK is so slow that is ridiculous.
iOS simulator is fast because XCode builds an X86 binary and because iPhone and OSX both run basically the same OS, there is no actual emulation happening, mostly just API mapping... It's running as a mostly OS-Native binary. Unless you want to develop your apps in Android itself on your desktop on an ARM CPU, you should understand that there will be a performance penalty for emulating the an ARM CPU on x86. One way to make it faster is to build an Android x86 emulator and stop emulating operations, instead using the CPU natively. It seems as if there is progress in that area, even if it's not all from Google. On Jan 29, 11:57 am, Marc Petit-Huguenin petit...@gmail.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/29/2011 10:55 AM, Leigh McRae wrote: It's easy to say that until you have actually written an OpenGL game for Android. Running at seconds per frame instead of frames per second means you can ONLY test on real hardware. On real hardware my game (Tank Recon 3D) takes over 5 minutes to load in the debugger (30 seconds on BlackBerry). Even working with these limitations you also have to develop for the different OS versions and screen sizes. Now I understand what you're saying with the emulation but this blanket answer is getting kind of old. Stop giving the 'You can't get there from here' answer and try and figure something out. The BlackBerry emulators route the OpenGL calls to the desktop PC and allow you to choose the level of acceleration. Maybe this is something that can be looked into. Sure I know you're not getting a 1:1 mapping but it does allows you to develop. How about making a new driver backed by the desktop GPU and give some way to select it? And what about you write and contribute this driver to the code base? There was something I disliked in the phone emulator, I fixed it for myself, and then submitted it in Gerrit and the patch was accepted, all in less than two months and it is now part of Gingerbread. Complaining about missing features on an open source project is ridiculous. On 1/29/2011 12:53 PM, Dianne Hackborn wrote: On Sat, Jan 29, 2011 at 1:26 AM, Miguel Morales therevolti...@gmail.com mailto:therevolti...@gmail.com wrote: Not to mention that testing OpenGL games is impossible. The only way to test on devices is users, otherwise it's just a guessing and hoping for the best. In any case, I don't care WHY the emulator is so slow. Hopefully they'll make it fast in the near future, the iPhone emulator is much better. At the end of the day, you absolutely need to test and run on a device, especially for doing things like OpenGL games. An emulator or simulator on desktop hardware is never going to give you a good idea of how your app performs on real hardware. This isn't an excuse for the emulator being slow (we really would like to improve it, this is just a fairly challenging problem), but no matter what is done it can never be a replacement for running on a real device. -- Dianne Hackborn Android framework engineer hack...@android.com mailto:hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en - -- Marc Petit-Huguenin Personal email: m...@petit-huguenin.org Professional email: petit...@acm.org Blog:http://blog.marc.petit-huguenin.org -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAk1EcS8ACgkQ9RoMZyVa61es6wCeMZHA1Lu5GrzI4qNBIpW/vMQX 6NIAn3azdKrV6q6BAurX2sDMwJsEkfMp =tUSL -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Best, easiest, cleanest, way to make a game and cross platfrom.
Let me enter this most holy war with some first hand experience. I have under my belt 5 Android-only games and one cross platform Android/ iPhone game. Want to guess which took the least amount of time relative to difficulty of game to do? The fact of the matter is that once you're good at cross platform programming, you get the advantage of being able to code/build/test natively in Windows or OSX which saves a good minute every time over deploying to the device and is easier overall to do. Why not use the emulator? It takes forever and does not have adequate 3D performance and does not support GLES 2.0. So I code in Eclipse/CDT, test mostly on Win32 builds then do a daily or every other day build for Android using NDK r4 (I haven't switched to 5 yet). What I test for on Android is scale, usability (controls) and performance. Of course if you're heavily multitouched you'll need more device testing time but often times keyboard bindings and a mouse can get you around that somewhat for testing on a desktop OS. Things are working so well for me that I know for certain I will not be developing any more platform-specific games in Java. I'm experiencing serious time savings and the performance I'm getting is fantastic. Of course there's a couple of months of code to build up to be able to do this (and I will be licensing mine soon for anyone interested who wants to save some time) but once you're over that hump, it's pure productivity. On Jan 24, 11:56 am, Phil Endecott spam_from_goo...@chezphil.org wrote: On Jan 22, 7:27 am, Hogus dupisani.lo...@gmail.com wrote: People spend way too much time worrying aboutcross-platform capability at the outset. Companies spend so much time trying to roll their product out to everyone that they back themselves into corners where there is no way to actually provide the functionality that they want to provide and end up with some watered down, me too, application that anyone else could have developed. This is an interesting viewpoint which I agree with to a certain extent. For me, the main motivation for making my codecross-platformis to avoid having all my eggs in one basket. (The Apple Basket in many cases.) Diversity, both across platforms and across apps, reduces the risk of some event beyond my control taking away the income that pays the rent. Perhaps the important thing is to at least be aware of your options, and to know what technologies arecross-platformand which are not. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Best, easiest, cleanest, way to make a game and cross platfrom.
I'm currently writing clean cross platform games in C++. I'll be releasing a product very soon that is the foundation of what I'm doing there. On Jan 20, 6:16 am, brian purgert brianpurge...@gmail.com wrote: Thanks i looked into it and i really like the unity game engine, and i just bought a book for it and i think it will be a good next step for me. On Jan 20, 2011 12:06 AM, Nightwolf mikh...@gmail.com wrote: libgdx allows you to develop mostly on PC and then generate apk for android. Unity engine has iPhone and Android targets. However android version will cost you. On Jan 20, 3:30 am, brian purgert brianpurge...@gmail.com wrote: Well, I,ve decided that I want to make my next game a diffrent way, after learning alot, i don't think i want to draw it with the canvas altough very easy for the concept im going with. So what do you think about andengine or corona sdk or even straight opengl i saw a little kid use it to make a game lol, so its probably easy, also i want it to be easy to transfer from platfrom to platfrom. What are my options, your advice.. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: 2D shooting game problem
It's kind of like what I said. You're at the point now where you need to take a step back and look at the big picture before you can move forward and make things more interesting. If I were you, my end goal would be to have a design that lets me write a bit of code that looks like this: if (spacePressed) { bullets.add(new Bullet(turret.x, turret.y, turrent.rotation)); } It all comes back to the modeling that I'm talking about. Put the bullet behavior in a Bullet class, and update all Bullet instances from your main class. Bullets are easy, they travel in a direction at a speed from a given point. Using code like this, you can have many bullets in-play easily :) On Jan 19, 3:50 am, Niksa Lovrinic niksa.lovri...@gmail.com wrote: Thank you guys and especially Robert, But the question would be, how do I make that the bullet is fired on a single SPACE key press from the turret to the end of the screen? That's my problem. Nick On Wed, Jan 19, 2011 at 7:16 AM, Kevin Duffey andjar...@gmail.com wrote: Or read Robert's post.. follow his blog, follow the links. He has a ton of good info on there. As I am finding out, game development is not for the faint of heart. It takes years to become really good at it and understand all the ins and outs. Thankfully we have people like Robert and some others that are willing to share their processes, problems and even code to help us out! On Tue, Jan 18, 2011 at 7:00 PM, Zsolt Vasvari zvasv...@gmail.com wrote: If I recall correctly, LunarLander is not exactly the best example of game design for Android. If I were to create an Android game, I'd start with the source of Replica Island. On Jan 17, 12:37 am, Niksa Lovrinic niksa.lovri...@gmail.com wrote: Hello everybody, I've been playing with the LunarLander example and tried to make my own thing out of it... On the right bottom screen, I've got a tank that is not moving and his turret that's moving up and down. It's supposed to shoot missiles at different angles. I've got a tank, turret and a bullet and they are a Bitmap image. private Bitmap tank; private Bitmap turret; private Bitmap bullet; Turret only rotates from angle 0 to angle 75, and I did that with the update... I managed to get the turret moving but now I'm finding it hard to shoot missiles. *doDraw method* * * private void doDraw(Canvas canvas) { canvas.drawBitmap(backgroundImage, 0, 0, null); canvas.drawBitmap(tank, x_tank, y_tank, new Paint()); //Rotating the turret canvas.rotate((float) mHeading, (float) x_turret + mTurretWidth, y_turret); canvas.drawBitmap(turret, x_turret, y_turret, new Paint()); ??? what should I write here for the bullet to be seen shooting out of that turret } *Update method* * * private void updateGame() { long now = System.currentTimeMillis(); if (mLastTime now) return; double elapsed = (now - mLastTime) / 1000.0; if (dUp) // UP key mHeading += 1 * (PHYS_SLEW_SEC * elapsed); if (mHeading = 75) mHeading = 75; if (dDown) // DOWN key mHeading += (-1) * (PHYS_SLEW_SEC * elapsed); if (mHeading 0) mHeading = 0; i f (dSpace){ // Fire bullet SPACE key ??? what should I write here for the bullet to be seen shooting out of that turret ??? When is the method doDraw being called?? } m LastTime = now; } Thank you so much guys, Nick * * * * -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at
[android-developers] Re: 2D shooting game problem
Model your world. Try this: public class GameObject { public float x,y; public Bitmap bmp; } public class Tank extends GameObject { // do tank stuff } public class Bullet extends GameObject { // do bullet stuff } See where I'm going there? Then in your main game class you just keep a list of the gameobjects, run through and update them. Check out this article I wrote when I was doing light racer 3d - http://www.rbgrn.net/content/215-light-racer-3d-development-journal Scroll down on that page to the end where all of the book pages are linked. Read through the first few. I show how games like that are designed on the inside so you can use that information to do yours. On Jan 16, 8:37 am, Niksa Lovrinic niksa.lovri...@gmail.com wrote: Hello everybody, I've been playing with the LunarLander example and tried to make my own thing out of it... On the right bottom screen, I've got a tank that is not moving and his turret that's moving up and down. It's supposed to shoot missiles at different angles. I've got a tank, turret and a bullet and they are a Bitmap image. private Bitmap tank; private Bitmap turret; private Bitmap bullet; Turret only rotates from angle 0 to angle 75, and I did that with the update... I managed to get the turret moving but now I'm finding it hard to shoot missiles. *doDraw method* * * private void doDraw(Canvas canvas) { canvas.drawBitmap(backgroundImage, 0, 0, null); canvas.drawBitmap(tank, x_tank, y_tank, new Paint()); //Rotating the turret canvas.rotate((float) mHeading, (float) x_turret + mTurretWidth, y_turret); canvas.drawBitmap(turret, x_turret, y_turret, new Paint()); ??? what should I write here for the bullet to be seen shooting out of that turret } *Update method* * * private void updateGame() { long now = System.currentTimeMillis(); if (mLastTime now) return; double elapsed = (now - mLastTime) / 1000.0; if (dUp) // UP key mHeading += 1 * (PHYS_SLEW_SEC * elapsed); if (mHeading = 75) mHeading = 75; if (dDown) // DOWN key mHeading += (-1) * (PHYS_SLEW_SEC * elapsed); if (mHeading 0) mHeading = 0; i f (dSpace){ // Fire bullet SPACE key ??? what should I write here for the bullet to be seen shooting out of that turret ??? When is the method doDraw being called?? } m LastTime = now; } Thank you so much guys, Nick * * * * -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Anyone with GL experience willing to take a contract/bounty?
There are many Android devs who have plenty of GL experience, however I believe that your post was too vague to draw interest. I believe many of the good game developers have stopped watching this group because it has become rather large and generally has little to offer graphics and simulation programmers, who are your targets. You would have more luck IMO searching this group for GL-related topics and emailing those directly who seem to have knowledgeable questions and replies. On Jan 17, 8:38 am, Brill Pappin br...@pappin.ca wrote: Thanks, I'll give that a try. I'm not surprised the GL knowledge pool is small, its a whole different beast... which is exactly why we want to framework work done... it will let us accelerate our experimentation and maybe actually get something to market in the black rather than in the red :) - Brill Pappin On 2011-01-17, at 11:01 AM, TreKing wrote: On Mon, Jan 17, 2011 at 9:52 AM, Brill Pappin br...@pappin.ca wrote: Really? Nobody is interested in this at all? Not surprised. People here probably have their own projects going on I get the impression that the knowledge pool for GL on Android is very small. Maybe try gamedev.net - great site for general game development stuff and they have a Help Wanted section. --- -- TreKing - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Eclipse/ADT just not cutting it, need refined ide For androdi development!
I wish I could have every eclipse naysayer sit by me and pair program. I've never had an IDE that I can burn through code so efficiently in every way. In fact, they do have UX experts working on it. It's gotten very good, but like any big IDE, you need to know lots of details to make use of that. It comes with years of experience. Just keep trying, ask questions and you'll get better with it. On Jan 14, 9:26 am, Kostya Vasilyev kmans...@gmail.com wrote: Using Eclipse on Windows 7 / 64 bit here just fine, and very happy with it overall. Automatic rebuilds occasionally lag a little (i7 860, 4G RAM), but then it's a small price to pay for not having to think about a separate build step. My favorite feature is refactoring, I like how easy it is to rename things (to improvide code clarity). Second fave is source formatting (and XML formatting too, now that I've learned how to make it put each attribute on a separate line). And various ways to navigate the code are great too - like jumping to the definition of a variable or a class, or jumping between all classes that implement / override a particular method. Can't say anything about the layout editor - I only use it for previewing, and not often. -- Kostya 2011/1/14 Brill Pappin br...@pappin.ca I can't say I agree. I like working in Eclipse and it supports *every* type of project that I might want to combine to make a product. The ADT could be a bit more responsive sometimes but I haven't had a lot of problems with it and I would really not want a whole new IDE to do my development in. Maybe I'm having a good experience because i develop on a Mac... but I can't really credit that as the reason. So, I for one would not be pleased if this IDE was not supported any more. I'm very much looking forward to the future and integration with the new Eclipse 4 as it becomes mainstream. -Brill Pappin BTW - If you want formatting, learn your tools. Eclipse can do it for you on every save. On Jan 7, 10:01 pm, indigo0086 indigo0...@gmail.com wrote: I mean right now it's the only IDE for developing for android efficiently. I'm just finding that eclipse and adt are just barely usable tools for android development (more eclipse than ADT of course). I've read where a few android developers have complained that the tools have poor usability, are slow, and are just not visually pleasing to use. I can site the android layout editor horribly formats xml, and eclipse doesn't automatically format it when switching to xml edit view. I think we need official tools solely for android development instead of a plugin for an ide developed by the community (none of which seem to be user experience experts either). I just feel like it's a chore to develop in java as opposed to in other languages mainly because of the ide tools available. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: 2D game BallBraker
First of all, you will not have that working in 5 days if this is your first game. Any one little thing will get you hung up and you'll slip. You will need much more time than that to get acquainted with game development. I published an article here about android game development - http://www.rbgrn.net/content/54-getting-started-android-game-development Mario Zechner has lots of great info for beginning game development at his blog - http://www.badlogicgames.com/wordpress/ On Jan 12, 1:01 am, Abhishek Talwar r.o.b.i.n.abhis...@gmail.com wrote: Hey guys I have to make the game like this :-http://www.1980-games.com/us/action-games/block-breaker/ballbraker.php I have to make this in 5 days and i have no idea how to make a game. Even tiny help will be appreciated -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android NDK
Where to start? 1) Read the documentation. http://developer.android.com/sdk/ndk/index.html 2) Ask on the right mailing list. http://groups.google.com/group/android-ndk 3) Get replies publicly so that the information can help other people. Asking to have people personally email you answers does not help others in the same boat. You provided no information for anyone to help so I'm guessing you are in windows. Install cygwin, do what the documentation says, enjoy your shared object binary. On Jan 6, 10:14 pm, Rocky rkjhaw1...@gmail.com wrote: Hi, but i'm not able to run make command. can u give me step by step procedure upto this point u can send me at rkjhaw1...@gmail.com thanks in advance.. On Wed, Dec 29, 2010 at 3:13 PM, Anshuman Tripathi anshuman.tripat...@gmail.com wrote: I am new guy for android. I am trying to use NDK in my Test Project. After getting MAKE APP successfully. I will get .so file but when I started my Test project its not able to load the file. It showing the error like unsatisfied link error . logcat message like : AndroidRuntime START D/AndroidRuntime( 275): CheckJNI is ON D/AndroidRuntime( 275): --- registering native functions --- I/ActivityManager( 65): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x1000 cmp=cem.net.NDKDem/.NDKDem } D/AndroidRuntime( 275): Shutting down VM I/AndroidRuntime( 275): NOTE: attach of thread 'Binder Thread #3' failed D/jdwp ( 275): adbd disconnected W/ActivityManager( 65): Activity pause timeout for HistoryRecord{43fa6198 com.android.launcher/ com.android.launcher2.Launcher} I/ActivityManager( 65): Start proc cem.net.NDKDem for activity cem.net.NDKDem/.NDKDem: pid=282 uid=10036 gids={} W/dalvikvm( 282): Exception Ljava/lang/UnsatisfiedLinkError; thrown during Lcem/net/NDKDem/NativeLib;.clinit D/AndroidRuntime( 282): Shutting down VM W/dalvikvm( 282): threadid=1: thread exiting with uncaught exception (group=0x4001d800) E/AndroidRuntime( 282): FATAL EXCEPTION: main E/AndroidRuntime( 282): java.lang.ExceptionInInitializerError E/AndroidRuntime( 282): at cem.net.NDKDem.NDKDem.onCreate(NDKDem.java:21) E/AndroidRuntime( 282): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java: 1047) E/AndroidRuntime( 282): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2627) E/AndroidRuntime( 282): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 2679) E/AndroidRuntime( 282): at android.app.ActivityThread.access $2300(ActivityThread.java:125) E/AndroidRuntime( 282): at android.app.ActivityThread $H.handleMessage(ActivityThread.java:2033) E/AndroidRuntime( 282): at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime( 282): at android.os.Looper.loop(Looper.java:123) E/AndroidRuntime( 282): at android.app.ActivityThread.main(ActivityThread.java:4627) E/AndroidRuntime( 282): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 282): at java.lang.reflect.Method.invoke(Method.java:521) E/AndroidRuntime( 282): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:868) E/AndroidRuntime( 282): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) E/AndroidRuntime( 282): at dalvik.system.NativeStart.main(Native Method) E/AndroidRuntime( 282): Caused by: java.lang.UnsatisfiedLinkError: Library ndk_dem not found E/AndroidRuntime( 282): at java.lang.Runtime.loadLibrary(Runtime.java:461) E/AndroidRuntime( 282): at java.lang.System.loadLibrary(System.java: 557) E/AndroidRuntime( 282): at cem.net.NDKDem.NativeLib.clinit(NativeLib.java:6) E/AndroidRuntime( 282): ... 14 more W/ActivityManager( 65): Force finishing activity cem.net.NDKDem/.NDKDem W/ActivityManager( 65): Activity pause timeout for HistoryRecord{43e3b3b8 cem.net.NDKDem/.NDKDem} I/ActivityManager( 65): Displayed activity com.android.launcher/ com.android.launcher2.Launcher: 108535 ms (total 108535 ms) W/ActivityManager( 65): Activity destroy timeout for HistoryRecord{43e3b3b8 cem.net.NDKDem/.NDKDem} D/KeyguardViewMediator( 65): pokeWakelock(5000) I/ARMAssembler( 65): generated scanline__0077:03515104__ [ 33 ipp] (47 ins) at [0x330a80:0x330b3c] in 3010726 ns I/Process ( 282): Sending signal. PID: 282 SIG: 9 I/ActivityManager( 65): Process cem.net.NDKDem (pid 282) has died. I/ARMAssembler( 65): generated scanline__0177:03515104_1001_ [ 91 ipp] (114 ins) at [0x330e60:0x331028] in 2971458 ns D/dalvikvm( 125): GC_EXTERNAL_ALLOC freed 1053 objects / 58696 bytes in 187ms I/ActivityManager( 65): Starting
[android-developers] Re: Converting Touch Inputs to Vectors
Define a minimum distance, say 10 dips. Make or use a Vector2D class. (just x and y) Allocate an array for your Vector2Ds. pseudocode: onPointerMoved() { if (points.size() == 0) { points.add(new Vector2d(pointerx, pointery)); } else { Vector2D lastpoint = points.get(points.size() - 1); if (distancefrom(lastpoint, pointerx, pointery) minimum_distance) { points.add(new Vector2d(pointerx, pointery)); } } // analyze points here if you want to do it while user still moving } This will plot points as the user moves around, given a precision of the minimum size you define. You can analyze the points while the pointer is moving or you can wait until they let the pointer up and then analyze. Checking for a direction of a vector is easy, it's atan2((point0.x - point1.x) / (point0.y - point1.y)) but making more sense of the graph becomes a bit more mathy. Curve or arc recognition could be done in hackerish form by analyzing 4 or 5 points at a time (depending on precision, of course) and calculating the average direction, min and max direction and minmax direction delta then using those to decide what kind of arc it is and mostly in what direction it was going. So this is the how, but without knowing more about exactly what you're trying to do, this is all I can offer. On Dec 30, 8:53 am, Paul pmmen...@gmail.com wrote: On Dec 30, 5:09 am, Daniel Drozdzewski daniel.drozdzew...@gmail.com wrote: On Dec 29, 1:18 am, Paul pmmen...@gmail.com wrote: Hi all. I am writing an app that will convert touchscreen user inputs (such as the user 'handwriting' on the screen) into vectors that can then be saved and recalled later. I need to get the vectors into a format I can store locally, either as a file or in an SQLite database. Just wondering if anyone had any pointers as to how to get started... my initial thought was to listen for MotionEvents and when an ACTION_DOWN is detected, record the coordinates and use this as the vector's start point, and then record intermediate coordinates as the ACTION_MOVE is triggered (used to help define the shape of this Path they are creating), ending the stroke vector on ACTION_UP... but this results in many many intermediate points per vector (30 or 40) and with several hundred vectors (a full page of handwritten text on a tablet for example) this solution gets quickly out of hand as each page will potentially require tens of thousands of points... Any suggestions on a better way to represent and store user-inputed vectors/paths? Or maybe another approach completely? Thanks for any help! Paul Paul, You could blindingly start filtering any intermediate vectors, but you would miss some important points, where the writing drastically changes its direction. As you see, the problem you have is detecting where the continuous line changes its direction by much and intermediate points could be filtered. You would need calculating the angles between adjacent vectors and when the angle gets bigger than some threshold value, the point between said vectors becomes very important. Hope this helps you somehow. -- Daniel Drozdzewski I was thinking about this issue too... how do I recognize when a path backs onto itself, makes sharp turns, etc as is normal in handwriting? As I mentioned in another reply, I have looked at the SVG Path standard: http://www.w3schools.com/svg/svg_path.asp Looks like a possibility in terms of efficiently storing the shape of the stroke, but to use it I need to somehow take a set of coordinate points that Android spits out from MotionEvent and 'recognize' when it is a curve, arc, etc... maybe I extend my StrokeGestureDetector I mentioned to handle the heavy lifting of this recognitions, so that it simply reports back when the stroke is curved, etc? The issue remains how I determine when a set of x,y coords forms a curve, a sharp curve (such as when printing an M for example), etc. Off the top of my head, maybe in my gesture detector, when in a stroke, store the last 3 MotionEvent points, generate a 'line' from point 1 to 2, and point 2 to 3 and determine the angle at this vertex to help recognize direction changes? Again, the HOW is where I am stuck at this point... once I have the points described, recreating looks straight- forward simple using the built-in Path class. Any ideas on how to programatically test for the direction changes, curves, etc? Paul -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: OpenGL Problem with Sphere Texture Mapping
Well said Kostya. Pedro - I defined the formula to get your normal above. A normal is a unit vector (a 3D vector of length 1.) Each vertex must have a normal for proper shading, as that's how light is calculated. The normal of a vertex of a sphere is a easy to calculate. Think of it as the direction from the center of the sphere through the vertex. That's your vector. I provided a formula, though you'll have to javafy it a little to make that work for you. If you're struggling to understand this, I suggest reading some 3D primer books before moving on. They are very, very helpful. Cheers On Dec 27, 7:59 am, Kostya Vasilyev kmans...@gmail.com wrote: Pedro, A normal is a unit vector (length == 1) that is perpendicular to the surface. Normals are used for shading, so don't worry about them too much for now. Texture coordinates, as was already pointed out here, are in 2D space, i.e. two coordinates. The reason is that textures are 2-dimensional, and texture coordinates specify which point within the texture should be mapped to a particular vertex in 3D space. Imagine that the texture is a stretchable, initially square, piece of fabric. Each UV coordinate represents a point within that square. For each vertex, the point within the texture specified for that vertex by UV coordinates is glued to the vertex. Then the texture is allowed to stretch between vertexes. What sort of texture coordinates you generate is entirely up to you. A simple way to texture map a sphere is to wrap the texture into a vertical cylinder around the sphere, then pull the top and bottom towards the sphere, so you have singularities at the top and bottom of the sphere. If you generate your sphere as a bunch of horizontal bands, each having equal angular size, and further subdivided around into equal patches, then you can your use loop variables (band / patch index) to compute UV coordinates. Just remember that UV are 0 to 1 (unless you want tiling). -- Kostya 27.12.2010 18:35, pedr0 пишет: But normal.x what is it? Is the abs(x) ? On 23 Dic, 20:41, Robert Greenrbgrn@gmail.com wrote: UV unwrapping/mapping is standard practice in 3d games. It's how the artist lines up the textures onto the skin/model. You're doing UV coordinate generation, which is similar but is mathematically specified instead of placed by a 3D modeling application. On Dec 23, 12:37 am, pedr0pulsarpie...@gmail.com wrote: What do you think about it? http://en.wikipedia.org/wiki/UV_mapping On 23 Dic, 09:19, pedr0pulsarpie...@gmail.com wrote: Thanks a lot, especially at Robert Green for his very good explanation! The absurd thing is that the code which I posted above is 100% right in a iPhone iOS, but when I port the same code on the Android platform I have these issues. I will try to do what you are talking about normals and I let you know about my progress! Thanks again. pedr0 On 23 Dic, 04:10, Mario Zechnerbadlogicga...@gmail.com wrote: On 22 Dez., 20:42, Robert Greenrbgrn@gmail.com wrote: 3DVec normal = (sphereCenter - point).normalize(); 3DVec normal = (point - sphereCenter).normalize(); Or your world will be upside down. Unless my brain is totally borked :) (could well be, 4am here...) -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Cross Word Game
Important decisions to make are: 1) Is this just for Android or are you targeting more systems? 2) Do you need a performance component, like a real time puzzle solver or random puzzle game creator? 3) Do you want fancy graphics or is something really basic going to work? If #1 = Only Android and #2 = No and #3 = No then consider going with this solution: A) All Java B) Mostly off-the-shelf Android UI Components C) Custom view for your gameboard (This is hard to escape from and is often easier than trying to build it all using android layouts and widgets) C1) Just use Canvas for your 2D lib and all will be easy and well. Cheers On Dec 27, 1:11 pm, ko5tik kpriblo...@yahoo.com wrote: On Dec 27, 6:35 pm, Diego N. diegonunes.sist...@gmail.com wrote: I would like to develop a crossword puzzle game but never worked with game development. He wanted to know where to start. I will use Java 2D? I would recommend to stick to standard android widgets if you do not need realtime graphics (which is the case with crossword puzzle game) - but full UI power including layout and animations. If you need realtime frame rendering your choice is SurfaceView and drawing into bitmaps with android toolkit - or maybe even with GL if hardware acceleration if available regards, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: OpenGL Problem with Sphere Texture Mapping
UV unwrapping/mapping is standard practice in 3d games. It's how the artist lines up the textures onto the skin/model. You're doing UV coordinate generation, which is similar but is mathematically specified instead of placed by a 3D modeling application. On Dec 23, 12:37 am, pedr0 pulsarpie...@gmail.com wrote: What do you think about it? http://en.wikipedia.org/wiki/UV_mapping On 23 Dic, 09:19, pedr0 pulsarpie...@gmail.com wrote: Thanks a lot, especially at Robert Green for his very good explanation! The absurd thing is that the code which I posted above is 100% right in a iPhone iOS, but when I port the same code on the Android platform I have these issues. I will try to do what you are talking about normals and I let you know about my progress! Thanks again. pedr0 On 23 Dic, 04:10, Mario Zechner badlogicga...@gmail.com wrote: On 22 Dez., 20:42, Robert Green rbgrn@gmail.com wrote: 3DVec normal = (sphereCenter - point).normalize(); 3DVec normal = (point - sphereCenter).normalize(); Or your world will be upside down. Unless my brain is totally borked :) (could well be, 4am here...) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Bitmap Matrix Rotate
No. Load it once and reuse it, otherwise you will suffer some nasty performance. On Dec 22, 10:35 am, nirm nirmi...@gmail.com wrote: Hello, I have a bitmap that i want it to rotate all the time. This bitmap is placed in a SurfaceView. My question is: Do i have to create the bitmap every time i want it to rotate? here is my code it is placed is the on draw method: leftMatrix.setRotate(degrees++, coords.getX()+bitmap.getWidth()/2, coords.getY()); graphic.setBitmap(Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), leftMatrix, false)); canvas.drawBitmap(bitmap, coords.getX(), coords.getY(), null); Kind Regards Nir -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: OpenGL Problem with Sphere Texture Mapping
pedro, your problem has nothing to do with android. I think you may need a 3D refresher to solve it. Normals are not UVs. Your UVs will depend on how you want to map, but the easiest way to do it is to map from the sphere center out using angles, like this. Since GL has 2D texture coordinate 0,0 as upper left, you will want to define where upper left is on your sphere. I'd use straight up and center as a unit vector, or (0, 0, 1) if z is up in your world. If y is up, then (0,1,0) will be 0,0 in UVs. so starting with that, you can calculate the UV of any point by getting the difference of angle of that starting angle and the new point. Remember that if they both come from the sphere center, you'll have complete 2PI radian coverage on both axis... so naturally dividing the resulting angle by 2PI will give you a UV number between 0 and 1. The process is like this (assuming z=up) For each point: // for U just look at the sphere from overhead U = (atan2(point.x - center.x, point.y - center.y) + PI) / (2PI) hyp = distance(point, center); V = ((point.z - center.z) / hyp) + 1) / 2 I believe that is correct and there will be a more elegant way to do it but today my head is in 2D math world so I can't remember how to dot it out. The idea though is that for every point, you can determine the angle needed for U by looking at the sphere from overhead and just using an arctan of the xy differences (assuming z=up) of the center to the point. The resulting range is in radians (- PI to PI) so you have to add PI to change it from 0 to 2PI and then dividing by 2PI gives you 0 to 1. Then for the V value, you can just examine the height (z) of the point and in conjunction with its distance from the center, you've got an opposite over hypotenuse which is the same as the sine of the angle, which is what you want to get a evenly distributed texture top to bottom. The number will also be ranged from -1 to 1 so you need to add 1 and divide it by 2 to get the 0 to 1 range. The texture should touch in the corners and if you use the right one, look seamless. If any of my math is wrong, please correct it after debugging, but at least this should get you going in the right direction. Cheers On Dec 22, 9:09 am, pedr0 pulsarpie...@gmail.com wrote: Please see the link and reply inside this post if you have not an account on OpenGL forum, the question is over there. http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflatN... Thanks a lot. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: OpenGL Problem with Sphere Texture Mapping
Also I should add that your sphere normal should be (sphereCenter - point).Normalize() and will be a 3D vector. Normals are 3D, UVs are 2D. On Dec 22, 9:09 am, pedr0 pulsarpie...@gmail.com wrote: Please see the link and reply inside this post if you have not an account on OpenGL forum, the question is over there. http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflatN... Thanks a lot. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: OpenGL Problem with Sphere Texture Mapping
Oh here is a faster method - http://www.mvps.org/directx/articles/spheremap.htm For each point (Assuming Y=up): 3DVec normal = (sphereCenter - point).normalize(); float U = asin(normal.x)/PI + 0.5 float V = asin(normal.y)/PI + 0.5 for z=up: float U = asin(normal.x)/PI + 0.5 float V = asin(normal.z)/PI + 0.5 But in your code example I don't know if you were calculating normals correctly. Your normal should be a vector pointing from the center of your sphere out the vertex, which is done by subtracting and then normalizing to make it a unit-vector. On Dec 22, 11:33 am, Robert Green rbgrn@gmail.com wrote: pedro, your problem has nothing to do with android. I think you may need a 3D refresher to solve it. Normals are not UVs. Your UVs will depend on how you want to map, but the easiest way to do it is to map from the sphere center out using angles, like this. Since GL has 2D texture coordinate 0,0 as upper left, you will want to define where upper left is on your sphere. I'd use straight up and center as a unit vector, or (0, 0, 1) if z is up in your world. If y is up, then (0,1,0) will be 0,0 in UVs. so starting with that, you can calculate the UV of any point by getting the difference of angle of that starting angle and the new point. Remember that if they both come from the sphere center, you'll have complete 2PI radian coverage on both axis... so naturally dividing the resulting angle by 2PI will give you a UV number between 0 and 1. The process is like this (assuming z=up) For each point: // for U just look at the sphere from overhead U = (atan2(point.x - center.x, point.y - center.y) + PI) / (2PI) hyp = distance(point, center); V = ((point.z - center.z) / hyp) + 1) / 2 I believe that is correct and there will be a more elegant way to do it but today my head is in 2D math world so I can't remember how to dot it out. The idea though is that for every point, you can determine the angle needed for U by looking at the sphere from overhead and just using an arctan of the xy differences (assuming z=up) of the center to the point. The resulting range is in radians (- PI to PI) so you have to add PI to change it from 0 to 2PI and then dividing by 2PI gives you 0 to 1. Then for the V value, you can just examine the height (z) of the point and in conjunction with its distance from the center, you've got an opposite over hypotenuse which is the same as the sine of the angle, which is what you want to get a evenly distributed texture top to bottom. The number will also be ranged from -1 to 1 so you need to add 1 and divide it by 2 to get the 0 to 1 range. The texture should touch in the corners and if you use the right one, look seamless. If any of my math is wrong, please correct it after debugging, but at least this should get you going in the right direction. Cheers On Dec 22, 9:09 am, pedr0 pulsarpie...@gmail.com wrote: Please see the link and reply inside this post if you have not an account on OpenGL forum, the question is over there. http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflatN... Thanks a lot. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: openGL ES animation rendering is coming out choppy
For first gen devices, 20,000 triangles is way too many to get a good framerate. I found that anything over about 2500 becomes a burden for them. New devices should be able to handle 20k much better. What device are you testing on? On Dec 13, 3:27 pm, Avtar Khalsa akhals...@gmail.com wrote: Hi All I am an Android beginner working with openGL ES to try to make some simple 3d animations. I only have one glDrawElements call per screen refresh and I have it set to RENDERMODE_CONTINUOUSLY. Unfortunately, for some reason, my animation is coming out very choppy with a frame rate of around 2FPS. I am drawing about 20,000 triangles, but I would think that is not too many considering some of the complex things you can render. I would be happy to post my code if anyone has any thoughts on why the animation might be so choppy? Thanks in advance Avtar -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Can only see 8 of 13 apps in market console still
Has anyone had this issue resolved yet? My company has a total of 13 published apps but I can only see 8 still with no pagination links or any of that. The age ratings showed up today but I still have to punch in package names in URLs to edit apps. Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Market is completely out of order !!
I'm still stuck on page 1 (8 apps in alphabetical order) with no pagination links so the only way I can modify my other apps is via the URL. On Nov 25, 10:34 am, Bradley Brown brownb6...@gmail.com wrote: Have you tried to go to your account (checkout.google.com)? I went there and got more information...but I'm still waiting on a LOT of answers from Google. I just LOVE how they go out to lunch on us... On Thu, Nov 25, 2010 at 10:13 AM, niko20 nikolatesl...@yahoo.com wrote: UGH THIS IS BULLSH*T, on a holiday, we want to upload new versions to get lots of new business, and the market is screwed up again! -niko On Nov 25, 10:07 am, Rob Franz rob.fr...@gmail.com wrote: Any idea when this might be fixed? I can confirm the same problems for me - half of my listings are gone. I know it's Thanksgiving and all but this affects a lot of people, apparently. On Thu, Nov 25, 2010 at 9:15 AM, Sarwar Erfan erfanonl...@gmail.com wrote: May be Google is not paying him well? :D On Nov 25, 7:55 pm, Yahel kaye...@gmail.com wrote: No news from the Android team(one-man team most probably : ) about the market being completely screwed and unusable : - Half my app do not appear anymore in the list - Delete links under the screenshots don't work anymore - Even though there is a highres icon present and showing, saving sends error This field is required I mean ok, Mister Market Developer you are alone in your office doing the job of a complete team but come on, Unit Testing before launching new version is the bare minimum. We know google isn't helping you much and there not giving you even an assistant but last count from july gives 10199 developers using the Market console. That's a lot of people depending on you. Could you try a little harder please ?? Yahel -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252Bu nsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Apps missing in publisher console
I'm currently missing 4 of my apps! Is anyone else having this problem? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Apps missing in publisher console
I'm glad it's not just me! On Nov 24, 1:25 pm, Kumar Bibek coomar@gmail.com wrote: Haha, Quite a few things there... Will you even be able to log in? This one is classy. In that case, we might also have trouble logging into Gmail. :D Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com On Thu, Nov 25, 2010 at 2:49 AM, TreKing treking...@gmail.com wrote: On Wed, Nov 24, 2010 at 3:10 PM, Kumar Bibek coomar@gmail.com wrote: Might be a side-effect. :D Indeed - the process for updating the Android Market usually involves adding one new thing and breaking several other existing components. It's turned into a unpredictable game of What will they break THIS time!? Will your download stats stop moving? Will your install percentage plummet and never return? Will your apps disappear? Will you even be able to log in? Will you be unable to publish / update? Who knows!? Best to steer clear of trying to do anything with the site for a while if you can help it. --- -- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: how many devices have the nexus one / HTC desire multi touch bug and would you release a game utilizing multitouch anyway?
Some facts: All HTC phones up until the Incredible and EVO had the old synaptics touch screen which did not support discrete touch points. The new high end phones (including the incredible and EVO) have much better screens. Motorola Droid, Droid 2 and Droid X all support discrete touch points. Samsung Galaxy S phones (Vibrant, fascinate, etc) all support discrete touch points. Android 2.2 supplies a feature flag for discrete touch points so you will be able to tell programmatically if you can use a discrete-touch control scheme. A smart game programmer would develop 3 control systems: Single Touch, Discrete MultiTouch and Non-Discrete Multitouch. Ensure the game is playable with all 3 systems, then use given the following logic: If (AndroidVersion 2.0), use Single Touch If (AndroidVersion = 2.2 SupportsFeature(DiscreteMultiTouch)), use Discrete MultiTouch Else use non-discrete multitouch Educating the users as to what their phone does and does not support is not an easy task. I've been through the ringer on this issue and I'm in the camp now where the more simple control system you can devise for your game, the better. The more complex your controls, the taller the hill you will be climbing up trying to make it work nicely for everyone and manage people's expectations about their device. On Nov 6, 7:22 am, Yahel kaye...@gmail.com wrote: Hi, Sorry but it's not only the nexus or the desire, it's all the htcs and some other. The answer to your question is in the market : Almost no games are multitouch because it is so broken. Mine(Armaboing) which is as simple as it can gets is using a massive amount of logic and took me a massivea amount of time to be almost decent in two players mode. If massive multitouch gestures is needed. Don't waste your time. Or be prepared to have only a very small share of the market and dreadful comments. I just realised : you said gesture. This might be different, my game uses only taps which are reported wrong almost everytime. In any case, you should prototype your gesture with a very simple app before and tests them on a nexus, a desire or a hero to see what happens for you. Yahel On Nov 6, 10:43 am, noriato fabri...@gmail.com wrote: Hi, so there's the multitouch issue with the Nexus One and HTC Desire. Is there some documentation on what other devices have this hardware error and what the total market share is? If you had a game idea that needs massive multitouch gestures, would you go for it on Android or would it currently be a waste of time with only a few devices supporting it? Peter -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: OpenGL more textures for one rect
This is what glBindTexture() is for :) On Nov 1, 3:15 pm, AFgan adolfaild...@gmail.com wrote: In Android OpenGL ES, I want to be able to switch textures for a given Rectangle. I have one rect and I put two textures, depending on different conditions. I just want to switch between textures. I followed this code to create the textures:http://blog.poweredbytoast.com/loading-opengl-textures-in-androidbut it seems that this is only for one texture. If I use only one texture, it renders fine, but then I don't know how to tell the rect to use another texture (same rect, different texture). Do I do something like setTexture with the ID that is generated in loadTextures()? Do I have to have an array with texture names (numbers) that I then change .. I just don't get it.. Help is really appreciated. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Problem with OpenGL ES application,please help
Or - make an atlas and only do 1 texture bind per cube. Raging Thunder 2 probably only switches under a dozen times per draw because of atlasing, group-by-texture optimizations, etc. There are profiling tools you can get to check for performance bottlenecks, btw. Search for the Adreno profiler if you're running a Qualcomm chip or Imagination Tech has stuff for the PowerVR chips. On Oct 25, 1:21 pm, Nightwolf mikh...@gmail.com wrote: Try reducing texture resolution. 128x128 texture for each of 6 sides of the cube. That means you do 6 texture switches to draw one cube. 10 cubes - 60 texture switches per one scene. Use one texture for all your cubes and see what you get. On 25 окт, 16:40, gambiting gambit...@gmail.com wrote: Hi there, I am currently trying to develop a game for android in OpenGL ESand I am testing it on my Nexus One. But I have run into some performance problems,and I would like to ask somebody about it,could you help? I currently have a very basic scene - background made of 25 tiles(256x256 texture each), and then a number of textured cubes(128x128 texture for each side of a cube ). However,when I try to display approx. more than 10 cubes, the performance becomes so sluggish that I can't even rotate the scene smoothly. I can't imagine how can I add more objects(player,enemies, all that kind of stuff) when it runs so slowly with 35 objects in total. I mean - games like Raging Thunder 2 probably display hundreds of objects at once(plus they do lots of computations behind the scenes) and they run super- smooth on my nexus one. What am I doing wrong? Could somebody help me please -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Kube example with simple 3D object select
Luke, Read these. http://groups.google.com/group/android-developers/browse_thread/thread/6243785d31f904d7/155df9bc386bb0ad?lnk=gstq=3d+selection#155df9bc386bb0ad http://groups.google.com/group/android-developers/browse_thread/thread/3b9ab1117971fe11/65e1376de2b698e3?lnk=gstq=3d+selection#65e1376de2b698e3 On Oct 22, 10:52 am, TreKing treking...@gmail.com wrote: On Tue, Oct 19, 2010 at 3:20 AM, Lukasz.Iwanski lukasz.iwan...@gmail.comwrote: I have done research.. but I have huge problem with that. Huge problem with what?http://www.catb.org/esr/faqs/smart-questions.html --- -- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Best phone for OpenGL game dev
FYI: Extensions are only listed if the GL implementation is below the version that has the same filter built-in. For example, the original droid DOES support VBOs, but it's not listed as an extension. It shouldn't be, because you can see that the GLES version given when initializing a 1.1 context is 1.1, meaning it has all 1.1 features (of which VBOs are part of). It will also initialize a 2.0 context, meaning it will support all 2.0 standard features (so don't expect an extension for FRAME_BUFFER_OBJECT etc, as that's part of 2.0). The first gen phones are 1.0, which does not include VBO support, which is why you'll see a VBO extension on them (As well as many others that you won't see on a 1.1 chip). Extensions extend base functionality, which is why you don't see them when the base functionality already contains it. Please review the official docs at http://www.khronos.org/registry/gles/ for more info on this. On Oct 18, 1:50 pm, EboMike ebom...@gmail.com wrote: Well great, there are two threads now. Here's the other one:http://stackoverflow.com/questions/2093594/opengl-extensions-availabl... On Oct 18, 11:48 am, EboMike ebom...@gmail.com wrote: The OS market share list is here:http://developer.android.com/resources/dashboard/platform-versions.html My recommendation: Require Android 2.0 and Open GL ES 2.0, this will allow you to use vertex/fragment shaders. Check for extensions like vertex buffer objects and use them, but don't require them (the original Droid doesn't have VBOs, but it still popular). That should allow your app to run on most modern phones and have good performance. Btw, there was a thread on Stack Overflow where people posted available extensions on several phones:http://stackoverflow.com/questions/3881197/opengl-es-2-0-extensions-o... -Mike On Oct 18, 11:36 am, Tudor Tihan tudorti...@gmail.com wrote: Thank, 2.2 sounds good. I dont want to build a game that runs on all hardware, just the top range hardware, since fixed function looks like crap in nowadays shader world. Where would I find an accurate OS/device market share list? On Oct 16, 1:33 pm, Nightwolf mikh...@gmail.com wrote: Results are pretty good. However iPhone 4 has higher resolution (960 by 640) so in some cases it'll be harder for it to compete. BTW Samsung Galaxy S gets Android 2.2 in Europe. Anyway there are only 33% of Android 2.2 phones. And only few of them are Samsung. If your game will run smooth only on one device you won't get large install base. On 14 ÏËÔ, 18:22, Tudor Tihan tudorti...@gmail.com wrote: Thank you all for your answers. @Nightwolf: That link was much appreciated. I also found this benchmark comparison, how do the results look to you:http://www.glbenchmark.com/compare.jsp?benchmark=glpro11showhide=tru...) @Andy: On Oct 14, 12:32šam, Adam Hammer adamhamm...@gmail.com wrote: I do mine on a N1. 2.2 is a target if you want to support ES2.0. You can do so in 2.1 but it'll be a headache using the NDK for such. [...] Can you give me a bit more details on this? The only high performance phone I can get in my country (Romania) is the Samsung Galaxy S, but it is 2.1. I am interested in making use of shaders in a character detailed 3D video game with lots of particle effects. What sort of pain would I get myself into if I bought thatphone? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Alternative to GLWallpaperService, OpenGL Live Wallpaper
The code I posted is mostly just a refactored GLSurfaceView from 2.1 Master. It shouldn't perform differently unless something deeper down is limiting. On Oct 15, 10:15 am, mr.winky mr0wi...@gmail.com wrote: Yes, I have verified with an opengl app under GLSurfaceView that I can get 60 fps. I havent been able to successfully adapt, beyond what Robert Green has posted, the GLSurfaceView to work for live wallpaper without the 30fps barrier. Is there someone out there that has solved this? On Oct 15, 6:54 am, Lance Nanek lna...@gmail.com wrote: Did you lookup the usual refresh rate, which is indeed 60FPS, or did you check the specific number for your phone? I know from my own testing that the HTC Evo 4G cannot go above 30FPS in OpenGL, for example. Chris Pruett mentioned one of the XPeria devices doing similar, running at 30FPS, even when he draws a scene with nothing in it (http://code.google.com/events/io/2010/sessions/writing-real-time-game... ). I'm just pointing out that you may actually have one of these rarer crippled phone models rather than a software issue. On Oct 13, 1:56 am, mr.winky mr0wi...@gmail.com wrote: I've been using theGLWallpaperServiceas posted by Robert Green (http://www.rbgrn.net/content/354-glsurfaceview-adapted-3d-live- wallpapers), which has worked so far for the live wallpapers but I'm hitting a wall when it comes to performance. The GL code is executing at the expected speed when swapping (about 14ms after the swap occurs), but there seems to be an extreme overhead with the wallpaper code of 33ms. For example, if I was to implement a basic live wallpaper that only called gl.glClearColor and nothing else, the maximum framerate I can achieve is 30fps (33ms), which is far lower than it should be. Now the phone refresh rate is 16ms, from what I have read, so I could understand hitting a wall at 60 fps. The question is if there is an alternative way out there? I tried naively using the GLSurfaceView with no luck and am looking for suggestions from those who may have encountered this issue or know of a solution. I have been googling but all posts send me back to the above site from Robert Green as the only way to do this, and I have had no luck finding a live wallpaper sample from the SDK that uses OpenGL while they state that you have access to OpenGL from here: http://developer.android.com/resources/articles/live-wallpapers.html I tried searching for the code for the bundled live wallpapers with no luck, if anyone could throw me a link to one of the wallpapers that uses OpenGL that would more than enough for me to figure it out (if a different method is used ;)).- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Alternative to GLWallpaperService, OpenGL Live Wallpaper
It was originally a submission for android master is why it is in that namespace :) Yes, if you use it (and be aware that it does NOT reset the gl context on orientation changes so do not reload vram content like normal or at least make sure to delete first) you will definitely want to put it in your own package/namespace. FYI - it doesn't delete the context because for some unknown reason many phones like to hard freeze right in eglMakeDisplayCurrent with the SharedBuffer timed out problem. Leaving the context in tact worked around it for some phones but there are other issues on other phones as well. On Oct 13, 1:43 am, Dianne Hackborn hack...@android.com wrote: Note that code is very broken -- it is putting a class in the android namespace, which it is not allowed to do. PLEASE change this to a valid namespace before using it. You are likely to break shortly if you don't. Thanks. On Tue, Oct 12, 2010 at 10:56 PM, mr.winky mr0wi...@gmail.com wrote: I've been using the GLWallpaperService as posted by Robert Green (http://www.rbgrn.net/content/354-glsurfaceview-adapted-3d-live- wallpapers), which has worked so far for the live wallpapers but I'm hitting a wall when it comes to performance. The GL code is executing at the expected speed when swapping (about 14ms after the swap occurs), but there seems to be an extreme overhead with the wallpaper code of 33ms. For example, if I was to implement a basic live wallpaper that only called gl.glClearColor and nothing else, the maximum framerate I can achieve is 30fps (33ms), which is far lower than it should be. Now the phone refresh rate is 16ms, from what I have read, so I could understand hitting a wall at 60 fps. The question is if there is an alternative way out there? I tried naively using the GLSurfaceView with no luck and am looking for suggestions from those who may have encountered this issue or know of a solution. I have been googling but all posts send me back to the above site from Robert Green as the only way to do this, and I have had no luck finding a live wallpaper sample from the SDK that uses OpenGL while they state that you have access to OpenGL from here: http://developer.android.com/resources/articles/live-wallpapers.html I tried searching for the code for the bundled live wallpapers with no luck, if anyone could throw me a link to one of the wallpapers that uses OpenGL that would more than enough for me to figure it out (if a different method is used ;)). -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: HelloWorld.... now what?
Skip straight to the custom 3D FPS engine :) On Oct 11, 12:48 am, Rocky rkjhaw1...@gmail.com wrote: Hey, go through the java code, xml code, and try to understand the flow, and replace hello world to ur customize text, then go through the developer.android.com for there u may find lots of example, try to run them. On Fri, Oct 8, 2010 at 3:13 AM, Joshua Germon littlebigfrea...@gmail.comwrote: I've just started here. I downloaded the SDK did the HelloWorld tutorial and I don't no what to do next. This is the first Java programing I've ever done. I want to start making my own apps but how Please clear this up for me! Cheers Josh -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Thanks Regards Rakesh Kumar Jha Software Developer Symphony Services Corp (India) Pvt Ltd Bangalore (O) +918030274295 (R) +919886336619 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Mapping 6 faces of cube with 6 different images
Girish, There are 2 tools you will need: 1) Canvas APIs 2) Your programming intuition It's not hard. Just load the 6 bitmaps, create your atlas one and draw the 6 bitmaps to it, then store the percentages (learn about UV coordinates somewhere) and use those percentages as your UVs. Get the redbook if you need more help - it's in there. :) On Oct 4, 2:23 am, Girish H T htgir...@gmail.com wrote: Hi Lance, Thanks for your answer. If i want to change the images dynamically how can that be possible ? Is it possible to generate the atlas @ runtime programatically ? Can you point me the the tools used for generating texture atlas ? Regards Girish -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: will the android emulator support opengles 2.0 in the future?
FWIW - The iPhone simulator does not emulate the actual phone. Instead it routes calls to native OSX functions, simulating the environment. The Android emulator does in fact emulator an ARM CPU and runs Android OS on it, which is an important distinction between the two. When using GL in the iPhone simulator, you're actually running all of your GL on the PowerVR GLES emulation library, which uses hardware. It's great for developing but you still really need a device to test since a PC GPU is going to be many times faster than a mobile GPU. So why can't the Android emulator do the same thing? Because the PVR lib is for x86/OSX and the Android emulator is running on ARM. On Oct 4, 4:13 pm, Satya Komatineni satya.komatin...@gmail.com wrote: From the posting so far I have seen, the current emulator as of API level 8 and Platform 2.2 does not support OpenGL ES 2.0. (Only in the emulator that the support is not there) (The support is there at API level 8 for the ES 2.0) wondering if any jone has figured out the following 1. Will the emulator support ES 2.0 in the future (considering there is compilers, shaders etc needed to support es 2.0) 2. What is a likely timeframe this may be available? (months or sometime future?) I suppose considering that iPhone SDK has the emulator suppor for es 2.0, it can be anticipated on the Android emulator as well. Thanks for the help Satya Komatinenihttp://www.satyakomatineni.comhttp://www.androidbook.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: OpenGL lockups in 2.2
I actually am adding a safe mode setting to the game that people can use if it's freezing on their device. I can't have it on all the time or the game really is unplayably slow on the first gen phones and it never seems to lock up on those - just snapdragons. What are you guys talking about with the swap interval? Is that a framebuffer thing and if so, where do you handle it? Thanks On Oct 2, 12:25 pm, Jeremy Statz jst...@gmail.com wrote: I'm not mixing Native in with anything either, straight Java is enough trouble as is. :P I noticed a definitely framerate hit with glFinish as well, but I'd rather suffer through that than have it forcibly lock up and reboot people's phones. The worst thing is everybody but HTC seems just fine either way. I really don't want to end up with a setting that says Check this if you have an HTC handset. After updating a few things I'm less sold on glFinish actually fixing the problem. In particular I'm starting to get e-mails from people who just bought a G2, and those seem to be a whole new raft of random stuff happening. The most recent EVO update introduced flickering on the bottom half of the screen, which I thought glFinish fixed, but it doesn't sound like it was a 100% fix. It might just come down to the framerate being slower in that case. That said, maybe it means SwapInterval is a sensible thing to try, so I'll give it a shot. On Oct 2, 12:04 pm, Leigh McRae leigh.mc...@lonedwarfgames.com wrote: Maybe set swap interval. I have to say I feel your pain as Android is starting to feel like PC when it comes to graphics drivers. On 10/1/2010 9:03 PM, Robert Green wrote: Update - I just tested with eglWaitGL right before swapBuffers and I got the same nasty performance hit as glFinish. Any other ideas? On Oct 1, 7:43 pm, Robert Greenrbgrn@gmail.com wrote: I'm not mixing native with my context, but I get lots of reports of freezing and have seen it on my Nexus One running both 2.1 and 2.2. I'm just trying to find a solution to it. On Oct 1, 7:04 pm, Leigh McRaeleigh.mc...@lonedwarfgames.com wrote: I would never call glFinish unless I was reading a buffer back. I would also never call glFlush. Swapping the buffers will do this. When I was writing drivers it was common for glFlush to be a NOP. With that said, if you're mixing native with your context use the eglWait functions. I know eglWaitGL says it's the same as glFinish but I think the driver has a more clearer picture as to what is going on. On 10/1/2010 7:43 PM, Robert Green wrote: After more testing it's apparent that glFinish is causing nearly double the frame time and it's not my code causing the issue. Do you think adding glFlush() will do anything useful? I did that on my first 3D game and no one's ever complained about it freezing. On Oct 1, 6:12 pm, Robert Greenrbgrn@gmail.com wrote: Bad news... My testing shows a very significant performance hit from doing this. Nexus One went from 40fps without ending on glFinish down to 20-27. G1 went from 30fps down to about 5-10. This is not good. I can't just put that in and call it fixed or it'll make the game unplayable on low end phones. I'll do some more testing and see if it's my threading causing problems but I have a bad feeling that it's not. On Sep 30, 3:30 pm, timedilationudayan.k...@gmail.com wrote: Jeremy, Glad to note that is has so far worked out for you. Leigh, to your point, I also tested this with an explicit call to eglWaitGL() function in my own version of GLSurfaceView (basically this call was added just before the eglSwapBuffer() call). This also fixed thefreezingin my case. I just resorted to using glFinish() because that way I didn't have to use my own version of GLSurfaceView. So if Google changed their GLSurfaceView in the next release, my code will not be affected much. When I mentioned this to a Google developer advocate and he said that this still needs to be fixed in the OS since it is an OS level bug. eglSwapBuffers() called glFlush() internally anyways but it ends up getting deadlocked once in a while on some of these devices we have seen. Explicitly calling eglWaitGL() or glFinish() in the renderloop *before* the eglSwapBuffers() appears to have fixed this issue in many (if not all) cases. I still have users reporting to me that their phonesfreezingeven with the latest update, albeit much less frequently. Let's hope for Google to fix this once and for all in their next release. On Sep 30, 2:26 pm, Leigh McRaeleigh.mc...@lonedwarfgames.com wrote: You might want to look into the eglWait functions that are used to synchronize with the native rendering system. On 9/30/2010 2:07 PM, Jeremy Statz wrote: I've tested this extensively at this point (including a 20-hour run on an Incredible
[android-developers] Re: OpenGL lockups in 2.2
Bad news... My testing shows a very significant performance hit from doing this. Nexus One went from 40fps without ending on glFinish down to 20-27. G1 went from 30fps down to about 5-10. This is not good. I can't just put that in and call it fixed or it'll make the game unplayable on low end phones. I'll do some more testing and see if it's my threading causing problems but I have a bad feeling that it's not. On Sep 30, 3:30 pm, timedilation udayan.k...@gmail.com wrote: Jeremy, Glad to note that is has so far worked out for you. Leigh, to your point, I also tested this with an explicit call to eglWaitGL() function in my own version of GLSurfaceView (basically this call was added just before the eglSwapBuffer() call). This also fixed thefreezingin my case. I just resorted to using glFinish() because that way I didn't have to use my own version of GLSurfaceView. So if Google changed their GLSurfaceView in the next release, my code will not be affected much. When I mentioned this to a Google developer advocate and he said that this still needs to be fixed in the OS since it is an OS level bug. eglSwapBuffers() called glFlush() internally anyways but it ends up getting deadlocked once in a while on some of these devices we have seen. Explicitly calling eglWaitGL() or glFinish() in the renderloop *before* the eglSwapBuffers() appears to have fixed this issue in many (if not all) cases. I still have users reporting to me that their phonesfreezingeven with the latest update, albeit much less frequently. Let's hope for Google to fix this once and for all in their next release. On Sep 30, 2:26 pm, Leigh McRae leigh.mc...@lonedwarfgames.com wrote: You might want to look into the eglWait functions that are used to synchronize with the native rendering system. On 9/30/2010 2:07 PM, Jeremy Statz wrote: I've tested this extensively at this point (including a 20-hour run on an Incredible) and I think you're right, calling glFinish() seems like it largely fixes the problem. Wow, I'd really thought that one was outmoded. Related to this, the most recent EVO update was causing the framebuffer to flicker with black squares sometimes on my wallpapers, and calling glFinish() fixed that too. And it fixed a similar corruption I had reported a few days ago on the Nexus one. It's the magic HTC fixer-upper! TimeDilation, you're my hero. On Sep 21, 3:26 pm, timedilationudayan.k...@gmail.com wrote: It was happening between 1 - 45 minutes into the app. Every single time. Maybe this is not a permanent fix and maybe it has just reduced the frequency of freezings. But as I mentioned before, so far I have not seen a single freeze since I made that change 2 days ago. On Sep 21, 4:05 pm, Robert Greenrbgrn@gmail.com wrote: And it was happening reliably before? On Sep 21, 12:48 pm, timedilationudayan.k...@gmail.com wrote: I haven't seen any freeze since making that change (I am only testing this on the HTC Desire running 2.2) On Sep 21, 1:32 pm, Robert Greenrbgrn@gmail.com wrote: So after finishing with glFinish(), you haven't seen a freeze at all or you just saw one now? I'm not sure what to make of the until now part :) If you really think that's making a difference, I'll try it out and see if it makes a difference for my games as well, though I have to play for about an hour to see it happen. On Sep 21, 12:10 pm, timedilationudayan.k...@gmail.com wrote: Not sure if the following will fix thefreezingin all cases but it appears to have fixed it in my app. I still have my fingers crossed about it although my app hasn't frozen for a while now - even when I let it run overnight on an HTC Desire 2.2. I first took the source code of GLSurfaceView into my custom class and added this line immediately before the eglSwapBuffer() call in the EGLHelper class function: mEgl.glWaitGL(); This is a blocking call that waits for all existing GL commands to be processed before returning. With this line, thefreezingseems to have stopped. I then realized that the glFinish() function does the same thing. So I went back to using the built-in GLSurfaceView and added the glFinish() call at the very end of my renderer.onDrawFrame() function. This had the same effect and I haven't seen a freeze until now. I suspect this call is just making the loop wait explicitly for all GL commands to be processed before rendering again. I took a look in the profiler and this call did not add any extra overhead (likely because the eglSwapBuffers() is also a blocking call and does the same thing - except that it freezes randomly). If thefreezingstarts again, I will update this post. Hope this works for you all out there too. On Sep 17, 7:46 am, Stringsterling.ud...@googlemail.com wrote: It's not all OpenGL implementations, that's for sure.
[android-developers] Re: OpenGL lockups in 2.2
After more testing it's apparent that glFinish is causing nearly double the frame time and it's not my code causing the issue. Do you think adding glFlush() will do anything useful? I did that on my first 3D game and no one's ever complained about it freezing. On Oct 1, 6:12 pm, Robert Green rbgrn@gmail.com wrote: Bad news... My testing shows a very significant performance hit from doing this. Nexus One went from 40fps without ending on glFinish down to 20-27. G1 went from 30fps down to about 5-10. This is not good. I can't just put that in and call it fixed or it'll make the game unplayable on low end phones. I'll do some more testing and see if it's my threading causing problems but I have a bad feeling that it's not. On Sep 30, 3:30 pm, timedilation udayan.k...@gmail.com wrote: Jeremy, Glad to note that is has so far worked out for you. Leigh, to your point, I also tested this with an explicit call to eglWaitGL() function in my own version of GLSurfaceView (basically this call was added just before the eglSwapBuffer() call). This also fixed thefreezingin my case. I just resorted to using glFinish() because that way I didn't have to use my own version of GLSurfaceView. So if Google changed their GLSurfaceView in the next release, my code will not be affected much. When I mentioned this to a Google developer advocate and he said that this still needs to be fixed in the OS since it is an OS level bug. eglSwapBuffers() called glFlush() internally anyways but it ends up getting deadlocked once in a while on some of these devices we have seen. Explicitly calling eglWaitGL() or glFinish() in the renderloop *before* the eglSwapBuffers() appears to have fixed this issue in many (if not all) cases. I still have users reporting to me that their phonesfreezingeven with the latest update, albeit much less frequently. Let's hope for Google to fix this once and for all in their next release. On Sep 30, 2:26 pm, Leigh McRae leigh.mc...@lonedwarfgames.com wrote: You might want to look into the eglWait functions that are used to synchronize with the native rendering system. On 9/30/2010 2:07 PM, Jeremy Statz wrote: I've tested this extensively at this point (including a 20-hour run on an Incredible) and I think you're right, calling glFinish() seems like it largely fixes the problem. Wow, I'd really thought that one was outmoded. Related to this, the most recent EVO update was causing the framebuffer to flicker with black squares sometimes on my wallpapers, and calling glFinish() fixed that too. And it fixed a similar corruption I had reported a few days ago on the Nexus one. It's the magic HTC fixer-upper! TimeDilation, you're my hero. On Sep 21, 3:26 pm, timedilationudayan.k...@gmail.com wrote: It was happening between 1 - 45 minutes into the app. Every single time. Maybe this is not a permanent fix and maybe it has just reduced the frequency of freezings. But as I mentioned before, so far I have not seen a single freeze since I made that change 2 days ago. On Sep 21, 4:05 pm, Robert Greenrbgrn@gmail.com wrote: And it was happening reliably before? On Sep 21, 12:48 pm, timedilationudayan.k...@gmail.com wrote: I haven't seen any freeze since making that change (I am only testing this on the HTC Desire running 2.2) On Sep 21, 1:32 pm, Robert Greenrbgrn@gmail.com wrote: So after finishing with glFinish(), you haven't seen a freeze at all or you just saw one now? I'm not sure what to make of the until now part :) If you really think that's making a difference, I'll try it out and see if it makes a difference for my games as well, though I have to play for about an hour to see it happen. On Sep 21, 12:10 pm, timedilationudayan.k...@gmail.com wrote: Not sure if the following will fix thefreezingin all cases but it appears to have fixed it in my app. I still have my fingers crossed about it although my app hasn't frozen for a while now - even when I let it run overnight on an HTC Desire 2.2. I first took the source code of GLSurfaceView into my custom class and added this line immediately before the eglSwapBuffer() call in the EGLHelper class function: mEgl.glWaitGL(); This is a blocking call that waits for all existing GL commands to be processed before returning. With this line, thefreezingseems to have stopped. I then realized that the glFinish() function does the same thing. So I went back to using the built-in GLSurfaceView and added the glFinish() call at the very end of my renderer.onDrawFrame() function. This had the same effect and I haven't seen a freeze until now. I suspect this call is just making the loop wait explicitly for all GL commands to be processed before rendering
[android-developers] Re: OpenGL lockups in 2.2
I'm not mixing native with my context, but I get lots of reports of freezing and have seen it on my Nexus One running both 2.1 and 2.2. I'm just trying to find a solution to it. On Oct 1, 7:04 pm, Leigh McRae leigh.mc...@lonedwarfgames.com wrote: I would never call glFinish unless I was reading a buffer back. I would also never call glFlush. Swapping the buffers will do this. When I was writing drivers it was common for glFlush to be a NOP. With that said, if you're mixing native with your context use the eglWait functions. I know eglWaitGL says it's the same as glFinish but I think the driver has a more clearer picture as to what is going on. On 10/1/2010 7:43 PM, Robert Green wrote: After more testing it's apparent that glFinish is causing nearly double the frame time and it's not my code causing the issue. Do you think adding glFlush() will do anything useful? I did that on my first 3D game and no one's ever complained about it freezing. On Oct 1, 6:12 pm, Robert Greenrbgrn@gmail.com wrote: Bad news... My testing shows a very significant performance hit from doing this. Nexus One went from 40fps without ending on glFinish down to 20-27. G1 went from 30fps down to about 5-10. This is not good. I can't just put that in and call it fixed or it'll make the game unplayable on low end phones. I'll do some more testing and see if it's my threading causing problems but I have a bad feeling that it's not. On Sep 30, 3:30 pm, timedilationudayan.k...@gmail.com wrote: Jeremy, Glad to note that is has so far worked out for you. Leigh, to your point, I also tested this with an explicit call to eglWaitGL() function in my own version of GLSurfaceView (basically this call was added just before the eglSwapBuffer() call). This also fixed thefreezingin my case. I just resorted to using glFinish() because that way I didn't have to use my own version of GLSurfaceView. So if Google changed their GLSurfaceView in the next release, my code will not be affected much. When I mentioned this to a Google developer advocate and he said that this still needs to be fixed in the OS since it is an OS level bug. eglSwapBuffers() called glFlush() internally anyways but it ends up getting deadlocked once in a while on some of these devices we have seen. Explicitly calling eglWaitGL() or glFinish() in the renderloop *before* the eglSwapBuffers() appears to have fixed this issue in many (if not all) cases. I still have users reporting to me that their phonesfreezingeven with the latest update, albeit much less frequently. Let's hope for Google to fix this once and for all in their next release. On Sep 30, 2:26 pm, Leigh McRaeleigh.mc...@lonedwarfgames.com wrote: You might want to look into the eglWait functions that are used to synchronize with the native rendering system. On 9/30/2010 2:07 PM, Jeremy Statz wrote: I've tested this extensively at this point (including a 20-hour run on an Incredible) and I think you're right, calling glFinish() seems like it largely fixes the problem. Wow, I'd really thought that one was outmoded. Related to this, the most recent EVO update was causing the framebuffer to flicker with black squares sometimes on my wallpapers, and calling glFinish() fixed that too. And it fixed a similar corruption I had reported a few days ago on the Nexus one. It's the magic HTC fixer-upper! TimeDilation, you're my hero. On Sep 21, 3:26 pm, timedilationudayan.k...@gmail.com wrote: It was happening between 1 - 45 minutes into the app. Every single time. Maybe this is not a permanent fix and maybe it has just reduced the frequency of freezings. But as I mentioned before, so far I have not seen a single freeze since I made that change 2 days ago. On Sep 21, 4:05 pm, Robert Greenrbgrn@gmail.com wrote: And it was happening reliably before? On Sep 21, 12:48 pm, timedilationudayan.k...@gmail.com wrote: I haven't seen any freeze since making that change (I am only testing this on the HTC Desire running 2.2) On Sep 21, 1:32 pm, Robert Greenrbgrn@gmail.com wrote: So after finishing with glFinish(), you haven't seen a freeze at all or you just saw one now? I'm not sure what to make of the until now part :) If you really think that's making a difference, I'll try it out and see if it makes a difference for my games as well, though I have to play for about an hour to see it happen. On Sep 21, 12:10 pm, timedilationudayan.k...@gmail.com wrote: Not sure if the following will fix thefreezingin all cases but it appears to have fixed it in my app. I still have my fingers crossed about it although my app hasn't frozen for a while now - even when I let it run overnight on an HTC Desire 2.2. I first took the source code of GLSurfaceView into my custom class and added this line immediately before the eglSwapBuffer() call
[android-developers] Re: OpenGL lockups in 2.2
Update - I just tested with eglWaitGL right before swapBuffers and I got the same nasty performance hit as glFinish. Any other ideas? On Oct 1, 7:43 pm, Robert Green rbgrn@gmail.com wrote: I'm not mixing native with my context, but I get lots of reports of freezing and have seen it on my Nexus One running both 2.1 and 2.2. I'm just trying to find a solution to it. On Oct 1, 7:04 pm, Leigh McRae leigh.mc...@lonedwarfgames.com wrote: I would never call glFinish unless I was reading a buffer back. I would also never call glFlush. Swapping the buffers will do this. When I was writing drivers it was common for glFlush to be a NOP. With that said, if you're mixing native with your context use the eglWait functions. I know eglWaitGL says it's the same as glFinish but I think the driver has a more clearer picture as to what is going on. On 10/1/2010 7:43 PM, Robert Green wrote: After more testing it's apparent that glFinish is causing nearly double the frame time and it's not my code causing the issue. Do you think adding glFlush() will do anything useful? I did that on my first 3D game and no one's ever complained about it freezing. On Oct 1, 6:12 pm, Robert Greenrbgrn@gmail.com wrote: Bad news... My testing shows a very significant performance hit from doing this. Nexus One went from 40fps without ending on glFinish down to 20-27. G1 went from 30fps down to about 5-10. This is not good. I can't just put that in and call it fixed or it'll make the game unplayable on low end phones. I'll do some more testing and see if it's my threading causing problems but I have a bad feeling that it's not. On Sep 30, 3:30 pm, timedilationudayan.k...@gmail.com wrote: Jeremy, Glad to note that is has so far worked out for you. Leigh, to your point, I also tested this with an explicit call to eglWaitGL() function in my own version of GLSurfaceView (basically this call was added just before the eglSwapBuffer() call). This also fixed thefreezingin my case. I just resorted to using glFinish() because that way I didn't have to use my own version of GLSurfaceView. So if Google changed their GLSurfaceView in the next release, my code will not be affected much. When I mentioned this to a Google developer advocate and he said that this still needs to be fixed in the OS since it is an OS level bug. eglSwapBuffers() called glFlush() internally anyways but it ends up getting deadlocked once in a while on some of these devices we have seen. Explicitly calling eglWaitGL() or glFinish() in the renderloop *before* the eglSwapBuffers() appears to have fixed this issue in many (if not all) cases. I still have users reporting to me that their phonesfreezingeven with the latest update, albeit much less frequently. Let's hope for Google to fix this once and for all in their next release. On Sep 30, 2:26 pm, Leigh McRaeleigh.mc...@lonedwarfgames.com wrote: You might want to look into the eglWait functions that are used to synchronize with the native rendering system. On 9/30/2010 2:07 PM, Jeremy Statz wrote: I've tested this extensively at this point (including a 20-hour run on an Incredible) and I think you're right, calling glFinish() seems like it largely fixes the problem. Wow, I'd really thought that one was outmoded. Related to this, the most recent EVO update was causing the framebuffer to flicker with black squares sometimes on my wallpapers, and calling glFinish() fixed that too. And it fixed a similar corruption I had reported a few days ago on the Nexus one. It's the magic HTC fixer-upper! TimeDilation, you're my hero. On Sep 21, 3:26 pm, timedilationudayan.k...@gmail.com wrote: It was happening between 1 - 45 minutes into the app. Every single time. Maybe this is not a permanent fix and maybe it has just reduced the frequency of freezings. But as I mentioned before, so far I have not seen a single freeze since I made that change 2 days ago. On Sep 21, 4:05 pm, Robert Greenrbgrn@gmail.com wrote: And it was happening reliably before? On Sep 21, 12:48 pm, timedilationudayan.k...@gmail.com wrote: I haven't seen any freeze since making that change (I am only testing this on the HTC Desire running 2.2) On Sep 21, 1:32 pm, Robert Greenrbgrn@gmail.com wrote: So after finishing with glFinish(), you haven't seen a freeze at all or you just saw one now? I'm not sure what to make of the until now part :) If you really think that's making a difference, I'll try it out and see if it makes a difference for my games as well, though I have to play for about an hour to see it happen. On Sep 21, 12:10 pm, timedilationudayan.k...@gmail.com wrote: Not sure if the following will fix thefreezingin all cases but it appears to have fixed it in my app. I
[android-developers] Re: Android devices supporting OpenGL ES 2.0 (at least through NDK) as of September 2010
You're going to find a couple of major chips used for Android phones so just knowing that lets you know what it supports: Integrated CPU/GPU Qualcomm MSM7200 - OpenGL ES 1.1 (G1, Hero, MyTouch, Cliq, Blur, Eris) Qualcomm Snapdragon - ES 2.0 (N1, EVO, Incredible, others) Dedicated GPU Any PowerVR SGX 5xx - ES 2.0 (Droid, Galaxy S, many others) On Sep 21, 8:33 am, RS rajeshs...@gmail.com wrote: Thanks, hope that would be the same on the Samsung tablet too. I'd be very happy to hear from anybody with any other device even if it doesn't support OpenGL ES 2.0, especially if you could post the supported extensions. Thanks again. RS On Sep 21, 1:05 pm, nagaraj attimani nagaraj.attim...@gmail.com wrote: Samsung Galaxy supports OpenGL ES 2.0 On Tue, Sep 21, 2010 at 5:30 PM, RS rajeshs...@gmail.com wrote: Is there some place where I can find a list of android devices with OpenGL ES 2.0 (at least through NDK for 2.x devices)? Or could some developer with any of these comment on how OpenGL ES 2.0 worked on their device? - Nexus One - running SDK 2.1 (Works through NDK) - Nexus One - running SDK 2.2 (Works) - Droid (Works) - Droid 2 (Works) - Samsung (various phone models) ? - Samsung Tablet ? - Any other ? To know the extensions available would also be very useful. Desire appears very close to Nexus One as expected. The list in stackoverflow is old but the closest I could find: http://stackoverflow.com/questions/2093594/opengl-extensions-availabl... Thanks in advance, RS -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Warm Regards, Nagaraj -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: OpenGL lockups in 2.2
So after finishing with glFinish(), you haven't seen a freeze at all or you just saw one now? I'm not sure what to make of the until now part :) If you really think that's making a difference, I'll try it out and see if it makes a difference for my games as well, though I have to play for about an hour to see it happen. On Sep 21, 12:10 pm, timedilation udayan.k...@gmail.com wrote: Not sure if the following will fix the freezing in all cases but it appears to have fixed it in my app. I still have my fingers crossed about it although my app hasn't frozen for a while now - even when I let it run overnight on an HTC Desire 2.2. I first took the source code of GLSurfaceView into my custom class and added this line immediately before the eglSwapBuffer() call in the EGLHelper class function: mEgl.glWaitGL(); This is a blocking call that waits for all existing GL commands to be processed before returning. With this line, the freezing seems to have stopped. I then realized that the glFinish() function does the same thing. So I went back to using the built-in GLSurfaceView and added the glFinish() call at the very end of my renderer.onDrawFrame() function. This had the same effect and I haven't seen a freeze until now. I suspect this call is just making the loop wait explicitly for all GL commands to be processed before rendering again. I took a look in the profiler and this call did not add any extra overhead (likely because the eglSwapBuffers() is also a blocking call and does the same thing - except that it freezes randomly). If the freezing starts again, I will update this post. Hope this works for you all out there too. On Sep 17, 7:46 am, String sterling.ud...@googlemail.com wrote: It's not all OpenGL implementations, that's for sure. I have 2 apps with OpenGL live wallpapers; one has had the lockup problem, the other hasn't. Architecturally, they're very similar - I based the later one off the earlier. It was by pursuing the differences (like changing textures mid-stream, as I discussed in an earlier post) that I've been able to stop the lockups so far. String On Sep 17, 4:26 am, timedilation udayan.k...@gmail.com wrote: I have played games like Winds of Steel for hours on my HTC desire. Surely they must be using opengl as well (I think). And the FPS is also pretty good. How's it that those games do not freeze at all? I need to dissect those and see what calls they are making. On Sep 15, 12:17 pm, Jeremy Statz jst...@gmail.com wrote: I just let the same wallpaper run uninterrupted on a Motorola Droid for something like 16 hours and it's still fine. I would've expected my Incredible to have hit the problem by then. I also haven't heard any reports of this from folks with a Galaxy S variant. On Sep 14, 7:38 pm, timedilation udayan.k...@gmail.com wrote: This appears to be an HTC specific bug. My app never freezes on the Motorla Droid. EVER. It is very stable on the Droid and I have tested it for about 4months without a single freeze. Interestingly though it never froze on my G1 either. The G1 I have is the ADP1 phone I bought directly from Google. All other HTC phones that I have exhibit the freezing - Evo, Desire and Nexus One (which is also from HTC I believe). Apart from that I tested it for a month on Samsung Moment. There was NO freezing there either. I have been in touch with a Google developer advocate and I have submitted the bug report to his team. They are looking into this as well. On Sep 14, 8:23 pm, Jeremy Statz jst...@gmail.com wrote: That's my experience as well. All my log results say that there's no loading or anything necessary -- the frame it dies on is bog standard, with drawFrame going from beginning to end. Any loading is long since done. I'm currently wondering if this is an HTC driver bug. I'm going to let this run on a Motorola Droid all night and see if it crashes. Not sure I'm expecting it to, as my fiance has been using my wallpapers on her Droid since forever and says she's never seen it lock and reboot like we're describing. Is there anyone at HTC to take something like that to, if I gather some evidence? On Sep 14, 3:32 pm, timedilation udayan.k...@gmail.com wrote: That's interesting.. Although I know for sure that all my gl* calls are happening only in the GL thread. And this freezing happens even when I simply leave the device (HTC Desire) running my app with zero user interaction whatsoever. All the app renders is a scenery with a single animation. No texture changes or geometry changes are taking place in this scenario. But because of the animation, I have to render continuously and this is why I have not used the
[android-developers] Re: OpenGL lockups in 2.2
And it was happening reliably before? On Sep 21, 12:48 pm, timedilation udayan.k...@gmail.com wrote: I haven't seen any freeze since making that change (I am only testing this on the HTC Desire running 2.2) On Sep 21, 1:32 pm, Robert Green rbgrn@gmail.com wrote: So after finishing with glFinish(), you haven't seen a freeze at all or you just saw one now? I'm not sure what to make of the until now part :) If you really think that's making a difference, I'll try it out and see if it makes a difference for my games as well, though I have to play for about an hour to see it happen. On Sep 21, 12:10 pm, timedilation udayan.k...@gmail.com wrote: Not sure if the following will fix the freezing in all cases but it appears to have fixed it in my app. I still have my fingers crossed about it although my app hasn't frozen for a while now - even when I let it run overnight on an HTC Desire 2.2. I first took the source code of GLSurfaceView into my custom class and added this line immediately before the eglSwapBuffer() call in the EGLHelper class function: mEgl.glWaitGL(); This is a blocking call that waits for all existing GL commands to be processed before returning. With this line, the freezing seems to have stopped. I then realized that the glFinish() function does the same thing. So I went back to using the built-in GLSurfaceView and added the glFinish() call at the very end of my renderer.onDrawFrame() function. This had the same effect and I haven't seen a freeze until now. I suspect this call is just making the loop wait explicitly for all GL commands to be processed before rendering again. I took a look in the profiler and this call did not add any extra overhead (likely because the eglSwapBuffers() is also a blocking call and does the same thing - except that it freezes randomly). If the freezing starts again, I will update this post. Hope this works for you all out there too. On Sep 17, 7:46 am, String sterling.ud...@googlemail.com wrote: It's not all OpenGL implementations, that's for sure. I have 2 apps with OpenGL live wallpapers; one has had the lockup problem, the other hasn't. Architecturally, they're very similar - I based the later one off the earlier. It was by pursuing the differences (like changing textures mid-stream, as I discussed in an earlier post) that I've been able to stop the lockups so far. String On Sep 17, 4:26 am, timedilation udayan.k...@gmail.com wrote: I have played games like Winds of Steel for hours on my HTC desire. Surely they must be using opengl as well (I think). And the FPS is also pretty good. How's it that those games do not freeze at all? I need to dissect those and see what calls they are making. On Sep 15, 12:17 pm, Jeremy Statz jst...@gmail.com wrote: I just let the same wallpaper run uninterrupted on a Motorola Droid for something like 16 hours and it's still fine. I would've expected my Incredible to have hit the problem by then. I also haven't heard any reports of this from folks with a Galaxy S variant. On Sep 14, 7:38 pm, timedilation udayan.k...@gmail.com wrote: This appears to be an HTC specific bug. My app never freezes on the Motorla Droid. EVER. It is very stable on the Droid and I have tested it for about 4months without a single freeze. Interestingly though it never froze on my G1 either. The G1 I have is the ADP1 phone I bought directly from Google. All other HTC phones that I have exhibit the freezing - Evo, Desire and Nexus One (which is also from HTC I believe). Apart from that I tested it for a month on Samsung Moment. There was NO freezing there either. I have been in touch with a Google developer advocate and I have submitted the bug report to his team. They are looking into this as well. On Sep 14, 8:23 pm, Jeremy Statz jst...@gmail.com wrote: That's my experience as well. All my log results say that there's no loading or anything necessary -- the frame it dies on is bog standard, with drawFrame going from beginning to end. Any loading is long since done. I'm currently wondering if this is an HTC driver bug. I'm going to let this run on a Motorola Droid all night and see if it crashes. Not sure I'm expecting it to, as my fiance has been using my wallpapers on her Droid since forever and says she's never seen it lock and reboot like we're describing. Is there anyone at HTC to take something like that to, if I gather some evidence? On Sep 14, 3:32 pm, timedilation udayan.k...@gmail.com wrote: That's interesting
[android-developers] Re: Why aren't the 2D graphics API UI toolkit hardware accelerated?
Bah, 2D in OpenGL really isn't that hard and there's not that much extra code. If someone were to just write a simple spriterenderer class that takes a set of bitmaps and lets you draw them wherever you want by index then improve it to handle an atlas of images for faster drawing and you've got 90% of most 2D game rendering code done right there, all in under a couple hundred or so lines. The lifecycle isn't that bad - all you ever have to do is reload vram- stored stuff like textures and VBOs, which I just have a method called vInit() that does that for any given renderer in the game, and when the gl context has changed, my main renderer just calls vInit() on all the subrenderers and all is back into the context and ready. I think that took me all of a few hours to get working correctly. On Sep 18, 1:55 pm, Leigh McRae leigh.mc...@lonedwarfgames.com wrote: On 9/18/2010 2:23 PM, Dianne Hackborn wrote: On Fri, Sep 17, 2010 at 7:54 PM, Leigh McRae leigh.mc...@lonedwarfgames.com mailto:leigh.mc...@lonedwarfgames.com wrote: Making a few fast paths for drawing bitmaps (BitBlt) would be huge for game developers. I know that 3 of my games I have made aren't OGL simply because I don't want the extra code maintenance/burden. If a game is doing some of the things you mention, well then it's not likely concerned with frame-rate. Use OpenGL ES. As I stated, using OpenGL ES requires extra code. You to manage re-loading the assets such as textures and VBO. With the Android Activity life cycle this is even more of an issue than other platforms. This isn't trivial. It also exposes you to driver bugs/oddities. Seriously, you generally can't just accelerate one function and nothing else. What you will end up with is the worst of both worlds, as you take the hit of switching between hardware and software rendering all the time. You can actually. I don't think it's being suggested that you use the OpenGL driver to implement a basic bitblt. Its being suggested that the Android OS supports the ability for hardware to accelerate the bitblt. Maybe it already does, I don't know. If you just want to draw bitmaps to the screen, this can certainly be accomplished with Open GL ES, and you don't need to rely on the platform to provide you with essentially helper APIs to make it easier to do that particular special case. You can ask anyone here to write such a thing for you. Waiting for the platform to provide it is a really bad option because you don't know when it will be available (we don't really, either), and even once it does become available you can't really take advantage of it until it is available on the majority of the devices. There are so many things people can do without relying on the platform to give it to them in a nice little bundle. I don't think anyone is waiting. I believe it was just a request/suggestion. -- Dianne Hackborn Android framework engineer hack...@android.com mailto:hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Leigh McRaewww.lonedwarfgames.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: trigonometry
Kostya hit it: float angleDegrees = Math.toDegrees(Math.atan2((y1 - y2) / (x1 - x2))); On Sep 15, 11:32 am, Kostya Vasilyev kmans...@gmail.com wrote: Pedro, Java (and pretty much any language's) trig functions work with angles expressed in radians. http://en.wikipedia.org/wiki/Radian To convert to degrees, multiply by 180 / 3,1415926 (in Java, that's Math.PI). Or just call Math.toDegrees. Better yet - use Math.atan2 ( difference along Y, different along X). This one correctly handles the case of value3-value4 being zero (or very close thereof). -- Kostya 15.09.2010 20:22, Pedro Teixeira пишет: Hi, I'm having problems with JAva and trigonometry to calculate a direction from a point to a certain point... I want to translate this equation to Java-wise: tg^-1 = |value1-value2| / |value3-value4| And I'd like the result in degrees.. how can I do this? any ideia? -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: trigonometry
Kostya - My mistake. My example was for Math.atan. atan2 just does the divide for you. Either will work. On Sep 15, 11:50 am, Kostya Vasilyev kmans...@gmail.com wrote: Um, no. Math.atan2 takes two values, not one. Math.atan2(y2 - y1, x2 - x1) This gives correct result even for x2 and x1 being very close to each other. Depending on the sign of y2 - y1 that's either up or down. -- Kostya 15.09.2010 20:45, Robert Green пишет: Kostya hit it: float angleDegrees = Math.toDegrees(Math.atan2((y1 - y2) / (x1 - x2))); On Sep 15, 11:32 am, Kostya Vasilyevkmans...@gmail.com wrote: Pedro, Java (and pretty much any language's) trig functions work with angles expressed in radians. http://en.wikipedia.org/wiki/Radian To convert to degrees, multiply by 180 / 3,1415926 (in Java, that's Math.PI). Or just call Math.toDegrees. Better yet - use Math.atan2 ( difference along Y, different along X). This one correctly handles the case of value3-value4 being zero (or very close thereof). -- Kostya 15.09.2010 20:22, Pedro Teixeira пишет: Hi, I'm having problems with JAva and trigonometry to calculate a direction from a point to a certain point... I want to translate this equation to Java-wise: tg^-1 = |value1-value2| / |value3-value4| And I'd like the result in degrees.. how can I do this? any ideia? -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: OpenGL lockups in 2.2
OpenGL. This hurts the platform as a whole, especially when comparing its game library to the iPhone. On top of that, while this seemed exceedingly uncommon on 2.1, I feel like I've seen a whole lot more of it with 2.2 on my HTC Incredible. Considering the free versions of my wallpapers have something like three or four million downloads between them, that scares me a great deal. That's a lot of potentially affected users. On Sep 13, 3:22 am, Robert Green rbgrn@gmail.com wrote: Jeremy, It happened to me quite a bit on both 2.1 and 2.2 on every device. It's surely a defect of Android but so far no one has been able to track it down. It's a tough one, very difficult to reproduce reliably. It tends to happen more often in certain cases for reasons unknown to me right now, such as on an EVO running 2.1 on the third level of Deadly Chambers if you play it straight through. Since that takes 20 minutes, it's impossible to figure out by logging because it's just way too much. Breakpoints don't work because the game doesn't run fast enough in debug mode and debugging doesn't work anyways once the lockup has happened. It's pretty much a worse case scenario - a very fatal, very intermittent bug that breaks debugging and is nearly impossible to isolate. I hope some genius out there can figure this one out. I couldn't even get close. On Sep 12, 10:34 pm, Jeremy Statz jst...@gmail.com wrote: There's been a couple threads about this in the last year or so, but I wanted to draw attention to it again, as I've spent most of the last couple of days trying to confirm it wasn't anything I'm doing. The short story is, I'm pretty sure there's a very serious lock-up-the- phone level bug that happens when using OpenGL applications. When it occurs the phone will freeze for at least two minutes before rebooting itself, sometimes requiring that the battery be pulled. This didn't seem to happen often on 2.1, but I'm seeing it with a lot more regularity on 2.2 (particularly on HTC phones, though that may be a coincidence) and am really hoping to draw some attention from someone in a position to fix it. Typically, you'll end up seeing hundreds of lines of this in the LogCat log: WARN/SharedBufferStack(2005): waitForCondition(LockCondition) timed out (identity=9, status=0). CPU may be pegged. trying again. WARN/SharedBufferStack(71): waitForCondition(LockCondition) timed out (identity=9, status=0). CPU may be pegged. trying again. There won't be any callstack or error of any kind preceding this. In this case 2005 is my app (a live wallpaper), and 71 appears to be the UI/system process. I'm assuming this is a race condition within SharedBufferStack. I've seen cases where four or five process IDs were all printing the message, all OpenGL apps of some kind. Replicating the problem is very, very difficult and seems very random... in the last case I had to leave the wallpaper running and active on the home screen for about seven hours before it occurred. Sometimes I've had it go days, other times it'll happen within a few minutes. My log output demonstrates no unusual activity at all before the crash, loading/unloading/visibility/etc doesn't seem to be a factor. It's very rare. I kind of feel like this got glossed over the last couple times people have reported it here, but based on my reading it's a long-standing problem with Android and OpenGL and is having a chilling effect on its usage. Is there anyone who can explain if there's anything I can do to discourage problems here? This is beyond my ken honestly, does anyone know this part of the system well? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: OpenGL lockups in 2.2
Jeremy, It happened to me quite a bit on both 2.1 and 2.2 on every device. It's surely a defect of Android but so far no one has been able to track it down. It's a tough one, very difficult to reproduce reliably. It tends to happen more often in certain cases for reasons unknown to me right now, such as on an EVO running 2.1 on the third level of Deadly Chambers if you play it straight through. Since that takes 20 minutes, it's impossible to figure out by logging because it's just way too much. Breakpoints don't work because the game doesn't run fast enough in debug mode and debugging doesn't work anyways once the lockup has happened. It's pretty much a worse case scenario - a very fatal, very intermittent bug that breaks debugging and is nearly impossible to isolate. I hope some genius out there can figure this one out. I couldn't even get close. On Sep 12, 10:34 pm, Jeremy Statz jst...@gmail.com wrote: There's been a couple threads about this in the last year or so, but I wanted to draw attention to it again, as I've spent most of the last couple of days trying to confirm it wasn't anything I'm doing. The short story is, I'm pretty sure there's a very serious lock-up-the- phone level bug that happens when using OpenGL applications. When it occurs the phone will freeze for at least two minutes before rebooting itself, sometimes requiring that the battery be pulled. This didn't seem to happen often on 2.1, but I'm seeing it with a lot more regularity on 2.2 (particularly on HTC phones, though that may be a coincidence) and am really hoping to draw some attention from someone in a position to fix it. Typically, you'll end up seeing hundreds of lines of this in the LogCat log: WARN/SharedBufferStack(2005): waitForCondition(LockCondition) timed out (identity=9, status=0). CPU may be pegged. trying again. WARN/SharedBufferStack(71): waitForCondition(LockCondition) timed out (identity=9, status=0). CPU may be pegged. trying again. There won't be any callstack or error of any kind preceding this. In this case 2005 is my app (a live wallpaper), and 71 appears to be the UI/system process. I'm assuming this is a race condition within SharedBufferStack. I've seen cases where four or five process IDs were all printing the message, all OpenGL apps of some kind. Replicating the problem is very, very difficult and seems very random... in the last case I had to leave the wallpaper running and active on the home screen for about seven hours before it occurred. Sometimes I've had it go days, other times it'll happen within a few minutes. My log output demonstrates no unusual activity at all before the crash, loading/unloading/visibility/etc doesn't seem to be a factor. It's very rare. I kind of feel like this got glossed over the last couple times people have reported it here, but based on my reading it's a long-standing problem with Android and OpenGL and is having a chilling effect on its usage. Is there anyone who can explain if there's anything I can do to discourage problems here? This is beyond my ken honestly, does anyone know this part of the system well? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: OpenGL lockups in 2.2
I'm sorry - let me clarify something. When I said, quite a bit, I mean that it happened to me on both versions at least once on every device I tested on. To quantify better, it happened maybe a total of 20 times in about 400 hours of play testing. It happens more often to others according to support emails I've received. On Sep 13, 3:22 am, Robert Green rbgrn@gmail.com wrote: Jeremy, It happened to me quite a bit on both 2.1 and 2.2 on every device. It's surely a defect of Android but so far no one has been able to track it down. It's a tough one, very difficult to reproduce reliably. It tends to happen more often in certain cases for reasons unknown to me right now, such as on an EVO running 2.1 on the third level of Deadly Chambers if you play it straight through. Since that takes 20 minutes, it's impossible to figure out by logging because it's just way too much. Breakpoints don't work because the game doesn't run fast enough in debug mode and debugging doesn't work anyways once the lockup has happened. It's pretty much a worse case scenario - a very fatal, very intermittent bug that breaks debugging and is nearly impossible to isolate. I hope some genius out there can figure this one out. I couldn't even get close. On Sep 12, 10:34 pm, Jeremy Statz jst...@gmail.com wrote: There's been a couple threads about this in the last year or so, but I wanted to draw attention to it again, as I've spent most of the last couple of days trying to confirm it wasn't anything I'm doing. The short story is, I'm pretty sure there's a very serious lock-up-the- phone level bug that happens when using OpenGL applications. When it occurs the phone will freeze for at least two minutes before rebooting itself, sometimes requiring that the battery be pulled. This didn't seem to happen often on 2.1, but I'm seeing it with a lot more regularity on 2.2 (particularly on HTC phones, though that may be a coincidence) and am really hoping to draw some attention from someone in a position to fix it. Typically, you'll end up seeing hundreds of lines of this in the LogCat log: WARN/SharedBufferStack(2005): waitForCondition(LockCondition) timed out (identity=9, status=0). CPU may be pegged. trying again. WARN/SharedBufferStack(71): waitForCondition(LockCondition) timed out (identity=9, status=0). CPU may be pegged. trying again. There won't be any callstack or error of any kind preceding this. In this case 2005 is my app (a live wallpaper), and 71 appears to be the UI/system process. I'm assuming this is a race condition within SharedBufferStack. I've seen cases where four or five process IDs were all printing the message, all OpenGL apps of some kind. Replicating the problem is very, very difficult and seems very random... in the last case I had to leave the wallpaper running and active on the home screen for about seven hours before it occurred. Sometimes I've had it go days, other times it'll happen within a few minutes. My log output demonstrates no unusual activity at all before the crash, loading/unloading/visibility/etc doesn't seem to be a factor. It's very rare. I kind of feel like this got glossed over the last couple times people have reported it here, but based on my reading it's a long-standing problem with Android and OpenGL and is having a chilling effect on its usage. Is there anyone who can explain if there's anything I can do to discourage problems here? This is beyond my ken honestly, does anyone know this part of the system well? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: OpenGL - 3D rotation from a 2D input
To switch to ES - Create an array of verts and normals and use those to replace the immediate mode drawing. You will need to replace the GLU sphere and torus creation with perhaps a known algorithm to create them - or if you can find a glut es implementation of those that would work too. On Sep 9, 4:11 pm, Thiago Lopes Rosa thiago.r...@gmail.com wrote: Lesson 48 ported to Java (still needs some OpenGL ES adjustments):http://www.java-tips.org/other-api-tips/jogl/arcball-rotation-nehe-tu... Thiago On Tue, Sep 7, 2010 at 21:04, Thiago Lopes Rosa thiago.r...@gmail.comwrote: Thanks! =) Thiago On Tue, Sep 7, 2010 at 14:25, Robert Green rbgrn@gmail.com wrote: I was going to suggest doing what they outline in that lesson. In short - keep a rotation matrix for the current orientation of your cube. Process input and keep a rotation matrix that you apply the user input to, then multiply the cube matrix by and store the result as the cube matrix, then reset the input matrix to identity and start all over. For user-space Z input rotation, you can do it like they do in the pro 3D apps - with a little button that shows that rotation to the left and to the right. Still use the same method as above, though, and you will get very predictable, nice rotation on all axis. On Sep 7, 11:39 am, alan a...@birtles.org.uk wrote: your first stop for all opengl questions should be NeHe open gl lessons:http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=48 On Sep 6, 9:58 pm, Thiago Lopes Rosa thiago.r...@gmail.com wrote: This is a 3D Minesweeper. Instead of searching mines on that rectangular field, you must search them on several 3D fields (8 in total) by looking in all faces/planes. So you must rotate the objects to see all sides. (search for: *3D Mines*) I got the idea about different movements for each axis, but I really wanted to use dragging for all axis. Thanks, Thiago On Mon, Sep 6, 2010 at 17:42, Droid rod...@gmail.com wrote: Suggest dragging for x, y and tapping for z axis movement. But its not clear exactly what your end-game is You could also use accelerometer for tipping (see Breakout Legend in the App in mkt) :) Droid On Sep 6, 7:04 pm, Thiago Lopes Rosa thiago.r...@gmail.com wrote: Hi, I have a cube on the center of the screen and the user can rotate it using the touchscreen. The problem: For example, when I rotate the cube 180 degrees (vertical), the horizontal rotation gets inverted (i mean, when moving right the cube rotates left and vice-versa). The issue is that I'm using 2D coordinates (touchscreen) to rotate the 3D cube. I'm always rotating around the cube's X and Y axis and never around the Z axis. The question is: How do I calculate how much and which axis to rotate from a 2D coordinate input? Thanks, Thiago -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Reading precomputed vertex arrays in application?
Lance, That's a good idea, though often times for 3D Models you'll need a few different object groups of given name to be loadable. You can simple insert them into a HashMap and serialize the whole thing. It deserializes surprisingly fast, especially if all you're storing are ints or floats for the data. If your data is less structured or more linear, you could certainly write up something to generate a java source file with the data in it like you said. It's probably going to load nearly the fastest, though it requires a little more programming than serialization does. I'm moving on to proprietary binary file formats in C now though since they are the smallest and I ran into a major asset size issue on Deadly Chambers which wouldn't have happened had I used my own format. On Sep 7, 2:48 am, Lance Nanek lna...@gmail.com wrote: One bizarre option you might want to consider is pre-generating Java files with arrays in them. It benchmarked faster than reading files in via Java NIO when I tested it for my purposes. I'm only doing 2D, though. I use a script that takes a bunch of individual graphics files and puts them into a couple atlas textures, then pre-generates the texture coordinates for the two triangles needed to draw each graphic. So each pre-generated atlas texture has a pre-generated Java file with an array of all the useful texture coordinate sets for it, and constants for the offset into the array to use to get them for a particular graphic. On Sep 6, 7:33 pm, SChaser crotalistig...@gmail.com wrote: My app has large vertex arrays that are pre-computed before I even build the app for distribution. I'd like to store these in assets (recognizing the size limits of asset files) and read them in with minimal computation. Can I store them in binary, and just read them into an NIO buffer, and then wrap it for GL, or do I have to go through the whole compute intensive (?) process of reading it in, making a byte array, and converting that to an integer (in this case) array? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: OpenGL - 3D rotation from a 2D input
I was going to suggest doing what they outline in that lesson. In short - keep a rotation matrix for the current orientation of your cube. Process input and keep a rotation matrix that you apply the user input to, then multiply the cube matrix by and store the result as the cube matrix, then reset the input matrix to identity and start all over. For user-space Z input rotation, you can do it like they do in the pro 3D apps - with a little button that shows that rotation to the left and to the right. Still use the same method as above, though, and you will get very predictable, nice rotation on all axis. On Sep 7, 11:39 am, alan a...@birtles.org.uk wrote: your first stop for all opengl questions should be NeHe open gl lessons:http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=48 On Sep 6, 9:58 pm, Thiago Lopes Rosa thiago.r...@gmail.com wrote: This is a 3D Minesweeper. Instead of searching mines on that rectangular field, you must search them on several 3D fields (8 in total) by looking in all faces/planes. So you must rotate the objects to see all sides. (search for: *3D Mines*) I got the idea about different movements for each axis, but I really wanted to use dragging for all axis. Thanks, Thiago On Mon, Sep 6, 2010 at 17:42, Droid rod...@gmail.com wrote: Suggest dragging for x, y and tapping for z axis movement. But its not clear exactly what your end-game is You could also use accelerometer for tipping (see Breakout Legend in the App in mkt) :) Droid On Sep 6, 7:04 pm, Thiago Lopes Rosa thiago.r...@gmail.com wrote: Hi, I have a cube on the center of the screen and the user can rotate it using the touchscreen. The problem: For example, when I rotate the cube 180 degrees (vertical), the horizontal rotation gets inverted (i mean, when moving right the cube rotates left and vice-versa). The issue is that I'm using 2D coordinates (touchscreen) to rotate the 3D cube. I'm always rotating around the cube's X and Y axis and never around the Z axis. The question is: How do I calculate how much and which axis to rotate from a 2D coordinate input? Thanks, Thiago -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Develop Games
Christian, Most games make their own map editor/generator and the reason for this is because for your game to run well, you will want to have an efficient implementation of whatever it is that your game world plays in. Since you already have to write code to render it, it's usually not that much harder to copy that code to an external utility and add a couple of buttons that let you point and click to some creation or editing of some sort, then write it to disk and have reciprocal code read it back in from disk for your actual game. There aren't that many standards for levels/maps in videos games because of the efficiency issue. Every game tends to have somewhat unique needs so things tend to be custom. Just start simple and work your way up. Go to gamedev.net to find good info too, or also check for Chris Pruett's presentation on replica island. He may have done what you seek and you can get the source to that game here - http://code.google.com/p/replicaisland/ On Sep 7, 1:51 pm, Christian Eduardo Palomares Peralta palomare...@gmail.com wrote: Hi everyone I'm designing a game for Android, but i can't find a generator of maps, does anyone know about it??? Could you recommend me a program for this?? Thxs -- Christian Eduardo Palomares Peralta (ShinjiDev) -http://learningwebdev.blogspot.com Administrador del Grupo Python-Perú -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Multiplayer Game – Handle Communication
Go lightweight and cross-platform. You'll be glad you did. Almost every platform can easily encode/decode JSON. Consider using it if it's not a real-time protocol (JSON is awesome for turn-based stuff). If it is a real-time protocol, roll your own binary format. Keep it super simple, with packets that are linear access, like header number-of-bytes-in-packet, next int start data, object ID, bytes for object, then just decode elements in-order, recurse if need-be, etc. next object ID, bytes for object, go in... On Sep 7, 8:24 pm, Bret Foreman bret.fore...@gmail.com wrote: How about sending and receiving tweets? How much info does the game need to exchange? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Fog of war? is it possible?
Fog of war = 1) Divide world into tiles. 2) Tile can have any of 3 states { FOGGED, PARTIALLY FOGGED, CLEAR } 3) If tile = FOGGED, draw black (or don't draw at all if you're clearing to black) 4) If tile = CLEAR, draw normal stuff. 5) If tile = PARTIALLY FOGGED, draw normal stuff, determine which direction the blend is in (examine surrounding tiles) and draw a pre- made tile of partially blended fog at the orientation you determined it to be in. As far as drawing or not drawing characters under fog of war, just examine the tile they are currently standing on to figure out whether or not to draw them. It's actually not that hard to implement in Canvas or OpenGL if you plan ahead a little and tile your world. The one thing you do not want to do is draw everything and then try to draw the fog on top. That's way more pixel writes than optimal and will probably give subpar performance on many devices. On Sep 7, 8:08 pm, Miguel Morales therevolti...@gmail.com wrote: Um ok, my solution would work just fine. Except maybe speed-wise. In which case you can then add a GL overlay to your 2d canvas. On Fri, Sep 3, 2010 at 7:37 PM, John Paul Bernal jpbal...@gmail.com wrote: we are using overhead view and 2d graphics on canvas. Our character is a ball where it needs to find key items to be able to exit the world map. On Sep 3, 2:17 am, String sterling.ud...@googlemail.com wrote: I can imagine several ways to accomplish it, but it completely depends on what graphics approach you're using in your maze game. 2D using Canvas? 3D using OpenGL? Is it first-person or overhead view? Etc. String On 2 Sep, 07:52, John Paul Bernal jpbal...@gmail.com wrote: we're making a maze game and we've been thinking if we added fog of war in our game so it would be more challenging but we're stunned on how we can implement it or is it even possible? Help would be really appreciated. ~JP -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- ~ Jeremiah:9:23-24 Android 2D MMORPG:http://developingthedream.blogspot.com/,http://diastrofunk.com,http://www.youtube.com/user/revoltingx -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Bug in glEsVersion?
I had crazy problems with that, too. Apparently the GLES Version filtering doesn't work right for many devices. It didn't work right for the first EVO firmware. I don't know if they've fixed it. Filtering is done by the client sending up all of its capabilities (I believe) to the market server and the market tells it what it can see given those capabilities. I assume google does proper gles version filtering (like it will show up on the Nexus One) but I know HTC did not do it right on the EVO and Incredible (blame sense) and I imagine others could make the same mistake. On Sep 4, 1:16 am, midpointgames .com gadz...@gmail.com wrote: If I set glEsVersion to be 0x00010001 or 0x0002 the app no longer shows up in the marketplace on the Samsung Galaxy S. If I don't have any glEsVersion in my AndroidManifest.xml, the game shows up and works perfectly fine on the Samsung Galaxy S. Also, the Sony Ericson X-10 also did not show my game in the marketplace of O set g;EsVersion to be 0x00010001. Please help! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Reading precomputed vertex arrays in application?
I had good luck just serializing them with a small utility I wrote. The workflow is like this: 1) Create your geometry in whatever tool you use 2) Write a tool that can load that geometry from whatever format its saved in (or in your case skip #1 and just start here with your generator) and serialize it to disk as the desired data structure 3) Your app deserializes right into the data structure that you need. Look into ObjectOutputStream/ObjectInputStream to learn how to serialize stuff. On Sep 6, 6:33 pm, SChaser crotalistig...@gmail.com wrote: My app has large vertex arrays that are pre-computed before I even build the app for distribution. I'd like to store these in assets (recognizing the size limits of asset files) and read them in with minimal computation. Can I store them in binary, and just read them into an NIO buffer, and then wrap it for GL, or do I have to go through the whole compute intensive (?) process of reading it in, making a byte array, and converting that to an integer (in this case) array? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to repeatedly draw on a canvas
Shashidhar, Use a surfaceview. Create a bitmap the size of the screen. Update it with your new line or whatever you want to do, then draw it to the canvas. On Sep 6, 11:37 pm, Frank Weiss fewe...@gmail.com wrote: The list of objects the view draws when the OS asks the view to redraw itself. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Multi-touch for a Piano
ArcDroid, I would do the following: Mock up the screen in a graphics creation/editing application. Slice out the parts that you're going to use for your app. Create a custom view. I use surfaceview if it's going to be primary. Load all of your assets and draw them to the screen. Tweak to get it to work right. Now write your touch handling code. Mostly you'll want to look for touch downs (**note on that for multitouch below) and trigger a sound on a touchdown point intersecting a key. For multitouch, when the second touch point comes down you won't get a down event but instead will have a move event with 2 touch points in it instead just one. There is a flaw in the implementation of the API though that no event is sent when the second touch point is lifted. You'll only find out when the first touch point has moved, as the event will have a pointer count of 1 instead of 2 like it did previously. That may not have much of an impact on your app but knowing to look for the pointer count going from 1 to 2 is key for you. A quick and dirty way to implement MT of any number of touches (Remember - some new phones support up to 5 touchpoints) is to keep an array of the keys and their states (up or down). If touch down or movement is occuring in any of those keys where the state is up, set the state to down and trigger the sound. If no touch is intersecting a key's bounds, set the state to up. This also makes for nice rendering since all you have to do is draw an alternate image for the current down keys. Good luck and have fun with your app On Sep 6, 10:12 pm, ArcDroid jacobrjohn...@gmail.com wrote: Hello, I would like to add multi-touch to my piano app and would like feedback on the best way to do it. I hate the idea that multi-touch is only for one view and not multiple views (ie buttons). Thanks, Jake -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: problem with GL_CLAMP_TO_EDGE
Bill, Only devices that have the non-power-of-two extension (NPOT) can do that. Different chips support different extensions. Most everyone uses power of two anamorphically to do NPOT rendering. Just pick the closest power of two size (for a full screen draw, 512x256 for 1st gen or 1024x512 for high density), squeeze your image into it and draw it at the original aspect ratio and while you'll lose a little quality, it will work. On Sep 5, 9:37 pm, billconan billco...@gmail.com wrote: hello guys, I cannot guarantee my texture size be a power of two, therefore, i'm using GL_CLAMP_TO_EDGE, but when i call glTexImage2D, or glutil.teximage2d, i always get the Opengl Error Code 1281 Invalid Value. this same setting seems to work on iphone. does this mean that android only supports power of two texture maps? if i hard code the bitmap size to be power of two, then my program will work. otherwise the texture map is black. see, this is how i set the texture map, it is exactly the same as the official sample. thanks Log.d(Ball Texture,textureID +textureID+; lengthx +lengthx+; lengthy +lengthy); //lengthx=64; //lengthy=64; if(textureID==0) { int[] textures = new int[1]; gl.glGenTextures(1,textures,0 ); textureID=textures[0]; } gl.glBindTexture(GL10.GL_TEXTURE_2D, textureID); gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER,GL10.GL_NEAREST); gl.glTexParameterf(GL10.GL_TEXTURE_2D,GL10.GL_TEXTURE_MAG_FILTER,GL10.GL_NE AREST); gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_S,GL10.GL_CLAMP_TO_EDGE); gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_T,GL10.GL_CLAMP_TO_EDGE); gl.glTexEnvf(GL10.GL_TEXTURE_ENV, GL10.GL_TEXTURE_ENV_MODE,GL10.GL_REPLACE); Log.d(opengl error 1, error code +gl.glGetError()); Bitmap bitmap=Bitmap.createBitmap(lengthx, lengthy, Bitmap.Config.RGB_565); Canvas mCanvas=new Canvas(bitmap); //mCanvas.drawColor(Color.BLUE); Path path=new Path(); int pointnum=(int) (pointSet.length*0.5); // Log.d(point cound:,pointnum+;); path.moveTo(pointSet[0], pointSet[1]); for(int i=1;ipointnum;++i) { // Log.d(point: ,pointSet[i*2]+;+pointSet[i*2+1]); path.lineTo(pointSet[i*2], pointSet[i*2+1]); } path.close(); // mC mCanvas.drawPath(path, ballPaint); //(lengthx*0.5f, lengthy*0.5f, 30.0f,ballPaint); ByteBuffer dst ; dst=ByteBuffer.allocate(bitmap.getHeight()*bitmap.getWidth()*4); bitmap.copyPixelsToBuffer(dst); gl.glTexImage2D(GL10.GL_TEXTURE_2D, 0, GL10.GL_RGB, lengthx, lengthy, 0, GL10.GL_RGB, GL10.GL_UNSIGNED_BYTE,dst ); -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: OpenGL ES - Color Picking - Front/Back Buffer
The only thing that swaps buffers in opengl es is eglSwapBuffers(). Something else is happening here but it's hard to see without more code. On Sep 4, 8:49 am, Kostya Vasilyev kmans...@gmail.com wrote: Based on your explanation, seems like glClear sometimes does a buffer flip. I put it in quotes, since, as far as I remember (from late-nineties), PowerVR chips use a completely different rendering technique, not based on color/depth buffers. Those were desktop chips, perhaps it's still the same for the mobile ones. Your best bet is to dive into doing hit testing the right way, using 3d math. Might take a little while to learn, but I'm sure you'll be better off in the long run. -- Kostya Vasilyev --http://kmansoft.wordpress.com 03.09.2010 22:12 пользователь Thiago Lopes Rosa thiago.r...@gmail.com написал: I have a class called ScreenView that extends GLSurfaceView. I have another class called ScreenRenderer that implements GLSurfaceView.Renderer. On ScreenView constructor I do the following: screenRenderer = new ScreenRenderer(context); setRenderer(screenRenderer); On onTouchEvent (in ScreenView) I set a flag during ACTION_DOWN to know that the user touched the screen (first IF on my first e-mail). I don't have other threads running at this moment. Thanks, Thiago On Fri, Sep 3, 2010 at 14:38, Robert Green rbgrn@gmail.com wrote: Thiago, I would n... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: OpenGL ES - Color Picking - Front/Back Buffer
Thiago, I would not expect to see those drawn. Your color/depth clear should take care of it. You're using a GLSurfaceView and drawing only in the renderer which is called by the view, right? I suppose I'd try a flush before the actual rendering pass but that shouldn't be necessary either. What is your thread configuration? Doing anything special there? On Sep 3, 11:33 am, Lance Nanek lna...@gmail.com wrote: Weird, even if the command queue filled up and some were sent to the hardware automatically, that shouldn't cause a buffer swap, which must have happened for you to see things in progress... On Sep 2, 3:50 pm, Thiago Lopes Rosa thiago.r...@gmail.com wrote: Hi, I have a 3D game and I am using color-picking to know which object was selected. When the user touches the screen, I draw each object with a different color. Then I read the color where the user touched the screen to know which object was selected. After that I draw each object with their respective textures/colors. (everything done during one onDrawFrame pass) The problem is that sometimes the colored objects appear on the screen (~5% of the times the user touches the screen) and it is even worse on slower hardwares. This is my pseudo code: public void onDrawFrame(GL10 gl) { if (user touched the screen) { gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); gl.glMatrixMode(GL10.GL_MODELVIEW); // DRAW COLORED OBJECTS gl.glReadPixels(x, y, ..); // CHECK WHICH OBJECT WAS SELECTED gl.glColor4x(0x, 0x, 0x, 0x); } gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); gl.glMatrixMode(GL10.GL_MODELVIEW); // DRAW TEXTURED OBJECTS } As far as I understand, we always draw on the Back Buffer and only after we finish, it swaps to the Front Buffer and updates the screen. Is there anything wrong with the above code? Thanks! Thiago -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: OpenGL ES - Color Picking - Front/Back Buffer
Thiago, I'm going to answer by providing a totally different way to do your picking. If you separate the object models and the rendering into two different things, you can have it so that when it's time to pick, you get a ray into your world using glUnProject (assuming you have your own view transform matrix that you use) and run intersection tests of that ray against your models. I recommend doing a simple ray-sphere intersection test to see if the ray was in the area of the object and then test against the faces of the object itself or a convex hull surrounding it to get a more accurate idea. This, done optimally, will most likely outperform your current solution as it doesn't introduce a complete pipeline stall with 2 pass rendering (glReadPixels, clear, draw again)... If you're interested in doing it, just refer to 3D game math books for the matrix math involved and google around for a ray-sphere test to get started. Once you've got that working, there are algorithms for producing the hull around the object or if you're ok with bounding boxes, they tend to work alright and are easily constructed. On Sep 2, 2:50 pm, Thiago Lopes Rosa thiago.r...@gmail.com wrote: Hi, I have a 3D game and I am using color-picking to know which object was selected. When the user touches the screen, I draw each object with a different color. Then I read the color where the user touched the screen to know which object was selected. After that I draw each object with their respective textures/colors. (everything done during one onDrawFrame pass) The problem is that sometimes the colored objects appear on the screen (~5% of the times the user touches the screen) and it is even worse on slower hardwares. This is my pseudo code: public void onDrawFrame(GL10 gl) { if (user touched the screen) { gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); gl.glMatrixMode(GL10.GL_MODELVIEW); // DRAW COLORED OBJECTS gl.glReadPixels(x, y, ..); // CHECK WHICH OBJECT WAS SELECTED gl.glColor4x(0x, 0x, 0x, 0x); } gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); gl.glMatrixMode(GL10.GL_MODELVIEW); // DRAW TEXTURED OBJECTS } As far as I understand, we always draw on the Back Buffer and only after we finish, it swaps to the Front Buffer and updates the screen. Is there anything wrong with the above code? Thanks! Thiago -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: ADT causing CDT to build all C projects on Android app launch??
Jason, Perfect! I don't know how I missed that. I'm glad a configurable option was able to fix it. I just tested and things seem to be working correctly again. Thanks for figuring it out! On Aug 28, 5:33 am, Jason jason.poli...@gmail.com wrote: Hi, I am one of the elusive few running this exact setup, and I too have been a bit annoyed by this feature. I did just find this: Window-Preferences-C/C++ There is a checkbox option entitled: Build configurations only when there are Eclipse resource changes within the project and its references I tried checking this at it seemed to eliminate these extra builds. I also tried making a small change to a C++ source file in my project and it picked up the change when I ran the app.. so seems to work. On Aug 28, 12:29 pm, Robert Green rbgrn@gmail.com wrote: Hey guys, I doubt there are too many people who run CDT in eclipse for native apps also with ADT installed for Android, but in the off-chance that someone here knows anything about this, my problem is that any time I run any android app, my C builder kicks in for projects totally unrelated. I have no idea why and have been digging through settings on everything, unable to find out why. All I can think is that the ADT pre-launch process triggers it via a refresh or some kind of catch- all type call in eclipse API land that I'm unaware of. Does anyone know anything about this? It's very annoying to have a C builder run for a different project than the one you're working on every time you launch the app. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Game math/logic calulating movement
Direction will be in the range -180 to 180 so don't use abs! Always use sin/cos for y/x respectively when in y+ down 2D coordinate systems, otherwise x/y respectively. Here is kind of what you want // tickDelta should be something like .016f to .033f - definitely should total 1.0f per second :) float tickDelta = (currentMs - lastMs) / 1000f; // now mMoveSpeed can be expressed in units-per-second and it'll work at any framerate if you multiply by tickdelta float touchDelta = (float)(TouchY - V.CurY) / (TouchX - V.CurX); float dirRads = (float)Math.atan(touchDelta); float amountX = (float)Math.cos(dirRads) * mMoveSpeed * tickDelta; float amountY = (float)Math.sin(dirRads) * mMoveSpeed * tickDelta; x += amountX; y += amountY; // no additional checks needed. This is how you do 2D directional movement. // this assumes that either TouchX/TouchY or V is set only when the touch is touched down initially so that a vector is made when the touch moves and that value is not updated. On Aug 26, 8:40 pm, Jeffrey jeffisagen...@gmail.com wrote: I know this is more of a general programming question, but my Android friends here have always been helpful. I am trying to make an image move from one part of the screen to a position the user touches, as a constant speed. I don't know the best way to go about doing this and the way I have been trying to get to work is taxing my brain too much. I have been using geometry to calculate slope, then using Sin * movement speed to calculate the difference in X,Y coordinates. This is the code I'm looking at: TouchX = V.TX; (This is the touch event coordinates TouchY = V.TY; ) Slope = (TouchY - V.CurY) / (TouchX - V.CurX); (this figures out the slope of the line to the touch point) DegreeSlopeY = Math.atan(Slope); DegreeSlopeY = Math.abs(DegreeSlopeY); (this is so that I can calculate the direction the image should travel along the slope) DegreeSlopeX = (90.0 - DegreeSlopeY); NewY = (mMoveSpeed * Math.sin(DegreeSlopeY)); (This calculates the shift in Y axis for the image) NewX = (mMoveSpeed * Math.sin(DegreeSlopeX)); (This calculates the shift in X axis for the image) if(TouchX V.CenterX) NewX = -NewX; (This is to finish calculating the correct X axis direction to travel) if(TouchY V.CenterY) NewY = -NewY; (This is to finish calculating the correct X axis direction to travel) The problem that I'm having is the image is veering way of course when traveling in Y heavy paths. When traveling horizontally it works almost perfect. I know there is probably an easier way though I don't know how to use a lot of things (like OpenGLES) so if your advice is to use a different method please link a tutorial for that method if you know of one. Thanks in advance. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] ADT causing CDT to build all C projects on Android app launch??
Hey guys, I doubt there are too many people who run CDT in eclipse for native apps also with ADT installed for Android, but in the off-chance that someone here knows anything about this, my problem is that any time I run any android app, my C builder kicks in for projects totally unrelated. I have no idea why and have been digging through settings on everything, unable to find out why. All I can think is that the ADT pre-launch process triggers it via a refresh or some kind of catch- all type call in eclipse API land that I'm unaware of. Does anyone know anything about this? It's very annoying to have a C builder run for a different project than the one you're working on every time you launch the app. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Do I need openGL or not?
Canvas2D-style APIs are easier to learn than OpenGL in the first place but once you know OpenGL, there are many things it does effortlessly. Antigen is 2D OpenGL and took very little graphics effort. Most of the time was spent tweaking difficulty curves, testing, developing and integrating assets such as graphics, sounds and music and putting in logic for the messages and achievements. Once I had the basic 2D sprite library working in GL, it was cake adding additional stuff, including the particle explosions, power-up auras, animations and text effects. Once you learn how to use atlases and draw quads using parts of them, GL doesn't seem so daunting. It's certainly worth learning if you want to up your game (pardon the pun). On Aug 26, 12:28 am, Ted Neward ted.new...@gmail.com wrote: What kind of frame rate are you hoping to get? In general, popular opinion holds that 2D is more easily done without OpenGL, but it's certainly do-able. Ted Neward Java, .NET, XML Services Consulting, Teaching, Speaking, Writinghttp://www.tedneward.com -Original Message- From: android-developers@googlegroups.com [mailto:android- develop...@googlegroups.com] On Behalf Of Firidan Sent: Wednesday, August 25, 2010 12:25 PM To: Android Developers Subject: [android-developers] Do I need openGL or not? I am thinking about creating a 2D game for android. Kind of like the flash game Age Of War (just google it). Can I do it with just Java or do I also need openGL? Thanks for help! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en