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

80
votes
12answers
6k views

Float or int for currency?

In a simple business simulation game (built in Java + Slick2D), which is more suitable to store the player's current amount of money: a float or an int? Some information: Most of the transactions ...
40
votes
8answers
26k 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 ...
31
votes
6answers
4k views

What is a good file format for saving game data? [closed]

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 ...
22
votes
6answers
9k views

How can I improve rendering speeds of a Voxel/Minecraft type game?

I'm writing my own clone of Minecraft (also written in Java). It works great right now. With a viewing distance of 40 meters I can easily hit 60 FPS on my MacBook Pro 8,1. (Intel i5 + Intel HD ...
20
votes
4answers
838 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 ...
17
votes
3answers
4k 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 ...
16
votes
14answers
1k views

Advice for a first year CS major

I'm coming to the end of my first year of CS which has been primarily a Java based course. I'd like to get my feet wet with some game development but I'm not sure where to start. Some people have ...
16
votes
5answers
3k views

Can I develop games for mobile platforms in C++?

I have a good grasp in C++ and C and have also experience developing AAA game using C++. Now, I'm shamelessly thinking to dive into mobile game development either in iOS or Android. Unfortunately, I ...
15
votes
7answers
2k views

Imperfect pong AI

So I'm starting to learn Java and some OpenGL while using the LWJGL. To start off easy, I'm writing a clone of the Atari Pong. I got set up correctly the game screen, collision detection, and all the ...
15
votes
2answers
2k 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 ...
15
votes
2answers
944 views

Graphics not being displayed on OUYA

I hope its not too early to be asking OUYA dev questions, but I just got my dev kit and I want to get my game running ASAP! I am using LibGDX as my framework for my game and launching the Android ...
14
votes
2answers
339 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 ...
13
votes
9answers
8k views

C# (Mono)/Java 3D Game Engine recommendation [closed]

can you recommend a good C# game engine for cross platform (Win/Mac/Linux, I don't care about consoles) development? I've got some experience with raw OpenGL and I played around with Java bindings ...
13
votes
2answers
1k views

How do you handle uneven tiles while rendering a tile map?

Here is what I want to do with my tile map that I am unsure of. As you can see the top walls are way larger then the bottom and side ones (this is also an issue with my corners which are odd shapes ...
13
votes
4answers
1k views

How can I implement a global high score ladder?

Are there any existing frameworks I can build on? Should I build my own? How can I prevent fake scores from being posted to it?
13
votes
8answers
3k 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 ...
12
votes
6answers
2k 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 ...
12
votes
3answers
1k views

How do I efficiently code both the client and server at the same time?

I'm coding my game using a client-server model. When playing on singleplayer, the game starts a local server, and interacts with it just like a remote server (multiplayer). I have done this to avoid ...
12
votes
2answers
2k views

Why is C/C++ preferred for game developers?

Some people say it offers more control to developers, but what is it precisely that can be controlled through C++ which can't be controlled using, for example, Java?
12
votes
4answers
9k views

How to load 3D models into Java?

Using LWJGL what is the easiest way to load a 3D model to be drawn on screen? I know LWJGL doesn't have built in loading support so I am looking for a small library that would help to load ...
12
votes
1answer
3k views

A* navigational mesh path finding

So I've been making this top down 2D java game in this framework called Greenfoot and I've been working on the AI for the guys you are gonna fight. I want them to be able to move around the world ...
11
votes
2answers
3k views

Am I allowed to make my Minecraft clone open source?

I'm developing in my spare time a game like Minecraft. In fact, it isn't "like Minecraft", because I'm trying to make it a close as possible copy of it (meant as exercise for myself at the age of 16 ...
11
votes
8answers
2k 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 ...
11
votes
5answers
7k views

Is there an XNA-like library for Java?

I'm curious to know if there is an XNA-like library for Java; that is, a library that Handles the game loop - i.e. you just implement an existing method, and it will get called every frame. Handles ...
11
votes
2answers
5k views

how should i develop my android game efficiently?

I have attached a image of a flow chart that i made in paint. The image shows how i want to develop my game. I want a game that runs great with smart coding that is easy to update and ad features ...
11
votes
2answers
862 views

How do I create a World Healing Wave effect?

I want to change my dark and depressing background to a happy grassy background, in real-time, such that the happy background is shown in a radius around a game character. A forcefield of happiness, ...
11
votes
2answers
8k views

How different is Java for JRE vs Java for Android?

I'm new to all this game developing, and I'm starting to learn java because I was told it was a great way to start. I want to later on create games for the android market, and want to get a good view ...
11
votes
1answer
2k views

Should I write my own physics engine, because of networking integration?

I'm currently developing a top down, realtime, zombie shooter. I'm coding this in Java, using JBox2D as my physics engine. I have been coding the networking this week, and am now up to the physics ...
11
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 ...
10
votes
3answers
444 views

Having a list of rooms with theirs connection to each other, how do I find isolated room groups?

I'm trying to create a small roguelike and went as far as random generating rooms and corridors. Each room is an instanced object and contain an arraylist of the others rooms connected by a corridor. ...
10
votes
5answers
2k 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 ...
10
votes
3answers
789 views

Is there any relation between Game Theory and Game Development?

I'm a Java programmer interested to learn games on Java, recently I looked on a book on Operations Research written by Wayne L.Winston. There is a topic on Game Theory. It's truly mathematical. I'm ...
10
votes
3answers
8k views

How can I make OpenGL textures scale without becoming blurry?

I'm using OpenGL through LWJGL. I have a 16x16 textured quad rendering at 16x16. When I change it's scale amount, the quad grows, then becomes blurrier as it gets larger. How can I make it scale ...
10
votes
1answer
505 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 ...
10
votes
3answers
346 views

Should scripts interact with an abstraction of the engine?

I'm using Java and Jython, and after some research I discovered giving scripts direct access to the engine interface could be a mistake, as it would tightly couple the two. It looks like most ...
10
votes
3answers
6k 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 ...
10
votes
1answer
8k 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 ...
10
votes
3answers
604 views

How should I model an economy-based game in code?

I'd like to create an economy game based on an ancient civilization. I'm not sure how to design it. If I were working on a smaller game, like a copy of "Space Invaders," I'd have no problem ...
10
votes
2answers
754 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 ...
10
votes
2answers
374 views

How to determine if a 3D voxel-based room is sealed, efficiently

I've been having some issues with efficiently determining if large rooms are sealed in a voxel-based 3D rooms. I'm at a point where I have tried my hardest to solve the problem without asking for ...
9
votes
5answers
617 views

Increasing the probability for similar tiles to generate next to each other

I'm working on a tile map system, which insofar looks like this (green is grass, air is white, stone is grey, and blue is water): It uses a simple random number generator so that there's a 45% ...
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 ...
9
votes
3answers
2k 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 ...
9
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 ...
9
votes
3answers
328 views

Object of arrays or array of objects?

I'm making a management sim game, something along the lines of Roller Coaster Tycoon. I want to know what the best way to structure my world objects is so to maximise performance. Let's say I have ...
9
votes
3answers
9k views

Fitting Android game to different screen sizes

I am making an Android game that is only in portrait screen orientation. It works great when I run it on my phone, but when I run it on a tablet, even though the screen size is bigger, all of the ...
9
votes
2answers
1k views

Rendering characters, with cut off limbs (Blender models in Java/OpenGL)

What aspects should I take into consideration for creating character animation and rendering classes if I want to be able to have detachable limbs? I've developed a detailed body system that can have ...
9
votes
2answers
3k 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 ...
9
votes
2answers
1k 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 ...
8
votes
2answers
5k views

How do I render terrain in a 2.5D perspective, like in the game Don't Starve?

I have experience in making 2D side scroller games such as Terraria, but now I want to challenge myself and make a game that has a 2.5D perspective. The game I am trying to mimic is Don't Starve. ...