Java is both a popular programming language and runtime environment which allows Java programs to run unchanged on most hardware and software platforms.
10
votes
3answers
4k views
Is there an algorithm for a pool game?
I am looking for algorithm to calculate direction and speed of balls in a pool game. I am sure there has to be some type of open source code for this since pool games are some of the oldest computer ...
3
votes
2answers
4k views
How do you determine which object/surface the user's pointing at with lwjgl?
Title pretty much says it all. I'm working on a simple 'lets get used to lwjgl' project involving manipulation of a rubik's cube, and I can't figure out how to tell which side/square the user's ...
4
votes
2answers
1k views
Move sprite in the direction it is facing?
I'm using Java/Slick 2D. I'm trying to use the mouse to rotate the sprite and the arrow keys to move the sprite. I can get the sprite to rotate no problem, but I cannot get it to move in the direction ...
4
votes
3answers
2k views
Why is my velocity decaying?
Programming in Java. Tinkering around with physics. My entities all have position and velocity. In the main loop, all I'm doing is applying gravity and bouncing off the edges, like so:
// add ...
34
votes
10answers
13k views
Is Java viable for serious game development?
Ever since I was a little kid, my dream has been to develop games. Well, now that I am older, more mature, and have some programming experience, I would like to start. However, I would like to turn ...
2
votes
3answers
529 views
How to Align Gun with Bullets
I have a top-down 2D shooter. I have an image of a player holding a gun, that rotates to face the mouse. Please note that the gun isn't a separate image tethered to the player, but rather part of the ...
3
votes
3answers
707 views
How can I change this isometric engine to make it so that you could distinguish between blocks that are on different planes?
I have been working on an isometric minecraft-esque game engine for a strategy game I plan on making. As you can see, it really needs some sort of shading. It is difficult to distinguish between ...
30
votes
6answers
2k views
What is a good file format for saving game data?
I need to save some custom game data. Map, player, etc.
All of them will have "sub objects". For example, a map and map will have an "array" of tiles. ie, hierarchical data. Hopefully nothing ...
4
votes
2answers
2k views
How to store 2D tile-map
I want to create a 2D map composed of small tiles, that should look like voxels (eg. this just from side).
I think I can make a structure like Voxel2D, that have int X, Y and some Color, and every ...
0
votes
1answer
611 views
Making an efficient collision detection system
I'm very new to game development (just started 3 months ago) and I'm learning through creating a game engine. It's located here. In terms of collision, I know only brute-force detection, in which ...
0
votes
2answers
735 views
Can you help me find resources for developing a top-down 2D game in Java?
I just started reading about games, and I'm going to develop a game where a person is moving around on a 2D map. My preferred language is Java. Is that suitable to develop games?
I'm going to ...
-5
votes
4answers
1k views
How to implement a 2d collision detection for Android
I am making a 2d space shooter using opengl ES. Can someone please show me how to implement a collision detection between the enemy ship and player ship. The code for the two classes are below:
...
7
votes
1answer
5k views
Making a HUD/GUI with OpenGL (LWJGL)
I'm at the stage in my game development where I need to make a HUD or GUI. I've never gotten to this part, so I don't know how its done. I tried rendering a simple quad at a fixed position on the ...
12
votes
8answers
2k views
How do I create tileable solid noise for map generation?
Hey guys, I'm trying to figure out how to generate tileable fractals in code (for game maps, but that's irrelevant)
I've been trying to modify the Solid Noise plug-in shipped with GIMP (with my ...
10
votes
5answers
1k views
2D Game dev and Java. Other possibilities than OpenGL?
I recently startet to programm some basic OpenGL stuff in Java, but OpenGL and DirectX is to much to handle and to understand for me and i'm getting bored really fast.
Now i am wondering if there are ...
4
votes
4answers
4k views
2D Platformer Collisions
I've basically asked this question before, and I know it's been asked probably a billion times, but I still can't seem to do it. All I want to know is how I should go about doing basic 4-way, ...
3
votes
4answers
13k views
Android game scrolling background
I'm just trying to figure out the best approach for running a scolling background on an android device. The method I have so far.... its pretty laggy. I use threads, which I believe is not the best ...
14
votes
3answers
2k views
Polling vs event driven input
I'm developing a game using polling for the input method. However, now that I'm delving deeper into the game menus and other UI components, I'm finding that I'd probably like to have event driven ...
7
votes
3answers
892 views
Android threads trouble wrapping my head around design
I am having trouble wrapping my head around game design. On the android platform, I have an activity and set its content view with a custom surface view. The custom surface view acts as my panel and I ...
2
votes
3answers
2k views
Where can I find tutorials for LWJGL?
I don't know if this is against the FAQ so if you close this, it'll be no surprise.
I have done research but all the tutorials I have seen have been to hard to follow; I reckon there are better ones ...
1
vote
4answers
893 views
Which Side Was Hit?
I am working on an Android game and I have two objects A and B (both rectangles) and when they collide I simply want to know which side of B was hit. I have detected the collision fine, but I am ...
12
votes
6answers
1k views
Am I hurting myself by not knowing C++ for game design?
Right now, I feel I am strong in both Java a C#. (Not much of a leap from one to the other really).
While I don't expect a game designer/programmer is an attainable goal early on in my career, This ...
8
votes
3answers
1k views
How to move an object along a circumference of another object?
I am so out of math that it hurts, but for some of you this should be a piece of cake.
I want to move an object around another along its ages or circumference on a simple circular path. At the moment ...
8
votes
3answers
7k views
Mods for Minecraft Server - how does it work?
Minecraft server comes as a single jar. How are mods developed? How do they interact with the original jar? What is there under the hood?
What technologies are involved there? I'm mostly a C++/Python ...
5
votes
1answer
3k views
Making a camera in a 2D game (glOrtho)
I'm trying to make a camera that follows my character and it seems I've managed. However, I don't know how to limit that my camera don't follow me when my character reachs the boundaries of the ...
1
vote
2answers
830 views
No LWJGL in java.library.path
Okay, so I know I need to set the path to the native files. I can do this in Eclipse, by going to the VM arguments and using -Djava.library.path=, but when I export, it says that the VM arguments ...
0
votes
3answers
913 views
Game Programming in java [closed]
I'm new to this site as well as new in game development, so I need to get a great start for it. Can anybody tell me from where I should start and some books or link are appreciable.
What are the ...
3
votes
1answer
658 views
Circle-Rectangle collision in a tile map game
I am making a 2D tile map based putt-putt game.
I have collision detection working between the ball and the walls of the map, although when the ball collides at the meeting point between 2 tiles I ...
3
votes
2answers
2k views
Java Slick2d - How to translate mouse coordinates to world coordinates
I am translating in my main class render. How do I get the mouse position where my mouse actually is after I scroll the screen
public void render(GameContainer gc, Graphics g) throws SlickException
...
3
votes
1answer
1k views
New Vector Calculation for Elastic Collision of Circle and Fixed Rectangle
I am writing a fairly simple breakout-style game for Android phones. I have successfully detected the collisions between the ball(s) and bricks. The problem that I am having is in calculating the new ...
1
vote
1answer
573 views
Bukkit shoot tnt & help with vectors
I want to shoot a piece of tnt from the players face and then let it explode when it hits the target block.
if (cmd.getName().equalsIgnoreCase("cannon")) {
...
0
votes
1answer
567 views
rotate sprite and shooting bullets from the end of a cannon [duplicate]
Possible Duplicate:
How to Align Gun with Bullets
Hi all i have a problem in my Andengine code,
I need , when I touch the screen, shoot a bullet from the cannon (in the same direction of ...
0
votes
3answers
429 views
OpenGL 2D Depth Perception
I have a 2D RPG game written in Java using LWJGL. All works fine, but at the moment I'm having trouble deciding what the best way to do depth perception is. So , for example, if the player goes in ...
11
votes
2answers
1k views
What are different ways to define items in an RPG like game?
I am casually working on an RPG type game in java but I am having trouble figuring out how I can have items that can do many different things without creating a different class for every item.
As an ...
8
votes
6answers
2k views
Which server platform to choose
I'm going to write a server for an online multiplayer with these requirements:
Pretty simple turn based game (think a card game) that is played entirely on the server (security reasons)
Must be able ...
7
votes
2answers
1k views
Multi threaded game - updating, rendering, and how to split them
From the StackOverflow post (it was recommended I move this):
So, I'm working on a game engine, and I've made pretty good progress. However, my engine is single-threaded, and the advantages of ...
8
votes
2answers
2k views
How do I tackle top down RPG movement?
I have a game that I am writing in Java. It is a top down RPG and I am trying to handle movement in the world. The world is largely procedural and I am having a difficult time tackling how to handle ...
7
votes
1answer
220 views
When and why is a Pool class needed to hold objects?
I've been studying opengl es and an example I saw was using a "Pool" class to keep track of touch and keyboard events.
Could someone please explain how and why a pool class is needed. From what I was ...
4
votes
1answer
594 views
SQLite in libGDX
Does anyone have an example of how I can use SQLite in libGDX? I have a class in my original Android code that allowed me to easily access a database but I can't seem to find anything equivalent to ...
3
votes
1answer
61 views
LWJGL Eclipse Resource Deployment
I'm still experimenting with some OpenGL in LWJGL, and as I get to know more and more about OpenGL, I start to do more complicated things like multi texturing, shadowmapping and more. Now, right now ...
2
votes
2answers
377 views
Checking if an object is inside bounds of an isometric chunk
How would I check if an object is inside the bounds of an isometric chunk? for example I have a player and I want to check if its inside the bounds of this isometric chunk.
I draw the isometric ...
2
votes
1answer
5k views
Java multiplayer cards game
I need to develop a simple multiplayer card game. For example, a poker game; this is only for study. I am going to develop it in Java.
How I can I manage communication between the server and clients? ...
13
votes
2answers
266 views
Territory patrol planning
I am developing a game/simulation where agents are fighting for land. I have the situation shown in the picture below:
These creatures are walking around and occupying pieces of land they step on ...
5
votes
2answers
2k views
How do I find the angle between two vectors?
I have 3 points on my screen:
a = a point which is (c.x, 0) makes a line pointing straight up
b = a user input touch, can be anywhere on the screen
c = a moving object
a
_______.________
| ...
4
votes
1answer
192 views
Move penetrating OBB out of another OBB to resolve collision
I'm working on collision resolution for my game.
I just need a good way to get an object out of another object if it gets stuck. In this case a car.
Here is a typical scenario.
The red car is in ...
4
votes
1answer
985 views
Access vertex data stored in VBO in the shader
If I wanted to store extra data in a VBO for skinning (indices for indexing into an array of matrices of bones and floats for applying weights to those bones) How would I go about accessing that data ...
3
votes
1answer
147 views
Moving the jBullet collision body to with the player object
I am trying to update the location of the rigid body for a player class, as my player moves around I would like the collision body to also move with the player object (currently represented as a ...
2
votes
4answers
523 views
How to Make Objects Fall Faster in a Physics Simulation
I used the collision physics (i.e. Box2d, Physics Body Editor) and implemented onto the java code. I'm trying to make the fall speed higher according to the examples:
It falls slower if light object ...
2
votes
1answer
210 views
Java Anti-Cheat Framework?
Are there any anti-cheating frameworks for Java games in order to make it a bit harder to cheat? (eg. something that protects from things like Cheat-Engine) Obviously if the cheater were to develop ...
2
votes
1answer
1k views
Using Nifty GUI with Slick2D
As seen here NiftyGUI has it's own GameState classes, I want to know if for adding UI to one state of my game I need to make that state NiftyOverlayGameState or still a BasicGameState but to add a ...