Tagged Questions

Java is both a popular programming language and runtime environment which allows Java programs to run unchanged on most hardware and software platforms.

learn more… | top users | synonyms

-3
votes
1answer
90 views

java app goes too slow in android os

The problem is that my java app contains too many animated sprites and it runs very slowly on android system. Does the usage of .gif animation instead of sprite animation will improve the speed? I ...
0
votes
1answer
81 views

Develop a 2D game in Java [closed]

At first i want to mention that i already searched much on the web, also in this forum, but i couldn“t find accurate answers to my questions or only outdated answers. My goal is to write a 2D game in ...
-1
votes
0answers
32 views

Scene2d not showing actors

I've been trying to do a UI menu with scene2d with this code but for some reason nothing is showing up. eclipse isn't giving me errors and the window is the size that I've set up, but none of the ...
3
votes
1answer
147 views

Where should I put my mob rendering code?

I'm making a simple LWJGL game. However, I'm a bit confused about rendering. So I have a Mob class and a TriangleMob is a basic enemy. package daniel.entity.Mob; public class TriangleMob { ...
-2
votes
1answer
76 views

3d objects in binary files

Currently I have 11 3d spheres created at runtime in my application. The application runs well as it is, but I'm anticipating some garbage collection hiccups due to camera panning. Would performance ...
-2
votes
0answers
62 views

Hidden objects game on Android [closed]

I want to write simple hidden object game on Android on java, so, Ill apreciate a little help(advice), about representing all game stuff(background is background, interactive objects, targets, etc). I ...
0
votes
0answers
31 views

problem adding bumpmap to textured gluSphere in JOGL

I currently have one texture on a gluSphere that represents the Earth being displayed perfectly, but having trouble figuring out how to implement a bumpmap as well. The bumpmap resides in ...
-2
votes
0answers
73 views

Setting Coordinates to spawn Enemies [closed]

i'm making a game for android with libgdx and I created a BloonFactory class (the enemies are bloons :P) The problem is that i have a shooter in the middle of the screen and I don't want to spawn ...
-2
votes
2answers
117 views

How can I draw a map that is stored in arrays [closed]

I have spent over 12 hours with no avail trying to successfully draw my map. The map is stored in an array called Tiles[]. Each value in Tiles can either be 4 numbers: Grass Stone Water Void (EMPTY ...
1
vote
2answers
58 views

Why cant I use slick-util with image IO and bufferedImage

My problem is that I get errors when I use texture = TextureLoader.getTexture("PNG", ResourceLoader.getResourceAsStream("TEXTURE PATH HERE")); it gives me these errors: Exception in thread "main" ...
2
votes
0answers
69 views

Android Virtual Pet Gameloop

Hello I'm looking for a bit of advice in which way is the best to proceed creating my applications 'gameloop' - It doesn't want to be a game loop in the truest sense since I'm not really rendering any ...
-4
votes
0answers
56 views

Overriding Image.draw() [closed]

Im trying to override Image.draw() in my class Foo extending Image public void draw(SpriteBatch batch, float parentAlpha) { super.draw(batch, parentAlpha); ShapeRenderer shapeRenderer = ...
12
votes
2answers
200 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 ...
1
vote
1answer
90 views

When to use ShapeRenderer & SpriteBatch in libGdx?

As a beginner(in GdxLib+Android), i found that for rendering particular screen, we can render that using both ways then when to use specific ones? & What is the best option for Updating the ...
3
votes
1answer
133 views

Packaging a Java game for Linux

I'm just about finished developing a small Java/Lwjgl-based game. For Windows users, I intend to use Launch4J to package the game into a nice .exe. For Mac users, I'll be using JarBundler to produce a ...
-3
votes
1answer
74 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, ...
4
votes
1answer
80 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 ...
-1
votes
0answers
69 views

Java game development book [closed]

I have read Head First Java. So now I'm looking to get into game development in java. There is alot of books out there, but i don't know which one is best for my level. I hope you can help me. Thanks
1
vote
1answer
192 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 ...
-4
votes
0answers
79 views

Making a 2D graphics game? [closed]

I am currently making an app/game, and I'm thinking whether this will work when creating a game... A Thread for each Physics component. Drawing through a registered array of updaters. What else could ...
4
votes
1answer
150 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
202 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
57 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
98 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
votes
0answers
59 views

Opengl normals not working [duplicate]

I have a model rendered in LWJGL. I have calculated and set correct normals and set up a light. However, the model is lit incorrectly. One half of the model is its normal color (magenta), and the ...
-1
votes
0answers
28 views

How to start developing Sequence board game in two platforms effectively [closed]

I have a graduation project which is the Sequence board game. Me and my friends are going to develop it. We decided to develop it on iOS (iPad) and android tablets. Since the game is strategic then we ...
0
votes
1answer
109 views

How compatible is OpenAL?

I'm making a game that needs sounds and LWJGL uses OpenAL. I was wondering out of 1.0, 1.1, C 1.0 and C 1.1 which would be the best to pick? I don't know what the C is but it's there in LWJGL :). My ...
-4
votes
4answers
184 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
2answers
61 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 ...
4
votes
4answers
157 views

Converting a 2D curve into points for data storage

I’ve created an algorithm which converts any curve i.e. path into minimum number of points so that I can save it into a file or database. The method is simple: it moves three points in equal steps ...
-1
votes
2answers
113 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
108 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 ...
0
votes
2answers
122 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
78 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
143 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
0answers
92 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
1answer
74 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?
1
vote
1answer
113 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
75 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
4answers
227 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) { ...
1
vote
2answers
219 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 ...
0
votes
0answers
22 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"); ...
0
votes
0answers
83 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
55 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
68 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
57 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
118 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 ...
0
votes
1answer
100 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, ...
0
votes
1answer
35 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
41 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 2 3 4 5 18