0
votes
0answers
12 views

How to put a rectangle around an ImageView in Android

I'm trying to make a rectangle have the same x, y, height and width values as an ImageView for collision detection purposes. Is there a way to do this?
0
votes
1answer
42 views

Different kinds of collision detection in Android

Are there any other ways to detect collision between two objects besides the bounding rectangle method and downloading another class to put into Android?
0
votes
0answers
19 views

Making a Collision Detection for ImageViews

I'm trying to make a collision detection system for two ImageViews, but I can't seem to figure it out. I've tried doing several things from StackOverflow and other places, but they don't work. One ...
2
votes
1answer
82 views

libgdx collision detection / bounding the object

i am trying to get collision detection so i am drawing a red rectangle to see if it is working, and when i do the code below in the update method. to check if it is going to work. the position is not ...
10
votes
2answers
310 views

Extrapolation breaks collision detection

Before applying extrapolation to my sprite's movement, my collision worked perfectly. However, after applying extrapolation to my sprite's movement (to smooth things out), the collision no longer ...
0
votes
1answer
295 views

How do I handle collision response between many different types of game objects?

I am looking for a way to avoid the dreaded switch or if/else scenarios between numerous game object types when a collision takes place in a game. For example: You have a list of game objects which ...
0
votes
2answers
299 views

Why is mesh baking causing huge performance spikes?

A couple of seconds into the gameplay on my Android device, I see huge performance spikes caused by "Mesh.Bake Scaled Mesh PhysX CollisionData" In my game, a whole level is a parent object containing ...
1
vote
1answer
124 views

Pixel Perfect collision detection on rotated bitmaps [duplicate]

I have two bitmaps which are being drawn onto a canvas using a matrix canvas.drawBitmap(bitmap, matrix, paint); first to work out if I need to check for a collision i am using eucilidean vectors ...
0
votes
1answer
299 views

Having to check collisions twice per game tic

I have vertically moving elevators (3 solid tiles wide) and static solid tiles. Each are separate entities and therefore have their own respective collision routines (to check for, and resolve, ...
1
vote
1answer
724 views

Moving bounding box in 3D using Libgdx

How do i go about moving a bounding box in libgdx? I want to make the bounding box capture my character and move with him. So ideally i want to be able to copy my vector 3 from my model instance and ...
0
votes
1answer
1k views

Android Bitmap: Collision Detecting

I am writing an Android game right now and I would need some help in the collision of the Pawns on screen. I figured I could run a for loop on the Player class with all Pawn objects on the screen ...
8
votes
3answers
573 views

Collision detection problems using AABB's

I implemented a simple collision detection routine using AABB's between my main game sprite and various platforms (Please see code below). It works great, but I'm now introducing gravity to make my ...
4
votes
4answers
3k views

Detecting collision between ball (circle) and brick(rectangle)?

Ok so this is for a small uni project. My lecturer provided me with a framework for a simple brickbreaker game. I am currently trying to overcome to problem of detecting a collision between the two ...
1
vote
1answer
624 views

How to detect screen boundary using AndEngine GLES1?

I am using the AnalogOnScreenControl to move my sprite around the screen. I would like to restrict the sprite so it can not move outside the screen boundaries. I have tried putting a line at the ...
1
vote
2answers
350 views

Randomly spawning bitmaps on cnvas

I need some ideas in order to finish algorithm. I'm randomly placing objects (bitmaps) on canvas without overlapping. Time needed to finish it is my problem. When I need to spawn for example 80% of ...
-1
votes
3answers
1k views

Collision between sprites in game programming?

I've since just started coding for an android game using eclipse. I've read Beginning Android Game Programming and various other e-books. Recently, I've encountered a problem with collision between ...
3
votes
2answers
172 views

Adding delay between damage

I have a bunch of enemies chasing my main-character, and if they intersect I want them to damage him and that's all good. The problem is that right now they damage him as long as they stand around ...
3
votes
2answers
2k views

how to solve ArrayList outOfBoundsExeption?

Im getting: 09-02 17:15:39.140: E/AndroidRuntime(533): java.lang.IndexOutOfBoundsException: Invalid index 1, size is 1 09-02 17:15:39.140: E/AndroidRuntime(533): at ...
-1
votes
1answer
158 views

Circle collision with a specific tile on a grid

Does anyone know of a good tutorial that will show collision detection on a 2d game platform without using any engines?
3
votes
2answers
362 views

How create a respawn area in a tiled map

I'm creating a RPG game, I need to create a monster respawn area like the Pokemon games where if I walk through the long grass areas a Pokemon can appear. I already created the battle scene, I've seen ...
1
vote
2answers
3k views

Pixel perfect collision detection between sprite and animated sprite

I am trying to make a collision between a sprite and an animated sprite. The animated sprite is the main character of the game. The problem I am facing is that when another sprite collides with the ...
0
votes
2answers
290 views

How can I improve this collision detection logic?

I’m trying to make an android game and I’m having a bit of trouble getting the collision detection to work. It works sometimes but my conditions aren’t specific enough and my program gets it wrong. ...
-4
votes
2answers
345 views

How to detect collisions between bullet and alien

I am designing a game for Android using Surface View. When a bullet hits any point on an alien it should blow the alien up. I wrote some code to detect collisions, but my code only triggers when my ...
1
vote
2answers
3k views

Sprite collisions in android andengine

I'm developing a simple game by andengine. I have 10 balls which are moving randomly on screen.i'm importing the balls as picture in sprites.if they move at the same coordinate , they pass though ...
0
votes
2answers
2k views

Android Java rectangle collision detection not working

I had been hard coding a collision detection system which was buggy. Then I came across using rectangles for collsion detection. So I put it all in and it does not work, I put a log in and it never ...
-5
votes
4answers
3k views

How to implement a 2d collision detection for Android

I am making a 2d space shooter using opengl ES. Can someone please show me how to implement a collision detection between the enemy ship and player ship. The code for the two classes are below: ...
1
vote
1answer
632 views

Polygon Collision Detection Android

I am starting to try and figure out polygon collision detection in my Android game. I am currently doing pixel level collision detection and it just seems to be too slow (though it works). I was ...
4
votes
4answers
2k views

Which Side Was Hit?

I am working on an Android game and I have two objects A and B (both rectangles) and when they collide I simply want to know which side of B was hit. I have detected the collision fine, but I am ...
6
votes
2answers
3k views

How to handle pixel-perfect collision detection with rotation?

Does anyone have any ideas how to go about achieving rotational pixel-perfect collision detection with Bitmaps in Android? Or in general for that matter? I have pixel arrays currently but I don't know ...
2
votes
2answers
632 views

Detecting image curve to move a truck on this surface

I have an image background in surface view I want to move something according to black surface.But i can not do this using height of this image as it return same height.and one more thing ...
1
vote
2answers
549 views

Android pong clone, having trouble getting the paddle to stop at the screen edge

Well, I'm obviously very new to game dev and android. I've got a ball bouncing around (successfully detecting screen edge collision so that the bitmap stays within screen) and a paddle that the user ...
2
votes
1answer
701 views

How to move a 2d sprite to a target location while avoiding obstacles?

How can I get a 2d sprite to move to a position clicked on the screen, without bumping into other objects? I'm programming in java using the android API library I have created a surface view and ...
-1
votes
1answer
909 views

Collision detection problem

I am a novice in android. It's my first game, so I am trying to make a frogger clone. I am getting a problem in collision detection. In logcat, even though the frog is not moving and not colliding ...
1
vote
1answer
1k views

What is wrong with my collision detection code?

I want to check collision detection between two bitmaps but I am not getting how to do it. I read several queries and tutorials but didnt get properly. I want to check by their width and height. I ...
1
vote
1answer
873 views

Android Fling Gesture, Animation And Collision - Resources?

I'm starting work on a 2D Android game where the player will put their finger on a game piece and do a fling gesture to throw the piece across the gameboard. I've gone through some Android ...
2
votes
4answers
4k views

How do I detect pixel-level collision using andEngine?

I'm developing a game for Android using andEngine, and I need to detect collisions only when two objects visually collide (not in blank space of the image). In J2ME, I'm able to do that using ...
1
vote
1answer
417 views

How can we match polygon data structure with a background image

I am referring to this fireball game. The ball will collide with background, which is in polygon form. I was wondering, how I can match my polygon data structure with the background image. Say, I ...
0
votes
3answers
283 views

Collision Error

I am having trouble with collision detection part of the game. I am using touch events to fire the gun as you will see in the video. Note, the android icon is a temporary graphic for the bullets ...
0
votes
2answers
553 views

Bitmap & Object Collision Help

Is it possible to detect when an object and a bitmap collide. I have an arraylist of sprites that I am shooting with an image. I tried using this method here but as soon as the bitmap appears the ...
0
votes
1answer
2k views

Java/Android pixel perfect hit detection

I am making a game for android which I need hit detection between two objects. The first bitmap I have is a flying superhero, and the second bitmap is anything that he collides with. The superhero ...
5
votes
3answers
1k views

Android collision detection of a 3d object based on a 2d projection

I am writing a game for android. We have an orthographic view setup, but the characters (ships, projectiles, etc). The enemies / characters will be able to rotate about the x axis. The problem is that ...
2
votes
4answers
3k views

per pixel based collision detection

I was wondering if anyone had any ideas on how to get per pixel collision detection for the android. I saw that the andEngine has great collision detection on rotation as well but couldn't see where ...