_id
int64
0
49
text
stringlengths
71
4.19k
7
How to rotate a sprite on circle in android using Libgdx Dear Fellow Game Developers i am newbie to Android Game Development,i like to know how we can develop a sprite rotate in circle on android,with help of libgdx, i do have a image in assets folder,cant load it in emulator,following code is using to load image in texture texture new Texture(Gdx.files.internal("1325603701 wordpress.png"))
7
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).
7
Horizontal scroll only part of the view I would like to know the best way on how to implement horizontal scrolling to only part of the view and vertical scrolling to complete view. I was able to achieve horizontal and vertical scrolling to the complete view. If I have to use layers can you explain a bit more on how to achieve layers and draw shapes on those layers separately. I tried using two different SurfaceViews it does not work. Here is my code for scrolling horizontally. Override public void onDrawFrame(GL10 unused) GLES20.glClear(GLES20.GL COLOR BUFFER BIT) Set the camera position (View matrix) Matrix.setLookAtM(mVMatrix, 0, mXOffset, mYOffset, 3, mXOffset, mYOffset, 0f, 0.0f, 1.0f, 0.0f) Calculate the projection and view transformation Matrix.multiplyMM(mMVPMatrix, 0, mProjMatrix, 0, mVMatrix, 0) mGraph.draw(mMVPMatrix) mLine.draw(mMVPMatrix) msquare.draw(mMVPMatrix)
7
Desaturate texture using mask in OpenGL 2 I have a very large texture i am using as background and i want to apply a filter to a small part of it, the "small part" is defined by the alpha layer of another texture i have (which is still RGB8888), i am not sure what's the best approach to do this. I'd like to keep the same (very simple) shader i am already using for other sprites, which is similar to the basic one, i.e. precision mediump float uniform sampler2D uTexture varying vec2 vTexPos void main() gl FragColor texture2D(uTexture, vTexPos) So, i have some questions How can i apply my filter only to "masked" region and avoid drawing others? Do i have any performance loss if i draw the big texture again once loaded to just apply it to a small portion of the screen? Can i map a second texture to the shader and use something like "if uTexture2 ! null" apply as mask? Will this give me any performance gain compared to using a second shader? Both textures are premultiplied, how should i handle alpha masking? What id like to do is something like this (original, mask, result) My environment is Android 4.0, im using GLES20.
7
How to rotate a sprite using multi touch with AndEngine? I am new to Android game development. I am using AndEngine GLES 2. I have created a box with a sprite. This box is now draggable by using the code below. It works fine. But I want multi touch on this I want to rotate the sprite with two fingers on that box, and to keep it draggable. I've no idea how do do that, which way should I go? final float centerX (CAMERA WIDTH this.mBox.getWidth()) 2 final float centerY (CAMERA HEIGHT this.mBox.getHeight()) 2 Box new Sprite(centerX, centerY, this.mBox, this.getVertexBufferObjectManager()) public boolean onAreaTouched(TouchEvent pSceneTouchEvent, float pTouchAreaLocalX, float pTouchAreaLocalY) this.setPosition(pSceneTouchEvent.getX() this.getWidth() 2, pSceneTouchEvent.getY() this.getHeight() 2) float pValueX pSceneTouchEvent.getX() float pValueY CAMERA HEIGHT pSceneTouchEvent.getY() float dx pValueX gun.getX() float dy pValueY gun.getY() double Radius Math.atan2(dy,dx) double Angle Radius 360 Box.setRotation((float)Math.toDegrees(Angle)) return true
7
Sound isn't playing in Game Maker Studio when interacting with an object I'm making a small game in Game Maker Studio. I have a piece of code that moves the player to the next room when he touches obj star this works. I have another line that tries to play sound collect when the star is touched, but the game just moves to the next room without playing the sound. This code is in the Step event My code is as follows Get the player's input key right keyboard check(vk right) key left keyboard check(vk left) key jump keyboard check pressed(vk space) React to inputs move key left key right hsp move movespeed if (vsp lt 10) vsp grav if (place meeting(x,y 1,obj wall)) vsp key jump jumpspeed Horizontal Collision if (place meeting(x hsp,y,obj wall)) while(!place meeting(x sign(hsp),y,obj wall)) x sign(hsp) hsp 0 x hsp Vertical Collision if (place meeting(x,y vsp,obj wall)) while(!place meeting(x,y sign(vsp),obj wall)) y sign(vsp) vsp 0 y vsp Sounds if (place meeting(x hsp,y,obj star)) sound play(sound collect) Next Level if (place meeting(x hsp,y,obj star)) room goto next()
7
How can I use ParallaxBackground in AndEngine? I'm new to game development with AndEngine. I want to add ParallaxBackground but I don't know how to change the background when the player moves. I'm using arrows for moving a player. Now my question is where I write the code parallaxBackground.setParallaxValue(5) ? I have written this line in onAreaTouched method of arrow but it does not work. Code private Camera mCamera private static int CAMERA WIDTH 800 private static int CAMERA HEIGHT 480 private BitmapTextureAtlas bgTexture private ITextureRegion bgTextureRegion Override protected void onCreateResources() BitmapTextureAtlasTextureRegionFactory.setAssetBasePath("gfx ") bgTexture new BitmapTextureAtlas(getTextureManager(),2160,480,TextureOptions.REPEATING BILINEAR) bgTextureRegion BitmapTextureAtlasTextureRegionFactory.createFromAsset(bgTexture, this, "background.png", 0, 0) bgTexture.load() Override protected Scene onCreateScene() this.getEngine().registerUpdateHandler(new FPSLogger()) Scene scene new Scene() scene.setBackground(new Background(Color.BLACK)) final ParallaxBackground parallaxBackground new ParallaxBackground(0, 0, 0) final VertexBufferObjectManager vertexBufferObjectManager this.getVertexBufferObjectManager() parallaxBackground.attachParallaxEntity(new ParallaxEntity(0.0f, new Sprite(0, CAMERA HEIGHT this.bgTextureRegion.getHeight(), this.bgTextureRegion, vertexBufferObjectManager))) scene.setBackground(parallaxBackground) Robot robot new Robot() add Player final AnimatedSprite animatedRobotSprite new AnimatedSprite(robot.centerX, robot.centerY, 122, 126, (ITiledTextureRegion) robotTextureRegion, getVertexBufferObjectManager()) scene.attachChild(animatedRobotSprite) animatedRobotSprite.animate(new long 1250,50,50 ) add right arrow button Sprite rightArrowSprite new Sprite(0, CAMERA HEIGHT 70, rightArrowTextureRegion, getVertexBufferObjectManager()) Override public boolean onAreaTouched(TouchEvent pSceneTouchEvent,float pTouchAreaLocalX, float pTouchAreaLocalY) switch (pSceneTouchEvent.getAction()) case TouchEvent.ACTION DOWN moveRight true parallaxBackground.setParallaxValue(5) break case TouchEvent.ACTION MOVE moveRight true break case TouchEvent.ACTION UP moveRight false break default break return super.onAreaTouched(pSceneTouchEvent, pTouchAreaLocalX, pTouchAreaLocalY) scene.attachChild(rightArrowSprite) scene.registerTouchArea(rightArrowSprite) scene.setTouchAreaBindingOnActionDownEnabled(true) scene.setTouchAreaBindingOnActionMoveEnabled(true) scene.registerUpdateHandler(new IUpdateHandler() Override public void reset() Override public void onUpdate(float pSecondsElapsed) if ( moveRight ) animatedRobotSprite.setPosition(animatedRobotSprite.getX() speedX, animatedRobotSprite.getY()) ) return scene
7
Is it possible to use 3G internet for a TCP IP game server? I'm working on a turned based multiplayer android game with a friend. I started working on the game server and client using socket programming. I found a few tutorials on how to implement a basic chat on android and I started extending that example to suit my needs. Basically the game is really simple and the communication only include sending a few string from the client to the server every turn and sending the calculated scores back to all the clients after each turn. the idea is that one of the players creates the game and thus initialize the server, and each player connects to this client using ip. I tried this solution and it seems to work great when all the players are using the same wifi connection or by using router port forwarding. The problem is when trying to use 3G internet for the server, I guess the problem is that 3G ip address isn't global and you can't use port forwarding there, correct me if I'm wrong here. Is there a way to overcome this issue? or the only solution is to limit my game to wifi only or think of a different solution than the standard socket programming solution? I.E web server etc. what do you think would be the best approach here? Thanks.
7
Overdrawn pixels vs many polygons, which affects performance the most? I know that having overdrawn pixels is not desirable as well as having many polygons since they can decrease performance. Often when I model I have an option to decrease the number of polygons by having disconnected polygons over. For example, considering this Let's imagine it has more turns that are not visible in this picture. I can decrease the number of polygons by having a pathway as a single disconnected face As a result I would have less poly count, but the bottom geometry would be overdrawn in many areas. Or I can model this as a single continuous mesh. As a result I would have more poly count, but no overdraw I very often have similar situations and I'm wondering which of these would be more performance efficient and cause less performance decrease on mobile devices?
7
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.
7
Error compiling irrlicht android using ndk in Mac I'm new to irrlicht and I have started with irrlicht android port. I have made the following changes to android.mk file LOCAL CFLAGS O3 DANDROID NDK DDISABLE IMPORTGL I. .. include I. include I documents karthik android android ndk r9 platforms android 18 arch arm usr include LOCAL LDLIBS L documents karthik android android ndk r9 platforms android 14 arch arm usr lib libGLESv1 CM.so ldl llog L documents karthik android android ndk r9 platforms android 14 arch arm usr lib libGLESv1 CM.so I have tried compiling irrlicht android using ndk build in terminal.It showed the following errors at first In static member function 'static void irr os Printer log(const c8 , irr ELOG LEVEL)' error format not a string literal and no format arguments Werror format security In static member function 'static void irr os Printer log(wchar t const , irr ELOG LEVEL)' error format not a string literal and no format arguments Werror format security In static member function 'static void irr os Printer log(const c8 , const c8 , irr ELOG LEVEL)' error format not a string literal and no format arguments Werror format security In static member function 'static void irr os Printer log(const c8 , const path amp , irr ELOG LEVEL)' error format not a string literal and no format arguments Werror format security make obj local armeabi objs irrlicht os.o Error 1 and then I googled that and made changes in os.cpp file as follows Changed the code, android log print(ANDROID LOG INFO, "log", message) to android log print(ANDROID LOG INFO, "log"," s", message) This change solved that issue, and then I got another error In file included from jni importgl.cpp 55 0 jni importgl.h 37 22 fatal error GLES egl.h No such file or directory Again I changed GLES egl.h to EGL egl.h and solved that issue, got fatal error irrlicht.h No such file or directory I even solved this , atlast I'm here with this error error 'EglDisplay' was not declared in this scope error 'EglSurface' was not declared in this scope error 'EglWindow' was not declared in this scope error 'EglContext' was not declared in this scope
7
How to debug shaders running on Android 4.x devices? I have tried some of the existing inspectors such as RenderDoc and gapid, but none of them can be used with Android 4.x. Latest version of gapid requires Android 6.0 and RenderDoc requires Android 5.0. But I need to debug shaders in my app running on a Galaxy Tab 3 8.0 (SM T311, ARM Mali 400), which uses Android 4.2.2. I cannot upgrade its Android version. The app was made with Unity 2018.4 and targets Android 4, ARMv7. How can I inspect amp debug my shaders running on this kind of device?
7
GLSL Shader not compiling (Android LibGDX) and no log available I'm trying to get a "ripple" shader working for OpenGL ES 2.0 (using LibGDX). However, I can't get it to compile, and for some reason ShaderProgram.getLog() returns an empty string even though the Shader didn't compile. I am 100 confident that the vertex shader is correct.. here's the fragment shader (not written by me, but I modified it a bit long time ago.. when I had a desktop project and it worked back then) version 120 precision mediump float varying vec2 v texCoords uniform float time uniform float alpha uniform float waveLengthMultiplier uniform sampler2D u texture void main() vec2 center vec2(0.5, 0.5) vec2 tc v texCoords.xy vec2 p 1.0 2.0 (tc offset) float len length(p) waveLengthMultiplier vec2 uv tc (p len) cos(len 12.0 time 4.0) 0.03 vec3 col texture2D(u texture, uv).xyz gl FragColor vec4(col, alpha) I'm still not very well versed with shaders, as I've used them only a little.. Like I said, getLog() returns an empty string, so I'm hoping someone spots an error in the code.
7
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
7
Fair sharing income with designer I am developing my android game, 2D Sidescroll arcade game, its almost finished, I found artist who wants to cooperate with me, creating graphics for my game, but we have to discuss how much he will receive if there will be any income from our game. How do you game developers handle this? What is fair share for an artist? Here is little description on my and his work, to estimate work value Done by me game idea, story game code (6 months of development) all game features, everything generally visual level editor levels created by me (more than 120) android license bought be me (I know its cheap but still it is value) sound purchased by me Done by artist game graphics generally, ground tileset, game characters, 5 tiled monsters (animation), around 30 different graphics for different game objects (like environment elements, obstacles etc) I would be grateful for some informations, thank you!
7
How remove banner adView from a Screen in libgdx? I have an AdMob banner in the game. But I need this banner not to be shown in Screen 1 and when user enter Screen 2 I need to show the banner. When I call AdView.gone() it dissapears from screen but coordinates becomes wrong and touch position doesn't match with coordinates. How can I properly remove AdView.
7
Do I need to copyright my game before releasing it on the Android Play store? I am developing a game on Android and I was wondering if I have to copyright it before putting it on the store (so no one can steal the idea)?
7
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
7
Is a separate thread for game loop compulsory for simple games? I am new to game development. In order to learn I am recreating this game on android platform. You can observe the game play video at the above link. It is a simple game. I have read a lot of articles on getting started with game development.Almost all of them recommended using a game loop on separate thread, which makes sense for other games. However, for this particular game do I need to start a separate thread ?
7
Marketing games for the android what are the best sites to contact for reviews advertising? WE are in final dev stages of our latest game and want to release it for the android market. What are the best sites to contact for reviews advertising that specifically target the android users???
7
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.
7
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!
7
Performance problems with many entities in AndEngine I'm developing a rolling scene based game. I'm loading all the entities from a XML file and create them in the Loading Scene. I recently increased the game width, and, by doing so, I now have about 300 entities (instead of about 100) in the whole level. This causes a performance problem the game is "Lagging" "jumping" and everything moves slowly. I'm loading the entities with the "LevelLoader". I tried to add levelObject.setCullingEnabled(true) before returning the object in public IEntity onLoadEntity(final String pEntityName, final Attributes pAttributes) ... and also set Dithering in the engineOptions engineOptions.getRenderOptions().setDithering(true) but it didn't help... I'm implementing the sprite created from XML as Matin does in his tutorial http www.matim dev.com full game tutorial part 11.html Is there a better way to handle such a high number of entities? Or is there another way to improve the performance?
7
How to decide to use OpenGL ES 1.0 or 2.0 for Android? I started learning some Android development and one of the first things I thought I could make is a simple game. However, I'm faced with one difficult question right off the bat. Should I use OpenGL ES 1.0 or 2.0? The game I have envisioned will be pretty simple graphically, utilizing 2D(tiled top down type graphics) and fixed camera isometric views. I've never used OpenGL in a desktop environment, so I'm oblivious on if shaders will be something I'll use, etc. According to this page I should use OpenGL ES 2.0 generally for new development. My own phone however just recently(past year) got an update to get it to the required Android 2.2. (I don't even know if it has OpenGL ES 2.0 support) So basically my question is, will I benefit from any of OpenGL ES 2.0's features over 1.0 and or is it worth it in terms of compatibility?
7
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.
7
Rotation of Rectangle along Y axis transformed to parallelogram After the rotation of a rectangular view along the Y axis, about its center, transformed into parallelogram, how do I get the rotated parallelogram coordinates? By Y axis, I mean perpendicular to the device screen. Rotated rectangle Original rectangle Not using the openGl, ViewProperty animator is used!
7
Game Development at iOS, Android and PC with OpenGL ES I'm beginning iOS apps development, and my aim is to make games to launch on App Store. But I want to know if it's possible to program a game on Xcode with OpenGL ES (C game logic), integrate it on iOS with ObjC, and with that same game code (OpenGL ES C ), implement it for Android with Java and to PC. I have great interest to publish the same game on App Store, Google Play and specially Steam, and intent to build my personal 2D engine API when I have more experience on graphic programming. Do you know where can I find material to learn this?
7
How to sell Android game if selling through Market is not available in your country Android Market doesn t allow developers from my country to sell app. From what I understand the only chance to make some profit is to place ads in my application. Does ads make a decent profit or is there some other way to earn money are there any other payments system available for Android to bypass Google s limitations?
7
Libgdx Scene2D second screen animating and accept input while still loading I'm currently developing an app Scene2D that involves a small number of screen switches. I am having a problem that after calling set screen there appears to be a pause of a second or two (I think it's the non UI logic is being performed in the new screen constructor to aid setting up UI actors), which is fine. But during that second pause. It appears my second screen is already running in the background but not being rendered. I think this is happening because of two problems Animations and Actions that are supposed to begin when the second screen loads are already one or two seconds in progress by the time the second screen loads. During the pause before the second screen loads, the first screen is still rendered in freeze frame, but any user input is queued and processed in the second screen after it renders! Meaning that the user is effectively clicking on things that are not yet rendered which can cause some problems for their experience. I already am setting the input processor in the show method but it show appears to be called before the screen is actually visible and rendering frames. Is there something I have misunderstood about the life cycle? Or common pitfalls I may have fallen into? Only a problem on Android, Desktop is fine but possibly only because the loading times are too fast to notice either problem.
7
Android emulator with acceleration and gyroscope simulation Is there an Android emulator that is compatible with eclipse that can simulate acceleration and tilting of a mobile device?
7
How do I determine a device's default orientation? I am developing a game with accelerometer controls. This works well on all the mobile phones I've tested it on. However, when testing on a tablet, the y and x axes are reversed, presumably because the device's default orientation is landscape. How can I identify the default orientation of the device, to set my axes accordingly? (I'm using Android SDK 1.5 1.7.)
7
libgdx SpriteBatch and ShapeRenderer projection wrong I'm using LibGDX and the SpriteBatch and ShapeRenderer are having a perspective problem or something... When I draw something with both (code below), the planet texture is smaller than it should be. I can even manually set the size values and it's still wrong. I'm setting Matrix4 matrix cam.combined batch.setProjectionMatrix(matrix) sr.setProjectionMatrix(matrix) and the draw code is... outline sr.begin(ShapeRenderer.ShapeType.Filled) sr.setColor(Color.BLACK) sr.circle(c.getPos().x,c.getPos().y,c.getSize()) sr.end() planet tex batch.begin() batch.draw(c.getTexture(), c.getDrawPosition().x, c.getDrawPosition().y, c.getSize(), c.getSize()) batch.draw(c.getShadow(), c.getDrawPosition().x, c.getDrawPosition().y, c.getSize(), c.getSize()) batch.end() Both the texture and the shape are centered properly and c.getSize() should always be returning the same value, so I'm trying to figure out why this isn't working. I've tried manually setting the value for size and it still does it, so either the texture is being rendered at the wrong size or somehow the ShapeRenderer and SpriteBatch are using a different camera projection.
7
How should I control leveling up in a knowledge skill testing game? I have developed a game that tests the knowledge and skills in a series of short quiz like games. Players have to move from Level 1 to Level 16 (with Level 4, 8 and 12 as major milestones BANDS). The Difficulty level of game questions increases at each level. The level progression is currently based on 'POINTS'. Points in turn are based on Correct responses, faster responses, Wins, Completion etc. Points continue to increase for a user irrespective of Win Loss (the duration of completing the levels varies) The challenge I foresee is 'every user can progress to Level 16' if he keeps on playing the game long enough (irrespective of whether he has acquired the skill knowledge for the next level). I am looking for a simple to understand progression rule(s) that would make lower skilled players remain longer in that BAND before progressing to the next level and BAND. What are some best practices in Level progression that I can refer to for overcoming this issue. Thanks,
7
Should I be using Lua for game logic on mobile devices? As above really, I'm writing an android based game in my spare time (android because it's free and I've no real aspirations to do anything commercial). The game logic comes from a very typical component based model whereby entities exist and have components attached to them and messages are sent to and fro in order to make things happen. Obviously the layer for actually performing that is thin, and if I were to write an iPhone version of this app, I'd have to re write the renderer and core driver (of this component based system) in Objective C. The entities are just flat files determining the names of the components to be added, and the components themselves are simple, single purpose objects containing the logic for the entity. Now, if I write all the logic for those components in Java, then I'd have to re write them on Objective C if I decided to do an iPhone port. As the bulk of the application logic is contained within these components, they would, in an ideal world, be written in some platform agnostic language script DSL which could then just be loaded into the app on whatever platform. I've been led to believe however that this is not an ideal world though, and that Lua performance etc on mobile devices still isn't up to scratch, that the overhead is too much and that I'd run into troubles later if I went down that route? Is this actually the case? Obviously this is just a hypothetical question, I'm happy writing them all in Java as it's simple and easy get things off the ground, but say I actually enjoy making this game (unlikely, given how much I'm currently disliking having to deal with all those different mobile devices) and I wanted to make a commercially viable game would I use Lua or would I just take the hit when it came to porting and just re write all the code?
7
Can i use Soccer football team names in my web, iphone and android apps? If i don't use logos, player names, sponsors or any images can i use team names in a for profit app? The reason i mention these is that i have seen countless references to images and badges but not the name in text format only. Eg print the league table or show a fixtures list or show some user stats in relation to a team name in the app. I read that a court has ruled in 2012 that fixture lists are not copyright able as they involve pure scheduling logic and no artistic or innovative value. Also i know that logos, shield, images, player names and images etc are copyright able. Do team names fall under fair use if it is purely the team name in a fixture list or in a list or teams?
7
Augmented reality on Mobile platform iOS Is there a way that we can control the iOS device camera to an extent what colors it sees, what shapes it sees ? etc I'm speaking about the ability to read information before the image is captured. Consider my question as Possibility of making an augmented reality game on iOS phones. I dont find relevant help for my query in internet iOS developer site. Hence posting here.
7
Moving sprites based on Delta time consistent movement across all devices with different resolutions This is the formula I am currently using to move my sprites across the screen Examples below only deal with X coordinates to keeps things as short as possible. Initial variable declarations float frames per second 30 Set this to target frames per second, 30 for this example. float dt 1 frames per second Delta float spriteXGrid Sprite's position on a grid (grid can be any explicit value, I use something simple like 800 x 600) float spriteXScreen Sprite's actual final position in screen coordinates float spriteXTime 5 Time variable. This is in seconds and is the amount of time the sprite should take to traverse the screen float spriteXVel 1 spriteXTime Velocity value used in conjunction with time value to calculate new position To set my sprite's initial position I simply do this spriteXGrid (pos 800) Where pos is the position on the grid (0 800) and 800 is the grid size that I chose to work with. spriteXScreen spriteXGrid width To convert to actual screen coordinates where width is the actual width of the device currently running on. Then to move my sprite, I do this spriteXGrid spriteXGrid (spriteXVel dt) Update sprite's position on the grid spriteXScreen spriteXGrid width And convert to screen coordinates (again, width is the screen width of the current device) Then I just use the spriteXScreen variable to plot the sprite, something like sprite.drawSprite(spriteXScreen,0) this is from a custom class I wrote that takes in sprite's x and y coordinate and draws it there. My question is, is there an easier way I can do this?! It's a nightmare to manage when it comes to collision detection etc.... because, you have 2 different coordinates, the 'screen' one (which I would describe as 'superficial'), and the 'grid' one which is needed for all the good stuff, and is a nightmare to actually work out and work with. is there anyway I can just do something like spriteXScreen 'some value' Which would allow my sprite to move across the screen in the same amount of time on all devices? (I mean I can't just say move it by 1 pixel, because if I move 400 pixels in say 5 seconds on a 400 pixel wide screen, the sprite will have passed the whole screen in those 5 seconds, but on an 800 pixel wide screen it would have only passed halfway in the same amount of time). The whole business of have a 'grid' coordinate and having to convert it to a 'screen' coordinate is extremely irritating and I'm wondering if I'm doing this all wrong....? Suggestions and solutions would be very welcome
7
How should I store a Game Database on Android? I'm looking at creating a game for Android and while I have most of the ins and outs worked out, the one thing I'm struggling with is how to store data for the game. Ultimately, the game will be based off of a lot of pre defined data and statistics so the obvious choice to me would be something like SQLite, but as I'm pretty new to the realm of Android and Game Development, I'm not 100 certain if this is the right route to follow. The data will be general pre defined data as well as player data (along the lines of careers stats what place finished, etc). I was wondering if there was a better best practice solution that wasn't SQLite and that would provide said functionality and if so, could you point me in the right direction?
7
How do I draw a scrolling background? How can I draw background tile in my 2D side scrolling game? Is that loop logical for OpenGL es? My tile 2400x480. Also I want to use parallax scrolling for my game. batcher.beginBatch(Assets.background) for(int i 0 i lt 100 i ) batcher.drawSprite(0 2400 i, 240, 2400, 480, Assets.backgroundRegion) batcher.endBatch() UPDATE And thats my onDrawFrame.I'm sending deltaTime for fps control. public void onDrawFrame(GL10 gl) GLGameState state null synchronized(stateChanged) state this.state if(state GLGameState.Running) float deltaTime (System.nanoTime() startTime) 1000000000.0f startTime System.nanoTime() screen.update(deltaTime) screen.present(deltaTime) if(state GLGameState.Paused) screen.pause() synchronized(stateChanged) this.state GLGameState.Idle stateChanged.notifyAll() if(state GLGameState.Finished) screen.pause() screen.dispose() synchronized(stateChanged) this.state GLGameState.Idle stateChanged.notifyAll()
7
Is an in app purchase required to unlock game in order to bypass pirating acceptable? I'm considering writing a mobile game and looking at distribution. The game will have a server requirement, which means I will have to pay for bandwidth, hosting, processor time, etc. Because of that I'll need to make at least a little money off this thing. According to the press piracy is rampant in the android community. To get around this, I'm thinking of implementing a simple model where the game is free, perhaps allowing play for X number of turns or something, and then requiring an in app purchase to continue to play. I would clearly explain this in the app description, and the in app purchase would be managed per account so it would be linked to your google play account so you wouldn't have to re purchase every time you get a new device. Would gamers accept this model or see it as unreasonable?
7
Amazon FreeTime Unlimited Monetization So I've recently noticed how great FreeTime Unlimited is for my daughter. There's no ads, no in app purchases, etc. She can just play the games apps and I don't have to worry about it. As a develop I thinking it could an interesting avenue to go down, but there's a few things that I for the life of me can't get Amazon support forums to answer in any logical manner. So the idea according to their information is that the apps are highly scrutinized to verify they are child friendly content, which is excellent. Also, you can't use webviews, ads, or in app purchases. My question is How do devs monetize these applications? Clearly they're not just giving away their work for free? The only logical answer I can guess at, is that it uses the Amazon Underground scheme of earning based on the amount of time the user spends in the app game?? Does anyone have and actual experience or information on this? As I said, I've reached out to multiple people at Amazon, and keep getting the runaround with all of them pointing me to the same useless link.
7
Saving data across same game in multiple devices Is there any library or something that works like iCloud but for different operating systems (Android, IOS, Windows Phone) that allow me to save game data to cloud and open the game data from another device to sync the game progress?
7
How do I access device camera in GameMaker Studio 1.4? I've looked everywhere in the documentation for GameMaker and I didn't find anything about how to access the camera.
7
libgdx sprite placement Im making a soccer game where you basically have to shoot the ball to the goal and the ball goes to where you touch the screen. Im having an issue with the ball though, when the ball spawns on the player it goes directly to the top left corner of the screen, without even touching the screen. This might be really easy but I cant seem to find the solution Here's the code Ball class public void shootToward(float targetX, float targetY) velocity.set(targetX position.x, targetY position.y) public void update(float deltaTime) position.add(velocity.x deltaTime, velocity.y deltaTime) velocity.scl(1 (1f deltaTime)) Game class public void create () cam new OrthographicCamera() cam.setToOrtho(false, Gdx.graphics.getWidth(), Gdx.graphics.getHeight()) batch new SpriteBatch() batch.setProjectionMatrix(cam.combined) player new Sprite(player1) player.setX(MathUtils.random(Gdx.graphics.getWidth())) player.setY(MathUtils.random(Gdx.graphics.getHeight() 2)) b.position.set(player.getX(), player.getY()) public void render () Gdx.gl.glClearColor(255, 255, 255, 1) Gdx.gl.glClear(GL20.GL COLOR BUFFER BIT) b.update(Gdx.graphics.getDeltaTime()) batch.begin() batch.draw(bg, 0, 0) batch.draw(goal1, Gdx.graphics.getWidth() 4 20, Gdx.graphics.getHeight() 180, 420, 130) if (!Gdx.input.isTouched()) batch.draw(bs, b.position.x, b.position.y) b.shootToward(Gdx.input.getX(), Gdx.graphics.getHeight() Gdx.input.getY()) player.draw(batch) batch.end() Thanks in advance.
7
Collision detection problems using AABB's I implemented a simple collision detection routine using AABB's between my main game sprite and various platforms (Please see code below). It works great, but I'm now introducing gravity to make my character fall and it's shown up some problems with my CD routine. I think the crux of the matter is that my CD routine moves the sprite back along the axis in which it has penetrated the least amount into the other sprite. So, if it's more in the Y axis than the X, then it will move it back along the X Axis. However, now my (hero) sprite is now falling at a rate of 30 pixels per frame (It's a 1504 high screen I need it to fall this fast as I want to try to simulate 'normal' gravity, any slower just look weird) I'm getting these issues. I will try to show what is happening (and what I think is causing it although I'm not sure) with a few pictures (Code below pictures). I would appreciate some suggestions on how to get around this issue. For clarification, in the above right picture, when I say the position is corrected 'incorrectly' that's maybe a bit misleading. The code itself is working correctly for how it is written, or put another way, the algorithm itself if behaving how I would expect it to, but I need to change it's behaviour to stop this problem happening, hope that clarifies my comments in the picture. My Code public boolean heroWithPlatforms() Set Hero center for this frame heroCenterX hero.xScreen (hero.quadWidth 2) heroCenterY hero.yScreen (hero.quadHeight 2) Iterate through all platforms to check for collisions for(x 0 x lt platformCoords.length x 2) Set platform Center for this iteration platformCenterX platformCoords x (platforms.quadWidth 2) platformCenterY platformCoords x 1 (platforms.quadHeight 2) the Dif variables are the difference (absolute value) of the center of the two sprites being compared (one for X axis difference and on for the Y axis difference) difX Math.abs(heroCenterX platformCenterX) difY Math.abs(heroCenterY platformCenterY) If 1 Check the difference between the 2 centers and compare it to the vector (the sum of the two sprite's widths 2. If it is smaller, then the sprites are pverlapping along the X axis and we can now proceed to check the Y axis if (difX lt vecXPlatform) If 2 Same as above but for the Y axis, if this is also true, then we have a collision if(difY lt vecYPlatform) we now know sprites are colliding, so we now need to know exactly by how much penX will hold the value equal to the amount one sprite (hero, in this case) has overlapped with the other sprite (the platform) penX vecXPlatform difX penY vecYPlatform difY One sprite has penetrated into the other, mostly in the Y axis, so move sprite back on the X Axis if (penX lt penY) hero.xScreen penX (heroCenterX platformCenterX gt 0 ? 1 1) Sprite has penetrated into the other, mostly in the X asis, so move sprite back on the Y Axis else if (penY lt penX) hero.yScreen penY (heroCenterY platformCenterY gt 0 ? 1 1) return true Close 'If' 2 Close 'If' 1 Otherwise, no collision return false
7
Score won't save to Android in Game Maker Studio 1.4 I have oController as the first object to run when the game is opened. In oController's Game Start event I have the following code ini open(working directory quot SavedScores.ini quot ) var highscores ini read real( quot Highscores quot , quot Score quot , 0) ini close() global.LastScore highscores When the player has gotten their score, I use this code to save it if global.gameOver if global.LastScore 0 global.LastScore global.currentScore ini open(working directory quot SavedScores.ini quot ) ini write real( quot Highscores quot , quot Score quot , global.LastScore) ini close() else if global.currentScore gt global.LastScore global.LastScore global.currentScore ini open(working directory quot SavedScores.ini quot ) ini write real( quot Highscores quot , quot Score quot , global.LastScore) ini close() Whenever I relaunch the game on my phone, it won't load the score I got when I previously launched the game. Idk why it's not saving?
7
Android Google play enable download app for devices that supports opengl extension I am using OpenGL ES 2 in my game. However, for simplicity i have used some extensions like VAO. Is there a way, how to disable dowloading of my app for devices, that do not support this (and other) extensions? I can check it in code, but that is a little late, when user already bought my game and it wont work.
7
LibGDX with SoundPool I'm developing a game for Android using LibGDX in Android Studio. I recently found out that some sounds in my game fail to play. I noticed that every time a sound fails to play, these are the logs 04 12 10 49 51.784 24234 24283 com.gadarts.parashoot.android E AudioTrack AudioFlinger could not create track, status 12 04 12 10 49 51.785 24234 24283 com.gadarts.parashoot.android E SoundPool Error creating AudioTrack 04 12 10 49 52.503 24234 24283 com.gadarts.parashoot.android W AudioTrack AUDIO OUTPUT FLAG FAST denied by client transfer 4, track 44100 Hz, output 48000 Hz This is the code I use to play the sounds public long playSound(SFX fileName, boolean loop, float volume, boolean randomPitch) if (GameSettings.SOUND TOGGLE) try Sound sound prepareSound(fileName) if (randomPitch amp amp GameSettings.SOUND RANDOM PITCH) return setRandomPitch(loop, sound, volume) if (loop) return sound.loop(volume) else return sound.play(volume) catch (GdxRuntimeException e) e.printStackTrace() return 1 private Sound prepareSound(SFX soundFile) throws GdxRuntimeException try String soundPath SFX.fileAttribute.SFX FOLDER NAME.getValue() " " SFX.fileAttribute.SOUNDS FOLDER NAME.getValue() " " soundFile.getParentDir().getValue() " " soundFile.getValue() "." soundFile.getFormat().getValue() Sound sound if (!sounds.containsKey(soundFile.getValue())) sound Main.getAssetsManager().get(soundPath, Sound.class) sounds.put(soundFile.getValue(), sound) else sound sounds.get(soundFile.getValue()) if (sound null) throw new GdxRuntimeException("preparing sound failed sound not found.") return sound catch (GdxRuntimeException e) throw e The sound files are in WAV format. Any ideas how to fix it? Thanks in advance! Update I've found out that this problem appears only on my Nexus 5X. I tried it on Xiaomi Redmi Note 4X and it didn't happen.
7
Candy crush saga popup like messages I was wondering how could I make in Android something like the popup messages seen in Candy Crush Saga, those messages like "Delicious!", "Tasty!" or similar As well as the score of each movement, they will pop up at first and then vanish How could I implement something like that in Android?
7
Reloading Resources on Resume I'm having a problem with my game. If I press the "Home button" the game is paused... everythings fine, but if I then go back to the game all the resources are reloaded before I can continue the game. And it takes quite a bit. Is this normal, or is there a way to avoid the reloading? I have write following code in onResume and onPause method. It loads same texture again and again on resume of game. Override protected void onPause() super.onPause() if (Utility.flagSound amp amp mScene ! null) if (mScene.getUserData().equals(Constants.GAME SCENE)) Utility.isPlayLevelMusic false else Utility.isPlayLevelMusic true audioManager.gameBgMusic.pause() audioManager.levelBgMusic.pause() if (this.mEngine ! null amp amp this.mEngine.isRunning()) this.mEngine.stop() Override protected void onResume() super.onResume() if (audioManager ! null amp amp Utility.flagSound amp amp dataManager ! null) if (Utility.flagSound) if (Utility.isPlayLevelMusic) audioManager.levelBgMusic.play() else audioManager.gameBgMusic.play() if (this.mEngine ! null amp amp !this.mEngine.isRunning()) this.mEngine.start() I would be glad if anybody could help...
7
Is it possible now to make something for android in Unity3d without buying any licenses? I was just talking to a game dev who said its possible, that it involves downloading the android sdk and few other things. If this is possible can someone tell me how? Also is it possible to build a .apk file and install on your device? Is it possible to release something developed this way on the play store?
7
How to use proximity sensor in android with unity3d? I want to create a android game with unity3d using proximity sensor an I don't know how to access that sensor with java script
7
How many threads should an Android game use? At minimum, an OpenGL Android game has a UI thread and a Renderer thread created by GLSurfaceView. Renderer.onDrawFrame() should be doing a minimum of work to get the higest FPS. The physics, AI, etc. don't need to run every frame, so we can put those in another thread. Now we have Renderer thread Update animations and draw polys Game thread Logic amp periodic physics, AI, etc. updates UI thread Android UI interaction only Since you don't ever want to block the UI thread, I run one more thread for the game logic. Maybe that's not necessary though? Is there ever a reason to run game logic in the renderer thread?
7
How to debug shaders running on Android 4.x devices? I have tried some of the existing inspectors such as RenderDoc and gapid, but none of them can be used with Android 4.x. Latest version of gapid requires Android 6.0 and RenderDoc requires Android 5.0. But I need to debug shaders in my app running on a Galaxy Tab 3 8.0 (SM T311, ARM Mali 400), which uses Android 4.2.2. I cannot upgrade its Android version. The app was made with Unity 2018.4 and targets Android 4, ARMv7. How can I inspect amp debug my shaders running on this kind of device?
7
Using buttons on Smartphone shooter games Just a simple and probably stupid question. I noticed that many iOS and Android shooter games tend to avoid using traditional buttons in favour to autofire. The very first reason to do so is to have more space in the screen available for graphics. However this takes away some satisfaction to the user when "pressing the virtual button". I understand that the fact that smartphone buttons would be only "virtual" is a good design reason to remove them and add autofire, but I was wondering which sort of comments your users (if u are one of those developers) have given you about this choice. In short Does autofire add to the gameplay? Does a game without autofire (and hence buttons) result inadequate for a smartphone and or become less fun to play?
7
Saving an interface instance into a Bundle All I've have an interface that allows me to switch between different scenes in my Android game. When the home key is pressed, I am saving all of my states (score, sprite positions etc) into a Bundle. When re launching, I am restoring all my states and all is OK however, I can't figure out how to save my 'Scene', thus when I return, it always starts at the default screen which is the 'Main Menu'. How would I go about saving my 'Scene' (into a Bundle)? Code import android.view.MotionEvent public interface Scene void render() void updateLogic() boolean onTouchEvent(MotionEvent event) I assume the interface is the relevant piece of code which is why I've posted that snippet. I set my scene like so ('options' is an object of my Options class which extends MainMenu (Another custom class) which, in turn implements the interface 'Scene') SceneManager.getInstance().setCurrentScene(options) Current scene is optionscreen
7
How to rotate a sprite using multi touch with AndEngine? I am new to Android game development. I am using AndEngine GLES 2. I have created a box with a sprite. This box is now draggable by using the code below. It works fine. But I want multi touch on this I want to rotate the sprite with two fingers on that box, and to keep it draggable. I've no idea how do do that, which way should I go? final float centerX (CAMERA WIDTH this.mBox.getWidth()) 2 final float centerY (CAMERA HEIGHT this.mBox.getHeight()) 2 Box new Sprite(centerX, centerY, this.mBox, this.getVertexBufferObjectManager()) public boolean onAreaTouched(TouchEvent pSceneTouchEvent, float pTouchAreaLocalX, float pTouchAreaLocalY) this.setPosition(pSceneTouchEvent.getX() this.getWidth() 2, pSceneTouchEvent.getY() this.getHeight() 2) float pValueX pSceneTouchEvent.getX() float pValueY CAMERA HEIGHT pSceneTouchEvent.getY() float dx pValueX gun.getX() float dy pValueY gun.getY() double Radius Math.atan2(dy,dx) double Angle Radius 360 Box.setRotation((float)Math.toDegrees(Angle)) return true
7
Mobile game without game engine I am planning on making a 2D mobile game for iOS and Android. It will have animations (including some simple flash light and particle effects, like in Candy Crush), but the only physics the game will need is hit detection between 2 circles, and dragging a sprite across the screen. And the game isn't very complicated. Since these would be easy to implement on my own, I'm considering using the native iOS Android SDKs for this (on Xamarin), with no game engine. Is this a good or bad idea? Would avoiding using game engines, and using the native SDKs (on Xamarin) improve the performance of my game? Wouldn't fixing bugs become easier (in some odd cases) since both platforms are separated into different builds code? Looking at games like Candy Crush, I don't see any physics involved and so believe that a game engine isn't even needed for a game like that. Any advice suggestions would be appreciated.
7
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
7
Using the AssetManager in LibGDX I am trying to use the AssetManager class in LibGDX and I understand how it works but I am trying to implement a loading screen. I have followed the AssetManagerTest.java file here, but I am having a hard time trying to figure out how to get it to work correctly. Can someone point me in the right direction? My goal is to load the assets (textures, sounds, fonts, ... etc) and update a bar with the percentage complete on the screen. I don't understand the ResolutionFileResolver and the Resolution in the link I provided. What are they for? My goal is to support a static class that can give me access to all of the assets I need in my game from any screen. Is there a preferred method to do this? Thanks.
7
How to render rounded shape perfectly? I'm having issues rendering rounded shape figures. I have a Texture with different images in it and I get this whale figure from it with TextureRegion but the stroke of it looks pixelated. The original whale image is 357x721 px and the program scalate it up or down depending on the device. And I use TextureFilter to Nearest but it doesn't solve problem as I thought it would. Does someone knows a bit about this issue? texture new Texture(Gdx.files.internal("texturepack nuevo.png")) texture.setFilter(TextureFilter.Nearest, TextureFilter.Nearest) pilar new TextureRegion(texture,591,0,357,721) whale 1 new TextureRegion(texture,0,0,591,323) whale 1.flip(false, true) whale 2 new TextureRegion(texture,0,323,591,323) whale 2.flip(false, true) whale 3 new TextureRegion(texture,0,646,591,323) whale 3.flip(false, true) TextureRegion whales whale 1,whale 2,whale 3 whaleAnimation new Animation(0.15f, whales) whaleAnimation.setPlayMode(Animation.PlayMode.LOOP PINGPONG)
7
libGDX AppWarp integration problem I have tried to use up AppWarp's old SuperJumper as a sample to create an up to date project from it with Gradle. Maybe it is good for learning. So, I have downloaded project from GitHub(https github.com SauravGShephertz libgdxMultiplayerSuperJumper) as zip and started to build a new Gradle based libGDX project from it. Here you can see actual state https github.com kovacsa91 superjumper I have some errors with following lines. com.shephertz.app42.gaming.multiplayer.client.command. Maybe it cannot found needed JAR file(s)? How should be it placed? Can you please check it out? Code was separated between project folders inside the main libGDX project.
7
irrlicht for android I was just wondering after noticing that moblox was.built with irrlicht if there is an android port of it? Or did the dev make his own port from scratch? From my research I noticed a port project on github but it seems far from ready.
7
How do I get and install the Android SDK on my Ubuntu OS? I heard that it would be a lot easier to do java type games and then move on to Android gaming? I AM a total beginning but with motive and I have been reading about it from several sources, including similar questions on this site alone. But I need to know specific things from experienced users. As for getting the SDK and Eclipse on the computer, I'm having trouble with it, I am running Ubuntu btw so exe files are useless. But I have tired terminal use but I kind of failed because I don't think the SDK and Eclipse are installed, just downloaded. Ubuntu users especially, I can use help from you seeing how complicated Ubuntu can be compared to windows "click install" setups. Also if you guys really suggest me learning Java first (which is still a big question cause I don't want to waste time with something I don't want to really use, but getting the feel of gaming is pretty important I know) I am looking at this tutorial http zetcode.com tutorials javaswingtutorial And it talks about using swing toolkit, but idk how to get that exactly, I tried searching. Sorry for the noobness, but gotta start somewhere and I'm new to this site so I'm really hoping you guys can really help me. I want to make simple games to put on the android market, and then advance. So going to the tutorial above, it just kind of starts with giving me coding and whatnot which is fine, just copy it but idk where exactly to do all this on (Swing toolkit?) so I can't even start with that. But really I want help getting this SDK and Eclipse plugins on my computer and then I can continue with this guide www.rbgrn.net content 54 getting started android game development Which is the main guide that I probably should follow, and would be great if some expert skims it a little at least to see if I should start with that guide and skip the java. But again, I'm stuck on the SDK stuff. Sorry for the long questions, I am new and I really want to get out of this beginner stage, it's the worst part. Tank you to all and if you want my facebook or AIM to help me through with IM to at least get this SDK and stuff installed fine with Ubuntu OS, ask please (
7
Memory leak while loading libgdx game screen So, I have a lot of texture atlases in my code for a talking tom type libgdx, and I use around 6 of them per screen. The app crashes abruptly without any errors on devices with 1gb ram or less. I started profiling my code and found that I have 3500 texture bindings, how should i minimize these?
7
Real time multiplayer game server development I'm an Android developer, and I want to start developing a real time multiplayer game, like Pocket Legends. Would this type of server be good for a real time multiplayer action game http systembash.com content a simple java udp server and udp client ? I'm absolutly new to server development, so it would be great if you explaind even more about this stuff ...
7
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.
7
How can I hand out free copies of my otherwise paid Play Store game? With Google Play Services, is it possible to give people redeemable codes for an Android game I made, or give them special access or something like that? How do I do it?
7
Android how do I switch between game scenes in a game? Any tutorials? I am trying to create a simple game using the Android SDK without using AndEngine (or any other game engine). I have plenty of experience designing games from the past, but I'm having lots of trouble trying to use the Android SDK to make my game. By far my biggest hurdle right now is switching between views. That is, for example, going from the menu to the first level, etc. I am using a traditional model I learned (I think it's called a scene stack or something?) in which you push the current scene onto a stack and the game's main loop runs the top item of the stack. This model seems non trivial to implement in the Android SDK, mostly because Android seems to be picky about which thread instantiates which view. My issue is that I want the first level to show up when you press a button on the main menu, but when I instantiate the first level (the level class extends SurfaceView and implements SurfaceHolder.Callback) I get a runtime error complaining that the thread that runs the main menu can't instantiate this class. Something about calling Looper.prepare(). I figured at this point I was probably doing things wrong. I'm not sure how to specifically phrase my issue into a question, so maybe I should leave it as either 1) Does anybody know a good way (or the 'proper' way) to switch between scenes in an Android game? or 2) Are there any tutorials out there which show how to create a game that doesn't take place entirely in one scene? (I have googled for a while to no avail... maybe someone else knows of one?) Thanks!
7
How to increase the acceleration of an object on the Y axis? So far I am able to make the character fall at a constant rate but I am unsure how to make the character accelerate while falling. When the character is falling I have a line of code as such position.y 7f How can I change my implementation such that the character falls faster over time?
7
Memory issues with new game on s3 I am building a new game with AndEngine and for some reason i keep getting this debug statement in the Logcat 01 31 21 29 50.503 I Choreographer(697) Skipped 152 frames! The application may be doing too much work on its main thread. Im not really sure what is causing this error exactly during my game. I am checking a lot of collisions, but they arent initiated until after the game play scene has started. I also noticed on my Galaxy S3 the game causes my phone to "flicker" when swiping changing home screens and pulling down the task bar at the top. I think this error has something to do with it, but I am not sure. What do you guys think? Also each time the user goes to another level I initialized the collision detectors all over again. But I don't unregister or stop the last collisions that were started. I thought they would be automatically cleaned up when the new one is initialized. What do you guys think?
7
Can you embed a Unity3d mobile project into an existing native mobile app? I am creating an application for both Android and iPhone that will have a few mini games in it. I would like to create the non game section in native Android and iPhone. My question is, is it possible to have a native app that will incorporate the Unity mini game I am creating all inside one apk and ios project?
7
Android TV game development Anybody develop games for Android TV? Especially with libGDX? I would like to know what game controllers Android TV uses? And whether we can use libGDX to control the game controllers?
7
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?
7
Android Swipe In Unity 3D World with AR I am working on an AR application using Unity3D and the Vuforia SDK for Android. The way the application works is a when the designated image(a frame marker in our case) is recognized by the camera, a 3D island is rendered at that spot. Currently I am able to detect when which objects are touched on the model by raycasting. I also am able to successfully detect a swipe using this code if (Input.touchCount gt 0) Touch touch Input.touches 0 switch (touch.phase) case TouchPhase.Began couldBeSwipe true startPos touch.position startTime Time.time break case TouchPhase.Moved if (Mathf.Abs(touch.position.y startPos.y) gt comfortZoneY) couldBeSwipe false track points here for raycast if it is swipe break case TouchPhase.Stationary couldBeSwipe false break case TouchPhase.Ended float swipeTime Time.time startTime float swipeDist (touch.position startPos).magnitude if (couldBeSwipe amp amp (swipeTime lt maxSwipeTime) amp amp (swipeDist gt minSwipeDist)) It's a swiiiiiiiiiiiipe! float swipeDirection Mathf.Sign(touch.position.y startPos.y) Do something here in reaction to the swipe. swipeCounter.IncrementCounter() break touchInfo.SetTouchInfo (Time.time startTime,(touch.position startPos).magnitude,Mathf.Abs (touch.position.y startPos.y)) Thanks to andeeeee for the logic. But I want to have some interaction in the 3D world based on the swipe on the screen. I.E. If the user swipes over unoccluded enemies, they die. My first thought was to track all the points in the moved TouchPhase, and then if it is a swipe raycast into all those points and kill any enemy that is hit. Is there a better way to do this? What is the best approach? Thanks for the help!
7
Saving an interface instance into a Bundle All I've have an interface that allows me to switch between different scenes in my Android game. When the home key is pressed, I am saving all of my states (score, sprite positions etc) into a Bundle. When re launching, I am restoring all my states and all is OK however, I can't figure out how to save my 'Scene', thus when I return, it always starts at the default screen which is the 'Main Menu'. How would I go about saving my 'Scene' (into a Bundle)? Code import android.view.MotionEvent public interface Scene void render() void updateLogic() boolean onTouchEvent(MotionEvent event) I assume the interface is the relevant piece of code which is why I've posted that snippet. I set my scene like so ('options' is an object of my Options class which extends MainMenu (Another custom class) which, in turn implements the interface 'Scene') SceneManager.getInstance().setCurrentScene(options) Current scene is optionscreen
7
Concerns about APK version compatibility I'm making a game in Unity, and i want to know if I generate the apk in version 4.1 Jelly Bean he will run in newest versions of android? Can anyone explain me better how the version works?
7
Bitmap to a custom coordinate pair when touched I am completely lost and needed some help. I have a ontouchListener for a bitmap and know how to check if the touch was within the boundaries of the bitmap. But say I want the center of the image to be at a custom coordinate like 0,0 and the entire image to be in the range of 319...319 and 239...239 . Does any one have any thoughts on how to best implement an eventX and eventY to a custom coordinate pair?
7
Ball Physics for Android Game I am starting work on a new Android game and I haven't had any experience implementing physics before. I am trying to steer clear of external libraries such as box2d, not just because I think it is overkill for my project, but I also want to code it myself for the experience. I am more just interested in getting 1 ball to bounce around the screen and bounce off of objects in my world. The game is in 2D and I was just looking for some advice on where to start with ball physics? I know I will need gravity, x y velocities... etc. I know I need to calculate how high the ball needs to bounce based on how fast it hit the object, I also know I will need to calculate the correct angle that the ball needs to bounce at. Just hoping to get some ideas on a good place to start and things I will need to take into account.
7
Disable autorotation if Android has it disabled I'm making a game for Android in Unity. I wanted the game to handle screen rotations, so I set "Default Orientation" to "Auto Rotation. This works well, except for one issue If you disable auto rotation in the device's settings, the game ignores this and keeps autorotation. How would I go about making it disable autorotate when the Android device is set to disable autorotate?
7
How to remove a box2d body when collision happens? I m still new to java and android programming and I am having so much trouble Removing an object when collision happens. I looked around the web and found that I should never handle removing BOX2D bodies during collision detection (a contact listener) and I should add my objects to an arraylist and set a variable in the User Data section of the body to delete or not and handle the removing action in an update handler. So I did this First I define two ArrayLists one for the faces and one for the bodies ArrayList lt Sprite gt myFaces new ArrayList lt Sprite gt () ArrayList lt Body gt myBodies new ArrayList lt Body gt () Then when I create a face and connect that face to its body I add them to their ArrayLists like this face new AnimatedSprite(pX, pY, pWidth, pHeight, this.mBoxFaceTextureRegion) Body BoxBody PhysicsFactory.createBoxBody(mPhysicsWorld, face, BodyType.DynamicBody, objectFixtureDef) mPhysicsWorld.registerPhysicsConnector(new PhysicsConnector(face, BoxBody, true, true)) myFaces.add(face) myBodies.add(BoxBody) now I add a contact listener and an update handler in the onloadscene like this this.mPhysicsWorld.setContactListener(new ContactListener() private AnimatedSprite face2 Override public void beginContact(final Contact pContact) Override public void endContact(final Contact pContact) Override public void preSolve(Contact contact,Manifold oldManifold) Override public void postSolve(Contact contact,ContactImpulse impulse) ) scene.registerUpdateHandler(new IUpdateHandler() Override public void reset() Override public void onUpdate(final float pSecondsElapsed) ) My plan is to detect which two bodies collided in the contact listener by checking a variable from the user data section of the body, get their numbers in the array list and finally use the update handler to remove these bodies. The questions are Am I using the arraylist correctly? How to add a variable to the User Data (the code please). I tried removing a body in this update handler but it still throws me NullPointerException , so what is the right way to add an update handler and where should I add it. Any other advices to do this would be great. Thanks in advance.
7
Streamline Facebook and Google Play Game Services integration in Android Game This has been confusing me a lot . I am creating a simple 2D platformer which I wish to make social. So I thought of letting users do the following Share their in game objective completion their high score etc with their friends. Challenge their friends to have a better score better multiplier etc from their's View leaderboards of high score , most distance traveled etc both social and global. So My First preference was Facebook , simply because people have better social connections there. But then Google Play game services integration has another advantage, It makes you game available in their game services app and may be boost your game ranking in play store if you have game services integrated. But then I'' need to have leaderboards(same ones) for google plus as well. That 'll be too confusing for people. I do not want people to sign in twice in my app. That'll simple cut down and disperse the number of people getting social with the game. I personally want to use facebook alone but then google game services may be boosts my app in store. Can someone tell me a solution to use them both frictionlessly and get the most out of them in my game
7
Android Jump Run Random map generation I'm pretty new to game development but I work on an android app. It's a 2D Jump and Run game. I do it in Eclipse and the map is readed out of a txt file right now. But I want to do a Jump and run game, where the player must jump over holes in the ground. Theses holes should be created randomly. So I want an infinite map, which is created randomly. Can somebody give me tips how to begin with this? How can I do a randomly generated map? I don't want the full code or something else, just a little tip how to start because I don't know how I can do this randomly generating. Thanks in advance! Hope u know, what I mean!
7
Actor not taking touch libGDX I am trying to handle the touch of one of the Actors in the stage. The following is the code I have written public class MyGame extends ApplicationAdapter private GameStage gameStage Game stage is custom stage class. Override public void create () gameStage new GameStage() Gdx.input.setInputProcessor(gameStage) Set the input processor Override public void dispose() super.dispose() gameStage.dispose() Override public void render () Gdx.gl.glClearColor(0, 0, 0, 1) Gdx.gl.glClear(GL20.GL COLOR BUFFER BIT) gameStage.act(Gdx.graphics.getDeltaTime()) gameStage.draw() Now in the GameStage class public class GameStage extends Stage implements ContactListener MyActor myActor Custom actor object. public GameStage() super(new ScalingViewport(Scaling.fill, Constants.APP WIDTH, Constants.APP HEIGHT, new OrthographicCamera(Constants.APP WIDTH, Constants.APP HEIGHT))) setUpWorld() Code to setup the world. added background and other actors. none of them are touchable. addActor() private void addActor() myActor new MyActor(100, 100, 100, 100, 1000, 0) myActor.setTouchable(Touchable.enabled) myActor.addListener(new InputListener() Override public boolean touchDown(InputEvent event, float x, float y, int pointer, int button) actorTouched() This method is not getting triggered becaused the call never comes in this function. return true ) addActor(myActor) The custom actor class initializes the actor with a sprite image. public class MyActor extends Actor public MyActor(int startX, int startY, int startWidth, int startHeight, int endX, int speed) TextureAtlas textureAtlas new TextureAtlas(Gdx.files.internal(Constants.ATLAS PATH)) TextureRegion runningFrames new TextureRegion Constants.MOVING REGION NAMES.length for (int i 0 i lt Constants.MOVING REGION NAMES.length i ) String path Constants.MOVING REGION NAMES i runningFrames i textureAtlas.findRegion(path) if (horizontalMovingDirection MovementDirection.Right) runningFrames i .flip(true, false) code to draw and animate in a straight line by overriding the draw and act methods. Am I doing something wrong here? Why am I not getting the touch in the actor?
7
LibGDX with SoundPool I'm developing a game for Android using LibGDX in Android Studio. I recently found out that some sounds in my game fail to play. I noticed that every time a sound fails to play, these are the logs 04 12 10 49 51.784 24234 24283 com.gadarts.parashoot.android E AudioTrack AudioFlinger could not create track, status 12 04 12 10 49 51.785 24234 24283 com.gadarts.parashoot.android E SoundPool Error creating AudioTrack 04 12 10 49 52.503 24234 24283 com.gadarts.parashoot.android W AudioTrack AUDIO OUTPUT FLAG FAST denied by client transfer 4, track 44100 Hz, output 48000 Hz This is the code I use to play the sounds public long playSound(SFX fileName, boolean loop, float volume, boolean randomPitch) if (GameSettings.SOUND TOGGLE) try Sound sound prepareSound(fileName) if (randomPitch amp amp GameSettings.SOUND RANDOM PITCH) return setRandomPitch(loop, sound, volume) if (loop) return sound.loop(volume) else return sound.play(volume) catch (GdxRuntimeException e) e.printStackTrace() return 1 private Sound prepareSound(SFX soundFile) throws GdxRuntimeException try String soundPath SFX.fileAttribute.SFX FOLDER NAME.getValue() " " SFX.fileAttribute.SOUNDS FOLDER NAME.getValue() " " soundFile.getParentDir().getValue() " " soundFile.getValue() "." soundFile.getFormat().getValue() Sound sound if (!sounds.containsKey(soundFile.getValue())) sound Main.getAssetsManager().get(soundPath, Sound.class) sounds.put(soundFile.getValue(), sound) else sound sounds.get(soundFile.getValue()) if (sound null) throw new GdxRuntimeException("preparing sound failed sound not found.") return sound catch (GdxRuntimeException e) throw e The sound files are in WAV format. Any ideas how to fix it? Thanks in advance! Update I've found out that this problem appears only on my Nexus 5X. I tried it on Xiaomi Redmi Note 4X and it didn't happen.
7
Marketing games for the android what are the best sites to contact for reviews advertising? WE are in final dev stages of our latest game and want to release it for the android market. What are the best sites to contact for reviews advertising that specifically target the android users???
7
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?
7
Android animating spritesheets I'm creating a basic endless runner game on Android using SurfaceView. I have background that recreates itself constantly, which was simple enough. One problem I've always had is getting my head around animating sprite sheets, not just in Android but other platforms as well. Based on the problem I'm stuck on right now.. I have a sprite sheet thats 9 images 2 rows, 5 columns, with an empty space at the end of the second row. All of which is one single running animation. I've made a Sprite Class. public class Sprite GameView gameView Bitmap bmp private int x, y, width, height private int spriteColumns 5, spriteRows 2 private int currentAnim 1 public Sprite(GameView gameView, Bitmap bmp) this.gameView gameView this.bmp bmp this.width bmp.getWidth() spriteColumns this.height bmp.getHeight() spriteRows public void update() do something here with currentAnim, x and y public void onDraw(Canvas c) update() canvas.drawBitmap(bmp, x, y, null) How do I go about doing this? Am I on the right track so far?
7
How can I "publish" an Android game without Google Play? I'm new to development and trying to get a sense for the obstacles to publication If I need to circumvent the Google Play app store, can I publish a game to a website that people can visit in a mobile browser and download and install like any other app? How does publishing "around" Google Play work? Are there any particular success stories, best practices or problems I should be aware of? Apologies if there is an obvious answer. I believe I found the answer at one point, but I don't remember and can't find the link. edit Thanks everyone! I really appreciate the help. Definitely answers my questions. Looks like I have some options!
7
Android OpenGL ES2 How do I set fragment shader value using C This should be easy So I am using the following to create a fragment shader. GLbyte fShaderStr "precision mediump float " "void main() n" " n" " gl FragColor vec4(1.0, 0.0, 0.0, 1.0) n" " n" I then render a circle (collection of lines) the circle comes our red. If I change the code to... GLbyte fShaderStr "precision mediump float " "void main() n" " n" " gl FragColor vec4(1.0, 0.0, 1.0, 1.0) n" " n" The circle is now purple. My question is how do I control this dynamically? So for example when I receive an input I toggle the two colors? I tried... GLbyte vShaderStr "attribute vec4 vPosition n" "attribute vec4 inColor n" "uniform mat4 Projection n" "varying vec4 fragColor n" "void main() n" " n" " gl Position Projection vPosition n" " fragColor inColor n" " n" GLbyte fShaderStr "precision mediump float " "varying vec4 fragColor n" "void main() n" " n" " gl FragColor fragColor n" " n" void initColor() LOGD("Initing Color") GLfloat vVertices 1.0f, 0.0f, 0.0f, 1.0f glVertexAttribPointer(1, 4, GL FLOAT, GL FALSE, 0, vVertices) However, this doesn't seem to work as the circle is now black.
7
Why does my game display the wrong "required Android version" on Google Play? I'm porting a Unity game to Android, and I've set up the "Minimum API Level" in the Player settings to "2.3.3 (API level 10)". However, on the store, it says "Requires Android 1.6 and up". On the Google Developer Console I didn't find this setting, so I guess the store is just trying to "guess" it examining the application, and failing. Did I miss something?
7
OpenGL ES 2.0 basic camera issues I am having issues with the camera, I cant find how to invert the AXIS Now A point is 0,0,0 B point is 1,0,0 C point is 0,0,1 What I want is A point 0,0,0 B point 0,0,1 C point 1,0,0 I cant find the way to do this, so if you can explain also why is this happening it will be great! (if you need more code ask for it) Code final float eyeX 2.0f final float eyeY 10f final float eyeZ 6.0f final float lookX 1.0f final float lookY 0.0f final float lookZ 6.0f final float upX 1.0f final float upY 0.0f final float upZ 0.0f Matrix.setLookAtM(mViewMatrix, 0, eyeX, eyeY, eyeZ, lookX, lookY, lookZ, upX, upY, upZ) ViewPort GLES20.glViewport(0, 0, width, height) final float ratio (float) width height final float left ratio final float right ratio final float bottom 1.0f final float top 1.0f final float near 1.0f final float far 25.0f Matrix.frustumM(mProjectionMatrix, 0, left, right, bottom, top, near, far)
7
Most common resolution used in Android phones as of 2013 Before making an Android app, I want to know what screen resolutions I should target. I know there are resolutions of 1280x800, 1280x720 and 800x480, but I would like to know which are most common. Are there any recent stats on the distribution of Android devices' screen resolutions?
7
Structure GameObject States Visual representation Question What is the best data structure for GameObjects that have different states and thus different visuals? The situation is I'm creating a game for mobiles (written in Kotlin, no Engine used). My simplified object structure looks like this I have 2 GameObjects (e.g. Person and Obstacle) Each GameObject might have two different states (IDLE and MOVE) But each state might also have different graphics. For instance depending on the movement direction, the MOVE state might show Bitmap Left or Bitmap Right. Person WALK State Visualisation (WALK, PERSON) draw(bitmap walk left person) My problem is, that I'm really not sure about that structure. Should I make subclasses for each State or a composition? One Visual object for each State (e.g. MOVE, IDLE, TALK) containing all Bitmaps for Person and Obstacle and always showing the right one depending on the parent? Currently it looks like this I have the GameObject. The object has a state that is called in the update() method (e.g. moving a bit to the left). Every State has a "Visual" object that knows its parent State (State WALK). It draws itself related to its states type (e.g. WALK) and considers (if needed) the orientation (left or right). This felt like it keeps structures as abstract as possible but I'm not sure sure thats a good solution because all objects have to keep references to their "parents". So the visuals need a reference to the state (WALK) and to the GameObject (Person) in order to draw the visual for a walking person. Would it be better to create subclases for each State? So I have a class "VISUAL MOVE PERSON", "VISUAL IDLE PERSON", "VISUAL IDLE TREE" ... That seems a lot of redundant code and classes. Is there a common structure for Actions States and their Visual Representation? Especially since I will have many more objects with at least a few different states (IDLE, MOVE, TALK, ...) Should the visuals be part of each state? Or are they independent to each other (e.g. GameObjects have a State and a Visuals object) instead of the "chain of references" shown above?
7
Making use of the Android GPU debugging tools I tried following the manual to install the Android GPU debugging tools for android Studio 2.0. Unfortunately it has not been very successful. I have been following the instructions of the official documentation which are still for version 1 of the gpu debugging tools here http tools.android.com tech docs gpu profiler It also isn't that helpful otherwise. I am using an arm based emulator for testing since the abi specific folders specified in the manual are for arm abi's only. Also the red button above the gpu monitor that is used to start the debugging tools is grayed out for me and it tells me that the gpu debugging tools are not installed when I hover over it. Are there any extra steps I need to follow to get it to work?
7
Recommended way to handle sprite assets for different screen densities (Android) I am currently working on a 2D game for Android. All of the images that I render were created as SVG's and then exported to PNG's which I have placed in my assets directory. These images are also all sprites that I render using a sprite batcher. My question is around using different versions of the sprites for devices with different densities. I know that when developing a traditional android app you could place separate directories for separate density levels inside of res and then place the correctly sized versions of the images in question in these sub directories of res. What is a good approach when dealing with sprite images in the asset directory? Should I just have one copy of the sprites at a really high density resolution that I use for everything and I just render them on a coordinate system that is independent of screen size or should I resize the image based on screen density before I process it to create all my texture regions? Or is there another solution entirely? Currently I have one high resolution set of sprites that I use for everything, it just seems wasteful and inefficient for the lower density devices.
7
Error compiling irrlicht android using ndk in Mac I'm new to irrlicht and I have started with irrlicht android port. I have made the following changes to android.mk file LOCAL CFLAGS O3 DANDROID NDK DDISABLE IMPORTGL I. .. include I. include I documents karthik android android ndk r9 platforms android 18 arch arm usr include LOCAL LDLIBS L documents karthik android android ndk r9 platforms android 14 arch arm usr lib libGLESv1 CM.so ldl llog L documents karthik android android ndk r9 platforms android 14 arch arm usr lib libGLESv1 CM.so I have tried compiling irrlicht android using ndk build in terminal.It showed the following errors at first In static member function 'static void irr os Printer log(const c8 , irr ELOG LEVEL)' error format not a string literal and no format arguments Werror format security In static member function 'static void irr os Printer log(wchar t const , irr ELOG LEVEL)' error format not a string literal and no format arguments Werror format security In static member function 'static void irr os Printer log(const c8 , const c8 , irr ELOG LEVEL)' error format not a string literal and no format arguments Werror format security In static member function 'static void irr os Printer log(const c8 , const path amp , irr ELOG LEVEL)' error format not a string literal and no format arguments Werror format security make obj local armeabi objs irrlicht os.o Error 1 and then I googled that and made changes in os.cpp file as follows Changed the code, android log print(ANDROID LOG INFO, "log", message) to android log print(ANDROID LOG INFO, "log"," s", message) This change solved that issue, and then I got another error In file included from jni importgl.cpp 55 0 jni importgl.h 37 22 fatal error GLES egl.h No such file or directory Again I changed GLES egl.h to EGL egl.h and solved that issue, got fatal error irrlicht.h No such file or directory I even solved this , atlast I'm here with this error error 'EglDisplay' was not declared in this scope error 'EglSurface' was not declared in this scope error 'EglWindow' was not declared in this scope error 'EglContext' was not declared in this scope
7
How do I add leaderboard feature of OpenFeint in android? I am developing a game in android, by extending a class with view. I have integrated OpenFeint in it by studying the tutorial provided on the OpenFeint site, but I am not able to add the leaderboard feature in my app. How can I achieve it? My game class is like this public class GameActivity extends Activity Intent i Grapic g public void onCreate(Bundle savedInstanceState) super.onCreate(savedInstanceState) requestWindowFeature(Window.FEATURE NO TITLE) getWindow().setFlags(WindowManager.LayoutParams.FLAG FULLSCREEN, WindowManager.LayoutParams.FLAG FULLSCREEN) setContentView(new Grapic(this)) and Grapic is a class which extends view and where scoring is done with touch events.
7
Convert triangle mesh to group of line segments I have a 3D .OBJ model file that is loaded in my OpenGL ES 2 Android application using ASSIMP library. All the faces are triangulated. I want to draw the wireframe for my mesh. In OpenGL we have something called glPolygonMode that enables wireframe drawing just in one line. Is there a function I can use to convert those triangulated faces into a pair of Line segments and then draw these line segments using GL LINES? Any better approach to draw wireframe for 3D mesh in OpenGL ES 2 would be appreciated. Maybe something based on GLSL shader.
7
error after changing the app name I have made a game in Libgdx(eclipse).I changed the name of the app inside the string.xml file.Now I have an error in AndroidManifest.xml. in this line android label " string app name" (line 12). its written " No resource found that matches the given name (at 'label' with value ' string app name')." what is the solution?