FBO rendering different result between Galaxy S2 and S3 I'm working on a pong game and have recently set up FBO rendering so that I can apply some post processing shaders. This proceeds as so Bind texture A to framebuffer Draw balls Bind texture B to framebuffer Draw texture A using fade shader on fullscreen quad Bind screen to framebuffer Draw texture B using normal textured quad shader Neither texture A or B are cleared at any point, this way the balls leave trails on screen, see below for the fade shader. Fade Shader private final String fragmentShaderCode "precision highp float " "uniform sampler2D u Texture " "varying vec2 v TexCoordinate " "vec4 color " "void main(void)" " " " color texture2D(u Texture, v TexCoordinate) " " color.a 0.8 " " gl FragColor color " " " This works fine with the Samsung Galaxy S3 Note2, but cause a strange effect doesnt work on Galaxy S2 or Note1. See pictures Galaxy S3 Note2 Galaxy S2 Note Can anyone explain the difference? edit Folowing VinceFR's comment, we've tried adding the following. When the renderbuffers are initialised they are briefly bound to the framebuffer and set the background to a uniform buffer with GLES20.glClearColor(backgroundColor 0 ,backgroundColor 1 ,backgroundColor 2 ,backgroundColor 3 ) GLES20.glClear( GLES20.GL DEPTH BUFFER BIT GLES20.GL COLOR BUFFER BIT) The result is unchanged on the S3, on the S2 it has improved a certain amount, but problems still exist note the 20 in the bottom right corner is supposed to be there.


Inconsistent sprite velocity? I'm moving my sprites using the following formula Code that I'm using (Only shows sprite's X position being calculated but Y position is also being done) spriteGridX 240 480 I start out with a virtual 'Grid' so I can scale position to all resolutions etc so 240 480 would place the sprite at the center of the screen (X) spriteScreenX spriteGridX width Scale to physical screen where width is the width of the current devices screen (viewport) spriteXTime 8f 8 being the amount of time in seconds that this sprite will take to traverse the entire width of the screen spriteXVel 1 spriteXTime Velocity that will be used to move the sprite along the virtual grid position So, when I need to move the sprite, I simply do the following spriteXGrid (spriteXVel Delta) for right for left. I'm using a fixed delta time spriteScreenX spriteGridX width And again, convert to usable screen position for current device drawsprite(spriteScreenX, SpriteScreenY) Draw the sprite (drawSprite is just a method I've written to draw openGL quads and it takes the screen X and Y as coordinates spriteScreenY not shown here but essentially same as X with height instead of width. Problem The above seems to work OK (if I specify, as above, 8seconds, then the sprite does indeed take 8seconds to pass the whole screen as far as I can tell). However, a problem becomes evident when I have 2 sprites (in my case, 2 horizontally moving platforms, both starting at the outer edges of the screen one on the left and one of the right) these move towards each other and when they 'meet', they go back in the opposite direction, and again when they reach their initial starting positions. After the second time, they start to move slightly out of sync and the problem accumulates. Each platform has the same time velocity settings and it seems that a sprite over the right side of the screen moves at a very slightly different speed than the one on the left. After the initial move, the difference between the grid positions of my 2 sprites are a follows Left sprite 0.002083334 Right sprite 0.0020834 I can't work out why there is a difference. They're using the same formula. Of course the problem could be that they are reversing at slightly different times and not the speed as I suspect, but for now I've ruled that out as they seem to be reversing correctly. Be grateful if anyone could assist. Thanks Test Device Google Nexus 10, Samsung Galaxy Ace v1


How to make a horizontal scrolling menu in Game Maker Studio 1.4? I know how to place the items you see in the picture, my problem is how do I move them? How do I know if the player is swiping right or left? I made the items with a ds list in a script file and then have an object obj MenuCreation run that script, so if I move the obj MenuCreation, will it move the list with it?


How to handle pixel perfect collision detection with rotation? Does anyone have any ideas how to go about achieving rotational pixel perfect collision detection with Bitmaps in Android? Or in general for that matter? I have pixel arrays currently but I don't know how to manipulate them based on an arbitrary number of degrees.


Who makes the art assets for mobile games? I know how to develop apps for Android but never tried developing games, and I want to start soon. For developing games we need sounds and high quality images (say a background, characters, logos, etc.), so how to create these? For this should we have a separate team? Or a developer can create these using any tools?


How to implement custom texture formats in Android? What I know Android can load PNG, BMP, WEBP,... via BitmapFactory. What I want to achive Load my own 2D file format (e.g. 1 bit texture with a 1 bit alpha channel) and output a RGBA8888 texture. Question Is there any interface to achieve this?(or any other way) The resulting image is used as a texture for a 3D model. Why would you do that? Saving phone memory and download bandwidth while expanding the texture at runtime to RAM seems reasonable for very simple textures.


OpenGL 2.0 Android Scrolling Horizontally and Vertically I am new to OpenGL2.0 in Android. How can I scroll the GLSurfaceView both horizontally and vertically?


Gradually reduce speed Basically I am working on following application of android version Party Games Drinking Wheel For this I want to rotate wheel and want to stop wheel at specific point. But I want this with gradually decreasing speed. For example at start I have speed of 10 then at stop time it at 0. So wheel stop smoothly. At presently I have working code but it stop suddenly. registerEntityModifier(new RotationModifier(desireTime, 359f, desireRotation, new IEntityModifierListener() Override public void onModifierStarted(IModifier lt IEntity gt pModifier, IEntity pItem) Override public void onModifierFinished( IModifier lt IEntity gt pModifier, IEntity pItem) mPointer.stopRotation() showWindowAfterSomeTime(randomSegment) , EaseLinear.getInstance())) I want some help in this. Thanks for your time.


How to build multiplayer games for android? I'd like to know how to build android multiplayer games but I'm struggling to find a step by step or good resources on this topic. My main questions is which engine and api to use? I'd like to achieve this with the technologies I already know such as Firebase and Libgdx on android studio. All my researches point to things like Unity, Godot and unreal. Is this the only better way to go since I want to build simple games such as pool ? What I want to build is a multiplayer game on where the users should be able to invite friend from their social media to play against, provide rankings and sharing results on social media. ONLY for Android, using Java and free resources (APIs, db's, engines). A good example would be Trivia Crack how is this game (probably) made? which technologies?


How do I eliminate black bar artifacts in AndEngine TMX plugin? I used AndEngine gles1 along with the tmx plugin to generate my background maps. The image width is not fit to my virtual device, so I increased the tmx image size. Here is my code for the camera width and Camera Height CAMERA HEIGHT 320 final DisplayMetrics displayMetrics new DisplayMetrics() this.getWindowManager().getDefaultDisplay().getMetrics(displayMetrics) float aspectRatio (float) displayMetrics.widthPixels (float) displayMetrics.heightPixels CAMERA WIDTH Math.round(aspectRatio CAMERA HEIGHT) But it shows me black bars as follows


"Non additive" alpha blending in OpenGL ES 2.0, Android (AndEngine) I have several monochromatic sprites and I render them with alpha 0.25 (all of them the same value). I want to "paint" with them, so when they overlap, the alpha won't be added. I am not sure if I can express myself properly in English here is an image of what I want to achieve (background visibility is important). Is this achievable in OpenGL ES 2.0? I was trying to figure out the different modes of alpha blending, but without success. Also if anyone can tell me, how is this called, I can continue my search. If this is not possible, I was thinking maybe I can somehow render the monochromatic sprites (alpha 1) to a texture and only then render this texture on screen. How can this be done in AndEngine?


How can the Unreal Development Kit be used with Android? I've read the UDK will support Android development, I checked the download page on the site and found nothing related to Android. also read that Dungeon Defenders Android game was built with Unreal engine. so is there a way to use the UDK with Android ?


Phone for Android game development I've been developing casual iPhone iPod Touch games touch for about two years. I'd like to port some games to the Android platform. Since I'm stuck w a two year iPhone contract I don't want to get an Android phone that requires a service plan. What is the best phone to get for development in this situation?


sharing preferences between two apps on android with libgdx I am making an android game with both a demo version and a paid version. I want users who decide to buy the paid version to continue from where they left off, with all their old data and settings. I've set a shared user id between both applications, and now I'm wondering if it's possible to use libgdx preferences across both versions. I am also open to other ideas on how to implement this.


Best method for 2 layer tile based map scrolling What is the best general approach to implement scrolling for a 2D tile based game? I need to scroll the map with a constant speed, lets say 2 pixels every frame (like in a top down shooter). The tiles are 32x32 and the map is quite big, lets say 10 x 300. There are 2 layers first is the background layer second is the forgeground layer with obstacles and enemies The target plattform is android and I want to use OpenGl. What is best practice? a) Draw only the visible Screen all the time (every frame) b) Load complete map into memory and just move the camera Is there a difference in performance and determining collision etc.? Thanks for any help!


Accessing libgdx classes within Android classes Currently what I'm able to do is to access android APIs within libgdx with an interface in core and defining all the methods and then implementing it in every project (desktop, android, etc). What I want to do is I want to create a way so that I can call a method from some android class (say AndroidLauncher) and it calls a method of a libgdx core project class (like modifying some stage element). How do go about that? Any help would be really appreciated. Note As a 'hack' right now, I'm just waiting for any update from android class in the render method using those same interface methods, but I don't think that's the best possible way.


How can i draw Arc in center of the screen on canvas in android RectF rectf new RectF(10, 100, 700, 800) c.drawArc(rectf, 0, 90, true, paint) the above code is draw the arc using drawArc() method of canvas but i try to draw arc in a center of the screen.


Game Loop Should resources be initialized in the game loop or in the respective classes? (both?) For example, lets say we have an enemy class in my Android game project. I am initializing the enemy bitmap to be used with certain sprites in my game loops init. I am then calling the respective classes init, which is passed this loaded bitmap. What is the process associated with initializing resources and classes in the game loop? If I am totally off course just point me in the right direction. Thanks! D


Flick Gesture in Unity3D Android I'm trying to create a football game where the user will make a flick gesture in order to kick the ball. I'm quite new to developing games in unity3d, I have successfully made a moving ball, added some rotation, gravity and some basic input (the ball follows the touch coordinates). How can I achieve the flick gesture?


Move Background in AndEngine for a Racing Game I am new to game development and AndEngine. I have small query about racing game. I am going to develop a bike racing game. For bike racing game we will move the background or the player. I am tried with andengine autoparallax background. But I didn't got the correct answer. I need to do a background like these screenshots in SpeedMoto. Can anyone help me to set the background.


Will I have copyright issues making a mobile game based on an anime? I have been wanting to create a mobile game based on some of my favorite anime. I want to know if using character images and names from those anime (even after giving full copyright credits and disclaimer) infringes any copyrights? Would this come under "fair use" in the DMCA (I mean there are already so many not so legal sites using this "fair use" to continue running). What are the possible things I can do for making this game? I have seen many online browser games based on anime which use images and elements from that anime, while I have also seen many games advertise themselves based on a anime but just use diffrent names for characters of that anime (sometimes modifying the character images, too).


How can I access bitmaps created in another activity? I am currently loading my game bitmaps when the user presses 'start' in my animated splash screen activity (the first launch activity) and the app progresses from my this activity to the main game activity, This is causing choppy animation in the splashscreen while it loads creates the bitmaps for the new activity. I've been told that I should load all my bitmaps in one go at the very beginning. However, I can't work out how to do this could anyone please point me in the right direction? I have 2 activities, a splash screen and the main game. Each consist of a class that extends activity and a class that extends SurfaceView (with an inner class for the rendering logic updating). So, for example at the moment I am creating my bitmaps in the constructor of my SurfaceView class like so public class OptionsScreen extends SurfaceView implements SurfaceHolder.Callback Create variables here public OptionsScreen(Context context) Create bitmaps here public void intialise() This method is called from onCreate() of corresponding application context Create scaled bitmaps here (from bitmaps previously created)


Libgdx Android app Avoid fullscreen and show titlebar I am developing an app using Libgdx and I don't want the app to go fullscreen and want to show the title bar but the app goes to fullscreen and hides title bar despite all efforts. Here is my style.xml file lt style name "MyStyle" parent "android Theme.Light" gt lt style gt Here is AndroidManifest.xml lt application android allowBackup "true" android icon " drawable ic launcher" android label " string app name" android theme " style MyStyle" gt lt activity android name "com.mygdx.game.android.AndroidLauncher1" android label " string app name" android configChanges "keyboard keyboardHidden orientation" gt lt intent filter gt lt action android name "android.intent.action.MAIN" gt lt category android name "android.intent.category.LAUNCHER" gt lt intent filter gt lt activity gt Here is AndroidLauncher class protected void onCreate(Bundle savedInstanceState) super.onCreate(savedInstanceState) AndroidApplicationConfiguration config new AndroidApplicationConfiguration() config.hideStatusBar false initialize(new MyGdxGame(), config) setContentView(R.layout.main activity) tv (TextView)findViewById(R.id.tv) tv1 (TextView)findViewById(R.id.tv1) button (Button)findViewById(R.id.button) button.setOnClickListener(new View.OnClickListener() Override public void onClick(View v) if (Build.VERSION.SDK INT lt 19) Intent intent new Intent() intent.setType("image ") intent.setAction(Intent.ACTION GET CONTENT) startActivityForResult(Intent.createChooser(intent, "Select Picture"), SELECT PICTURE) else Intent intent new Intent(Intent.ACTION OPEN DOCUMENT) intent.addCategory(Intent.CATEGORY OPENABLE) intent.setType("image ") startActivityForResult(Intent.createChooser(intent, "Select Picture"), SELECT PICTURE) ) public void onActivityResult(int requestCode, int resultCode, Intent data) if (resultCode RESULT OK) if (requestCode SELECT PICTURE) Uri selectedImageUri data.getData() selectedImagePath getPath(selectedImageUri) Intent act2 new Intent(this ,AndriodLauncher2.class) act2.setData(selectedImageUri) startActivity(act2) public String getPath(Uri uri) String projection MediaStore.Images.Media.DATA Cursor cursor managedQuery(uri, projection, null, null, null) int column index cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA) cursor.moveToFirst() return cursor.getString(column index)


What will happen at a different aspect ratio and what is the most efficient and easy way of dealing it? Let's say I have built a game for Android at the size of 480x854. If I test this on my device that has this resolution I suppose it will work and look property. But at a different aspect ratio will the game work and look good? Also, what is the most efficient and easy way to handle this? Thanks in advance.


Can I use real currency name symbol as an in game currency? Can I use a real currency name (i.e USD, PKR) or symbol ( , Rs.) for my in game currency with the same exchange value as original currency? I couldn't find anything about it in google play store policies neither in government websites. Of course I have other options, I can call it gold or silver etc but I'm just wondering if it is allowed or not.


Get an image from canvas on android? At the moment I have not worked with android and am not familiar with its capabilities. In the browser, it is possible to get an image from the canvas using the methods toDataURL() toBlob() Are there any similar methods on android canvas (android.graphics.Canvas, if I understood correctly) to get an image? Or is it possible only in canvas in the webview component? Thanks.


libGDX new TextureAtlas(filename) and new Texture(filename) drawing stale image data I'm trying to draw an image using libgdx but no matter what I do, libgdx seems to insist on drawing a portion of an image I had loaded and used in an earlier game screen. In my current game screen (class implements Screen), I have tried loading the image using both an atlas and loading it via the Texture class. However, when I draw the image in my render method, portions of an image that I had loaded previously are being displayed instead. Not the image that I am passing to the draw method! I have tried both loading the image using a Texture Atlas and directly private TextureAtlas deckAtlas private TextureRegion aceHearts In class constructor deckAtlas new TextureAtlas("deck.atlas") aceHearts deckAtlas.findRegion("ace heart") and Texture texture new Texture("deck.png") sprite new Sprite(texture, 72, 0, 72, 100) Depending on the method used above, I try to display by either game.batch.begin() game.batch.draw(aceHearts, 100, 100) game.batch.end() Or game.batch.begin() sprite.draw(game.batch) game.batch.end() where game is an instance of a class that extends Game and batch was initialized in that class's create method. To start from the beginning, in my class that extends Game I call setScreen(new MainMenu(this)) In Main Menu Screen, I load a skin using skin new Skin(Gdx.files.internal("uiskin.json")) and create a bunch of Scene.2d UI widgets with that skin (the packed image that's loaded by the skin is contributing the image that is being drawn on my next screen when I don't want it to). Finally, I create the Screen in which I am having the above problems using game.setScreen(new TableGame(game)) So to summarize, I am loading an image in a class that implements Screen, but that image never gets drawn to the screen. Instead, an image that I had used in the previous screen is being displayed instead. Any ideas why? Thanks for any help. I am using libGDX 1.3.1 (I think).


In App Billing Library for Android Game I'm trying to add in app purchases into my Android game and it having some trouble figuring my around the Google Play Billing. Can anyone refer me to a good open source reference for how to do that?


LibGDx android Show animation on button click I am trying to create an application using libgdx where i need an animation to be played on pressing an image button, i've been able to achieve it using this code if(slapBossFlag true) currentFrame animation.getKeyFrame(timePassed, true) batch.begin() timePassed Gdx.graphics.getDeltaTime() Gdx.app.log("time","time is" timePassed) batch.draw(currentFrame, screenWidth 2 ((currentFrame.getRegionWidth()) 2), screenHeight 2 ((currentFrame.getRegionHeight()) 2)) batch.end() slapBossFlag false the problem is the animation goes by too quickly. i've tried setting timePassed to zero when slapBossFlag is false, and that didnt work. Can anyone help?


How do i update opengl lightning equation in my fragment shader to make my texture less glossy and more like a fabric I built a model in blender, and am currently trying to import it into my android app using assimp together with opengl, i dont have any issues with the importing but my goal is to make the object look realistic as possible, and this is where my problem lies...I have implemented normal mapping using both the diffuse and normals of my texture but after rendering it the objects looks smooth and glossy, yes the bumps were rendered well and i like it but i need the material to look more like a fabric (cloth textile), please how can i do this? do i need to update my lighting equation or the issue is with my original diffuse texture? Here is my original diffuse texture Here is my rendered model Here's my fragment shader void main() obtain normal from normal map in range 0,1 vec3 normal texture2D( normalMap, textureCoords ).xyz transform normal vector to range 1,1 normal normalize(normal 2.0 1.0) this normal is in tangent space get diffuse color vec3 color texture2D( textureSampler, textureCoords ).xyz ambient vec3 ambient 0.1 color diffuse vec3 lightDir normalize(tangentLightPos tangentFragPos) float diff max(dot(lightDir, normal), 0.0) vec3 diffuse diff color specular vec3 viewDir normalize(tangentViewPos tangentFragPos) vec3 reflectDir reflect( lightDir, normal) vec3 halfwayDir normalize(lightDir viewDir) float spec pow(max(dot(normal, halfwayDir), 0.0), 32.0) vec3 specular vec3(0.2) spec gl FragColor vec4(ambient diffuse specular, 1.0) Here's my vertex shader mat3 transpose(mat3 m) return mat3(m 0 0 , m 1 0 , m 2 0 , m 0 1 , m 1 1 , m 2 1 , m 0 2 , m 1 2 , m 2 2 ) void main() gl Position mvpMat vec4(vertexPosition, 1.0) vec3 fragPos vec3(model vec4(vertexPosition,1.0)) vec3 T normalize(normalMatrix tangent) vec3 N normalize(normalMatrix normal) T normalize(T dot(T, N) N) vec3 B cross(N, T) mat3 TBN transpose(mat3(T, B, N)) values for fragment shader tangentLightPos TBN lightPos tangentViewPos TBN viewPos tangentFragPos TBN fragPos textureCoords vertexUV


Simple way to detect collision between two bitmaps on android surface view I'm looking for a standard way to detect collision between two bitmaps inside a surface view. I tried the intersect method with two rectangles, but it doesn't log. practiseA new Rect(500, 500, 500, 500) practiseB new Rect(500, 500, 500, 500) public void isIntersecting() Log.d("yeah", "hello") if (practiseA.intersect(practiseB)) Log.d("collision", "yes") So can someone tell me what I'm doing wrong or give me a different method? I saw this complicated algorithm but didn't understand what to feed it sqrt( ( ax bx ) 2 ( ay by) 2) lt aR bR What's aR and bR?


Java RPG class implementation (design pattern ?) For my school project I'm making a little NFC based game on Android. The concept is simple, on each phone you create a character and you can fight with other people through NFC. The character will have have a set of attributes, like strength, agility, etc which are represented as short (only 2 bytes for NFC communication). A character must have a race (human, dwarf, ...) and a class (warrior, wizard, ...). Each race has attribute advantages (ex 2 strength for dwarf) and a passive bonus ex 5 gold after a fight. Each class can wear different weapon and will have a different attack() methods. My problem is that I don't know how I should create my character class and allow it to have a race and a class. Does anyone have an idea of how I can accomplish this ?


Loading Bitmap by name in Android Currently, I'm loading images as follows sampleimage BitmapFactory.decodeResource(context.getResources(), R.drawable.sampleimage) This automatically chooses the correct image from the drawable hdpi, drawable mdpi or drawable ldpi folders. How can I load the bitmap using the image name as the string "sampleimage.png"?


What is an elegant way to localize level data? I'm writing a simple android game. I planned to store all levels in xml files that contain info about level, including a level name field. The Level class would load an appropriate level by parsing the corresponding XML file and reading data into the Level's fields) when user selects it. Everything seems fine, until I want the game to support multiple languages. With UI it is clear how to solve this problem since we have strings.xml file. But what about localizing level data stored in XML files? I considered having multiple fields for a given piece of data in a level.xml file, with each containing a different translation. Another thought was storing only the ID of level and get related level name from strings.xml file. However, neither of these seem very elegant. Is there a more better way of doing this?


Problem with drawing textures in OpenGL ES I'm developing a 2D game for Android and i'm using the framework which has been told in the book which named Beginning Android Games by Mario Zechner.So my framework is well designed and using OpenGL 1.1.It's similar to libgdx. When i put my textures adjacent each other in my 2d surface,there are some spaces size as 1 px.But this problem only occur on my tablet.There aren't a problem like this on my phone.It's like in this picture What can be the problem?I can't fix it from one week.


Drawing a circle in OpenGL ES Android, squiggly boundaries I am new to OpenGL ES and facing a hard time drawing a circle on my GLSurfaceView. Here's what I have so far. The circle class public class MyGLBall private int points 40 private float vertices 0.0f,0.0f,0.0f private FloatBuffer vertBuff centre of circle public MyGLBall() vertices new float (points 1) 3 for(int i 3 i lt (points 1) 3 i 3) double rad (i 360 points 3) (3.14 180) vertices i (float)Math.cos(rad) vertices i 1 (float) Math.sin(rad) vertices i 2 0 ByteBuffer bBuff ByteBuffer.allocateDirect(vertices.length 4) bBuff.order(ByteOrder.nativeOrder()) vertBuff bBuff.asFloatBuffer() vertBuff.put(vertices) vertBuff.position(0) public void draw(GL10 gl) gl.glPushMatrix() gl.glTranslatef(0, 0, 0) gl.glScalef(size, size, 1.0f) gl.glColor4f(1.0f,1.0f,1.0f, 1.0f) gl.glVertexPointer(3, GL10.GL FLOAT, 0, vertBuff) gl.glEnableClientState(GL10.GL VERTEX ARRAY) gl.glDrawArrays(GL10.GL TRIANGLE FAN, 0, points 2) gl.glDisableClientState(GL10.GL VERTEX ARRAY) gl.glPopMatrix() I couldn't retrieve the screenshot of my image but here's what it looks like As you can see the border has crests and troughs thereby rendering it squiggly, which I do not want. All I want is a simple curve.


Do I need a company name to publish on Google Play? I'm going to upload my Android mobile game on Google Play. But it seems like all games are developed by companies(such as Zynga, and King) and I don't see individual's names as developers. Do I need to register a company name officially? I think it costs a few hundred dollars... If I have to, how and where do I register? or instead of registering a company for a few hundred dollars, if I make a domain website that is named as my company name, would it provide me some protections? Also, do I need to trademark my game's title as well? Thanks!


How bad would be to focus on iOS Android development for an indie developer? After some time developing games for others I'm thinking of moving towards my own productions. My background is 10 years of software development, with last 2 years spent on the iOS development (Objective C and CoronaSDK). With my current experience in Corona I can quickly develop for iOS and Android systems. And this is something that I'm probably gonna do with several of the game ideas I have, at least for the prototype part. But I'm wondering if it's not a bad idea to focus on those 2 systems only. After all there are other mobile platforms, there are PCs, Macs and Linux boxes... All of them having gamers using them. I was wondering if it wasn't a good idea to try some other SDK, giving me more flexibility when it comes to platform independance. There's Unity3D (I think I can develop a 2D game in it though), there's MoAI from what I checked. I see a few options, not sure which one is best as I have little experience in this field (publishing own games) Stick with CoronaSDK for the whole time, release for iOS and Android platforms, screw other mobile devices and PCs, Use Corona for prototyping, then when the idea goes more into the "production" phase rewrite it in MoAI or Unity3D for more platforms support, Start with one of those 2 SDKs right now (which means the prototype phase will be delayed a bit, but after that I can jump right into real coding). Any clues here, what to do?


how to use texture atlas I am trying to implement texture atlas. 1) I am using the texturepackerGUI and the result is taking 2 files , one png (whicj contains all the images and one .atlas (and not .pack). 2) Now , I want to use the above instead of every seperate image. Right now , I use for example private void loadTextures() bobTexture new Texture(Gdx.files.internal("data images bob 01.png")) blockTexture new Texture(Gdx.files.internal("data images block.png")) I want to use texture atlas , so instead of the above TextureAtlas atlas atlas new TextureAtlas(Gdx.files.internal("data images bobs")) bobs.atlas Sprite bobsprite atlas.createSprite("bob 01") Sprite blocksprite atlas.createSprite("block") Now,I must initialize TextureAtlas I think because it gives me error "Syntax error on token " ", , expected".I don't know how. 3) I put TexturePacker2 in the android project (MainActivity) ... AndroidApplicationConfiguration cfg new AndroidApplicationConfiguration() cfg.useGL20 true cfg.useAccelerometer false cfg.useCompass false cfg.useWakelock true TexturePacker2.process("my gdx game android assets images ", " my gdx game android assets data", "bobs.atlas") ... The folders inside TexturePacker are ok syntaxed? Or I must remove the "my gdx game android assets "? Thanks!


Implementing unlockable items on Android I know this would be a beginners question (some of you might think) but I would like to know different approaches for this. I have a game with lets say 20 unlockable items, at the main menu I have a button where the user can go to an activity and view the unlockable items. So I would like for it to have a "Locked image" and under it a text telling you what the item is and maybe how to unlock it. What is the best way of going about this? And then when the item is unlocked during the game, maybe put a variable in the shared preference and check at the beginning of the activity with the unlockabled items. Let me know what you guys think. Thanks.


The best option to multi platform 2d mobile development we are in the process of porting a game from iphone(made with cocos2s) to android(using the andEngine), and it has been a pain to do. So for our next project (a 2d game) we are thinking about using some multiplatform engine framework. For now we are thinking about testing both unity, marmaled(former airplay sdk) and cocos2d x. Do you have any opinion about this? Does someon have experience developing 2d games using Unity?


glsl fragment shader work diffrently on different devices i'm making a 2d android game where i have a mechanics that allow the player to move the camera away from the main character, and to not allow him to explore the hole world, a have create a Fog shader, know the shader works very well on the emulator, and in the desktop application from libgdx, but once i run it on real devices it give me a defferent output, in Xperia SP the for never get heigher and make every thing visible, and in a Galaxy S3 the Fog act like a Circle and make every thing invisible. my question is are shader work differently from gpu to one other.


AndEngine Font Issue I am learning AndEngine. I am displaying Hello world using this code public class myactivity extends SimpleBaseGameActivity private final int CAMERA WIDTH 320 private final int CAMERA HEIGHT 480 private Camera m Camera private Scene m Scene private Font font private Text text Override public EngineOptions onCreateEngineOptions() m Camera new Camera(0, 0, CAMERA WIDTH, CAMERA HEIGHT) EngineOptions en new EngineOptions(true, ScreenOrientation.PORTRAIT FIXED, new RatioResolutionPolicy( CAMERA WIDTH, CAMERA HEIGHT), m Camera) return en Override protected void onCreateResources() determine the density WindowManager windowManager (WindowManager) getSystemService(WINDOW SERVICE) Display display windowManager.getDefaultDisplay() DisplayMetrics displayMetrics new DisplayMetrics() display.getMetrics(displayMetrics) int density (int)(displayMetrics.density) scale desired size 25 by density int fontSize (int) (25 density) font FontFactory.createFromAsset(this.getFontManager(), this.getTextureManager(), 1024, 1024, this.getAssets(), "times.ttf", fontSize, true, android.graphics.Color.BLACK) font.load() Texture fontTexture new BitmapTextureAtlas(1024, 1024, TextureOptions.BILINEAR PREMULTIPLYALPHA) font new Font(fontTexture, Typeface.create(Typeface.DEFAULT, Typeface.NORMAL), fontSize, true, Color.WHITE) mEngine.getTextureManager().loadTexture(fontTexture) mEngine.getFontManager().loadFont(font) Override protected Scene onCreateScene() m Scene new Scene() m Scene.setBackground(new Background(Color.WHITE)) text new Text(0, 0, font, "Hello Android", this.getVertexBufferObjectManager()) m Scene.attachChild(text) text.setPosition(CAMERA WIDTH 2 (text.getWidth() 2), CAMERA HEIGHT 2 (text.getHeight() 2)) return m Scene It is displaying the font like this As you can see that pixels are stretching and font is looking ugly with too much pixelation. How do I display proper font text with no pixelation or add anti aliasing to the font?


TiledMap taking a lot of time to load in libgdx I am developing a game using libGdx in which a level has 2400 450 tiles Map and each tile is of 4 pixels. I am also using box2d in my game. My problem is that when I run the game on my phone it takes a lot of time to load the screen (more than a minute). How can I reduce this loading time? I created tilemap using Tiled and I am using Android Studio. Below is my code (SCALE is 2.0f and PPM is 4) Override public void show() w Gdx.graphics.getWidth() h Gdx.graphics.getHeight() camera new OrthographicCamera() camera.setToOrtho(false, w SCALE, h SCALE) camera.update() viewport new FitViewport(w SCALE, h SCALE ,camera) viewport.apply() . . . map new TmxMapLoader().load("maps lvl3.tmx") tmr new OrthogonalTiledMapRenderer(map, 1 SCALE) Override public void render(float delta) update(Gdx.graphics.getDeltaTime()) Render Gdx.gl.glClearColor(0, 0, 0, 1) Gdx.gl.glClear(GL20.GL COLOR BUFFER BIT) tmr.render() . . . b2dr.render(world, camera.combined.scl(PPM)) public void update(float delta) world.step(1 60f, 6, 2) cameraUpdate(delta) tmr.setView(camera) batch.setProjectionMatrix(camera.combined) Override public void resize(int width, int height) camera.setToOrtho(false, width SCALE, height SCALE) viewport.update( width , height ) Please help and thanks in advance


Integration of LibRocket and Android I am using OpenGL ES 2.0 to create a 2D game for Android 2.2 and was planning on using LibRocket for the GUI. Does anyone have any links or knowledge they would share on how to integrate LibRocket with the android platform? I know that it is a c library that would need to go through the NDK, however I rather not change my OpenGL rendering code to the NDK unless I have to.


How to use HyperLink with Actor in Libgdx I am making a quiz game using LibGDX. I want it to redirect to a website. I am using classes like Text and Label that extends Actor to write text using a bitmap Font. I have no idea on how to provide a link (like anchors in html) in a native app. However, I am not very good at Android but know java well. In android , I saw on stackexchange, we can do so using Intent or string.xml configuration. Can anyone suggest me a way to do so using Actor in libGDX?


How do I create an in app update for a mobile game? I'm researching how to make an in app update on mobile game. When there is a hotfix, or an update, I don't want users to have to go to Play store, or App Store to update, but rather for them to update inside the game (like in Clash of Clans). I want to do this because Apple takes too much time for reviewing. I found https ionic.io, they use Cordova to embebed HTML inside. We can do live update, rollback to old version with a click. This is pretty suitable for normal app, but for game, the performance is not great. How can I create an in app update like this?


How to handle pixel perfect collision detection with rotation? Does anyone have any ideas how to go about achieving rotational pixel perfect collision detection with Bitmaps in Android? Or in general for that matter? I have pixel arrays currently but I don't know how to manipulate them based on an arbitrary number of degrees.


FBO rendering different result between Galaxy S2 and S3 I'm working on a pong game and have recently set up FBO rendering so that I can apply some post processing shaders. This proceeds as so Bind texture A to framebuffer Draw balls Bind texture B to framebuffer Draw texture A using fade shader on fullscreen quad Bind screen to framebuffer Draw texture B using normal textured quad shader Neither texture A or B are cleared at any point, this way the balls leave trails on screen, see below for the fade shader. Fade Shader private final String fragmentShaderCode "precision highp float " "uniform sampler2D u Texture " "varying vec2 v TexCoordinate " "vec4 color " "void main(void)" " " " color texture2D(u Texture, v TexCoordinate) " " color.a 0.8 " " gl FragColor color " " " This works fine with the Samsung Galaxy S3 Note2, but cause a strange effect doesnt work on Galaxy S2 or Note1. See pictures Galaxy S3 Note2 Galaxy S2 Note Can anyone explain the difference? edit Folowing VinceFR's comment, we've tried adding the following. When the renderbuffers are initialised they are briefly bound to the framebuffer and set the background to a uniform buffer with GLES20.glClearColor(backgroundColor 0 ,backgroundColor 1 ,backgroundColor 2 ,backgroundColor 3 ) GLES20.glClear( GLES20.GL DEPTH BUFFER BIT GLES20.GL COLOR BUFFER BIT) The result is unchanged on the S3, on the S2 it has improved a certain amount, but problems still exist note the 20 in the bottom right corner is supposed to be there.


How do I debug two android devices simultaneously in Eclipse? I have a multiplayer game which should be tested on two devices at the same time, if possible, with debugging. Can eclipse do this? If so, how?


Currently developing a game with Android SDK, should I switch to a game engine in future projects? I am an android developer, and I've made several apps on the Google Play Store. I'm currently working on my first game, which is just a simple RPG for android, that I'm coding in Java with the android SDK. I went to an indie game conference recently, and one of the veterans, asked why I didn't use Unity or another game engine to build my game, so it could be easily ported later on. Which got me to wonder if I should use a game engine, since I do want to port this game to other platforms. So, my question is, should I try to adapt to a game engine to make my future projects, if so, which game engines should I look into? Thanks!


Android developer publisher royalty sharing I am creating and Android game, and will need to partner with a publisher. I am curious about how this is typically implemented. Probably publishers are going to have a difficult time trusting some developer that they don't know to pay them, assuming the develop puts the game up on Google Play. So will the publisher want the apk file so that they can put it up on Google Play themselves? Or does Google Play have a mechanism where the royalties can be automatically split between two parties from sales IAP? I know that all contracts will be different and it will depend, but I'm just looking to get a general idea of what is usual typical.


Can I include PCM audio data in a commercial application? For certain reasons, I need raw audio data in my application. I would convert certain sounds to a PCM format (at development time), and store amp load these PCM files in my game. PCM stands for Pulse Code Modulation, and as far as I can see, it is a representation of signal, and thus cannot be patented by anyone. Only formats can be patented I suppose (e.g. WAV, which relies on PCM), but PCM sequence of bits cannot be. So if I include PCM data in my application package, I don't violate any patent, do I? I'm developing for Android, by the way.


How do you triangulate an arbitrary polygon? I need to triangulate a polygon for rendering in OpenGL ES on Android (no GLU triangulation available). Is there an already known algorithm for polygon triangulation? The polygon can be convex or concave (with no holes).


Problem converting FBX file into XNB I create a Monogame Content Project to convert assets into XNB. For FBX file without texture there is no problem the file is correctly converted and when I load XNB into my project everything is ok. The problem occours when i have associated to fbx file a texture map in this case both FBX and PNG files are converted to XNB but when i try to load these XNB files into my project the following problem occours "ContentLoadException Could not load Models maze1 asset as a non content file!" Note maze1 is the XNB file that was converted from FBX. How can I solve this problem? Thank you in advance


Drawing game app How to use vector graphics instead of bitmap in Android? I have a problem concerning the concept of using vector graphics instead of bitmaps in order to draw on canvas. Usually to draw on canvas we set a bitmap to that canvas and we start drawing pixels on it by simply moving our finger on the screen. However, this method will result very pixelated relatively low quality drawings. It is noteworthy that there are some drawing apps that result in very smooth curves when you want to draw via them. After doing some googling and researching, I knew that there is the new concept of use vector graphics that is being used in order to draw smooth edged drawings on the screen. Look guys, the thing is when I developed my drawing app, I used bitmap (which was already there as an object given by Android) in order to draw cubic Bezier curves. No matter how much I tried to smooth my drawings out, I always get stair like edges. If you are interested in how I developed the curve, please read this. If not, just ignore this bold paragraph In order to draw the cubic bezier curves I simply took the sampled touch points and for every 4 points in these sampled points I calculated the 2 intermediate control points (the ones that the curve never touch) to create a bezier through the sampled points. For the curve to appear, I used bitmap and paint objects given by android. After getting the undesired result (low quality curve), I decided that I want to use vector graphics in order to do the same thing but with a higher quality. The thing is that I am very new to Vector Graphics, that I don't know where to start. My question is simple as is Is there a platform given to me by Android in order to use vector drawable like in the case of bitmap? If not, am I supposed to start this from scratch? I am clueless and any tip or hint from you will be greatly appreciated.


Cross platform, free (for commercial use) C C 2d game library or rendering engine? I need a C C engine that should be really cross platform (or at least windows, android, and iphone). The 2d engine should be written in C or (better) C , should permit the rendering of animated sprites, permit transparency, collisions (but I can integrate box2d for that), rotations (eventually with opengl support to accelerate things), handle tile based games. If it could be a game engine (with support for events actions, scripting and generally have the features needed when developing a 2D game) it would be fantastic. There are a lot of open source free 2d engine out there, but soon or later you find that the documentation is not so good and or the tutorials are not so good (or there are no tutorial at all), the examples are missing (or are too few or are missing) the community is too small and not so supportive the engine doesn't abstract system things enough. That is bad, because you soon find out that there is support for X and Y but not Z. With abstraction, you can use even Z adding system specific code the engine is a game engine but does not have an associated editor. scripting is good, but an editor would save a lot of time I think the engine writers have spent too much time to develop a complex (that will probably fails) compilation tools. It would be useful to have something that define WIN PLATFORM define IOS PLATFORM define ANDROID PLATFORM define UNKNOWN PLATFORM In that way, using an empty implementation of the relevant interfaces, you can simply code what you need 6 . You come to the conclusion that usually there is not a sufficient conceptual separation from what really needs to be abstracted and what can be supposed to be found on almost all systems (e.g. opengl). Ok. The question is, regarding a free, open source 2D rendering engine or a 2D rendering engine 2D game engine for at least iOS and Android in your experience, what would be a good wise choice?


Move Particle to touch position on android I am attempting to make a Particle start moving to the position of my finger on the touch of the screen. I have been using this as the basis so far public void update() deltaX .9 deltaY .9 this.x this.deltaX this.y this.deltaY public void moveTo(int newX, int newY) float dx newX this.x float dy newY this.y float length (float) Math.sqrt(dx dx dy dy) dx length dy length dx 10 dy 10 deltaX dx deltaY dy now while it does move the Particle, it is rarely in the direction of my finger. How can I make the particle have the correct amount of velocity to get to the position of my finger, but no farther? Thanks in advance!


Pinch in zoom in android In My layout parent as Relative layout and then am having Scroll view inside Linear layout now am having child views as Image view Text View Web view and Recycle view and 2 buttons is there now i want to pinch in zoom entire layout please help me out Regards Govardhana


Separate renderng thread in Android (OpenGL ES 2.0) I'm used to mainly working with the Canvas SurfaceView API on Android and have recently been learning openGL ES 2.0 With canvas I know that surfaceView gives you the ability to start a new thread to render on, but it doesn't specifically do this for you, so I was creating a new thread and managing that thread when the app was ended paused etc.... However, from what I've read with glSurfaceView it seems that this is actually done for you automatically? Does this mean I don't actually need to manually create start and manage my own rendering thread? (I'm talking specifically about a rendering thread (which could also be used for logic updates) which is separate the main UI thread. Clarification on this matter would be greatly appreciated.


Randomly spawning bitmaps on cnvas I need some ideas in order to finish algorithm. I'm randomly placing objects (bitmaps) on canvas without overlapping. Time needed to finish it is my problem. When I need to spawn for example 80 of canvas it takes to long. So i was thinking I should make some change when the bitmaps take off 50 of canvas. I want to tell algorithm that it should generate new locations (x,y) where it is free space. My question is How to render new location (x,y) in place where is free space. In summary Things I know object location (x,y) 4 corners (x,y) of object object width, height canvas width, height Any suggestions? Thanks for ideas. Now I've got problem. OK, thanks for ideas. I've got a problem. Link to picture Picture with grid I'm incrementing number of objects in cell after each adding object to grid. In the picture there are 9 possible locations for object. Should I check 9 conditions which tells where I should increment number of objects in cell? I assume that if object is on both cells than I increment number of objects in both cells.


Loading large bitmaps in Android In a few games in the Android Market Google Play Store, huge bitmaps are drawn onto the screen. For example, the game Unicorn Dash and Robot Unicorn Attack I'm assuming the entire island (which is multiple screens long) is loaded into memory. With probably around 10 different islands, how can something like this be possible? I've attempted to do something similar in one of my games, but I always ran out of memory. The bitmaps are (estimated) at around 2000px x 500px at the largest which comes out to about 4mb each uncompressed? If you had 10 of them it would require 40mb of memory! So obviously I'm missing something. Is it plausible to be loading and unloading bitmaps into memory while the game runs? Or is there some other technique that I'm not aware of? EDIT I extracted the images from Robot Unicorn Attack and saw that they were indeed whole images (not split up) of around 2000 500 pixels.


How can i get object from TMXTiledMap and store it in Dictionary variable ? I've been following a tutorial to make tiled map in cocos2d x 3.0 , but i couldnt complete the rest of the tutorial because its for coco2d x 2.0 version, How can i get a value of property that is stored in an object from TMXObjectGroup variable ? and my code is tileMap cocos2d TMXTiledMap create("ground.tmx") ground tileMap gt layerNamed("ground") this gt addChild(tileMap) TMXObjectGroup objects tileMap gt getObjectGroup("objects") ??? sign objects gt getObject("sign") it return ValueMap not Dictionary ?! how can i get a Dictionary of that object so i can get its values ??


How do I make a background fill the whole screen in Libgdx? I'm using this code to set a 800x420 image to be full screen public void show() float w Gdx.graphics.getWidth() float h Gdx.graphics.getHeight() camera new OrthographicCamera(1, h w) batch new SpriteBatch() texture new Texture(Gdx.files.internal("images splashatlas splashatlas1.png")) texture.setFilter(TextureFilter.Linear, TextureFilter.Linear) TextureRegion region new TextureRegion(texture, 0, 0, 800, 420) sprite new Sprite(region) sprite.setSize(0.9f, 0.9f sprite.getHeight() sprite.getWidth() ) sprite.setOrigin(sprite.getWidth() 2, sprite.getHeight() 2) sprite.setPosition( sprite.getWidth() 2, sprite.getHeight() 2) public void render(float delta) Gdx.gl.glClearColor( 1f, 1f, 1f, 1f ) Gdx.gl.glClear( GL20.GL COLOR BUFFER BIT ) batch.setProjectionMatrix(camera.combined) batch.begin() sprite.draw(batch) batch.end() But on real device it looks like this I tried to setSize with different parameters sprite.setSize(1.0f, 1.0f ) Now it's fullscreen, but it's really stretched What is the way to set a background to be full screen? I want it to look like this


What matrix operations do I perform to translate then rotate then translate then rotate? In an android game I want to draw a running leg. To output the thigh I do something like legCX,legCY is the location on screen about which the leg rotates. Matrix m new Matrix() m.postTranslate( legCX, legCY) m.postRotate(legRot) m.postTranslate(legCX,legCY) So, the above translates the 0,0 point over to the point of rotation about which I want to rotate the leg, then it rotates by the amount I want the leg rotated, then it translates 0,0 back to the original origin. I then use that matrix to draw the thigh. It ends up rotated as expected. So far so good. How do I draw the second part of the leg below the knee? It rotates differently than the part of the leg above it and has a center point which moves with the leg above it. I tried the following, but it turns out that the end result is rotation around some single point which doesn't follow the thigh. Matrix m new Matrix() m.postTranslate( legCX, legCY) m.postRotate(legRot) m.postTranslate(0, thighLength) m.postRotate(shinRot) m.postTranslate(0,thighLength) m.postTranslate(legCX,legCY) I suspect that it's probably necessary to do the two rotations in two different Matrix objects and then combine them somehow, but I can't figure out how exactly to do that. I've tried reading the various wikipedia articles on matrix operations, but I'm having trouble finding the sort of operation that I'm trying to perform. EDIT This type of matrix seems to be called a "transformation matrix". Combining multiple operations is called composition of transformations. However, none of the pages on this topic mention how to do a series of translations and rotations. Surely, if you can use a matrix to do rotation about one point, it must be possible to do multiple matrix operations somehow to allow rotation about one point and then an additional rotation around a different point. I've tried looking at pages on skeletal animation, but I can't make head nor tail of what they're talking about. My game won't involve many characters, so I don't need to use a physics engine to do super complex stuff. I just want to do the calculations to draw a character that runs. EDIT Hooray! Thanks dkantowitz! Your answer wasn't quite right, but you got me really close. I've edited your answer to be correct now. The second matrix needed to translate from the origin, not relative to the leg's center of rotation. And, the combined matrix needs to preConcat the shin matrix first and then the thigh's matrix. Thanks!


AndEngine Painting on a canvas rather than composing image from objects I'm trying to implement drawing a line with a finger, similar to a Pencil tool in image editors. From what I've found on AndEngine, it seems like the recommended approach would be to create a line entity on every finger move, from the previous position to the new one. To me it seems rather inefficient to mimic this raster tool by vector graphics apart from creating tens on objects per simple swipe, I guess that all these objects are repainted on each frame which is bad for speed. So I'm looking for a way to do all the painting on a bitmap canvas and draw it as a single entity. Am I missing something conceptually or did I just overlook some method?


Consturcting a sprite bitmap from mutliple partial sprties across sheets First of all, I am not using engine and this is for Android. Bear with me if I use incorrect lingo as I am not experienced in game dev (but I am trying) I am being provided multiple sprite sheets. Each sheet represent the animation of one part of a warrior (ie. Head sheet, arm sheet, leg sheet and body sheet). I intend to basically construct the frames of the warrior using the sprite sheets. I basically thought of the following. For every Frame, I will create a bitmap that consists of the different parts ( by extracting the correct part from every sheet and placing it in the intended x y position). That way every bitmap represent a frame. Is my approach correct? Is there different way recommended way to do this? Please share your advice ( anything but game engine as it is tool late to use) Thank you PS I need the end result to be a bitmap because at the end, I will supplying a bitmap to another function at once every 200ms.


Android Loop Draw Loop How to pull off smooth FPS? I am writing 2D side scrolling bullet hell like game. I am at a point where I struggle to pull off smooth fps. I have separated loop that manages drawing. However I want update the position of sprites from game logic(for bullets). Since there are many bullets, waiting for new set of position significantly decreases the speed in which the drawing loop executes itself. I thought about another approach like this I could upload and stack positions of bullets somewhere. So my drawing method can pull off only the previously completely uploaded data, but doing so it can free itself from worrying about waiting for updating since stacked data is already in there. however lt that approach seems counter intuitive.


Export Blender 3D animation to be played by Android OpenGLES Below code snippet shows the way to export coordinate of bones def export bone matrix(armature, bone, label, file handler) SystemMatrix Matrix.Scale( 1, 4, Vector((0, 0, 1))) Matrix.Rotation(radians(90), 4, 'X') if (bone.parent) Export babylon.write matrix4(file handler, label, (SystemMatrix armature.matrix world bone.parent.matrix).inverted() (SystemMatrix armature.matrix world bone.matrix)) else Export babylon.write matrix4(file handler, label, SystemMatrix armature.matrix world bone.matrix) I have create a 3D character in Blender, and add keyframes in it by transforming in some frames. From the graph editor, you can easily tell the all displacement of transformation translate, rotate, scale are all measured with respect to the original value in frame 0. Is it possible to write OpenGL in Android to animate the same 3D animation in Blender? I'd like to transform the 3D character translate, rotate in each frame according to the displacement value exported from Blender. Below lists the python function to export translate, rotate displacement in each frame def get bone action location(action, bonename, frame 1) loc Vector() if action None return(loc) data path 'pose.bones " s" .location' (bonename) for fc in action.fcurves if fc.data path data path loc fc.array index fc.evaluate(frame) return(loc) def get bone action rotation(action, bonename, frame 1) rot Quaternion( (1, 0, 0, 0) ) the default quat is not 0 if action None return(rot) data path 'pose.bones " s" .rotation quaternion' (bonename) for fc in action.fcurves if fc.data path data path and frame gt 0 and frame 1 lt len(fc.keyframe points) rot fc.array index fc.evaluate(frame) return(rot) Or I need to transform the meshes with vertex group controlled by root bone by the transform matrix SystemMatrix armature.matrix world bone.matrix? And for those controlled by child bones by the matrix in terms of (SystemMatrix armature.matrix world bone.parent.matrix).inverted() (SystemMatrix armature.matrix world bone.matrix)?


Function call to AndroidJabaObject to an instance of com.prime31.PlayGameServicesPlugin causes the application to stop responding Using Prime31 PlayGameServices attempting to call 'authenticate' causes the game to stop responding very soon after. There isn't much I can show as there's literally no logs showing up in logcat. Is there any way I can debug this? I did notice 'enableDebugPrints' on the AndroidJavaObject was 'false' and I don't know how to set it to true, which might help with prints? I've tried catching an exception but that hasn't worked.


android game change background image at every level? I want to be able to have a different background image at each level of my game. Presently I have only one. There is no layout folder shown in Android Studio and all info I have searched shows how to do it with the layout xml. I have found this code in GameLayer.java of my game. Actually I am reskinning the game so everything is already there, I just need to know how to have different bg images now. Code background CCSprite bg new CCSprite("game game bg.png") bg.setPosition(G.displayCenter()) addChild(bg)


how to render small texture on another texture? can anybody help me to render small texture on another texture. i.e I have one background image, when user touches on the screen it should draw small(circle or any object) on it. can anybody suggest me good tutorial to starts with it?


Using LibGDX within Android Fragment I want to use LibGDX with Android, but instead of modifying my Activity to extend AndroidApplication I want my to render my graphics inside Android Fragment The problem is that my class already extends Fragment, so I can't make it extend LibGDX AndroidApplication (Multiple Inheritance) is there any workaround for this ? Thanks


Pass a single boolean from an Android App to a libgdx game I'm writing an Android application that needs to pass a single boolean into an Android game that I am also writing. The idea is that the user does something in the App which will affect how the game operates. This is tricky with LIBGDX since I need to get the bool value into the Java files of the game, but of course, you can't call Android specific things from within LIBGDX's main Java files. I tried using an intent but of course the same problem persists. I can get the boolean into the MainActivity.Java of the android output of the game, but can't pass it along any further since the android output and the main java files don't know about each other. I have seen a few tutorials that explain how to use set up an interface in the LIBGDX java files that can call android things. This seems like wild overkill for what I want to do. I've been trying to use Android's Shared Preferences with LIBGDX's Gdx.app.getPreferences, but I can't make it work. Anyhelp would be MUCH appreciated. I've set up two hello world applications. One is a standard Android app, with a single button that is supposed to write "true" into the shared preferences. The other is a standard LIBGDX hello world that is supposed to do nothing but check that bool when launched and if true display one image to the screen, if false, display a different one. Here's the relevant bit of the Android code import android.preference.PreferenceManager public void onClick(View view) if (view this.boolButton) final String PREF FILE NAME "myBool" SharedPreferences preferences getSharedPreferences(PREF FILE NAME, MODE WORLD WRITEABLE) SharedPreferences.Editor editor preferences.edit() editor.putBoolean("myBool", true) editor.commit() And here's the relevant bit of the code from the LIBGDX main file Preferences prefs Gdx.app.getPreferences("myBool") boolean switcher prefs.getBoolean("myBool") if(switcher true) texture new Texture(Gdx.files.internal("data worked512.png")) prefs.putBoolean("myBool", false) else texture new Texture(Gdx.files.internal("data libgdx.png")) Everything compiles fine, it just doesn't work. I've spent HOURS googling trying to find a way to pass this single boolean from android into a LIBGDX main and I'm totally stumped. Thanks for your help.


2D game physics, doing it right I have a ball that you can make jump, I have a sneaking suspicion I'm doing this wrong. It works now, to the extend that gravity pulls the object down toward the ground, but I'm having trouble manipulating the speed of the object. What this is, is a ball jumping and falling towards the ground. I have another function called "jump" that just adds a value to it's yVel I can increase gravity, and it falls faster. I can increase the jSpeed speed, and it'll rise up longer, but not faster But I can't get it to do everything faster. It just looks painfully slow, which may or may not be because of my emulator running at 11 fps, on average. Is it just my emulator, or is it something on my end? float time elapsedTime 1000F if (speed lt maxSpeed) speed speed accel if(mY mVelY lt Panel.mHeight) 0,0 is top left mVelY (speed) if (!(mY height gt Panel.mHeight)) mVelY mVelY gravity mX (float) (mX (mVelX time)) mY (float) (mY (mVelY time))


How to scroll background image Android App Basically, I have a main menu, and I would like the background image to scroll (parallax I believe is the term? Like the Angry Bird's title screen background). However, I'm used to just having a variable iterate (x ) and setting that as the x value so the image scrolls. So is there any way to confer variables and such between xml and my java files so I can use iteration? Or can I skirt this completely somehow?


Progress bar in Super Hexagon using OpenGL ES 2 (Android) I'm wondering how the progress bar in Super Hexagon was made. (see image, top left) Actually I am not very sure how to implement a progress bar at all using OpenGL ES 2 on Android, but I am asking specifically about the one used in Super Hexagon because it seems to me less straightforward obvious than others the bar changes its colour during game play. I think one possibility is to use the built in Android progress bar. I can see from some Stackoverflow questions that you can change the default blue colour to whatever you want, but I'm not sure whether you can update it during the game play. The other possibility I can think of for implementing a progress bar is to have a small texture that starts with a scale of 0 and that you keep scaling until it reaches the maximum size, representing 100 . But this suffers from the same problem as before you'll not be able to update the colour of the texture during run time. It's fixed. So what's the best way to approach this problem? I'm assuming he didn't use a particular library, although if he did, it would be interesting to know. I'm interested in a pure OpenGL ES 2 Android solution.


Mobile Game Google Play no supported dev country and capitalization alternatives (no policies violation or suspicious behavior)? If my country is listed as not supported as a developer country (for payments), this mean developer can upload app but no make any money with it. If I understood correctly, not even in app ads are allowed (I have my doubts about ads because It has no sense they aren't allowed). Is there any mean, friendly with Google policies, to monetize the app? For example Desktop version is free to play. Optional content requires a payment. Mobile version is free to play. Optional content requires you to log in with same account you used to purchase it on desktop. No ads and no in app purchase in mobile version. Is the above scenario OK? Which are the alternatives? Notes To me, no ads has no sense. After reading Developer Console documentation I assumed that ads are OK but after doing some research It turns on that many people thinks that ads are not OK.


How do I stop overlapping shapes when collision detected in AndEngine? I am making a very simple demo in AndEngine in which I have three rectangles rect1, rect2 and rect3 in an ArrayList. I register onAreaTouch as follows Override public boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) switch (pSceneTouchEvent.getAction()) case TouchEvent.ACTION DOWN this.setScale(1.0f) this.mGrabbed true break case TouchEvent.ACTION MOVE if (this.mGrabbed) for (int i 0 i lt rectangles.size() i ) int index rectangles.indexOf(this) if (i ! index) if (this.collidesWith(rectangles.get(i))) should not overlap else this.setPosition(pSceneTouchEvent.getX() 90, pSceneTouchEvent.getY() 90) break case TouchEvent.ACTION UP if (this.mGrabbed) this.mGrabbed false break return true Rectangles are now overlapping with one another. I don't want this behavior, instead I'd like it if rect1 collides with rect2 then rect1 should not move further, but can move in any other direction. Cross Posted here


Game with changing logic I'm planing to develop a puzzle like mobile game (android ios) with a different logic for each puzzle. Say, for example one puzzle could be a Rubik's cube and another one a ball maze. Many more new puzzles will appear during the life of the game, and I want the users to be able to play those new puzzles. The standard way for managing this would be through application updates. Each time a new puzzle or bunch of puzzles appear, create a new update for the app that the user can download. However, I would like to do it in a more transparent way. When a new puzzle appears, the basic info of the puzzle would be displayed in the app menu, and the user would be able to play it by just clicking it. What comes to my mind is that the app would automatically download a .dll or .jar and inject it in the application at runtime. Is that even possible? Are there any restrictions from the OS? Is there a better way for solving it? Thanks alot


Creating an Android port of old PC games I have seen some decent ports to Android of old PC games. The graphics and game engines are the same, and all that seems to have been changed was the key mapping, and adding touch screen events. I want to play around with learning how to do this, but I have done a lot of searching online, and haven't been able to find a general overview of how to begin. What would I to do, or at least, where can I learn how, to take an old, existing PC game, and port it to Android, only changing the key mappings, and add touch screen support? From what I have seen, a native app is created to launch the game, and then from that point, you're just playing the original game. And I'm not referring to playing games through emulators. This is something that would be able to be downloaded from the Google App store. And I would first get rights to do so, of course, unless it was, or has been released as, an open source game.


Profiling the GPU of a tablet We are working on a tablet game in Unity Pro (for the first time). Unity's profiler works great for probing the CPU, but the tablet's GPU isn't supported in the profiler, so we have no idea where the rendering bottlenecks are. Are there any other means of profiling the GPU of an android tablet? (We are working with a Samsung galaxy tab 2 10.1 ) How do other mobile devs do this? We are basically looking for any ways of getting info from the gpu as we're running the game. Benchmarking software wouldn't help we don't need benchmark scores. Cheers!


Different kinds of collision detection in Android Are there any other ways to detect collision between two objects besides the bounding rectangle method and downloading another class to put into Android?


Google Play 3rd Party Payment Allowed? Does Google allow 3rd party payment solutions to be enabled in developers' apps (i.e., Paypal, carrier SMS payment), especially in countries where Google Checkout isn't present? Or does this violate any policy of theirs? Please reference the policy in your answer if you can, and thanks in advance to all who answer.


How do I implement a subclass of CCSprite? Can someone tell me how to subclass CCSprite on Android? I've added this snippet of code into my CharacterSprite public static CharacterSprite sprite(String fileName) return new (CharacterSprite)CCSprite( CCTextureCache.sharedTextureCache().getTexture(fileName) ) But getTexture() can't be found. Can someone help me please?


Access Android Camera.Parameters from Unity I would like to access the android defined class Camera.Parameters.getHorizontalViewAngle() from a Unity3D c script but my java skills are limited. Can anybody offer any help? I have this code using UnityEngine if UNITY ANDROID public class CameraParametersAndroid public static float HorizontalViewAngle get protected set public static float VerticalViewAngle get protected set public static int numCameras get protected set static CameraParametersAndroid() AndroidJavaClass unityPlayerClass new AndroidJavaClass ("com.unity3d.player.UnityPlayer"), cameraClass new AndroidJavaClass ("android.hardware.Camera"), cameraParametersClass new AndroidJavaClass ("android.hardware.Camera.Parameters"), cameraInfoClass new AndroidJavaClass ("android.hardware.Camera.CameraInfo") AndroidJavaObject currentActivity unityPlayerClass.GetStatic lt AndroidJavaObject gt ("currentActivity") object args currentActivity AndroidJavaObject camera cameraClass.CallStatic lt AndroidJavaObject gt ("getCamera", args) if (camera ! null) AndroidJavaObject cameraParameters camera.Call lt AndroidJavaObject gt ("getParameters") numCameras camera.Call lt int gt ("getNumberOfCameras") HorizontalViewAngle cameraParameters.Call lt float gt ("getHorizontalViewAngle") VerticalViewAngle cameraParameters.Call lt float gt ("getVerticalViewAngle") else Debug.LogError(" CameraParametersAndroid Camera not available") endif but not even the getNumberOfCameras() call works.


How to fix overly blurred texture image in unity? so, I'm not sure what caused this, let image below do the explanation How to fix the overly blurred texture in unity? It's so frustrating, since I can't get it right, because when I tried it in LibGDX, the image looks good (Well, it's not exactly a same image, but similar). They both screenshot from android device (Samsung Galaxy Note 3 Neo) Thanks P.S. It's a pixel art Edit, here's the screenshot of my relevant inspector window And here's the alpha ingame screenshot


What would be the simplest way to create a 2D board game for Android? I'd like to create a very simple 2D board game for Android, it would be a concept mockup so I can see how the game works out. Let's for the sake of this question that it's a clone of Othello board game with score display, clickable game pieces spots on a square grid and some animations. I have to choose from these approaches do it all myself, draw the game on Canvas I've done one game this way, and it took some time to code it. Then, that was a casual action game and the animations would be hard to implement. implement it with Android widgets I'd use RelativeLayout TableLayout the pieces will be ImageViews this way I'd get the animations for free with Android tween animations. This would be the quickest of all solutions timewise, but I might run into some problems that may be a deal breaker. use AppInventor it may do the task, but don't know anything about it, this approach would also require some time to go through the tutorials. use a proper game engine. That will take time to learn how to use it, which I view as the biggest disadvantage as I do mostly business apps, not games. And I don't know which one to choose from. I really only want to throw this together in the shortest amount of time to see how it works, so I don't want to invest a lot of time to do it in the most "correct" way that I'll do later if the concept works.


Continous horizontal animation of objects We have to continously animate objects from right to left in a panel. The player has to pop the first object. If the first object could not be destroyed by the player and it reaches the left border of the panel, the game is over We have experimented by implementing this using Android widgets. The panel is a HorizontalScrollView and the objects are ImageViews placed in a LinearLayout. The HSV is continously scrolled using ObjectAnimators and when the first object is popped by the player, a new object is added to the LinerLayout. This solution has some problems the LinearLayout gets infinitely big, adding new objects to our model and layouting them causes small hiccups and the animator speed is changable through the Android developer options which makes implementing high score pointless. What would be a "standard" solution for games with an infinite animation where constant animation speed and good performance are critical? Is using native widgets possible with these requirements or should we throw everything away and use a Canvas?


How to move a 2d sprite to a target location while avoiding obstacles? How can I get a 2d sprite to move to a position clicked on the screen, without bumping into other objects? I'm programming in java using the android API library I have created a surface view and loaded my sprites as a bitmap object.


Where do I find the code for the open source game Warmux? I found an open source game called Warmux but I don't know how to get the code. I downloaded the file from here, but I don't know where to go from there. I didn't find any instructions on how to use the source. While I was looking for it, I came across something called git and repo. Do I use that?


Mismatch cordinate system of unity and android I am new to unity3d, Right now i am adding a cube as game object with coordinate 0,0,0 But when i run it on android device Iam facing 2 problem a) Coordinate system of unity3d are different from coordinate system of device, For device top left is 0,0 but for unity center of the screen is 0,0. How to fix that mismatch or i need to multiply with some factor to make it work. b) Iam moving the object on x axis this is what iam doing for moving object on x axis if(xback) xaxis (2 Time.deltaTime) if(xaxis gt Screen.width 2) xback false else if(!xback) xaxis (2 Time.deltaTime) if(xaxis lt (Screen.width 2)) xback true Vector2 temp transform.position temp.x xaxis temp.y yaxis transform.position temp But the problem iam facing is as soon as my xaxis equals 9 it touches the right of screen and then it get out of screen, so iam little bit confuse is unity3d pixel system is different from the one on device, because iam moving the cube by one pixel every time but movement is not equal to 1 pixel of device. so i want to know is pixel system of unity is different from pixel system of android or iam doing something wrong.


Separate parts of a game engine I'm pretty new in developing videogames. By now I only used SDL with C C to create games. I'm currently learning OpenGL and I realized that to be fluid and easy to maintain the code must be logically separated. Since I want to use OpenGLES on iOS and Android I was wondering how the engine must be imagined in a technical way, some questions came up Do I have to separate input update functions from draw functions in different threads? Is there only one proper way to think a game engine loop? What kind of assets should I use to create a 3D game using openGl ES to get better performance? EDIT I figured that I had more questions lacking of answers reading the links DMGregory refered me to. I'll keep reading it till I fully understand it and than ask for the good questions. Thanks a lot.


I am looking for a simple tutorial for sprite animation in android Possible Duplicate What 39 s the best way to create animations when doing Android development? I saw a couple of them on the internet but they are beyond my level of understanding ...I need to start with basics in a simpler way if possible...can anyone guide me to some good online resources for this


Unregister touch sprite when background scene is zoom and moving I am new to game development on Android, I use AndEngine framework. I'm developing an application with isometric view, at this time I had problems with touchlistener area on the sprite in the scene background, I intend to turn off the touch function on the sprite when the background is shifted, so as not to disturb the background when being moved. How it works?


Is there a way to setup an Android game project with a large assets during development to allow for fast testing iteration? I'm working on an Android port of an iOS game at the moment. I am using the Android NDK only (android native app glue) in Eclipse (CDT ADT). I am using the Android emulator, API 15 (but we are targeting API9 ) as we do not yet have an Android device. The game has about 200 300mb of assets and I'm unsure of how to include them properly or how to get into a fast testing debugging cycle with assets attached. As it stands I am linking the assets folder in my Android project to the resources folder that contains the game assets. This works but the problem lies in the fact that when I build it takes about 9 10 minutes for the 200mb .apk file to be installed onto the emulator. This is simply unacceptable when things need to be tested quickly. If I strip the assets out of the project, it installs very quickly. Because of this I am stripping out the bulk of the assets at the moment to do my testing but when it comes to the long run I need a better solution. My question, is there a way to setup an Android game project with a large asset collection during development to allow for fast testing iteration? E,g. fast deployment or updating of .apk to allow for quick testing.


Side scroller terrain generating and scrolling I am creating a side scroller game for android devices but I encountered a problem. The game looks like this The black dot is a player. Player's x doesn't change, only the y does. When the player collides with the green terrain the game is over. I have a problem with how should I handle a map storing and drawing. What I did is store the level file in a large png file (like 1k px height and 20k px width), same with the collision mask (basically the same file but with black colored collision terrain). I guess this approach isn't to good beacuse I was getting the out of memory exceptions due to large bitmap on some devices. I've learned that some people use tile based maps but with this sinusoidal map it could be to hard for me to do small tiles and collsion masks for them. I want the map to be as long as possible and if it's possible random generated but I don't know what's the best approach to do this with this kind of terrain and how to handle pixel perfect collisions when doing so.


How do you implement Libgdx touchDragged? I'm a beginner in Java and in Game Development too. I was following some tutorials, but now I'm stuck on implementing a touchDragged listener using libgdx, Can anyone suggest how to drag the image when the user touches it and then move with the users finger position? I am using both a stage and an actor. I want to catch a touchDragged event on an actor. Thanks. public void create () Texture.setEnforcePotImages(false) stage new Stage() Gdx.input.setInputProcessor(stage) create a SpriteBatch with which to render the sprite batch new SpriteBatch() load the sprite's texture. note usually you have more than one sprite in a texture, see see TextureAtlas and see TextureRegion . texture new Texture(Gdx.files.internal("ball3.png")) Skin skin new Skin() skin.add("default", new Label.LabelStyle(new BitmapFont(), Color.WHITE)) skin.add("ball", texture) Image sourceImage new Image(skin, "ball") sourceImage.setBounds(50, 125, 100, 100) stage.addActor(sourceImage) create an link OrthographicCamera which is used to transform touch coordinates to world coordinates. camera new OrthographicCamera() we want the camera to setup a viewport with pixels as units, with the y axis pointing upwards. The origin will be in the lower left corner of the screen. camera.setToOrtho(false) public void render () Gdx.gl.glClear(GL10.GL COLOR BUFFER BIT) stage.act(Gdx.graphics.getDeltaTime()) stage.draw() Table.drawDebug(stage) if a finger is down, set the sprite's x y coordinate. if (Gdx.input.isTouched()) the unproject method takes a Vector3 in window coordinates (origin in upper left corner, y axis pointing down) and transforms it to world coordinates. camera.unproject(spritePosition.set(Gdx.input.getX(), Gdx.input.getY(), 0))


OpenGL 2.0 Android Scrolling Horizontally and Vertically I am new to OpenGL2.0 in Android. How can I scroll the GLSurfaceView both horizontally and vertically?


AndEngine GLES2 getting Black screen on emulator 4.1 I'm new in andengine . I create following code public class MainActivity extends BaseGameActivity static final int CAMERA WIDTH 800 static final int CAMERA HEIGHT 480 public Font mFont public Camera mCamera A reference to the current scene public Scene mCurrentScene public static BaseActivity instance public EngineOptions onCreateEngineOptions() instance this mCamera new Camera(0, 0, CAMERA WIDTH, CAMERA HEIGHT) return new EngineOptions(true, ScreenOrientation.LANDSCAPE SENSOR, new RatioResolutionPolicy(CAMERA WIDTH, CAMERA HEIGHT), mCamera) Override public void onCreateResources(OnCreateResourcesCallback arg0) throws Exception mFont FontFactory.create(this.getFontManager(),this.getTextureManager(), 256, 256,Typeface.create(Typeface.DEFAULT, Typeface.BOLD), 32) mFont.load() Override public void onCreateScene(OnCreateSceneCallback arg0) throws Exception mEngine.registerUpdateHandler(new FPSLogger()) mCurrentScene new Scene() Log.v("Scene","enter") mCurrentScene.setBackground(new Background(0.09804f, 0.7274f, 0.8f)) return mCurrentScene Override public void onPopulateScene(Scene arg0, OnPopulateSceneCallback arg1) throws Exception TODO Auto generated method stub I got code on sites there is returning scene but in AndEngine GLES2 in method onCreateScene() there is no return scene ... so my First run is BLACK .. any suggestion )


What are the hidden cost while deploying game with Unity3D? I just started learning Unity3D. I created a small 2D game, and I want to host for Windows, iPhone, iPad, Android, Windows 8, Xbox and even on websites. I created it using free Unity3D editor. Now I want to host all these game on my website. I will purchase iPhone, Android, and Windows 8 developer accounts. Apart from that, do I need to purchase any license in order to deploy the game on my website? I can lots of license here https store.unity3d.com If I later purchase Unity Pro, then do I need to purchase any extra licenses? And will that Unity logo always appear while starting the game?


How do I implement an AutoParallax Background in AndEngine GLES1? I'm using AndEngine GLES1. In my game, I use AnalogOnScreenControl to move a sprite and when it moves vertically, the background image also moves vertically. I want to do something like this that is in this link. I know that AutoParallax Background or BackgroundParallaxScrolling may be used. But how do I use it in my game?


Libgdx Android 2D RPG game optimizing time consuming when switching from Map to Map I am completely new in game developing and even more new in the use of Libgdx. So far I have successfully done great thing on my game project thanks to all the advices I could have gathered on this forum. I would need your brilliant help once again. Context I have several TiledMaps and on each one of them, there is an object layer named trigger . This layer contains objects with name corresponding to an animation in my code. All the animations of this layer are loaded thanks to TextureRegion.split. Issue When I load a new map or for instance a new floor in a house, the time spent to preload the animations of this new floor is too high. Here are the tests of the time spent to load 3 animations of 4 frames each and dimension 64x64 pixels (corresponding to 16 tiles) 0.7 sec on a Samsung Galaxy S6 (this is far too much for a powerful device and only 3 animations). 1.1 secs on a 4 years old Samsung Galaxy Note2. 2.2 secs on a 4 years old Sony Xperia M (pretty old and powerless though). Here is the logic of my gamescreen class Possible solutions 1) Preload all the animations of the game in the OnCreate and loading screen Far from being a good idea with my current game architecture. I expect having 300 animations (with the fighting ones, cutscenes ). With above tests, it would take 3 minutes on a powerful device as the Samsung Galaxy S6 for instance. 2) Preload new map animations in another Thread when the user is approaching a teleport trigger It will be a good idea on device with good double core CPU but I am afraid of a big FPS drop on single core device or not good double core CPU (like double 600Mhz ones). 3) Label a group of animations with a level flag and preload them only if level flag changes For instance Level1 flag for 2 exteriors which contains 10 interiors (houses for example) Level2 flag for 1 exterior and 6 interiors. On that example, it will just require to preload and having a loading screen when we change of level but with the current architecture of my game code, it will still be a lot of time consuming. If there is 20 animations and 20 fights animation per level it will be still 40 animations which represent about 7 9 sec on Samsung Galaxy S6 without including sounds loading 4) Refactor all my code and include logic I was not aware of. I think it is the best option here. I heard of AsseManager for instance but I have no idea how it is working with Animation object. Thank you all for your help in advance!


Open GL ES 2.0 Android Texture,Shader, etc... loading I have gotten texture's to load along with shader's however it seems that I can only create shaders and textures in onSurfaceCreated in my implementation of the render interface. Is this truly the only place one can create shaders, textures, ...?


Are there any comprehensive resources for learning Google's PlayN framework? How do I learn to use the PlayN framework? The Getting Started page is not enough. I have been searching for some resources to learn PlayN but am unable to find any. (P.S. Does PlayN require GWT?)


What size should i use for my game design? i am currently working on a android game by using libgdx and i am designing graphics with ps for it. I want my game looks the same quality for different screen sizes but i dont know in which size should i design my graphics. For example if i design the graphics 200x200 size and for a bigger screen i should make it bigger by resizing with code. But this will demage the graphic which is something i dont want. What i think is to make a much bigger graphic then shrink for ever screen sizes. is that right approach to do? Or there is a better way. And also if this approach what size should i use for portrait game. Like 800 width is good? Thanks for ur answers.


Transparency in GLSurfaceView I'm new in game development. I have a view using GLSurfaceview and call in MainActivity. I want to make transparent that view. I have tried setZOrderOnTop() method in MainActivity and glClearColor() but both are not working. public class RubikActivity extends Activity cubeView cv GLSurfaceView gv SuppressLint("NewApi") Override public void onCreate(Bundle savedInstanceState) super.onCreate(savedInstanceState) setContentView(R.layout.activity) cv (cubeView) findViewById(R.id.cubeView) cv.initialize(PreferenceManager.getDefaultSharedPreferences(this)) cv.requestFocus() cv.setFocusableInTouchMode(true) cv.setEGLConfigChooser(8, 8, 8, 8, 8,0) cv.setRenderer( new CubeRenderer(getApplicationContext(), font, mWorld, rCube, mMenu, prefs) cv.getHolder().setFormat(PixelFormat.TRANSLUCENT) cv.setZOrderOnTop(true) cubeView.java public cubeView(Context context, AttributeSet attrs) super(context, attrs) font new TextureFont(getContext(), R.drawable.roboto regular, "roboto regular dims.txt") mWorld new GLWorld() public void initialize(SharedPreferences prefs) rCube new Rubec(mWorld, prefs.getInt("dim", 3)) mMenu new CubeMenu(rCube, font) renderer new CubeRenderer(getContext(), font, mWorld, rCube, mMenu, prefs) rCube.setRenderer( renderer) mWorld.setRubeCube(rCube) setRenderer( renderer) getHolder().setFormat(PixelFormat.TRANSLUCENT) setZOrderOnTop(true) cubeRenderer.java Override public void onDrawFrame(GL10 g) GL11 gl (GL11)g surfaceSetup(gl) gl.glClearColor(1.0f, 1.0f, 1.0f,0) gl.glClear(GL11.GL COLOR BUFFER BIT GL11.GL DEPTH BUFFER BIT) gl.glDisable(GL11.GL DEPTH TEST) gl.glMatrixMode(GL11.GL MODELVIEW) gl.glShadeModel(GL11.GL SMOOTH) gl.glLoadIdentity() GLU.gluLookAt(gl, 0f, 0f, 7f, 0f, 0f, 0f, 0f, 1f, 0f) gl.glGetFloatv(GL11.GL MODELVIEW MATRIX, modelViewMatrix, 0) if(!worldBoundsSet) getWorldBounds() gl.glColor4f(0.5f, 0.5f, 0.5f, 1) gl.glEnable(GL11.GL DEPTH TEST) gl.glEnableClientState(GL11.GL COLOR ARRAY) gl.glEnableClientState(GL11.GL VERTEX ARRAY) gl.glEnableClientState(GL11.GL TEXTURE COORD ARRAY) menu.draw(gl) mWorld.draw(gl) gl.glDisableClientState(GL11.GL TEXTURE COORD ARRAY) gl.glDisableClientState(GL11.GL COLOR ARRAY) gl.glDisableClientState(GL11.GL VERTEX ARRAY) gl.glFlush() I want the white color to show as transparent background in my layout. I am already use glClearColor(0,0,0,0) which shows as a black color and already use in xml file lt com.rtpl.rubikgame.cubeView android id " id cubeView1" android layout width "match parent" android layout height "match parent" android layout weight "1" android background " 000000" android windowIsTranslucent "true" gt lt LinearLayout gt but nothing happened when we use glClearColor(0,0,0,0) it shows this


Amazon GameCircle Integration I'm trying to integrate Amazon GameCircle and I have been able to successfully initialize GameCircle in my app, but the problem is when I click on the button that displays achievements, the GameCircle achievement list comes up but it says "You have unlocked 0 of 0 achievements". Same happens with leaderboards i.e there are no leaderboards for this app. I have created a Leaderboard and a few achievements on the online developer portal for Amazon but they don't show for some reason. Can someone help me with this. Any links resources that help with integrating GameCircle will be appreciated. Thanks.


How can I draw crisp per pixel images with OpenGL ES on Android? I have made many Android applications and games in Java before, however I am very new to OpenGL ES. Using guides online, I have made simple things in OpenGL ES, including a simple triangle and a cube. I would like to make a 2D game with OpenGL ES, but what I've been doing isn't working quite so well, as the images I draw aren't to scale, and no matter what guide I use, the image is always choppy and not the right size (I'm debugging on my Nexus S). How can I draw crisp, HD images to the screen with GL ES? Here is an example of what happens when I try to do it And the actual image Here is how my texture is created get id int id 1 gl.glGenTextures(1, texture, 0) id texture 0 get bitmap Bitmap bitmap BitmapFactory.decodeResource(context.getResources(), R.drawable.ball) parameters gl.glBindTexture(GL10.GL TEXTURE 2D, id) 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 LINEAR) 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) GLUtils.texImage2D(GL10.GL TEXTURE 2D, 0, bitmap, 0) crop image mCropWorkspace 0 0 mCropWorkspace 1 height mCropWorkspace 2 width mCropWorkspace 3 height ((GL11) gl).glTexParameteriv(GL10.GL TEXTURE 2D, GL11Ext.GL TEXTURE CROP RECT OES, mCropWorkspace, 0)


Android cocos2d removing a sprite after animation I have an object going across the screen with an animation using the following code CCSpriteFrameCache.sharedSpriteFrameCache().addSpriteFrames("ninjastar.plist") CCSpriteSheet projectileSheet CCSpriteSheet.spriteSheet("ninjastar.png") addChild(projectileSheet) ArrayList lt CCSpriteFrame gt projectileSprites new ArrayList lt CCSpriteFrame gt () for (int i 1 i lt 4 i ) projectileSprites.add(CCSpriteFrameCache.spriteFrameByName("ninjastar" i ".png")) CCAnimation projectileAnimation CCAnimation.animation("throw", 0.1f, projectileSprites) CCSprite projectile CCSprite.sprite(projectileSprites.get(0)) CCAction projectileAction CCRepeatForever.action(CCAnimate.action(projectileAnimation, false)) projectile.setPosition(CGPoint.ccp(winSize.width (projectile.getContentSize().width 2.0f), actualY)) actionMove CCMoveTo.action(actualDuration, CGPoint.ccp( projectile.getContentSize().width 2.0f 320, actualY)) projectileSheet.addChild(projectile) projectile.setTag(1) projectiles.add(projectile) CCCallFuncN actionMoveDone CCCallFuncN.action(this, "spriteMoveFinished") CCSequence actions CCSequence.actions(actionMove, actionMoveDone) projectile.runAction(actions) projectile.runAction(projectileAction) I'm using "spriteMoveFinished" to remove the sprite once it is done going across the screen public void spriteMoveFinished(Object sender) CCSprite sprite (CCSprite)sender projectiles.remove(sprite) sprite.stopAllActions() removeChild(sprite, true) However, when the sprite gets to the end of the screen it just stays stuck there on the last frame. How do I remove it completely?


Can I make a flash file I developed to run on Androis IOS? I've created a simple game using ActionScript 3.0 and Adobe Flash CS5. Is there any way to run this creation on Android Apple IOS ? (Even if so, I still have no Idea how to work with "touch" interfaces, just want to know if such thing is possible first.)