Side scrolling android game developemnt - android

I am implementing a side scrolling android game. The player should move in a diagonal direction and the objects around him seem to move back ward.
I have structured my app like the open source project (replica island) by Chris Pruett.
I can render the obstacles and the player, but unable to move the obstacles.
Any help in this direction is greatly appreciated.

First of all: I am not familiar with the source code of "Replica Island" (I've played the game, though).
If you want to move/physically manipulate objects in your world, I'd suggest you use a 2D physics engine. A good start would be jBox2D or chipmunk for Java. Both are very similar.
It is quite easy to integrate in a game and fun to use, but the approach of character controlling is quite different to a game without a physics engine. For example, you apply forces to your character to move him around and do not set his speed/position manually.
I'm sure you'll find plenty of examples and tutorials for both physics engines out there.
HTH

Related

How to create Fluid motion in android

i need to render Fluid inside a bottle and when the device is rotated
Fluid dynamics isn't a simple topic. The simplest example of fluid flow is 2D, incompressible, irrotational, laminar flow. I'd start by looking into that.
You cannot do it in a week, you'll have to learn it.
You can learn from this java example http://www.jbox2d.org/liquid/ Unless your simulation is very small and 2D, you'll probably need to use a C/C++ library with the NDK to get any reasonable framerate.
Google did release a Physics library based on box2d (using NDK) for android. http://google.github.io/liquidfun/ This could be a good resource to get started but unless you understand Physics well, you won't be able to do much.

What do I have to learn or should use in creating a 3D android game?

My thesis is to create an 3D android game. I have installed the 3D softwares like 3DS Max, ZBrush, Blender. I also downloaded Android SDK for Windows and I have Eclipse Juno. But I don't know how to start. Thank you in advance. :)
If you want to write a game, use a game engine.
I would advice against using OpenGL directly if you want to focus
on game mechanics or story. 3D game engines like
Unity or JMonkeyEngine
give you all the tools you need to turn your 3D assets into a game:
Importers for various file formats, a scene graph,
math libraries, and usually tons of example projects that get you
started quickly.
If you want to write a rendering engine, use OpenGL
With OpenGL you can build everything mentioned above yourself: Write
or find importers for your assets, figure out a lighting model, write
a scene graph. If you want to do all that, cool, use OpenGL. But
doing this technical stuff will keep you busy; you will have less time
to make a really great game.
I prefer OpenGL ES for Android. Good performance and easy enough to learn.
It's better to start from basic with opengl and then understand concept of using 3d and then prefer standard tool to use.
I have listed android game engine tool for 2d and 3d. Hope it might help u.
https://stackoverflow.com/questions/17163446/what-is-the-best-2d-game-engine-for-android/17166794#17166794
Start with unity3d which is a game engine, I am not sure but the names that you have posted are used for making 3d models for the game.
Your Thesis? That's pretty broad scope! :)
What I would be looking for, is something with lots of example code (since you say you don't know where to start) and good community involvement (ditto the start thing).
If you only need a single player setting, then I would suggest libGDX as a place that would be a good jumping off platform, as there are lots and lots of step thru tutorials along with lots of example code (and a very up to date wiki on the API), and a pretty good group at helping out with issues.
Since it is open source, you can dig as deep as you want into the inner workings to understand (or be mystified like me) as to how the code is accomplishing whatever task you are looking at. (which might be handy for your thesis)
While it might not be quite as polished as some other commercial 3d development kits, the BadLogic crew has made some very big progress the past few months on the 3d side of the house, along with breaking my JSON code... thanks! :) )

Are there simple AR SDK that does not use image recognition?

I'm looking for a 'basic' AR SDK that allows me to draw images and 3D shapes around the user (no matter where he is). It would be even better if the SDK includes a simple way to detect interaction with the shapes (something like onClick).
I made a project from scratch on Android but there's still a lot of work to do and I'll need to do the same on iOS after... So that's why I'm looking for an SDK or a similar project (no matter what platform).
I tested Metaio but it's quite expensive and maybe overkill for my purpose because it uses LLA coordinates.
I tested DroidAR on Android but it's only for Android and it looks heavy too (don't need the GPS).
How about Qualcomm's Vuforia? I was able to quickly get a sample project running on it.
EDIT Looks like I was wrong about what it could do. According to this (which is slightly dated, so who knows) Metaio might be your only choice.
i really don't sure what you really want to do ..but if you simply show images or 3d models on camera without any detection you can achieve this very easily i am explaining for Android and you can extend it to ios on same logic.
first approach:
you have to use custom camera of Android in your app,then use any game engine as per your need..i will suggest Jpct-ae or Rajawali
they are very simple to integrate and can be used for 2d images and 3d models.
this tutorial will explains a lot
keep the gl-surafce transparent and you can have model floating in space ...
second approach :
to add some more effect to your AR app you can use sensor values to move model in 3d space as per movement of device..it gives a cool effect.
use first approach and additionally collect sensor values and apply that matrix to gl camera of your game engine..for sensor values follow here
good tutorial here..
i hope this may help you..i done these a long time ago but try to help if you want..

How to start with 2D

Ok my question is simple:
How do I start working with 2D graphics on android? Untill now,I found on the how to make almost anything on Android,however with graphics I see is harder.
On the android sdk website,I get some simple codes that don't really help me,and I also searched for a book,guess what,I didn't find one that actually shows you how to make a little game explaining me what does every line of code.
So: How do I start working with 2D graphics? I'm interested because I want to make some games.I would be very happy to find a tutorial for ex. that shows you how to make a little character that just jumps over a box.I know you need an engine and all that stuff,and I would actually want to learn how to make a little engine.
libGDX runs on Android (and a few other platforms) and provides high level 2D graphics features like sprites, fonts, tile maps, particles, etc.
Tutorials here.
A few complete demo games with source code here.
Here's a whole series that seems pretty decent, and starts from the beginning.
Also, the techniques of "generic" 2D programming apply, so general-purpose game engine information is useful as well.
If you are interested in android games(2d), I recommend this book http://www.amazon.com/dp/1430230428/
The following book is very good for learning 2d graphics in Android.
"Android 2D graphics with Canvas API".
http://www.amazon.com/Android-Graphics-Canvas-API-ebook/dp/B00DKIAVK8/ref=sr_1_8?s=books&ie=UTF8&qid=1374420538&sr=1-8&keywords=android+2d
It is not for game developers though.
It teaches how to use graphics primitives and work with different coordinate systems. It also has a chapter on multithreading.
It has many simple examples good for beginners.

Converting html5 canvas to android

I've been spending the last week to develop a little platform game with HTML5's canvas element.
I was thinking about trying to port my game to the Android platform, but came across a few questions.
I have never done any Android programming, nor Java!
Only Javascript and PHP - but belive I have a good understanding of programming in general.
Will I be able to use the same procedure for building my game? Here I mean, my way of drawing everything on the screen/canvas. The rest is just calculations, and should be easily ported?
Every game loop I draw the background image, all items, and both players.
What would be the best way to control a platform game on a touchscreen? I was thinking about detecting parts of the screen individually.
Finger on right side: Walk right
Finger on left side: Walk left
Tap screen: jump
2 Finger tap: place bomb
Any suggestions or links are appreciated. Let me know if you need to see any code or an example of the game.
I suggest you look into using cocoonjs with your experience in php/javascript. It is really new so there is not a lot of documentation but if you pick through there demo code I am sure you will be fine.
http://wiki.ludei.com/cocoonjs:devguide
Am not being specific here but I think you can look up on Appcelerator Titanium and Phonegap to write Android apps using PHP and Javascript. There is a difference between how they function and what they do, though.
Here are some links:
http://www.appcelerator.com/products/titanium-mobile-application-development/
http://www.phonegap.com/home

Categories

Resources