Java is both a popular programming language and runtime environment which allows Java programs to run unchanged on most hardware and software platforms.
5
votes
1answer
513 views
OpenGL: Resizing Display and glOrtho/glViewport
I have researched this question from several sources and have yet to find a firm answer saying that "yes that is correct thinking" or "no, here is how it's done."
I am trying to ensure resolution ...
-3
votes
1answer
169 views
Java2D Collision Detection
I've been wrapping my head around Java2D collision detection. I am working with Slick library and trying to figure a simple clean code to check if a collision has occurred.
The idea is fairly simple, ...
1
vote
1answer
272 views
How does Minecraft update process work?
When you initially launch Minecraft you open the "launcher", which will check if your client is up to date. If it's not it proceeds to download the latest files & then runs the game.
How does ...
1
vote
1answer
209 views
Point inside Oriented Bounding Box?
I have an OBB2D class based on SAT.
This is my point in OBB method:
public boolean pointInside(float x, float y)
{
float newy = (float) (Math.sin(angle) * (y - center.y) + Math.cos(angle) *
...
4
votes
1answer
369 views
RPG game engine. Skill application calculations
Short preface
I am a part of a small team which is entering game development. We're creating a new RPG setting with custom game system and mechanics based on dice rolls. I'm server-side java ...
-2
votes
1answer
288 views
Which of these languages: Java, C++, or Python (Pygame) would be most effecient for a 2d rpg game? [closed]
I'm trying to create a 2d rpg game that could be comparable to Realm of Mad God, but would be singleplayer only. I would like to use Pygame but I heard that 1.It's too slow, and 2)It would crash to ...
1
vote
2answers
200 views
Render rotated rectangle inside other rectangle bounds using Libgdx
I have this code to generate a red rectangle inside a grey rectangle:
new Rectangle(grey_rectangle_position_x, Game.SCREEN_HEIGHT/2-Rectangle.height/2,0);
This code makes the following:
Now, I ...
1
vote
1answer
127 views
When to Load Assets
I'm writing a game using LWJGL and Java, and I was just wondering if there is a rule/recommended method for when to load resources. I have seen examples that load all of the resources at the ...
1
vote
2answers
105 views
LWJGL MouseY Coordinates are flipped
So I'm very new to using OpenGL and LWJGL, although I am proficient in Java itself.
One of the first things I read in the documentation of the Display class was that it maps the origin to the bottom ...
-3
votes
4answers
246 views
Making Video Games In pure Java, where to go? [closed]
I have been programing for about a year now, and have a very good grasp on all the basic of programming in generaly and am a pretty decent Java programmer, so now that I have the time I would like to ...
1
vote
4answers
262 views
Limiting a player's movement to the screen's dimensions
I have a player, that I can control using WASD. And I don't want him to leave the screen.
So I've tried the following:
if (player1.getX()+5 < 974 && player1.getX()-5 > 0) {
...
9
votes
2answers
691 views
Android real time multiplayer over LAN [closed]
I've developed several games for the android platform and now planning to create my first multiplayer game. What I have in mind is basically just a 2-player game witch you can play with 2 phones over ...
3
votes
2answers
897 views
OpenGL Lighting [duplicate]
I have a simple day and night cycle by at day disabling OpenGL lighting and at night enabling openGL Lighting. When I enable everything appears darker. My question is How would I make it that at a ...
1
vote
1answer
144 views
Alternative to JSF for browser-based 4X game [closed]
I intend to make browser based MMO game. Something from Master of Orion genre but with more accent on command ship operations.
I've done some tests and research and turns out that indeed, for ...
0
votes
1answer
151 views
Coordinates different between Tiled editor and my game
So I have been using Tiled map editor to create my map for my game. I'm using Libgdx to load and draw the map.
The problem is that the coordinate from objects placed in tiled do not seem to be the ...
-1
votes
2answers
163 views
moving from XNA to LWJGL [closed]
Hi StackOverflow people!
I would like to know how easy it could be to move from XNA to using LWJGL.
Just wanted to throw this out there because of the rumors that MS is shutting down XNA and having ...
0
votes
1answer
274 views
Minecraft - How do I check if someone has a clear inventory
How do I check if a player has a clear inventory?
I'm making a PvP arena plugin but I need it so when someone types /pvp join, it checks if they have a clear inventory. If they do have a clear ...
0
votes
2answers
168 views
What java library/framework for a game with baldurs gate like grapics? [closed]
I really would like to create my own small rpg. It could probably look as simple like baldurs gate. So without fancy 3D stuff.
As language I want to use java (or scala, I thinking about it - the good ...
0
votes
0answers
232 views
Set sprite on box2d body [closed]
I don't understand how to do this... I have seen some tutorials about it, but it was not helpful for me...
Thanks in advance!
Here is my code:
public class Level_1 implements Screen {
Untitled ...
0
votes
0answers
123 views
Canvas - Good rendering practises? [closed]
I've been using the Canvas a lot lately for little Java games and i've noticed a lot of strange things can happen. For example, earlier today I created a little game in which the objective is to shoot ...
0
votes
1answer
84 views
Can I use multiple OpenGL version together
I want to use GLSL but keep my current OpenGL 1.1 setup. The thing is that can I use OpenGL 2.0 shaders on OpenGL 1.1 renders?
6
votes
2answers
383 views
An odd performance problem rendering a simple scene (less than 14k vertices) in OpenGL using two vbos with LWJGL
Problem
I have been having a strange degrading performance issue rendering a simple scene containing two "chunks" of 4x4x4 cubes each.
Video of problem
This is a screen capture showing my console ...
1
vote
1answer
153 views
Terrain detection on racing game
Hi I don't speak English very well so ill try to do my best :P
I'm doing my first top-down racing game for LibGDX, now I need to create tracks, the tracks aren't very large, I prefer doing this with ...
0
votes
2answers
143 views
How to create texture coordinates for a spritesheet with lwjgl
Using lwjgl and slick-util I've been trying to use certain pieces of a spritesheet as textures. lwjgl uses glTexCoord2f(); to map coordinates to individual vertices, and the coordinates it takes in ...
1
vote
2answers
297 views
Online MMO collision detection for players & walls
Let's assume the following:
I have a server which stores the player's position (float x, float y, float z)
Client sends the server it's updated position ever 250ms or so.
Server has bounding boxes ...
8
votes
2answers
283 views
How well do functional languages perform on Android?
This is a special case of this question that I feel is particularly pertinent.
I'm working on a game for Android, and I'm planning on using Scala with libgdx. I'm planning on making a performant ...
0
votes
0answers
50 views
JFrame on OS X with buffer strategy disables rounded corners
I'm trying to create a simple JFrame window in OS X and render a simple black square on it like so using Graphics2d:
public Start() {
running = true;
window = new JFrame("Finest Hour");
...
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 ...
0
votes
0answers
157 views
Multiplayer turn-based game architecture question [closed]
I'm working on creating a 2D game for fun to learn some of the ins and outs of multiplayer gaming. The game itself will pit two players' armies against each other in a strategic turn based battle.
...
0
votes
1answer
61 views
Which Swing control should I use to render graphics with?
I'm using the Swing UI toolkit in Java, and I want to use the Graphics class to draw images and grids in a control. Which is the most appropriate control for this?
1
vote
1answer
110 views
Ways to represent/store different regions in a non tiled map
I am developing a game where agent tribes fight each other for land.The map is a 2D map.Each agent has an instance of group object that represents their family.And each group object contains ...
0
votes
0answers
114 views
Fling and Spin an Object with Touch
For making a bottle to spin, I focused first on the touch dragging via input processor interface. It's a bit unresponsive since when I rotate clockwise or counter-clockwise as long as my finger ...
0
votes
0answers
77 views
LWJGL not working, need help [closed]
I'm trying to make a simple game in LWJGL but no matter what I do I just get a black screen and it becomes unresponsive. Here is the code that opens the window:
package src;
import ...
-4
votes
1answer
147 views
Moon lander, gravity + velocity for an image
Hey its my first year doing java so I'm still quite bad.
I'm making a lunar lander for my coursework and I'm struggling to make some kind of gravity to pull my rocket with increasing speed, and I ...
1
vote
4answers
466 views
How can I remove enemies from my ArrayList after they have died? [duplicate]
Possible Duplicate:
How do I best remove an entity from my game loop when it is dead?
Right now, I have an ArrayList like this:
List<Enemy> enemies = new ArrayList<Enemy>();
...
0
votes
1answer
194 views
Anyone know good network Java Tutorials for Game Dev? [closed]
I'm trying to create a very basic pong game with Java that can have two users on two different computers and one will be the host, or a computer can just be a host and the other two clients connect, ...
1
vote
1answer
123 views
Handling multiple pressed keys with KeyListeners
I'm making a game Applet with Java that uses KeyListeners to control a paddle (for a game like Breakout/Pong). My basic implementation goes like this:
public void keyPressed(KeyEvent e) {
switch ...
-1
votes
1answer
130 views
Collision detection tutorials [closed]
I'm supposed to develop a Java game using AWT and Applet libraries. I'm stuck with the concept of "collision detection". If you can help me with any tutorials that explain the concept (how it works) ...
0
votes
1answer
49 views
Saving an arbitrary sized 2d array
I'm trying to create an arbitrary sized(but not infinite) 2d tilebased world. My question is, how do i save a world like this?
My idea was to split up the tiles into bigger chunks and then save those ...
-3
votes
1answer
55 views
C++ Loading DLL Error [closed]
So I'm attempting to fix a OpenGL in Java problem by making a DLL in C++ and then call it from Java but I've ran into an issue. So I'm testing a basic DLL in C++ and I got this error: "error: ...
1
vote
1answer
167 views
Can I mix OpenGL and swing?
I'm working on a small game library for me and some people I know that just handles the window and nothing special that we weren't gonna use. I know how to use OpenGL and stuff I just don't like ...
1
vote
3answers
992 views
How do I load tmx files with Slick2d?
I just started using Slick2D and learned how simple it is to load in a tilemap and display it. I tried atleast a dozen different tmx files from numerous examples to see if it was the actual file that ...
2
votes
2answers
158 views
Making a player move to my mouse when clicked?
How can I get my player to move to the mouse when it is clicked (like in Warcraft)?
So far I have tried:
if (Mouse.isButtonDown(0)) {
if (X < Mouse.getX()) {
X += Speed;
}
if ...
-2
votes
1answer
68 views
How to find which dirction to move in a 3D space [closed]
In my game you are controlling a person walking(X and Y) and they can:
Rotate view - -180 to +180
Move a direction - Forward, Backwards, Left, Right.
I want the Move to get closer to a goal ...
0
votes
1answer
1k views
Resource not found: testdata/alphamap.png
I started a tutorial for java's slick 2d library, called SlickBlocks which is essentally a tetris clone. The problem is I have followed and typed in the code examples to the dot, yet when I run it I ...
0
votes
2answers
313 views
adventure game architecture
I would like to make an adventure type game functioning similarly to machinarium or broken sword. The only way I can think of doing this is to draw an image as a background on a canvas and use some ...
-2
votes
3answers
534 views
Writing a server for a multiplayer game
I've been looking on the internet, but I can't really find any good answers to all my questions..
I started to think about writing a little multiplayer game on my own and after thinking and thinking ...
3
votes
1answer
257 views
Implementing a hook (Like pudge in Dota)
I'm coding a new game, which involves hooking.
Ive been testing a couple of ideas now and im quite stuck.
The player can throw a "hook" which fires away in the aimed direction, until it hits ...
0
votes
1answer
277 views
Please help me with my 2D isometric tile picking [duplicate]
Possible Duplicate:
How to convert mouse coordinates to isometric indexes?
Okay, I apologise in advance if I make no sense here.
Basically, I've got a simple application that takes in a ...
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 ...
