How to set Abitrary Units properly?
I'm currently working on a game where you have to avoid asteroids. I started to use arbitrary units. public final static int WIDTH = 100, HEIGHT = 100; Additionally, I'm using an OrthographicCamera: float aspectratio = 16/10; cam = new OrthographicCamera(100, 100 * aspectratio); cam.position.set(cam.viewportWidth / 2f, cam.viewportHeight / 2f, 0); cam.update(); In the game screen, the asteroids look deformed:
That's a problem of your Viewport. Have a look at this page. For example, you can use a FitViewport that scales your game as much as possible to fit the screen, but there may be black bars.
Your aspect is off. Notice your planets aren't round either. Your viewport is 500x400, which is a 5:4 aspect, you want 16:10 aspect. Try changing cam = new OrthographicCamera(500, 250 * aspectratio); to cam = new OrthographicCamera(500 * aspectratio, 500); that will give you a viewport of 800x500, or 16:10 aspect
Spring sql-error-codes.xml does not show correct exception on timeout
Approaches to Android MediaPlayer state mismatch error on isPlaying()?
Issue with Android SQLite cursor while reading table having blob content
Is there a non-jdk implementation for a concurrent weak hash map?
how to immplement dynamic parameter on Jmeter with java
What to do when catching e(rror) in Java
apache.servicemix.bundles.quickfix - Attempting to create standalone NewOrderSingle object throws exception
Printing a message if a char has more than one symbol(using char, not String)
Stop Eclipse to show documents when mouse is hover over words in double quotation
What exactly does Android's #hide annotation do?
Java - Server listens on many ports
Should I use one SQLiteHelper for all SQLiteDatabases in my app or one for each one of them?
no connection between postgresql DB and eclipse
How to change Android status bar color in all activities together
Writing sql query in hibernate
How to initialize all threads of a fixed thread pool before submitting any tasks? (JAVA)