Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I want to make rolling cube like dice that reacts on accelerometer. So accelerometer gives parameters for cube moving. I think that small physic should be used here. My question is what formulas, techniques should I use to accomplish this without any physics engine.
You will need probably to use OpenGL for that. There a good physics tutorial for OGL here
Specifically for dice, take a look at this nokia demo. It's written in cpp (source here)
On the physics side, you can take a look at this site.
Anyhow, I do not think you need real physics for the app, but just an approximation:
I would start getting a velocity that depends on the accelerometer (plus or minus, let's say, 20%) and random angular speeds for the dice.
Then, find the trajectory for each and when touching a border.
Bounce them to one direction or another depending on the rotation at that particular moment.
Change the sign of the angular speed if the dice bounce back.
Reduce the speed about 50% each bounce, until a threshold.
Below that threshold, leave them in the floor and stop movement.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
In the game i need to the user to draw a figure, for example a rectangle, and the game has to recognize the figure. How can i do this?
Thanks!
This sounds like you would want to use a Neural Network. If you don't know what that is: It is basically an Artificial Brain which can do simple tasks like classifying (recognizing) shapes. It's really easy to do with tensorflow, since it's easily integratable into Android: https://www.tensorflow.org/mobile/android_build
Then, you would train your classifier to differenciate between Circle, Rectangle, Triangle and more. For this, you should draw some rectangles and triangles in your app, save them as images and label them yourself with what is in them. Then you can use those images with TensorFlow to train your AI to recognize images the user draws.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
There is an app named Funny Face Effects on play store.
I am trying to achieve the effect in which when a user moves the finger on image, pixels under the finger in certain radius shifts in that direction. It feels like moving a cloth with a finger or moving some thick paste with the finger. I could not find a proper name but I think it is called smudge.
After searching and trying I found that I can achieve this with GPUImage library.This library uses OpenGL fragment shader to apply some effect on image. I tried this but to get the continuous effect I have to save each finger position(each point on line) and apply filter for each point which is not feasible and it stuck after drawing more lines.
How to achieve this effect with OpenGL-ES?
It will be good if code is provided but just the idea of implementation will also work. Thank you.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I am new at Android game development. I want to know how can i create and Animate the game characters i have in mind. Is there a tool out there that can help me get started with the drawing or i have to draw frame-by-frame.
I am targeting simple 2D games.
What you'll need is a sprite sheet. A series of images on the same bitmap laid out in a grid. For example you would have 8 different sprites of the same character, 1 standing still., 1 left foot forward, 1 right foot forward and jumping and again facing the opposite direction.
When you draw the sprite set the coordinates to be drawn and on button presses change the variables controlling the coordinates.
A good tutorial is here http://warriormill.com/2009/10/adroid-game-development-part-1-gameloop-sprites/
and a sprite sheet maker can be found here http://www.codeandweb.com/sprite-sheet-maker
Hope this helps!
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
There is that app called "turkey blast: reloaded" (link below). The graphics and animation of the game are amazing! Also it is 2d but looks like 3d, I'm not sure how to explain it. Anyways, I am also making an app which is quite different from that (nothing alike..) but I love the menu and the sound and the graphics of this game. The game that I'm working on is about to be finished but its not even close to that kind of level... One of the things that interest me the most in this app is the graphics. How can I make a game with this kind of graphics? I have someone that draws the sprites for me but its hand-drawn, what kind of program do they use? also, how did they make that menu? (all the items in the menu are arraged in a way that you can scoll in them <------> to get to the item that you want.) I am just using texture and texture region. Thanks!
Turkey Blast: Reloaded
https://market.android.com/details?id=com.ezone.Turkey
How can I make a game with this kind of graphics? I have someone that
draws the sprites for me but its hand-drawn,
If you want pro graphics you will need to hire a pro artist. There are several websites where you can find one, including guru.com, odesk.com, etc.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
i am planning to make racing game in android.I have created many applications in different mobile technology. but i am pretty much beginner for game application. So my question is how can i make race track in android? How should i show that car is moving on that race track.
I have the images of cars and race track. But i have no idea how should i show the part of race track and how should show that car is moving on that track??
I suggest you download AndEngine ( an open source 2d android game develoopmnent framework ). In the examples there is a (very simple) race track demo with a movable car + controls + obstacles. If you have troubles you can always get support from the forums
AndEngine has a very easy learning curve :-)
Have fun creating your racing game!!
Here are 2 good tutorials on starting with 2d:
- Canvas tutorial
- OpenGL tutorial
The last part, about showing only a part of the map, can be achieved by using a BoundCamera in AndEngine.
You should start with studying the 2D graphics capabilities of the Android library. Here's another good reference article. It lists some drawing options including drawing to the Canvas object which is probably the right choice for the kind of game you're describing.
Here's a full but simple example of handling the onDraw event for a canvas and performing custom drawing. Here's a small bit of the code:
paint.setColor(Color.BLUE);
canvas.drawCircle(20, 20, 15, paint);
The above is a simple example that draws a circle with a particular size to a particular location on the canvas. It's a good place to start. To finish your game you'll be drawing bitmaps which is a more complex process but conceptually similar.