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.
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I am creating a simple graphics application, where the user can draw several shapes, change the shape color-size, zoom, rotate the device etc. After researching, I found out that there are many options on how this can be achieved and I find it hard to choose which approach would benefit me more. One approach that I have started testing is to create a custom view and to draw on Canvas.
Is this option valuable in order to proceed without having the futuristic fear of low performance resulting to switch over something else (e.g. something like OpenGL)?
Or better, given the brief description above, what would you recommend as the best option?
As this is an opinion based type of question, I think this one might get closed, so I'll type fast: I think to get your app up and running fast, Canvas is your best approach (lots of easy docs and examples out there), unless you're already an export in OpenGL, to which there is quite a steep learning curve. It doesn't sound like, from your app requirements, you would hit upon any serious performance issues, and, as I say, you can get thing running quickly. If performance is not adequate, you can latter switch to pure OpenGL or use a framework for it like libGDX, Rajawali, AndEngine, 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 creating an interactive book application for Android. Currently I am using AndEngine.
The interactive book has 30 scenes with different animations and backgrounds. That means will use at least 30 different backgrounds. Also there are some heavy animations that takes a large part of the screen.
For example, there is one scene which shows a little kid crying, that little kid image takes most portion of the screen. Also there is a scene, there is a large gift box, and then it opens and shows some toys. (The animation is almost full screen, much more like a video)
I am a little bit confused about how can I optimize the application. The goal is to reduce load and lag.
There are several questions :
1.) The common best practices is to use sprite-sheets. Should I put all the different backgrounds and sprites in one file?
2.) Should I load all the backgrounds and sprites first then use it throughout the application? Or should I load only the required background and sprite at the beginning on every scene? (When starting scene 1, loads background and sprites for scene 1 only)
3.) For the heavy animations (like a video), what is the best practices for creating them?
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
We created graphics for many mobile apps, but this is the first time our designer has to create graphics for 2D game.
Should he create a Photoshop file like in mobile app projects or there are some specific things when creating 2D-game graphics?
I tried to find answer on the net, but I found nothing on this specific issue. I would appreciate someone who is familiar with game coding replies as he had probably received graphics to implement into his code.
Basically most 2D games are tile based.
So your designers should provide graphics files where all possible artifacts and animations are visible.
Afterwards you need to take snippets from those images to create tile sets that are usable by the game engine that you are using for each game level.
An example of editors for tile set editing is the famous Tiled, http://www.mapeditor.org/.
The game engine is then takes care of for locating a tile set for the given level, and using the available tiles for the background and character animations.
I'd say that it depends on what tools/frameworkds you want to use...
If you intend to use cocos2d (really nice 2D mobile game framework), then you should definitely have a look at CocosBuilder (http://cocosbuilder.com), a great editor for collaboration between designer and developer.
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 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.