Jump to content

  • Log In with Google      Sign In   
  • Create Account


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

Topics I've Started

Anti Aliasing creates diagonals/triangles

06 October 2013 - 09:39 AM




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:





Any Help would be appreciated ;)




Collision Problem in BrickBreaker (Java/Slick2D)

31 August 2013 - 03:34 AM



First something about my Project:

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 :P). 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.


Steps which i already tried:

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.