Android :: OpenGL 2D Game Framework - Speeding / Screen Settings / Vibration
Sep 18, 2009
I've been working on a game framework for a little while, and while its far from perfect, I've put the current version online. To be honest, I haven't used much OpenGL in the past. Before last week I had never tried using it. If anyone would like to take a look, please do, I'd appreciate all the help possible on speeding it up. There are many features I have in mind and am planning at the minute, but so far it supports:
# Texture and Sprite management # Text, using TTF fonts # Organised layers # Two audio management classes, one optimized for music, the other for sound effects # Sprite dynamics (acceleration, terminal velocity, collisions) # Animation # Handlers to manage events fired through movement, animation, screen touches, accelerometer input, device shaking and collisions # Several minor features aimed at speeding development, such as screen settings and vibration.
View 1 Replies
Feb 4, 2010
I'm trying to develop a 2D game to android using opengl. I know how to print images on the screen and animate them. But in my game I have a map and a want to zoom in and out and scroll the map. But I can't figure out the best way of doing it.
View 2 Replies
View Related
Oct 5, 2009
I think, Android needs a game framework. Something like SDL or more, XNA from Microsoft. Of course, we can use Canvas to draw, but it is slow. We can use OpenGL, but after two days of learning I still do not know how to draw f** background. Of course, I will do that. Some day :) But state and flags-ful OGL interface is really hard to understand if you go from wonderful world of objective thinking. I just want to focus on creating art, not wondering how to create tools for that.
I'm worrying, really worring about Android and games. M$ has XNA, porting it to Zune with Tegra. After that, XNA will come to WinMo. If you ever used C# and XNA, you know, how simple and great it is. What does it mean ? Thousands of games for Microsoft Mobile Junk and still no great games for Android. Worst. Many Android developers will go to WinMo for XNA. Many games will be easily ported from Xbox Arcade too. And we will be wasting time, wondering, how to get 25fps from Canvas or OpenGL. Without sound. Now, I think, is the time to do something with that. Android really needs something like XNA, to allow us producing games without all that technic stuff like OpenGL, game loops with managing threads, times, buffers, right pixel format settings and others. What you think about official game framework for Android?
View 10 Replies
View Related
Sep 15, 2010
I am a beginner in Android game development, while searching i found Rokon, a framework for android game development. It has very nice five tutorials for beginning, done that all now i need some more tutorials so that i can learn more, some more complicated tasks. Now where to find other resources to continue on Rokon, or if there exists some other framework with more available tutorials?
View 1 Replies
View Related
Oct 13, 2010
What do you think is the best phone for OpenGL ES based game development? Large screen, OS 2.0.1+. Maybe even having the shaders path accessible from NDK.
View 19 Replies
View Related
Sep 14, 2010
im currently playing around with a Game that architecture is basically like the example 2d Games like JetBoy / LunarLander and so on. But as things now running (and animating continuously) they have kind of "hiccups" when the GC is running. I have done all i can to allocate as much Objects in front. There is nearly nothing that is created "new" besindes some Strings that are used to set the Score and so on. (TextView doesn't take int's =( - So do you have similar Problems that the GC is "lagging" your 2s game ? any solutions ?
View 12 Replies
View Related
Feb 12, 2009
I need to draw a background of 320 x 480 (fullscreen) for a OpenGL game. What I did was to stretch the texture to 512 x 512 and mapped it to 320,480 quad and then drew the rest of the game elements. I tried changing the texture image to 256x256 and no noticeable improvement in speed. Game was horribly slow even on the real device. It is actually slower on the device than on the emulator... I think i am the first one to have such a situation.. I am drawing a max of 12 triangles only 2 for background and rest are 64 x 64 textures. on 5 quad made with 10 triangles. I have disabled Depth, Lighting already. Only blending enabled as I use transparent PNG for texture of sprites. render cycle is like this - draw the background - draw the sprites (only 5) [with 10 triangles only] - swapbuffer... Please don't advice me to use 2d canvas, bitmap etc... I need to do it in OpenGL only. don't think OpenGL ES 1.0 is so incapable that it can't give me atleast 25-30 fps with just 12 triangles which you one 256x256 texture and one 64x64 textures (used by 5 quads...
View 20 Replies
View Related
Nov 16, 2009
I have a the beginnings of an Open GL game running, and have gotten to the point where it would be nice to have the FPS displayed. Since I will probably want to be able to put score or other info up anyway, I started searching for how to do that. I found the SpriteTest example, It looks nice, but really complex. Is there an easier way?
View 5 Replies
View Related
Jun 18, 2009
My game runs fairly well on my phone, but i want to increase the performance by using opengl. However currently i use the Canvas. I am a beginner in opengl. I have to port all my drawing code to opengl. However can somebody give me directions. For example how do i do the following in opengl:
c.save();c.scale(0.3f+scale, 0.3f+scale, width/2, height/2) c.drawBitmap( bMsg.bitmap, width/2 - bMsg.bitmap.getWidth()/2,dy+height/2 - bMsg.bitmap.getHeight()/2, MESSAGE_PAINT);c.restore();
And why cant i just use Canvas as an abstraction layer (facade) for opengl. An implementation of canvas could call the correct opengl methods in order to render. Why do i have to port all my code. I thought the canvas was a good abstraction interface to a drawing surface, why do i have to bother with opengl? It looks like this is possible, when is see the following contructor: "public Canvas (GL gl)" Also the this seems usefull. SURFACE_TYPE_GPU Surface type: creates a surface suited to be used with the GPU So what should i do? Re implementing the GamePainter completely and call opengl functions directly? Or is there some kind of abstraction mechanism, so that i can use OpenGL with just a few lines of code?
View 4 Replies
View Related
Aug 17, 2010
"Windows Phone and XNA. Nightmare is real. What we do with that ?" http://groups.google. com/group/android-developers/browse_thread/threa.M$ just yesterday announced over 50 games for his Windows Phone 7 platform: http://www.engadget.com/2010 /08/16/xbox-live-launch-titles-for-window.Till this day, I was convinced, WP7 will die. But now, with Xbox Live network and really serious and great developers game support, I can tell, Android with its crappy games is going DOWN on this field. Some of you have say, that real android gaming framework is not necessary. I think, in 3 - 5 months, M$'s WP7 will beat Android in gaming.This is the price for ignorance of your enemy potential. I'm afraid, Google will create gaming framework, when it will be just too late. Games ARE so important. Windows wins all battles, mainly becuase of games. Every osx/linux fan can tell you this.
View 3 Replies
View Related
Sep 29, 2010
How can we lock the current state of settings like wifi,gps,bluetooth,vibration,etc...after clicking on button1.and it should be unlock when button2 is pressed.
View 1 Replies
View Related
Jan 15, 2012
i'm searching an app where i can control the intensity of the whole system vibration settings. keyboard, alarm, calls...anything
i'm running cm7 with the siyah 2.6.7 if it's of interest...
View 2 Replies
View Related
Apr 8, 2010
Surprisingly, I don't seem to have issues with the OpenGL side of things (which is very unusual), but my problems stem from getting a clear idea for app architecture and a few other problems. Right now, most tutorials on the net just describe the render portion. I know that when I create a GLSurfaceView and hook a Renderer into it, it uses it's own thread for rendering.
I want to do logic operations and other gameplay stuff (like moving characters and whatnot) in it's own thread as well. Can anyone explain a good approach to this? I'm guessing the two threads will have to be synchronized (do logic, render, repeat), and limited based on time so that it performs smoothly across different devices.
View 1 Replies
View Related
Jun 17, 2009
I 'm porting a 6502 Emulator to android. I have it working, but only at roughly .3mhz (1 required.) After running the profiler I see the simply reading memory (byte[]) is one of the most costly operations. Does anyone have any ideas for speeding this up? Should I wait for the NDK? Or is my G1 just underpowered.
View 10 Replies
View Related
Apr 28, 2010
I've created a custom ViewGroup (based off of the Launcher) that allows paging scrolls between some WebViews. Problem is that it doesn't scroll as smoothly as I want it to. I've been following Romain Guy's 2008 advice, but I don't see any massive improvements. Is it because I am using WebViews, or am I just doing the prescaling wrong? This is my code:
Bitmap originalImage = BitmapFactory.decodeResource(getResources(), R.drawable.redbg);
originalImage = Bitmap.createScaledBitmap( originalImage, // bitmap to resize ((WindowManager)
getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay().getWidth(),
// new width ((WindowManager)getSystemService(Context.WINDOW_SERVICE))
.getDefaultDisplay().getHeight(), // new height true); // bilinear filtering
getWindow().setBackgroundDrawable(new BitmapDrawable(originalImage));
called from onCreate. Is the right?
View 3 Replies
View Related
Nov 8, 2010
I'm planning to develop a 2D game for Android devices without a dedicated GPU, like the HTC Wildfire. I remember from the PC that OpenGL is generally to be chosen over something like SDL for 2D graphics because of speed and features. On Android, there are two APIs for graphics: A "normal" 2D API (does it have a name?) OpenGL ES 2.0 Which one should I favor for a 2D game that should run on Android devices without a dedicated GPU?
View 1 Replies
View Related
Sep 9, 2009
Could an alternate home screen app replace the assets such as s "menu_item_background_pressed.9.png" or "list_selector_background_focus.9.png", both found in frameworks/base/ core/res/res/drawable in the open source project? I have altered those by changing out the assets and recompiling.
But can I make it so the installation of the home screen will open up framework-res.apk, replace the asset, then re-package framework- res.apk? I realize this would then have broad ramifications, but just wondering if it could be done. thanks.
Also wondering if a alt home screen app, can replace icons of core apps, such as Contacts, etc.
View 5 Replies
View Related
Nov 12, 2009
Is there a way to alter the intensity of vibration or the type of vibration for different notifications? Same goes for the LED light
View 5 Replies
View Related
Oct 7, 2010
I have follow an example of an opengl application and I don't know why is this thing happening...I have a GLSurfaceView with it's corresponding renderer drawing a triangle. But, instead of getting the whole view on screen, I have just the upper half, and it's also duplicated as you can see on the picure. I'm using a Nexus One.
View 3 Replies
View Related
Sep 14, 2010
... like "Swype settings" in this picture. Been searching for hours on how to do this. Going to go insane.
View 2 Replies
View Related
Oct 23, 2009
I've just dusted off an application I did for Android half a year ago. I upgraded to the latest SDK and Eclipse ADT. After some struggeling I get the application to run again. When I debug it I can see that all the right code are executed the right way. The application shows a OpenGL surface and animates stuff on it. It used to work perfectly (I even have it running on my HTC Magic device), but in the new emulator the screen is just white?
View 11 Replies
View Related
Apr 7, 2010
For some reason my code here (this is the entire thing) doesnt actually render anything besides a red screen..
can anyone tell me why?
CODE:.................
View 2 Replies
View Related
Feb 9, 2010
I am very new to OpenGL ES. I am implementing some demo app to load multiple textures on the screen. For demo purpose I have loaded 2 textures in 2 different locations on the screen using glTranslatef() and glBindTextures() twice. Now I am able to see 2 different images on the screen. Now I want to move one particular texture across the screen using mouse.
View 2 Replies
View Related
Feb 25, 2009
Single Threaded OpenGL game ! (check bottom, you can download and use the helper class) Lighting disabled ! Depth Buffer disabled ! Culling enabled ! Textures disabled !
Just 176 integers (x,y values only) making 88 vertexes along with 132 index numbers making "44 triangles only"
Framerates I get is
with GL_BLENDING disabled - 145 fps approx only! enabled - 110 fps approx only!
I have the screenshot of exact code in the draw function here.. just 2 damn lines ! I have hidden only the comments.. click here to see it http://prasna991.googlepages.com/drawframe.png
variable details in the 2 lines of code =========================== ipts = 176 elements (only x and y for each vertex) totallinetriangles * 3 = 176 lineindexes = 132 elements - type "short"
Here is the screenshot of output drawing and how it will look like http://prasna991.googlepages.com/screen.png
OpenGL single threaded Initialization Helper ================================ Here is my OpenGL helper class.. makes the OpenGL initialization for newbies a cakewalk http://prasna991.googlepages.com/OpenGLHelperclass.txt
I tested by rendering on the touch event only.. frame rate drops only when u touch and drag and here I have just tested by tapping and releasing gently on the emulator and on the device
Is this the device limitations ? So graphics is actually a lot lot lot slower than on iPhone ?
View 8 Replies
View Related
Jul 24, 2010
I would like to be able to use the OpenGL API from both Java and C (via NDK).
In Java, there is a GL object passed, which has all GL methods on it.
In C, you just talk to the native library.
In a single onDrawFrame callback (for which Java is passed a GL), can I use methods on the GL object, and also call NDK methods which access the openGL library?
In other words, is the GL object just a wrapper for the same instance of the native library?
View 3 Replies
View Related
Aug 12, 2009
Is there anyway I can embed my application's settings to global settings screen (resides in launcher as Settings) without modifying the Android Settings application.
View 2 Replies
View Related
Jun 27, 2010
Can somebody take me step-by-step how to draw 2D stuff over a 3D scene (such as controls, etc.). What I've been doing so far has not been working (it only draws the 3D scene), which is (in every frame): draw the 3D scene as normal, projection matrix mode, load identity, call GLU.gluOrtho2D(gl, 0, myScreenWidthInPixels, 0, myScreenHeightInPixels), switch the array pointers (vertices and texture coords) to the ones for my 2D stuff, then drawElements with an appropriate index list. (then switch the array pointers back so the 3D stuff works again).I get nothing added to the screen (just the 3D stuff).Do I need to be doing something else for it to draw? Can somebody take me step-by-step?
View 5 Replies
View Related
Oct 16, 2010
I got Samsung Galaxy 5.
I got some gameloft games (HD versions) installed but as I Run them only Top left (approx 1/4)view of game screen appers.
As whole game can not to fitted on one screen..
|--------------------|
| |
| |
| |
|Gamel |
| |
|--------------------
It looks like half of screen is cut like on "oft" of Gameloft is invisible
View 3 Replies
View Related
Jul 24, 2010
I want to be able to slide to unlock my phone WITHOUT the vibration. i have gone to settings to disable haptic feedback, but the phone will still vibrate when i slide to unlock.
View 2 Replies
View Related
Jan 29, 2010
After upgraded to 2.0.1, the screen unlock always give me phone vibration. Does anyone know how to disable the energy-spending vibration from Setting? I could disable the 4 soft buttons vibration but I don't know how to disable this.As I remember, there is no such vibration in version 2.0.
View 7 Replies
View Related