Java is both a popular programming language and runtime environment which allows Java programs to run unchanged on most hardware and software platforms.
0
votes
0answers
8 views
Getting direction of mouse from the middle - slick2d
I need to find the direction of the mouse from the centerpoint, i need it to return a direction e.g. north, south, northwest, southeast and so on
how would one go about doing that in java
ps. to ...
2
votes
2answers
48 views
Java Tetris - Matrix Rotations
I'm building Tetris in Java and am trying to use linear algebra to rotate a piece composed of 4 tiles.
My friend was explaining the way to do it is:
He said:
"To clarify, you do need to rotate ...
2
votes
3answers
150 views
Tetris - Rotations using Linear Algebra (Rotation Matrices)
I'm making Tetris in Java and am at the point of rotations... Originally I was hardcoding each rotation:
if (direction.equals("right")) {
if (shape.equals("Bar")) {
if ...
1
vote
1answer
25 views
LibGdx: How do I combine 2 GestureListener objects from 2 seperate classes into 1 GestureDetector
I'm trying to make 2 separate classes, 1 a VirtualJoystick class and 1 a VirtualButton class. I want to implement a GestureListener class in each, it just seems like good code to do so, but when I go ...
-3
votes
0answers
31 views
Using an OpenGL wrapper in Swing? [closed]
I'm building a custom OpenGL wrapper in Java. But I was wondering how do I link OpenGL commands to a Swing window? Thanks in advanced!
1
vote
2answers
54 views
Calling opengl32.DLL from java?
I don't like LWJGL in some cases, so I prefer to use Swing. The thing is that Swing doesn't have OpenGL. I have tried JOGL and it's a mess to install, needs external jars, and I have yet to get it ...
-1
votes
0answers
79 views
Logic in an Object Oriented Architecture [closed]
Good evening.
Recently I've been thinking of making a simple TBS game in Java for fun and I was wondering if my logic is correct.
Basically, I have the following classes:
public abstract class ...
-1
votes
0answers
39 views
LWJGL - Switching from 3D to 2D to render text with NO external librarys
I want to render 2D quads on my screen by switching to a 2D scene then switching back to 3D.
I dont want to use any external librarys besides LWJGL.
This is what I got so far:
private static void ...
2
votes
1answer
50 views
MVC with looping view
For our school project we'd like to develop a game using the MVC pattern. We're all moderate new java programmers and absolutely new in game development.
With our current view (containing only menu) ...
0
votes
0answers
25 views
Library for asynchronous client to client messaging
I am currently developing an online game where two players can play against each other (something like Who Wants to Be a Millionaire?). And I would like to implement an asynchronous service so those ...
1
vote
0answers
38 views
How to put OpenGL in a state for drawing blended, colored, nontextured polys?
Using OpenGL1.1 (sadly) I'm trying to draw a cube, which is colored and alpha blended. It is instead showing up as opaque black. Even without including alpha in the color it still shows up as opaque ...
0
votes
1answer
47 views
Slick2d Particles loading xml returning null
I've made a particle class that creates a particle of Slick2d library, but the XML file doesn't want to load , it keeps giving me null error. I gave it the path as I do for everything but it refuses ...
-1
votes
1answer
83 views
Class equality in JAVA [closed]
I want to equalize two object like this:
public abstract class Shape{...} // There is an abstract shape class
public class Circle extends Shape {
int radius;
...
}
...
-2
votes
0answers
39 views
How can I create a board with Java GUI? [closed]
I am trying to create a Battleship game with MVC pattern. I have never used GUI libraries before. So can you please guide me how can I create a board with Java GUI?
-1
votes
1answer
103 views
Usage of triangulators - Slick2d
So i need detailed examples how to use one of Slick2ds many triangulators to create a polygon with a hole. Could someone show me code examles of how to use it.