Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (480)
Games in Android Showcase (110)
games submitted by our members
Games in WIP (546)
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 / 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.
2  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.

Quote
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
3  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.
4  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
5  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:

1  
2  
3  
4  
public HeightMap(Model terrain) {
      width = 202;
      height = 202;
      ...


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

1  
2  
3  
4  
5  
      for (int i=0; i<terrain.vertices.size(); i++) {
         Vector3f vec = terrain.vertices.get(i);
         heightMap[(int)(vec.x+((float)width/2f))]
               [(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:

1  
2  
3  
4  
5  
6  
7  
8  
      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;
            ++idx;
         }
      }      


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
6  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. http://www.mkyong.com/spring/maven-spring-hibernate-mysql-example/  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
7  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:

1  
2  
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!?
8  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
9  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?
10  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
11  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?

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
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.
12  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.
13  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
14  Java Game APIs & Engines / OpenGL Development / Re: Design or pattern for handling background consumer/producer tasks on: 2014-05-14 10:11:40
...snip...

Some good suggestions there, cheers.

Quote
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.

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

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.
Quote

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
16  Java Game APIs & Engines / OpenGL Development / Design or pattern for handling background consumer/producer tasks on: 2014-05-08 13:55:51
Background:

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:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
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:  http://stackoverflow.com/questions/23542776/design-or-pattern-for-handling-background-consumer-producer-tasks

- stride
17  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
18  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
19  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.
20  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
21  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?
22  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?

e.g.

1  
2  
3  
4  
5  
6  
7  
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
23  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 well..so 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.
24  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
25  Discussions / Miscellaneous Topics / Re: Comments! on: 2014-04-24 14:25:00
Hate all comments?

Burn the witch!
26  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.
27  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).

pros:
- re-uses your existing mesh code.

cons:
- 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.

pros:
- 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).

cons:
- 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
28  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
29  Discussions / General Discussions / Re: Blender Character Animation formats on: 2014-04-17 10:38:47
I also looked at FBX as a potential 'definitive' file format for animated, skinned models, but again the actual underlying format is not particularly well documented so you're in same boat when it comes to writing your own importer - at least COLLADA is backed by Kronos, seems to be current and is supported by most of the 3D tools out there AFAIK.

I found this excellent tutorial on using COLLADA for loading animated models exported from Max, Maya, etc:  http://www.wazim.com/Collada_Tutorial_1.htm

I will be giving this a whirl over the Easter break and will respond with any issues, thoughts, criticisms, etc., I'd be interested to hear feedback on your progress from you guys as well.

- stride
30  Game Development / Performance Tuning / Re: LWJGL VBO vertices amount on: 2014-04-17 10:06:07
So how many floats fit into 4 mb? 1mil?

Yeah just over a million.  I'd choose a VBO size with that ~4Mb limit in mind.

If you're interested why 256 x 256 chunks in my example:
each vertex has eight floats (3 for position, 3 for normal, 2 for texture coordinates) = 24 bytes per vertex
assuming a 4Mb limit means I could fit ~175K vertices in a single VBO.
256 x 256 is well inside this 'limit', 512 x 512 exceeds it.
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.

atombrot (23 views)
2014-08-19 09:29:53

Tekkerue (22 views)
2014-08-16 06:45:27

Tekkerue (21 views)
2014-08-16 06:22:17

Tekkerue (12 views)
2014-08-16 06:20:21

Tekkerue (19 views)
2014-08-16 06:12:11

Rayexar (57 views)
2014-08-11 02:49:23

BurntPizza (37 views)
2014-08-09 21:09:32

BurntPizza (29 views)
2014-08-08 02:01:56

Norakomi (36 views)
2014-08-06 19:49:38

BurntPizza (66 views)
2014-08-03 02:57:17
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
java-gaming.org 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‑gaming.org
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!