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

learn more… | top users | synonyms

2
votes
1answer
141 views

What causes my client's painting & input thread to stop? [closed]

I recently returned to face a problem I had with a game client of mine, i.e. the client's thread responsible for input & painting becomes unable to run after some while. I suspect that it has ...
1
vote
2answers
528 views

Problems with Creating Snake's Clone on Java

I'm creating Snake's clone. My app have too classes: Snake.java and Board.java. Right now I have three problems: 1) There are two constants - BOARDS_WIDTH, BOARDS_HEIGHT. They are meant to be ...
0
votes
1answer
2k views

Android sidecroller template

I want to create a sidescroller game for Android but it seems stupid to reinvent the wheel and since there are a lot of android sidescroller games already out I though that there must be some sort of ...
5
votes
1answer
1k views

What's the best way of drawing a glowing 3d line using LWJGL?

Sort of like a strip-light effect; not actually a light source, but just a polygon with glowing edges. Can this be done easily? Right now I'm contemplating drawing a line more than once with varying ...
1
vote
1answer
633 views

How to create a vertex array from any shape in JBox2D?

I have a code, that add a vertex array to a shape, my code is: PolygonDef shape = new PolygonDef(); for (int i=0; i<vertices.size(); i++) { Vec2 v = vertices.get(i); shape.addVertex(new ...
3
votes
1answer
900 views

Get shape of my bodies using Box2D

I would like to get the shapes of my bodies, but I can't get anything, only null. Why? Here is the relevant code section: Body b; while((b = box2d.physics.PhysicsWorld.world.getBodyList().getNext()) ...
6
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
2answers
268 views

Rcon Api not working

I am developing a gaming control panel and that uses Rcon.jar to fetch data from gaming server. the code to use it written as below public static String rconExecute(String rcon, String command, int ...
2
votes
3answers
735 views

Game World structure in classes

I am developing 2D game in java, and I want some basic in-game scripting (spawn enemy, spawn item, change enemies properties). What I don't know is, how to divide the game world, to easily work with ...
1
vote
4answers
1k views

Client server design question

I'm working on creating a multiplayer game, with the client in ActionScript and the server written in Java. I'm using XMLSocket in the client to connect to the server. The server code looks something ...
4
votes
2answers
231 views

Developing an Asteroids successor: which languages/tools/frameworks?

Currently I'm planning to run the Asteroids successor on the Java Virtual Machine, while writing the code in Scala (because that's the language I'm fluent in). I have looked at different options, ...
2
votes
1answer
333 views

Filling in 3d Shapes

For a college project I need to draw an empty cube and then show the cube being filled. So far I have heard that JME and voxels is the way to go but I have no idea where to start. Can anyone point me ...
1
vote
2answers
711 views

Collision Problems

I'm having some troubles with a 2D platformer type game (there's more to it, but that's all that matters for this question). I had collision with the platforms working fine, but if the character hit ...
3
votes
1answer
7k views

Is it possible to overlay EditText box on a GLSurfaceView on Android?

I am trying to add a "PlayerName" box on top of a opengl menu background, is this possible? I've tried various layouts, but they don't seem to allow an EditText box to appear on top What is the ...
6
votes
5answers
1k views

What is Java missing that might make it difficult to develop fully-featured 2D games?

Without using any external libraries, does Java, including all officially supported APIs give you enough to develop fully-featured 2D games? The reason I ask is that I hear a lot of "bad-mouthing" ...
1
vote
1answer
1k views

Passing an OpenGL texture ID loaded in NDK back to java

Is it possible to load a texture using the NDK, but pass the result back to use in java. I have used the code in the link above and it appears to load the png correctly and generates a texture ID ...
7
votes
3answers
1k views

Effective methods to continuously update movement in a tower defense game?

We are four guys making a Tower Defense game as a project in first grade on a university. The game is going to be really simple! Three different towers Three different monsters One map (maybe add ...
3
votes
1answer
13k views

Loading PNG textures for use in Android OpenGL ES1

I'm very new to Android and OpenGL coding (I have previously used ogre3d). I am trying to find an efficient way to load PNG textures. It is currently taking around 8 secs to load 3 512x512 textures ...
6
votes
1answer
754 views

For 2D tiled maps is all object and NPC data loaded into memory when the map is loaded?

I'm creating a text RPG in Java, but I think this applies for a GUI as well with regard to the data structure. Each Level is a tiled map. Each Tile object has an (X,Y) coordinate, and references to ...
7
votes
2answers
3k 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 ...
21
votes
4answers
896 views

How to implement a never-rebooting test world?

Am looking for ideas on how to do the following: I want to write a simple "world" in Java. One which I could start and then add new objects later at a later date to simulate/observe different ...
6
votes
1answer
982 views

Method of terrain in a 3d RPG

I am working on a RPG using the JMonkey engine. While I was conceptualizing the map, I realized I would have a problem with the terrain. My problem is this: I want to have a click to move interface, ...
1
vote
1answer
542 views

Network Abstraction for a Java Game Messaging System

I'm currently working on an online java game. Currently building the messaging system between the client/server and I came across a big if. I am not experienced as a game programmer, only worked with ...
8
votes
4answers
3k views

Java game in a day or two

We are three people who are going to make a simple game in Java as a school project (University, first year). The game has to be object oriented. We don't have much time, 10-20 hours tops. None of us ...
3
votes
2answers
2k views

How do you structure a 2D level format with collisions etc. in Java (Slick 2D)?

I am developing a game in Java. 2D Fighter, Kind of like the 2d flash game Raze(http://armorgames.com/play/5395/raze). I currently am using the Slick 2D game library and am researching how to ...
9
votes
2answers
1k views

How should i have the key/mouse input in an advanced java game?

I am a self taught programmer, so I do not know the proper ways to do things. I have made simple games like asteroids and snake, but in those games, you can easily modify the variables within the ...
5
votes
4answers
350 views

What version of Java should I target for applets?

I recently deployed an applet that seems to require Java 6 Update 24. I assume the reason for this requirement is the matching JDK version I used to create the applet (I am new to Java). The fact ...
9
votes
4answers
1k views

Is there a good reason I shouldn't use a java applet for a game?

I want to make a multiplayer browser-based game. The nice thing about using an applet is that I can make the client and the server in the same language (java/closure/scala/etc). I know there's html5 ...
12
votes
5answers
1k views

Sprites as Actors

I'm not experienced in Game Development questions, but as a programmer. In the language Scala, you can have scalable multi-tasking with Actors, very stable, as I hear. You can even have hundreds of ...
4
votes
3answers
6k views

Server-side Architecture for Online Game

basically I have a game client that has communicate with a server for almost every action it takes, the game is in Java (using LWJGL) and right now I will start making the server. The base of the ...
2
votes
2answers
1k views

Can one draw a cube using different method/drawing mode?

I've just started learning gamedev (in particular android EGL based) and have ran over a code from Pro Android Games 2 that looks as follows: /* * Copyright (C) 2007 Google Inc. * * Licensed ...
2
votes
1answer
300 views

Are there any Java based libraries that provide game mapping features?

I'm working on a Java web based game in my spare time (springMVC / JSPs etc), and I'm wondering what are my options for dealing with the "game world" or mapping element. My game will be 2d / text ...
1
vote
3answers
235 views

Java graphic objects as in flashgames

How is it possible (with the standard Java2D engine) to use small sprites like graphic objects? For those who don't know what I mean, in all those Flash-games like on Facebook they put small sprites ...
4
votes
3answers
1k views

Collision Detection in Java for a game

Im making a game in Java with a few other people but we are stuck on one part of it, making the collision detection. The game is an RPG and I know how to do the collision detection with the characters ...
8
votes
8answers
3k views

Best resources to learn Game Development from a Java background? [closed]

I'm an enterprise Java programmer, however something I've been interested in and what got me into the whole programming thing was the idea of being able to create a game. Just wondering if anybody ...
4
votes
1answer
953 views

Most efficient way to handle coordinate maps in Java

I have a rectangular tile-based layout. It's your typical Cartesian system. I would like to have a single class that handles two lookup styles Get me the set of players at position X,Y Get me the ...
1
vote
1answer
1k views

How to use OpenGL blend mode/functions to brighten/darken a texture.

Tried this code, but the texture didnot get any lighter. try { texture = TextureLoader.getTexture("png", ...
2
votes
1answer
741 views

Storing Tiled Level Data in J2ME game

I'm developing a J2ME game which uses tiled backgrounds for the levels. My question is how do I store this tile information in my game. At the moment it is stored as an array; with each number ...
2
votes
3answers
5k views

Understanding MotionEvent to implement a virtual DPad and Buttons on Android (Multitouch)

I'm trying to implement a virtual DPad in android, but I'm still very confused about how do I keep track of each trouch point, from the moment it is pressed, till it is released. In my code, I test ...
0
votes
1answer
433 views

Need help drawings planets in Java

I am looking for help/links/notes/agorithms/URLs/examples on drawing/rendering spheres in pure Java (so that I can hopefully, one day, generate/render planets with various surfaces & atmospheres) ...
7
votes
3answers
5k views

How much is java used in 2d/3d indie games? (before/after Minecraft) [closed]

I wonder for my own use and curiosity, how popular is Java in indie game development , in 2d and 3d? Are there any good open/closed source games done in java?
5
votes
3answers
725 views

Programming Languages Recommendations: A Space shooter game that allows two people to play [closed]

Do you remember an arcade game, that allowed two people to versus or play each other? It was a Galaga/Gradius type game. Me and a couple of other people I know want to make a game like this. We want ...
1
vote
1answer
2k views

J2ME character animation with multiple sprite sheets

I'm working on a J2ME game and I want to have walking animations. Each direction of walking has a separate sprite sheet (i.e. one for walking up, one for walking right etc), I also have a static ...
4
votes
2answers
349 views

How do I get started with fog type effects in a first person game?

Hey guys, I'm currently using JME3 to learn 3d game development in java, and I have run into a situation. I would like to add fog effects to my games, but I don't even know where to start to implement ...
6
votes
3answers
2k views

Java enum pairs / “subenum” or what exactly?

I have an RPG-style Item class and I stored the type of the item in enum (itemType.sword). I want to store subtype too (itemSubtype.long), but I want to express the relation between two data type ...
1
vote
2answers
696 views

Adding objects to the environment at timed intervals

I am using an ArrayList to handle objects and at each interval of 120 frames, I am adding a new object of the same type at a random location along the z-axis of 60. The problem is, it doesn't add just ...
5
votes
2answers
1k views

Java game design question (graphical objects)

I'm beginner in game development, in Java and here on this site too and I have a game design question. Please comment my idea: I have a main loop which call update and draw method. I want to use an ...
4
votes
4answers
23k 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 ...
3
votes
1answer
898 views

Developing for Chrome App/Android?

I have been developing for win7 mobile (XNA/silverlight and will continue to do so, love everything about it) but I wanted to branch a few of my more polished games to google app store online, and ...
1
vote
1answer
109 views

Unused frame(window) management

I'm rewriting my game now using software designing patterns and want to do the code, most correct I can. While implementing MVC(Model View Controller) I got a question which I would like to discuss or ...