0
votes
1answer
37 views

Is this Possible to force gameobjects (coliders etc) to get stretched based on the aspect ratio of the screen?

Well with unity3D, I am in big trouble whenever I use sprites. As for textures I compensate for a evener look by Stretching it (Screen.width & Screen.height- that's fine for low end 2D games). Now ...
3
votes
1answer
76 views

Pygame collision detection less frequent when objects are increased

I currently experiencing an issue in pygame where whenever i increase the number of objects e.g. platforms, rocks for a in range(150): rock = Rock(0,0) OR incresing the range which they spawn ...
1
vote
1answer
127 views

How to prevent a sprite to move in an angle that will lead to collision

I have two sprites that can move in any angle. The sprites are rectangular. I created bounding boxes for both the sprites. These boxes rotate whenever the sprite rotates. They always surround the ...
1
vote
2answers
109 views

Detecting collision of two sprites that can rotate [duplicate]

I have a problem with collision detection in a 2D Java game. Normally, what I would do is create a getBounds() method for an object that can collide with other objects. This method would return a new ...
3
votes
1answer
218 views

Collision detection for sloping tiles

I've been looking into adding 'sloping' tiles into my platform game and my first attempt at collision detection with these tiles has produced some promising results (considering it's a first attempt), ...
0
votes
0answers
33 views

2D collision beetween a sprite and an array of sprites [duplicate]

I am creating a simple Android jumper (think Doodle Jump or Abduction) using libGDX so I can get started in game programming. My problem is that I need to figure out a way to check for collision ...
1
vote
1answer
202 views

2D fighting bounding boxes

I'm prototyping a 2D platformer/brawler game for uni and I'm having some trouble with creating collision/bounding boxes. This is most likely going to end up on a Vita so I do have some library ...
0
votes
1answer
237 views

C# XNA4 2D Collision Detection

I am working on a 2D engine in Xna and am running in a bit of trouble with Collision implementation. What I want to do is have an interface ICollidable that I can add to GameObjects that are ...
0
votes
5answers
864 views

Collision detection logic

Edit 2 In the following picture sprite1 (the red square) is hitting the platform from the left, so: sprite1_rightEdge>platformSprite leftEdge would be true, so I can simply reposition ...
1
vote
0answers
347 views

Love2D : How can I keep up with lots of small sprites' collision data?

So I'm using a SpriteBatch to keep up with lots of small pieces for a falling-piece puzzle game. I have an array of Quads (for different color blocks), and they are randomly added to the ...
1
vote
0answers
176 views

Detect Sprites, they are in Shape or Not which random draw in Cocos2d

I have searched a lot on web and found some of help ful links as exact my question. Link 1 Link 2 But still i am not success to achieve this, i have done some of code lines, as like draw line by ...
1
vote
2answers
190 views

Simple Bounding Sphere Calculations for 2d game

I'm writing a 2d game and have a question regarding the use of bounding spheres. I'm kind of OK with the math, but I'm confused about one thing. To work out the distance between the 2 centre points ...
3
votes
3answers
174 views

Collision and Graphics integration

I'm a little confused about the integration between collision and graphics. They both need to share the same position in the world. The most obvious choice is the center of the entity, which is good ...
1
vote
2answers
128 views

How to fetch only the sprites in the player's range of motion for collision testing? (2D, axis aligned sprites)

I am working on a 2D sprite game for educational purposes. (In case you want to know, it uses WebGl and Javascript) I've implemented movement using the Euler method (and delta time) to keep things ...
1
vote
2answers
2k 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 ...
1
vote
1answer
2k views

XNA 2D Collision with specific tiles

I am new to game programming and to these sites for help. I am making a 2D game but I can't seem to get the collision between my character and certain tiles. I have a map filled with grass tiles and ...
2
votes
1answer
1k views

Collision detection with non-rectangular images

I'm creating a game and I need to detect collisions between a character and some parts of the environment. Since my character's frames are taken from a sprite sheet with a transparent background, I'm ...
3
votes
1answer
2k views

Spritesheet per pixel collision XNA

So basically i'm using this: public bool IntersectPixels(Rectangle rectangleA, Color[] dataA,Rectangle rectangleB, Color[] dataB) { int top = Math.Max(rectangleA.Top, rectangleB.Top); ...
1
vote
2answers
2k 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
400 views

Detecting collision between a sprite and many tiles

I have been looking at the following question:- Tile coordinates and am thinking of using this for collision detection in my tile game. The set up in my game is similar to this, in that there is a ...
0
votes
2answers
3k views

Box2d and sprites

i have really little practice with box2d, but basically it seems to me that it is possible to attach to every sprite (in a 2d game) a box2d shape (that is, a bounding box enclosing the sprite itself) ...
2
votes
1answer
668 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 ...
3
votes
3answers
6k views

Bounding box of a rotated rectangle (2d)

I can see this has been asked before in various ways. I am struggling to work it out though hence asking again. 2d sprite that moves and rotates. I'm looking to contain it in a bounding box as it ...
0
votes
2answers
766 views

How to coordinate sprites, player's position and collisions in a Bomberman-like 2D game?

I'm programming a Bomberman in Java (my first game) and I'm having problems with the player's sprites and position in the map. I'm using a 2D integer array to represent: Unbreakable blocks ...
1
vote
2answers
747 views

Getting 2D Platformer entity collision Response Correct (side-to-side + jumping/landing on heads)

I've been working on a 2D (tile based) 2D platformer for iOS and I've got basic entity collision detection working, but there's just something not right about it and I can't quite figure out how to ...
3
votes
1answer
452 views

Collision and response between sprites?

What is an easy way to have sprites collide and react to the collision? E.g. if I'm writing a game in XNA or with Canvas 2D and need to write the code myself very simply.