• Create Account

# JohnnyCrazy

Member Since 30 Aug 2013
Offline Last Active Oct 19 2013 01:28 PM

### Anti Aliasing creates diagonals/triangles

06 October 2013 - 09:39 AM

Hello,

I made a Java 2D Game, written with the Slick2D + LWJGL Library.

On my Laptop, its perfectly working with Anti Aliasing on an Intel I7 and a HD 4000 Graphic Card

But, when i transfered it one to one to my PC, the Anti Aliasing creates Triangles/Diagonals.

If I turn it off, it works without Problems. (But I need AA)

PC Specs:

Graphics Gard: GTX 680 EVGA

CPU: FX 8350

Picture with AA:

Without:

Any Help would be appreciated ;)

Regards,

Johnny

### Collision Problem in BrickBreaker (Java/Slick2D)

31 August 2013 - 03:34 AM

Hello,

For a important school-work, we need to develop a game in Java. Since we are allowed to use Librarys, i decided to use SLICK2D/LWJGL to create my game (If you know a better one, say it ). My game is called BrickBreaker, a classic game in which you have to destroy Bricks with a paddle and a ball.

I solved nearly all my issues alone, but for this one, i can't find any answer:

To get the collision detection working, when the ball hits a Brick, i have to check which side was hit by the Ball. I achieved this with creating a Line on each side, and then i check if the line collides with the Ball and return the code for that direction (e.g "south","west").

This works at the most collisions, BUT:

Since i hava a Circle Object as ball, i also can happen, that the Ball collides with 2 lines of a Brick, e.g if he hits a corner of a Brick. Then, the ball goes in that direction, which was checked first, and often thats unrealistic and looks ugly.

Storing all collisions with the lines in an ArrayList, and then checking if the ArrayList contains 2 Directions. If so, turn the Ball 180°.

Works at all, but there are moments where it totaly looks crappy:

The ball would turn around 180°, but normally he should just go down. ( it collides with north and east)

I hope you can understand my Problem, if not, i will post more Infos.

Thanks,

Johnny

PARTNERS