Android :: Compensate Drawing Delay From Game Logic Updates

Aug 24, 2010

Now I have (1: the UI-loop, there my SurfaceView is placed), (2: a second thread, there the draw function from the UI-loop is called AND the update calculations from my Engine) and (3: the engine, there all the calculations stuff are).Now I wonder how the best and smoothest way to do the SurfaceView independent from the actual frame rate. How shall I do so it will compensate if there is a low frame rate?

Android :: Compensate drawing delay from game logic updates


Android :: Responding To Preference State Updates Logic

May 1, 2010

I am calling a PreferenceActivity from another activity and then updating the application state (ie: changing the font size) on onActivityResult, based on the preference changes. I was thinking it would be better to put the state update logic in the PreferenceActivity. That way I don't have the duplicate the logic in each activity that calls the PreferenceActivity. What's the best or correct way to do this?

View 2 Replies View Related

Games :: 1 Minute (Logic) Game For Android Market

Mar 7, 2010

I'd like to announce the release on the Android Market of our last creation: 1 Minute Game. The main concept is very simple. The computer shows puzzles based on numbers, shapes and colours: the player must solve them and touch the correct answer to go to the next round, trying to be as fast as possible. We implemented 3 different modes that must be unlocked by playing more and more. You can play games under the "Training" areas so to train yourself and challenge your friends locally (there are 6 slots to store the profiles of the players).

Online Challenge
But the core of 1 Minute Game is the online challenge, which allows the players (once per day) to play a special match and to send the result to an online leader board. Each score shows also the nationality selected by each player try to get your country at top of the ranking. The ranking is visible both through the application and visiting the web site of the game.

Free DLC
In order to make the game more appealing and let you enjoy it for more time, we are developing new games to be released for free in the next versions of the application. For example, this morning (it's a matter of minutes) we will release the version 1.1 which contains a brand new game in the training section: The intruder. In each round, all of the objects shown on the screen share the same characteristic (same shape, colour, number or animation) except for one: that's the Intruder!

New games of logic will be released once they are completed and fully tested through future news.

LITE version
There is also a LITE version in the Market: 1 Minute Game LITE (limited number of levels, no online challenge and 2 slots to store the users' profiles), so you can try it and see if it is worth to buy the Full one. This LITE version includes the additional training "The Intruder" as well.

DOWNLOAD
the game can be downloaded from the Android Market. Just search for its name or click on these links with the browser of your Android smartphone:
FULL version - market://search?q=pname:com.wepromite.oneminutegame
LITE version - market://search?q=pname:com.wepromite.oneminutegamelite

View 7 Replies View Related

Android : Game Math / Logic Calulating Movement?

Aug 26, 2010

I know this is more of a general programming question, but my Android friends here have always been helpful. I am trying to make an image move from one part of the screen to a position the user touches, as a constant speed. I don't know the best way to go about doing this and the way I have been trying to get to work is taxing my brain too much.

I have been using geometry to calculate slope, then using Sin * movement speed to calculate the difference in X,Y coordinates.

This is the codecode...

The problem that I'm having is the image is veering way of course when traveling in Y heavy paths. When traveling horizontally it works almost perfect.

I know there is probably an easier way though I don't know how to use a lot of things (like OpenGLES) so if your advice is to use a different method please link a tutorial for that method if you know of one.

View 7 Replies View Related

Android :: Making Game's Logic Supporting Multiple Screens

Jul 25, 2010

I've read the article "Supporting Multiple Screen" on Android developers site. But that doesn't apply to game logic.Let me get straight to the point. My situation is as follows:

- I'm creating a game using LunarLander code as a base.

- In my game, there'll be an object flying up from the bottom of the screen. The object will fly in projectile motion.

- I set the starting velocity, gravity and angle so that the highest point(of projectile motion) is almost at the top of the screen.

- The screen tested is Motorola Milestone. (480x854 resolution) Meaning the object travels around 854 pixels vertically.

I'm thinking of adjusting starting velocity based on screensizes. But that sounds unreliable when we've so many devices/resolutions out there. How do you combat these kind of problem when making games?

View 3 Replies View Related

Android :: Android OpenGL Game - App Architecture / Threading Logic

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

Android :: FrameLayout For Drawing Overlays In Game?

Nov 15, 2010

I've got a game, a custom View class draws my gameboard. I'm thinking of drawing some elements on a separate layer above the gameboard. I could do this in the View's canvas code, but since they won't change frequently, was thinking of introducing a frame layout to display this top layer.I'm not sure which route to take, the only reason I wouldn't do the FrameLayout is because I'm not sure if it has an impact on battery life. Everytime onDraw() is called, the system probably has to do an alpha composition of the two layers. Is that more battery consuming than drawing the elements from that layer myself in my canvas on every frame? Hard to answer since I'm not sure how complex the drawing will be yet, any general opinions?

View 1 Replies View Related

Android :: Game Stutters When Drawing Outside Screen

Apr 25, 2010

I have a game built for 480x320 screen resolution. When playing the game on a phone with a higher screen resolution (480 x 800 or 480 x 856) the game automatically stretches to fit the screen which works great. Because of different screen dimensions there is a piece of the screen on the right side (game is in landscape mode) that is black, not used by the game. I want to fill this up with an image, so the whole screen is filled. I only draw that image on screens bigger than 480x320. This all works fine, the image is displayed exactly the way I want to. The only problem is that the game runs less smooth then it used to run. There are small stutters noticeable. When I just draw a rectangle instead of an image the same problem occurs. Does anyone have an idea why this is happening?

View 8 Replies View Related

HTC EVO 4G :: Application Updates - Download Delay

Oct 10, 2010

Has anybody noticed download delays while trying to update an application? Sometimes it takes minutes or longer for a download to start so that an application can be updated...

View 4 Replies View Related

Android :: Drawing Bitmaps On Screen In Game Without Slow Performance

Sep 16, 2009

I want to make a tile based game for android. At the moment I am drawing each tile as a separate bitmap. I have a big for loop that reads from a string and draws different tiles depending on what character it finds to draw the level. I have allowed the user to scroll the screen using scrolling gestures. However the game is too slow. It takes a long time to update the screen after the user scrolls. I presume this is because it has to draw each tile's bitmap individually. What would be a faster way to draw the level? I was thinking I could merge all the tiles into one bitmap. But I don't know how to do this.

Anyway here is my code so you can see the problem:
package org.example.tutorial2d;
import android.app.Activity;
import android.os.Bundle;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.GestureDetector.OnGestureListener;
import org.example.tutorial2d.Panel;
public class Tutorial2D extends Activity implements OnGestureListener {
GestureDetector gestureScanner; Panel main;
/** Called when the activity is first created. */
@Override public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
gestureScanner = new GestureDetector(this);
//requestWindowFeature(Window.FEATURE_NO_TITLE);
main = new Panel(this); setContentView(main); }
@Override public boolean onTouchEvent(MotionEvent me) {
return gestureScanner.onTouchEvent(me); }
@Override public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) {
main.handleScroll(distanceX,distanceY); return true; }
@Override public boolean onDown(MotionEvent e) { return true;
} @Override public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { return true;
} @Override public void onLongPress(MotionEvent e){
} @Override public void onShowPress(MotionEvent e) {
} @Override public boolean onSingleTapUp(MotionEvent e) { return true; } }

And the class that does all the work:
package org.example.tutorial2d;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.util.Log;
import android.view.View;
import org.example.tutorial2d.Point;
public class Panel extends View {
private int scrollX = 0; private int scrollY = 0;
public Panel(Context context) { super(context);
} @Override public void onDraw(Canvas canvas) {
/*Bitmap scratch; //Drawable scratch;
//scratch = getContext().getResources().getDrawable(
// R.drawable.icon); canvas.drawColor(Color.BLACK);
//scratch.draw(canvas); int origin = 0;
scratch = BitmapFactory.decodeResource(getResources(), R.drawable.horizontal5);
canvas.drawBitmap(scratch, origin, origin, null);
int width = scratch.getWidth(); int height = scratch.getHeight();
scratch = BitmapFactory.decodeResource(getResources(), R.drawable.room4entrynesw3x3);
canvas.drawBitmap(scratch, origin + width, origin - 32, null);
[Code]

View 3 Replies View Related

Games :: Drawing Or Pictionary Style Game

Oct 17, 2010

Is there a game for android in which a person draws stuff on screen and others users guess? I have a game like it on my sister's ipad but want one for my Samsung Epic. Game is super addicting! Please let me know!

View 4 Replies View Related

HTC Wildfire :: Android Game/app Updates?

Aug 24, 2010

i have recently downloaded a few apps such as battery time, sms popup and pingchat for my htc wildfire for free. its now saying there is an update available... is this update free? or is it updating it to the full paid version or something?

View 1 Replies View Related

Android :: Looking For Definitive Location Finding Logic

Mar 31, 2010

I am looking for a tutorial that explains the logic for fast, robust location finding.Basically I am sick of Google Maps finding my location so incredibly fast and accurately while my own application struggles to get a location.I would be fine with pseudo code responses and I will explain what I am doing so maybe I can be shown what I am doing wrong.

1. Get the locationManager object.

2. Do a 'get best provider' call.

3. Get a list of all available providers.

4. lm.requestLocationUpdates(bestProvider, 0, 0, this); hit the location provider as much as I can to get my first signal

5. Send a delayed message.If a location cannot be found in 10 seconds, switch to a different provider and try again with lm.requestLocationUpdates(nextProvider, 0, 0, this);

6. Repeat step 5 until I have a location.

7. Once a location is found determine if it is the most accurate provider.If it is not try again with the most accurate provider on an 8 second delay.If it is the most accurate provider then set lm.requestLocationUpdates(currentProvider, 30000, 0, this); to conserve battery

8. Make sure to lm.removeUpdates(this); before changing the requestLocationUpdates

Now it occurs to me that it may be possible to iterate through my list of providers and do requestLocationUpdates for all providers at once.Is this a viable option or can you only listen to one provider at a time?I have seen that location from onLocationChanged has getProvider()to let you know who provided the location information so that I can know which provider is actually finding a signal and turn off the others.

View 5 Replies View Related

Android :: Logic Different Between Using Keypad - With Finger Tapping?

Jun 19, 2009

I have a ListView. When I click a row Item (which are just TextView instances) I want them to remain hilighted (default orange color). The default behavior is that they flash orange.

Strangely, if I use the key pad (arrow up/down) to move between items, it has the exact behavior I want. Why is the logic different between using the keypad or with finger tapping?

View 7 Replies View Related

General :: LG L35g Optimus Logic Pause In ClockWorkMod Boot Loop

Jan 25, 2013

My stats:

LG L35g Optimus Logic from Net10
Running Android 2.3.6
It is rooted.
Clockworkmod 5.8.4.5

Okay, first off this is totally my fault that this phone is stuck.

I was inside the About menu of android and saw there was an update for 2.3.6

So, stupidly, I decided to select it. It downloaded the update, rebooted, and then wound up at the clockworkmod recovery screen.

I tried the "reboot system now" option, but it just reboots back to the recovery screen.

I have used the "wiped data/factory reset" option. I've wiped the cache partition and Dalvik cache.

I didn't backup the stock rom, so I found these two roms for the l35g from here:

AA51

Stock (user modded version)

I used the restore option in recovery mode, but the "Stock" rom above didn't take. The AA51 rom did install fully and told me to reboot. I did, but it still went right back into the boot-loop!

I think the solution to this is to fix the boot-loop issue. Would Zengarden or Xionia work? Then, if so, I need a version of it to work with the l35g.

View 1 Replies View Related

Android :: How To Store Path Of Game Pawn In Turn Based Game?

May 22, 2010

I have a square grid, for a turn based game ( grid is similar to the chess board ), but the moves in the games are different based on whether you have lapped your opponent pawn at least once or not.i.e if you have not lapped (beaten any of the opponents pawns) in the outer most grid as below.if you have lapped your opponent pawn once at least, then you get to reach home,this way.Any player having all his pawns reaching "home" first wins.The ones in yellow are safe-houses, i.e both the opponent pawn and the player's pawn get to stay in the same grid, this is not considered to be lapping ( the opponent ).The lapped pawn will return to its start point.Now the question is, what is the effective way to store the paths for the all the pawns.we will have 4 pawns for the player and 4 opponent pawns.Is there any pattern to store such static information, in a elegant way?

View 1 Replies View Related

Android : Puzzle Game With 7x7 Grid Of Graphics / How To Save And Continue Game

Nov 12, 2010

I have a puzzle game with a 7x7 grid of graphics, and a timer, its just about ready to go. But I am stuck on how to go about saving/continuing game. For example when someone exits I want them to be able to save and exit, then come back and click continue to pick up where they left off with all of the graphics in the right place, timer and score. I looked at onSaveInstanceState android examples, but not sure if this is what I need or how to implement it in my case.

View 8 Replies View Related

Android :: What Logic Does Contacts Api Use To Aggregate - Overlapping Fields From Multiple Raw Contacts

Nov 2, 2010

when a "contact detail" screen is presented in the contacts application, how is each field aggregated from its underlying raw contacts

case 1: Overlapping fields

when the same field exists in two or more contacts. Say they have two different last names or emails in different accounts. Does the contacts app show both fields with an account indicator?

case 2: Non overlapping fileds

one rawcontact has email while the other one has phone number

Short of scouring the source code, I have exhausted searching everywhere else.

View 2 Replies View Related

Android : Best Drawing App?

Jul 21, 2010

What is your best drawing app?

I've tried Draw!, Draw(er), and MagicMarker, but I dunno, they each have their pros and cons and can't find one that suits me well. I'm not looking for Photoshop on my phone, but something better than a colored line. So what is your best drawing app?

View 3 Replies View Related

Android :: Delay Before Starting

Mar 30, 2010

I am writing a application which will write to a file. Now I want to show the contents of the file but How do I delay the show function so that there is enough time for the writing to be done before continuing?

View 2 Replies View Related

Android :: Drawing And Animating?

Nov 5, 2010

This is more of a question about animating than a specific problem coding. i need to fill in the broad strokes left by the research i've been doing.

What i'm trying to do:

The activity should load with only the a togglebutton visible. when the button is touched, a png will be animated to a certain position relative to the togglebutton. also, another button will slide in from off screen and slide off if/when the togglebutton is pressed again.

What i can't figure out:

I can draw an image, but only via xml. creating an imageview and setting the background programmatically does nothing.

When i draw from xml, i can't move the image when the togglebutton is pressed like i want to. when i call getPositionOnScreen() i get a null pointer, even though the complier can see i'm referring to the imageview described in both xml and in code.

I'm calling getPositionOnScreen because via xml, i have the image positioned behind the togglebutton so that it's not visible until the button has been pressed and the image starts moving. the idea is that with different screen sizes i won't know exactly where the view is until runtime. getPostionOnScreen allows me to get the coordinates of the imageview so i know where it has been positioned. when i have a start position, can tell it to "move up" on the screen from behind the togglebutton by simply adding to x or y until it's where i want.

This is the code to draw the image (inserted in the onCreate method).

CODE:.......

This is the code i'm using to animate. when the button is clicked, it calls this method on the view from the listener.

CODE:...............

I'm well aware that this is horribly wrong and won't work. what i need to understand is why.

View 1 Replies View Related

Android :: Low Delay Audio Via NDK

May 4, 2010

It seems that this question has been asked before, I just would like to know whether there is an update in Android.I plan to write an audio application involving low delay audio I/O (appr. < 10 ms). It seems not to be possible based on the methods proposed by the SDK, hence is there - in the meantime - a way to achieve this goal using the NDK?

View 1 Replies View Related

Android : App That 'animates' Drawing?

Apr 18, 2010

I'm trying to learn about Android programming by rewriting a C app I've moved from DOS to X-windows to Windows as a learning tool. It's just a silly little app that draws symmetrical 'game of life' patterns on the screen in a kaleidoscopic fashion. It's structured so that the patterns do their own animations. I.e. there's a 'Life' class that produces the next generation and redraws itself from the center outward, inserting delays to produce a kaleidoscopic effect.

I've got it so that the patterns draw - I took the LunarLander sample as a starting point, and an drawing on a SurfaceView. But my problem is with timing the 'animations'. I'm not doing traditional animation, where I build a whole frame and then draw it, but the surface seems to want to draw itself completely on each iteration of my loop, so my inserted sleep's don't insert delay in the right places.

So my questions:

1. Is there a more direct way to write to the screen than via a SurfaceView? If I did that, would the various steps of my 'animation' occur as I drew them, producing the desired effect. 2. If such a drawing method exists, would I be wasting my time learning how to use it? 3. What's the 'standard' way to do this kind of animation?

View 3 Replies View Related

Android : API For Drawing Chart

Oct 8, 2010

Is there any api for drawing financial chart in android.

View 2 Replies View Related

Android :: WebView Starts With A Delay

Feb 6, 2009

I am using WebView in a number of screens in my application, and notice that it takes couple of seconds when starting up for the first time. What can I do to speed it up besides trying to create one in a separate thread beforehand?

View 3 Replies View Related

Android :: Drawing Circle In MapView

Oct 29, 2010

Trying to draw a circle at a longitude/latitude position. The circle below doesn't show up, does anybody know why?

View 5 Replies View Related

Android :: OpenGL Circle Drawing

Mar 16, 2010

I have to recommend just getting a book on the subject.I learned most everything off of examples and documents on the web.After several months, I finally picked up the blue book and everything I had scoured to find is clearly demonstrated in it.Look for the red book and the blue "superbible."They cover everything you need.There are also books specific to ES.Make sure to get a good 1.1 one and not a 2.0-only one.

View 7 Replies View Related

Android :: Return Value Of Get Drawing Cache

Jun 17, 2009

From the JavaDoc, it said it returns 'a bitmap representing this view or null if cache is disabled'. My question is what if the View is longer than the phone screen (you need to scroll vertically), what does the bitmap return? * only the visible portion of the view * everything the view has (both visible + invisible part)

View 4 Replies View Related

Android :: Drawing An Image Using OpenGL

Aug 10, 2010

Using OpenGL ES, how do I draw an image from the resources file onto the screen? The image is in png format, if that matters.

View 3 Replies View Related

Android :: Drawing A Nine Patch Image

Nov 29, 2009

I'm trying to create on of these images, but Eclipse won't accept it once I've used the draw9patch tool. I've found other people having the same problem, and saw this comment: I discovered later that the problem I was having was caused by the image not being exactly true to the nine-patch spec as defined in the documentation. Once I fixed the image to have a clean (i.e., no gradients etc) one pixel border it was fine. "'m not much good when it comes to image design. What does this mean, how do I create my original png file to meet the specification for Nine Patch?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved