I am planning to do an app that involves triangle colliding with circle. Also determining how fast the user touches the circle while it is is moving.
I am already experienced with android development (but limited on drawing but knows the basic). Should I go with surface view drawing or should I start learning libgdx for the above purpose? And what would be the rational "so it is not vague/opinionated question"
Thank you so much
I suggest you to go with libgdx. It is very well designed, well documented and has a friendly community which will help you to quickly get started.
Furthermore it will be a lot easier to render graphics elements, which would be a lot more difficult with "pure" Android/OpenGL.
Another great feature you might be interested in is that libgdx has a Box2D extension, which might help you with the triangle/sphere collisions, if you are planning something more advanced here.
And last but not least libgdx would be my preferred way of developing a game, because I can develop it on desktop and then just deploy and test it on my mobile device.
Related
I've been given a task of designing an app in android with the UI created in OpenGL. The reason for this approach is the fact that the app will be a port from iPhone and Android does not have such smooth animations and graphics as IOS.
I have experience in Android development but I'm totaly new to OpenGL.
Is that approach reasonable to create GUI in OpenGL? If not, why? If yes, how do I start?
Is your application a game? because if not, I think using OpenGl just for creating a fancy UI might be too much. It leaves the door open to do things inefficiently, and probably, get a lot of bugs.
You can get a lot fo smootth animations using the different animations of Android.
If you still want to go with OpenGl, I will first advice you to start with Android Documentation
I am planning to make an android game. The game doesn't include a lot of movement. It will be like custom maps that user can switch between, maybe zoom in and out, select parts of the land, draw some objects on the map. User should also have a dashboard to manage his game . It will NOT include objects moving like cars/people.
I am new to both Canvas and OpenGL-ES developing but i feel that OpenGL-ES includes a lot more that what i need.. but just little skeptic if Canvas would be good enough to fulfill my requirements.
So, what would you advise me to do?
Thanks in advance.
Adel
I would say it's a difficult one to answer as it's virtually impossible for anyone but yourself (as the game designer) to know which one your particular game would require.
However, I would say, personally, I would go with openGL ES 2.0. I spent months designing a game (and even longer writing it) only to find that canvas wasn't powerful enough. Granted it did have 'moving objects' but not a huge amount of them - and it ended up with a lot of jerky movement that I just couldn't eliminate, so I am in the process of re-coding it with openGL ES 2.0.
I would say, look at some examples of games written with Canvas / Surfaceview and judge to the best of your ability which one you think you should go with.
Bear in mind while making this decision, that if you think Canvas / Surfaceview would be good enough, then go for it, however even if it is, are you going to be creating more demanding games later down the line? If so, then like I said above, I would just jump straight into openGL ES 2.0.
Canvas = simpler coding, worse performance
Open GL ES 2.0 = more demanding coding, but potential for much better performance.
Just my opinion!
I want to know the best way or a tool for making a good Android game!, I mean by "good" that the game must have a nice performance no lags or something like that, ..
So I will begin by 2D game development, and I want to avoid "Game engines"! ..
So what's the best way?! - to make it by Open GL ES or there another way?! ..
You should be able to learn a lot about open gl graphics programming by looking at Replica Island. Its an open source 2d Platform game which uses no engine.
The author gave some talks on Google IO which might be of interest to you:
http://www.youtube.com/watch?v=U4Bk5rmIpic
http://www.youtube.com/watch?v=7-62tRHLcHk
http://www.youtube.com/watch?v=cdvaPyq_eBU
It's possible that this is considered too broad a question - we can't tell you how to make a game. But in response to your last question: yes, OpenGL is the best way to make a high performance game in 2D or 3D. If you have a more slow moving, turn based game, then you could stick to a Canvas on a SurfaceView or even use basic View widgets to build up the layout of a game board.
But if it's your first game, unless you have a lot of time and patience, I would strongly urge you to try an existing game engine. You may not realise how much work goes into a decent game engine until you're halfway (or 10% of the way) into making one. Have a look at the source of an engine like LibGDX and think about whether it's the sort of thing you'd be able to write.
There's plenty of info in the Android graphics dev guide.
You do not need a game engine to develop a 2D game in Android. You do not need to use SurfaceView either. SurfaceView, OpenGL and AndEngine and (maybe other game engines) have issues with consistent sprite animation speed and size of sprites across the various Android devices. Especially when the game has complex sprite movements. I went crazy trying to build a 2D game with consistent speed movement of sprites and sprite sizes in relation to screen size and density (e.g. tablets vs phones). So, I decided to drop the game engines and this is how I accomplished my first recently published 2D Android game:
Use drawable-nodpi for sprite images (gives sprite size consistency
across screen densities and sizes)
Use different layouts to support various screen sizes (e.g.
layout-large, layout-xlarge, etc...)
Use TranslateAnimation and ObjectAnimator to animate sprite movements across screen
Use math to figure out sprites collision (e.g. screen coordinates and sprite location etc.)
Use handlers and condition statements to control the game events
You can test the outcome of following the above guide to developing a 2D Android game without game engine by checking out the game. It is called Yum Yum Pow available on Google Play. The free limited version is available also on Google Play. I can only link to free apps I think, so here it is:
https://play.google.com/store/apps/details?id=com.wildroid.yum.yum.pow.limited
If u are planning to build a simple game then stick with Basic android.If it is a big game,With out game engine your game developing will be a heavier process.if u want to use a lot of images then memmory problem will occur(OOM).if u are comfort with the game engine that will be easy for future game developing.if u are making a simple game then there is no need of game engines.
there are so many game engines available
andengine,libgdx,cocos2d..
Can I Use both Adobe Flash cs5 and OpenGL to create an application on an android OS4.3 device?
I am creating a 3D chess game compatible for an android OS 4.3, so I am using eclipse and the SDK obviously.
The problem I have now is I am meant to make the chess pieces human like. For instance, the pawn pieces should look like miniature foot soldiers and the king piece should be a figure of a person sitting on a throne etc. I started with OpenGL but because I am new to it, I might not be able to carry put displaying the graphics with OpenGL. So I decided to use adobe flash cs5 to create the pieces and use OpenGL to make the chess board because I can do that and also because in my specs, I said I would be using OpenGL.
I want to know if this will actually work and also if there is a much easier way of doing this I just haven't thought of. Any suggestions would be appreciated, especially how to implement this with the A.I.
If anyone has a sample or an idea I could work with, I will also be very grateful.
Adobe has said that "Stage 3D" support will be coming to mobile devices in the future, but in the meantime, there are not any ways to accelerate 3D with Adobe AIR.
Although Away3D or another 2.5D library would be fast enough for the web or desktop, I am not sure how well this will work for mobile, as AIR moves slow enough even for 2D games.
Since chess is a relatively static game, you might be able to create 3D graphics, then render to 2D sprites. I was the lead engineer for a large Facebook game, and we used this approach. ALthough it required more file size, it worked very well for quality and performance. The end result was something similar to Diablo 1, but in a cowboy theme instead of medieval.
Although it does not have true 3D support, yet, you might also consider looking into NME. That Facebook game I made ran at 5-6 FPS using Flash, but topped 30 FPS using NME on my old Palm Pre (so not the fastest phone in the world). That might help give you extra overhead to be able to lean into rich graphics. The framework will also publish as a true C++ NDK application, so it is actually possible to extend or modify the framework (it's open source) with your own OpenGL calls.
Here's the website if you're interested: http://www.haxenme.org
I want to create a simulation game and a main component of this simulation will be a 2D map (topographical/navigation map), which shall have different layers (objects are moving on the map, using of labels, you get it)
The question for me is now, shall I use OpenGL to accomplish this or is that not necessary? I have no special requirements apart of that the scrolling and zooming shall be smooth. The target platform are only Android tablets (so Android OS 3.0+).
Edit: To precise my question:
platform independence is not important for me
I'd like to go with the easiest way concerning implementation efforts
If and only if you're really targeting Honeycomb specifically, then don't bother with OpenGL... and I say that as a reasonably experienced OpenGL programmer who's done some cool things with it on Android.
My reasoning is that, starting with Honeycomb, the normal Canvas-based APIs are hardware-accelerated too. Typically the only real reason for using OpenGL was greatly increaased performance, but that is no longer the case.
Or so the theory goes... I've yet to see actual Honeycomb hardware and run comparative tests. What I do know is that the Honeycomb emulator shows triangular tearing everywhere, strongly suggesting the whole desktop is now going through the GL pipeline.
If you have solid experience with OpenGL go with it. If not try some performance tests before you really decide if you invest time to learn it or if you use the good old simple 2D canvas drawing...
I'm not an expert on OpenGL + android (or any other mobile devices), but I think you will get better results (more FPSs, better drawing and animation options, etc) using OpenGL.
If you're used to non-OpenGL android development and are new to OpenGL it would be easier develop the game without using OpenGL. But before you choose this option, be aware that it should be a better option to use OpenGL if you aim to achieve beautiful/good performance graphics!
In short, if you master "regular" android development and prefer to build something good enough in a short time, stay "regular". Otherwise, I advice you to go for OpenGL.