Featured games (81)
games approved by the League of Dukes
Games in Showcase (495)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1] 2 3 ... 7
1  Game Development / Newbie & Debugging Questions / Re: Texture mapping for a cube turning out white. on: 2014-09-08 15:28:38
Maybe you need to activate the texture whenever you bind it (when uploading texture images and rendering)?

glActiveTexture( GL_TEXTURE0 + unit );
glBindTexture( GL_TEXTURE_CUBE_MAP, tmp );

where unit is the texture unit (probably zero if you're just using one texture unit).

Also the values passed into the upload class seems incorrect, e.g.

glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X, 0, GL_RGBA, decoderTop.getWidth(), decoderTop.getHeight(), 0,
               GL_RGBA, GL_UNSIGNED_BYTE, bufSide);

mixes the side texture buffer image and the width/height of the top image, though I doubt that's the main problem, would probably just cause odd results rather than all white.

You could also try GL11.glGetError() after each of the main steps to verify the code.

- stride
2  Game Development / Shared Code / Re: Map builder on: 2014-09-05 15:07:27
Another approach using the little-known double-brace initialization technique:

   private final Map<String, Integer> map = new HashMap<String, Integer>() {{
      put( "one", 1 );
      put( "two", 2 );

Slightly more verbose in that you have to replicate the key/value classes since the created map is actually an anonymous class.
3  Game Development / Game Mechanics / Re: "No Man's Sky" - Procedurally Generated Space Exploration on: 2014-07-24 08:31:18
This trailer (and it was a 'canned' video btw) took centre stage at the recent E3 2014 show, it certainly looks very pretty, not bad for a indie bunch from Guildford!
Procedural generation seems to be in vogue, Elite Dangerous is following the same approach amongst others.
4  Game Development / Newbie & Debugging Questions / Re: Why does my if statments stop working when I remove System.out statments on: 2014-07-24 08:26:33
With that said I'm sure the problem is my code/lack of knowledge. Which is why I posted the question so I can learn what may be the issue.

Cool.  I had another quick look through your code but can't think of anything else to add to the suggestions me and others have already posted.

Anyways Thank-you for your help I'll look into those things.

Let us know how you get on and be sure to post the solution as it might help other newbies in the future Smiley

Good luck! 

- stride
5  Games Center / WIP games, tools & toy projects / Re: Age of Conquest IV - Risk-like Strategy Game on: 2014-07-22 08:57:47
As previous posters: A is definitely the nicest for the terrain/icons, C has the better UI I think.
6  Game Development / Newbie & Debugging Questions / Re: Why does my if statments stop working when I remove System.out statments on: 2014-07-22 08:52:54
Be very wary of attributing code problems to threads or other mysterious 'effects' - unless you've found the JVM bug-of-the-century it's much, much more likely that it's a problem in your code.

Couple of suggested approaches:

Have you tried debugging the code line-by-line to see what's happening?  Using print to dump out status messages is fine but adding a breakpoint to the update() method and stepping through the code is more likely to diagnose this problem.

Have you checked the various game-state getter methods for side-effects?  e.g. accidentally changing the state when you're getting it.

That code is quite convoluted IMHO - it's difficult to follow so I'm not surprised you are having logic problems (not having a go here, just suggesting).
  • Consider using a switch statement rather than lots of chained if...else clauses (assuming your game state thing is an enum).
  • What is the need for three states?  And are you sure you're getting/setting the right one in each case?
  • Maybe strip the code right down / comment it out and start with the first couple of state changes, if that works add the next one, and so on.

I assume this is a SWING based game?  Is the while statement running in it's own background thread?  Are the various methods that change the game (e.g. reestablishRoom) correctly modifying the GUI on the event-dispatch thread?

- stride
7  Game Development / Newbie & Debugging Questions / Re: 3d terrain heightmap not working on: 2014-06-26 08:49:53
Without seeing the Model class it's quite hard to see what's going on here.  Can you post that code as well?  or at least a fragment of what the data looks like.

However there's a couple of things in there that look suspicious to me:

public HeightMap(Model terrain) {
      width = 202;
      height = 202;

Why 202?  Seems a bit of a random size.  Why not 200, or maybe even 201?

      for (int i=0; i<terrain.vertices.size(); i++) {
         Vector3f vec = terrain.vertices.get(i);
               [(int)(vec.z+((float)height/2f))] = vec.y;

What is the reason for including the width/height divided by two in this loop?  Again seems a rather odd way of deriving the 2D height-map from the vertices.

Assuming the model is a one-dimensional array of the same width-height size as the height-map then surely this is simpler:

      int idx = 0;
      for (int x=0; x<width; x++) {
         for (int z=0; z<height; z++) {
            Vector3f vec = terrain.vertices.get(idx);
            heightMap[x][z] = vec.y;

Also, I would change the loop that initialises the height-map data to zero to set it to something else (say -1 or 256 or whatever your maximum height is) which might help to diagnose the problem.  In any case, assuming the model is the same size as the height-map (and why would you make it any different?) then what's the point in initialising the height-map at all?

Finally, I'm surprised you are attempting to 'extract' the height-map from the model, generally it happens the other way round.  i.e. load or create a height-map (from a grey-scale image or some noise function) and then generate a 3D model from that data.  Usually the height-map (and image) can then be discarded, the only time the height-map usually needs to remain in memory is if you're implementing some sort of terrain following or collision system that doesn't use the model itself.

Not meant to be criticisms, just some pointers that hopefully might help?

- stride
8  Discussions / Jobs and Resumes / Re: Skill set for an average Java Job on: 2014-06-23 10:04:51
These are all standard libraries/frameworks that are used in a large fraction of the Java market, the only thing I would add is JUnit (unless that was implied in your list) and possibly Maven and GIT as the most ubiquitous build and source-control tools.  (it's MVC, model-view-controller btw Wink )

Getting a basic understanding of these technologies is perhaps not as daunting as it looks if you have the time and patience to invest in a little self-learning.  There are plenty of online and free resources out there that will get you started - a quick Google search for 'Spring Hibernate tutorial' for example returns plenty of 'hello world' examples, e.g.  I would suggest following one of those tutorials and/or use them as a template for a simple project of your own - this would give you a decent background in most of the technologies you listed.

If you have any spare cash available then it might also be worth buying a few books, but in my experience you won't learn anything that you wouldn't from resources available on t'internet.

Then I'd suggest you look for junior or graduate Java developer roles with that skill-set, hopefully by that point you will have sufficient understanding of those skills so you could deal with questions and problems put to you in an interview.  Your 6 years in employment will also be a plus point (i.e. you have experience of a real-life role, working with others, etc) even if it was in a completely different field, so don't be afraid to emphasise that.

I have a friend-of-a-friend in my local pub that has followed this approach never having any IT related work and now has an 'entry level' full-time Java developer job that she enjoys, is getting experience all the time, has clocked up almost a year on her CV, and has every prospect of progressing her career - so it can be done.

Good luck!

- stride
9  Game Development / Newbie & Debugging Questions / Re: OpenGL rendering problem on: 2014-06-20 12:03:29
The other thing that caught my eye was this:

for (int shader : shaders)
         GL20.glDetachShader(program, shader);

at the bottom of createShaderProgram, which looks to me to be undoing everything else in that method!?
10  Game Development / Newbie & Debugging Questions / Re: OpenGL rendering problem on: 2014-06-20 11:18:00
Unless I'm missing something really obvious I can't see why anything would be displayed - you never invoke the initializeProgram and displayTriangle methods!  The display is black because IIRC that's the default background colour.

Add the init method after you've created the Display and the render method in the update loop at the end of the constructor.

I also suggest you add some temporary 'logging' println messages and/or use your debugger to verify that the code is doing what you think it is.  Also change the values in glClearColour to be sure that you're not using the default.

- stride
11  Game Development / Newbie & Debugging Questions / Re: Casting Errors after refactor on: 2014-06-11 09:23:49
I don't use NetBeans myself, but is it possible that the compiler is still picking up the 'old' classes?  Can you clean the project and/or delete the binary folders to make sure that only the new refactored code is being used?
12  Discussions / General Discussions / Re: Design advice for a library I'm working on. on: 2014-06-07 12:57:16
I've used another approach when I'm unsure about design:  rather than focusing on the structure of the internals of your 'engine' consider how you would like it to be used by a hypothetical 'user'.  It's easy to get bogged down in the details of class hierarchies, patterns, etc. when the important aspect is how your library delivers the features you want.

Write some test cases, demo applications or pseudo-code - whatever works for you - that exercise the functionality of your library, that may well highlight any iffy design decisions you have made, e.g. if you find that the demo code you write is ugly or overly complex then the underlying library code probably needs re-designing or cleaning up.

Re-write the test / demo code to be the way you (as the hypothetical user) would like it to work and you will hopefully derive a better structure, then focus on the details of the internals to deliver that API.

Might be worth a try.

- stride
13  Game Development / Newbie & Debugging Questions / Re: Calculating probabilities - is this the right way? on: 2014-05-16 11:39:49
Maybe some sort of table approach?

Map<Integer, ThingGenerator> table = new LinkedHashMap<>();
table.put( 10, new ThingGenerator( 1 ) );       // 0..10% for tiny
table.put( 20, new ThingGenerator( 3 ) );       // 10..20% for small
...   // etc

ThingGenerator getGenerator() {
    int rndValue = ...
    for( Entry<Integer, ThingGenerator> entry : table.entrySet() ) {
        if( entry.getValue() < rndVal ) return entry.getValue();
    return null;   // Empty thing


foreach cell {
    ThingGenerator g = getGenerator();
    if( g != null ) {
        cell = g.create();

The percentile values would have to be ascending for this to work, you might want to create your own class that enforced that rule.

I don't know how you were going to handle each type of thing, the above uses a sort of factory that takes the size of the cell, but you might have a different approach in mind.
14  Game Development / Newbie & Debugging Questions / Re: How do you name variable for angles? on: 2014-05-15 09:38:10
The only 'standard' angle names I've seen used (which I've tried to follow myself) is theta for 'vertical' and 'phi' for 'horizontal' when creating a 3D sphere, torus, etc.
15  Java Game APIs & Engines / OpenGL Development / Re: Design or pattern for handling background consumer/producer tasks on: 2014-05-14 10:17:35
In addition to suggestions @riven made I have been getting to grips with the Java 8 (which is screwing with my head as I'm also starting to ramp up using Scala for my real-life work!)

Java 8 introduced the CompletableFuture class. With that you can do this kind of stuff very easily.

These new goodies seem to address the problem I was facing.

I haven't quite completed the re-factoring but it's looking pretty good so far:
- less boiler-plate code
- the tasks are now entirely re-usable
- inter-task dependencies are handled by out-of-the-box Java functionality rather than me having to build from scratch

Thanks for the all input Smiley
16  Java Game APIs & Engines / OpenGL Development / Re: Design or pattern for handling background consumer/producer tasks on: 2014-05-14 10:11:40

Some good suggestions there, cheers.

Also consider your most valuable resource to be time. A tiny bit of code duplication is acceptable if it saves you from hours/days of crafting some super-neat design that provides exactly the same functionality. High quality code is not the goal, after all - something us developers tend to forget. Smiley

Also sound advice.

17  Java Game APIs & Engines / OpenGL Development / Re: Design or pattern for handling background consumer/producer tasks on: 2014-05-09 09:49:46

That's pretty much what I have now so hopefully I'm working on the right lines.

The main issue I was trying to highlight was the one of how to deal with tasks that produce and consume resources (such as the texture image example) without having to write cut-and-paste boiler-plate code for every use-case.

Java 8 introduced the CompletableFuture class. With that you can do this kind of stuff very easily.

This could be a very good call.  I had a good look at the various concurrent features such as Future (the background queue I mentioned is a ThreadPoolExecutor) but there wasn't anything there that I could see that addressed the specific problem of how to deal with tasks that produce/consume.  I've yet to look into Java 8 features in any detail so perhaps now's the time.

Cheers for the thoughts guys.

- stride
18  Java Game APIs & Engines / OpenGL Development / Design or pattern for handling background consumer/producer tasks on: 2014-05-08 13:55:51

I have a 3D engine implemented using LWJGL aimed largely at rendering a large 'world' - terrain, vegetation, animated creatures, weather, day/night cycle, etc. The engine manages the resources that are required for rendering such as the various textures, meshes, models, etc.

As the player navigates this world the engine caches the various types of data discarding/releasing resources that are no longer required and loading/caching newly required data on demand. This is handled by a set of background threads that perform I/O tasks (loading images, loading a new terrain 'chunk', building a model mesh, etc) and a queue of tasks to be executed on the OpenGL context (allocating a new texture, uploading data to a VBO, deleting a texture, etc).

Current design:

This all works nicely with the exception of tasks that have dependencies. I'll illustrate with an example:

Let's say the engine needs to apply a new texture to an object in the scene, this consists of the following steps:

  • load the texture image from the file system (I/O background task)
  • allocate a texture on the GPU (OpenGL context task)
  • upload the image to the texture (OpengL)
  • attach the texture to the material for the object (OpenGL, not really but avoids rendering issues)

There are a few problems to resolve here:

1. Ideally I want these steps (or tasks) to be atomic and re-usable, for example the engine needs to load images for several other parts of the system - the code is exactly the same and therefore can (and should) be encapsulated and re-used.

2. Some of this can be run in parallel (e.g. load image and allocate texture), some of it must be sequential, e.g. cannot upload the image until we have loaded it and allocated the texture.

3. Some of the steps have 'resource dependencies' on previous steps, e.g. in particular the upload step requires the allocated texture ID and the image.

The first two turn out to be relatively straight-forward, it's the last one is what I am struggling with - I cannot seem to come up with a decent design that allows re-usable and relatively atomic tasks to be linked together when there are inter-task dependencies.

Some pseudo-code:

interface Task extends Runnable {
    TaskQueue getQueue();

// Generic load-an-image task
class LoadImageTask implements Task {
    private final String path;
    private BufferedImage image;

    public LoadImageTask( String path ) {
        this.path = path;

    TaskQueue getQueue() { return TaskQueue.BACKGROUND; }

    public void run() {
        // load the image from the given location

// Uploads an image to a given texture
class UploadTextureTask implements Task {
    private BufferedImage image;
    private Texture texture;


    TaskQueue getQueue() { return TaskQueue.RENDER_THREAD; }

    public void run() {
        texture.buffer( image );

// Example task manager for the scenario outlined above
class Example extends TaskManager {

    // Load the texture image
   final LoadImageTask loadImage = new LoadImageTask( ... );
    add( loadImage );

    // Allocate a texture
   final AllocateTextureTask allocate = ...
    add( allocate );

    // Upload texture image
   final UploadTextureTask upload = ...
    add( upload, loadImage, allocate );

The add method in TaskManager registers a task on the relevant queue in the background. The manager gets notified when each task is completed. When all current tasks are finished (loadImage and allocate in this case) the manager starts the next task(s) in the sequence.

Note that the final add call for the upload task tells the manager that it has dependencies on the load and allocate tasks.

The problem:

As things stand the resources (in this case the image and the texture objects) are copied from the dependant tasks by reflection when those tasks are completed. This just seems dirty but I cannot think of a better method.

I've tried defining consumer and producer interfaces with generic getter/setter methods and linking dependant tasks that way but this approach breaks down if a task consumes more than one resources (as the upload task does above).

I have researched this problem here and on other sites but haven't come across any good designs - they either seem to just consist of cut-and-paste code or some sort of shared state (usually a map) with lots of nasty casting everywhere. Maybe I am not searching for the correct terms? Or maybe my whole approach is rubbish?

Has anyone implemented or come across anything similar? Any suggestions, criticisms, pointers are welcome.

Apologies for wall of text, also posted this here:

- stride
19  Discussions / General Discussions / Re: Project Setup and Maintaining Different Builds on: 2014-05-08 08:32:27
I think you have a couple of options:

1. Multiple projects: You could split your project into multiple sub-projects, e.g. the single player version, the multiplayer client, the multiplayer server, free version, and everything that is common to all the above (which will probably be the largest component).  As you're using Eclipse you can specify the inter-project dependencies as part of the build-path:  Project > Properties > Java Build Path > Projects.

2. Build tool:  You've already suggested using some sort of build tool, I would suggest Maven since it's relatively simple and fairly ubiquitous if you need help getting to grips with it.  You could structure your project as #1 and define the inter-dependencies in the POM, with the added bonus that you can also use Maven to specify and manage any third-party libraries you're using.

Either of these approaches should hopefully satisfy the constraints you've specified, for example only the multiplayer client and server projects would contain any networking code (you might even consider another common component here).

I have used both of these approaches in real-life work and well as personal game development projects.

One approach I wouldn't recommend is to try and develop scripts that 'cherry-picks' source code from some uber-source-tree - from experience it can quickly become messy and therefore difficult to maintain, taking time away from actual development.

- stride
20  Game Development / Newbie & Debugging Questions / Re: How to manage very large 3D arrays? (OutOfMemoryError) on: 2014-05-07 20:05:55
As previous posters have already suggested, divide your 'world' into chunks and create some sort of service or facade that loads chunks as required on the fly.

Some other things you might want to consider adding to this idea:

- caching: as the user moves around you will loading new chunks into memory (on a background thread) and discarding stale chunks, this is essentially a cache.  If your cache is slightly larger than the extent of your world you can retain chunks even though they are not currently in view since they are likely to be needed again due to locality (i.e. user will move back).  When you do need to discard from the cache (you will need to apply some sort of limit(s)) you could use an LRU algorithm, or distance to user, or cost-to-load, some combination of these, etc.

- pre-loading: similar to the above, you could pre-load chunks that the user is likely to see soon, e.g. you display (say) all chunks within 3 units-of-distance from the user, but you load all chunks to a radius of 5, or load the ones in the direction the user is facing, or some such algorithm.

- LOD (level of detail): not sure if this is relevant to your game, but if you are (for example) rendering a 3D environment the more distant chunks do not need to be at the maximum LOD.  Therefore you can load less detailed data / textures initially and progressively load more detailed data as the user gets closer.

Just some thoughts to consider.

- stride
21  Java Game APIs & Engines / OpenGL Development / Re: Passing vertex attributes to vertex shaders on: 2014-05-04 08:30:49
Compile the shader before binding the vertex attributes?
Post the rendering code as well.
22  Game Development / Game Play & Game Design / Re: Getting more serious about game DESIGN on: 2014-04-30 08:12:01
Just to agree with trollwarrior, you can't even really build a game engine if it is not being used in several real and complete games. Otherwise, how do you know your solution is solving anything?

Agree completely with this.

I'm one of those that prefers making an engine as opposed to aspiring to an actual game, that said I try and force myself to aim for an end-product when developing this engine, otherwise the temptation is to continually tinker rather than actually delivering anything.

Just dug out my initial 'roadmap' listing the engine features for each 'release':

1. proverbial textured spinning cube
- abstract application (render/update loop)
- point, vector, matrix
- mesh builder (specialised for cube atm)
- viewport, projection, scene classes
- LWJGL rendering implementation
- image loader
- texture class
- animator, rotation transform

2. galaxy simulation
- vertex/fragment shader (fixed parameters for now)
- VBOs / VAOs
- upgraded mesh builder
- height map loader
- camera class, orbit camera controller

3. terrain
- height map loader
- terrain builder
- phone lighting
- indexed mesh builder
- normals computation
- device management
- event handling, basic movement events
- improved camera controller

etc etc

Obviously I only have myself to please so I still procrastinate Wink but at least I generally have some goal in mind and a set of tasks to achieve.

- stride
23  Game Development / Game Play & Game Design / Re: Storing gameobjects, and calling them through events on: 2014-04-30 08:01:07
Still not entirely sure what you are asking for.
Also registration isn't a Java (or OO) concept AFAIK so not sure what you mean by that.
Might be worth posting some of your code, or maybe a rough diagram to illustrate your design?
24  Game Development / Game Play & Game Design / Re: Storing gameobjects, and calling them through events on: 2014-04-29 12:15:32
Couple of thoughts:

1. Tile-map

If you have a tile-map, why organise the data as a hash-map indexed by ID?

Seems more logical have a 2D array (or similar data-structure) that represents each tile and have those reference your game objects?


class Tile {
    private final Set<GameObject> objects = ...

class World {
    private final Tile[][] map = ...

No need for any IDs or look-ups since (presumably) you know which tile(s) you are dealing with at and the above tells you which objects are on each tile.

Or am I missing the point completely here?

2. Events

I assume you are referring to user input events here?  Or are you also talking about other events such as timers, AI, random events, etc?

In either case, presumably you know which tile(s) the event applies to so it's just a matter of handling that event in some sort of controller class and updating the state of the game object(s) on that tile?

- stride
25  Game Development / Game Play & Game Design / Re: Opinions on static ArrayLists for objects (where to store them) on: 2014-04-25 15:36:23
There's nothing wrong with global variables.  Static methods are global as what.  (This is no comment on OPs code..just general comments)

Yeah good point, maybe mentioning global variables was a bit of red herring when what I was really trying to raise was encapsulation and separation-of-concerns.
26  Game Development / Game Play & Game Design / Re: Opinions on static ArrayLists for objects (where to store them) on: 2014-04-25 10:49:33
There's nothing inherently wrong with static per-se when used correctly, e.g. immutable constants.

However using static class members to 'store' data is essentially akin to global variables, a more OO (and considerably tidier) approach could be:
- encapsulate the MapAnimation into it's own class (probably immutable once each one is loaded?).
- re-factor the posted code so that it returns the animations.
- create another model class that contains the array of map animations (may also include other game data?)
- the controller that you mention uses that model, updates whatever needs updating, renders, etc.

Each class now has a clear and concise purpose (easier to comprehend or modify), can more easily be tested, and no nasty global variables.

- stride
27  Discussions / Miscellaneous Topics / Re: Comments! on: 2014-04-24 14:25:00
Hate all comments?

Burn the witch!
28  Game Development / Performance Tuning / Re: Taming Java GC to prevent stutter, an in-depth post on memory management on: 2014-04-23 11:57:15
From quick skim this all looks questionable.  About the only reason I'd object pool would be to simulate structures given that same sized object will be allocated address-first if they happen prior to the first GC.

Questionable implies the OP and the blog post are a subjective viewpoint, whereas s/he has has cold, hard evidence for a bottle-neck and a means of measuring whether the solution resolves or mitigates it (or even makes it worse).  Object-pooling (or any other performance 'improvement') has it's place if there is a real performance bottle-neck due to GC, especially on mobile devices.

What do you mean by simulate structures btw?

Is the modern JVM and CPU so efficient that it makes object pooling almost obsolete? and that home brew object pooling is more likely to lead to performance issues rather than resolving them?

On the other hand this is also valid, the more complex the code the more risk you add, and ofc pooling can lead to nasty memory leaks if implemented poorly.
29  Game Development / Game Play & Game Design / Re: Particle System Implementation on: 2014-04-23 09:13:25
I think the question should be whether to use point sprites or not:

1. Bill-board approach:

Sort array of vertices by distance from the camera (for correct blending), generate bill-board quads from your array of vertices, buffer the data into a dynamic VBO, render each sprite as a quad or two triangles.  Your mesh would consist of VBOs for texture coordinates (and colours if required) as well as the quad vertices (or one inter-leaved VBO).

- re-uses your existing mesh code.

- over-head of having to orientate the quads to the camera.
- need to provide texture coordinates but these are usually the same for every sprite hence redundant data.

2. Point-sprites:

As #1 but use point sprites rather than billboard quads.

- re-uses your existing mesh code.
- no need to calculate billboard orientation or texture coordinates.
- usually faster rendering.
- supported by most (all) modern graphics cards (including OpenGL-ES).

- point sprites have some limitations (e.g. large sprites are culled if the centre point is outside the view frustum) but these are usually not relevant or can be worked around.

Either approach can be enhanced by using a vertex/fragment shader:
- more flexible rendering
- faster than fixed-function pipeline

Note sure why you would need an IBO for a particle system though, or is it just an optional part of your mesh class?

- stride
30  Game Development / Game Play & Game Design / Re: Overall design strategy. on: 2014-04-22 08:58:55
Couple of techniques for organising your 'thinking':

Nouns and verbs: If you're starting a new project or a new feature in your game categorise your ideas into classes (the nouns) and methods (the verbs), a simple UML diagram will help you organise your thoughts - or it helps me anyway.

MVC (Model-View-Controller): Another way to work out where to put everything is to categorise your code using the MVC design pattern, quick summary: the model is the state of your game (entities, events, etc), the controller(s) manipulate the model (player actions, animations, game AI, etc) and the view is the representation of the model to the player (scene graph, UI, etc).

Cohesion: A good way to check that you're organising your code as best as you can (and it will never be perfect) is to consider how concise each chunk of code is, i.e. does it have a straight-forward purpose? is the 'API' of that code clear and simple?  If the answer is no then you might want to reconsider the design, break that class up, etc.  A good test is whether that code can be easily unit-tested, if you find that it's complicated to test then the code is probably a bit messy.

Just some random thoughts off the top of my head, hope it helps.

- stride
Pages: [1] 2 3 ... 7

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Dwinin (28 views)
2014-09-12 09:08:26

Norakomi (57 views)
2014-09-10 13:57:51

TehJavaDev (72 views)
2014-09-10 06:39:09

Tekkerue (37 views)
2014-09-09 02:24:56

mitcheeb (57 views)
2014-09-08 06:06:29

BurntPizza (43 views)
2014-09-07 01:13:42

Longarmx (27 views)
2014-09-07 01:12:14

Longarmx (34 views)
2014-09-07 01:11:22

Longarmx (34 views)
2014-09-07 01:10:19

mitcheeb (40 views)
2014-09-04 23:08:59
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!