Java-Gaming.org    
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
1  Java Game APIs & Engines / OpenGL Development / Re: From display lists to VBOs on: 2013-03-19 21:37:06
Okay. I checked out the arcsynthesis tutorial earlier and it seemed to be very good. I'll work through it then.
Thank you for you efford and advice =)
2  Java Game APIs & Engines / OpenGL Development / Re: From display lists to VBOs on: 2013-03-19 12:55:58
So the main differences are the different pipelines?

Another question: I read that one of the advantages of VBOs is that you can reuse vertices for multiple primitives. I'm not sure how I would implement this in a useful way for my project, some kind of Minecraft like game. At the moment I have an array of blocks and create a display list for each chunk of blocks by looping through all the blocks and add them in immediate mode to the list. The problem now is, that they don't know each other so I can't determine which vertex could be reused. I have no idea how to do this.
3  Java Game APIs & Engines / OpenGL Development / From display lists to VBOs on: 2013-03-19 00:24:36
Hey guys
I'm working on my first OpenGL 3D project with LWJGL and I'm currently using display lists to render everything. Now I heard that display lists are deprecated and Vertex Buffer Objects are the state of the art. My problem is that I can't find any resources for people who want to take the step from old to new. I don't want to learn everything again.
Does anybody know any resources for this or could explain me the basic differences in how these techniques work? Is there an easy way to convert the code for rendering with display lists to VBOs?

I'm happy about any answers! =)

Many thanks in advance!
4  Game Development / Newbie & Debugging Questions / Re: Game gets slower on: 2013-01-27 08:25:11
The baseline reading idea is a good one. I think I'll implement some kind of debugging framework that let's me decide what data I want to take a look at.

I think my assumption is right. The heap monitor shows nearly the same curve every run no matter how I move around, where I look (that was one of my early assumptions) and even if I don't move at all.
I implement the FPS counter yesterday. The weird thing is, that since I did this, it seems to be better. The game doesn't get slower (or at least not that much) which doesn't make any sense because all I did was to add code that only counts the fps. The regulation still is handled by Display.sync() and I don't think that an overhead increases speed Tongue

Also thank you for your effort to look at my code! =)
5  Game Development / Newbie & Debugging Questions / Re: Game gets slower on: 2013-01-26 16:05:21
Nice idea. I'll definitely will include this! Thanks =)
6  Game Development / Newbie & Debugging Questions / Re: Game gets slower on: 2013-01-26 12:05:00
Thanks for the code!
I tested it and all values are around 9000. There are some outliers around 28000 and a few even at 40000 but they are rare. That's not too bad, right?
7  Game Development / Newbie & Debugging Questions / Re: Game gets slower on: 2013-01-26 10:29:33
Well this is my collision 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  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
   public void checkCollision(){
     
      /*
       * -> get Blocks in question
       * -> check Collision for every block
       * -> if true set pos to oldPos
       *
       */

     
      if(currentChunk == null)
         return;
     
      //Get the player coordinates
     int x = (int)Math.floor(this.position.x);
      int y = (int)Math.floor(this.position.y);
      int z = (int)Math.floor(this.position.z);
      y--;
     
      // Get the blocks
     surrounding.add(currentChunk.getBlock(x-1, y+1, z-1));
      surrounding.add(currentChunk.getBlock(x-1, y+1, z));
      surrounding.add(currentChunk.getBlock(x-1, y+1, z+1));
      surrounding.add(currentChunk.getBlock(x, y+1, z-1));
      surrounding.add(currentChunk.getBlock(x, y+1, z));
      surrounding.add(currentChunk.getBlock(x, y+1, z+1));
      surrounding.add(currentChunk.getBlock(x+1, y+1, z-1));
      surrounding.add(currentChunk.getBlock(x+1, y+1, z));
      surrounding.add(currentChunk.getBlock(x+1, y+1, z+1));

      surrounding.add(currentChunk.getBlock(x-1, y+2, z-1));
      surrounding.add(currentChunk.getBlock(x-1, y+2, z));
      surrounding.add(currentChunk.getBlock(x-1, y+2, z+1));
      surrounding.add(currentChunk.getBlock(x, y+2, z-1));
      surrounding.add(currentChunk.getBlock(x, y+2, z));
      surrounding.add(currentChunk.getBlock(x, y+2, z+1));
      surrounding.add(currentChunk.getBlock(x+1, y+2, z-1));
      surrounding.add(currentChunk.getBlock(x+1, y+2, z));
      surrounding.add(currentChunk.getBlock(x+1, y+2, z+1));
     
      //Check collision for every block
     
      boolean collision = false;
     
      for(Block b : surrounding){
         if(b != null && this.getBounds().intersects(b.getBounds())){
            collision = true;
            break;
         }
      }
     
      surrounding.clear();
     
      //Reset position
     
      if(collision){
         this.position.x = oldPos.x;
         this.position.z = oldPos.z;
      }
     
   }


surrounding is a HashSet, so there are at most 18 checks every cycle (I know that this isn't optimal. I just did this to brute force a basic collision). I clear the Set afterwards so no growth here.

I never intentionally save any data for a longer period so there should be no growth especially no exponential Tongue
It has to be internally or I oversee something...

EDIT: I just found the source of the huge amount of char[]'s. It's because I set the title of my window to the current player position every update cycle. I removed it, but it's still the same problem.
Also the execution time profiling told me that most of the time goes into glCallList. That's reasonable because I call one list for every chunk, which is 64 lists every update. I probably should find an algorithm for that too. Still I don't think that this is the reason for the growth. The lists are generated only once in the beginning and then kept in the memory and never touched.
8  Game Development / Newbie & Debugging Questions / Re: Game gets slower on: 2013-01-26 00:16:51
At the moment it's not a real game. It's only a world where I can walk around. And the longer I walk around, the slower everything gets.
The collision detection takes the Objects in the direct surrounding and only checks them. Afterwards the Objects are cleared again. So this should be the same every cycle too.
9  Game Development / Newbie & Debugging Questions / Re: Game gets slower on: 2013-01-25 19:40:45
I made a heap dump closely before the memory peek and another directly after the gc and everything that got removed were some of those char[] and a few HashMap Entries.

All this is really weird. I know that 16MB is not much and I use a single array to store the data in the chunks, so I have constant time to acces the single Blocks inside the chunk. The chunks themself are stored in an ArrayList but there are only 64 of them so this shouldn't be too bad.

Thanks for your help! If anyone has another idea or took a look at the code and found something, please tell me!
10  Game Development / Newbie & Debugging Questions / Re: Game gets slower on: 2013-01-25 18:48:21
This MAT is a neat little tool =)
It showed me that most of the memory goes to the storage of the chunks. That makes sense, because I have 64 of them. They take up 16MB of memory which isn't that much, right?
The char[] is the input queue of the keyboard.

Then again the weird thing is that it gets slower with the time. (In fact it gets slower, then when the gc runs, a little faster again)
How can I find out what exactly is removed by the gc?
11  Game Development / Newbie & Debugging Questions / Re: Game gets slower on: 2013-01-25 18:03:04
Thank you very much. That was exactly what I was looking for.
The heap usage is going up, then the GC comes and it drops a little bit. Then it rises again. So the GC is working but after every run it's less then after the last.

The profiler says that there is a char[] that takes about 25% of the total memory used. That's weird, because I never use a char[].Also I get a huge amount of Object[]. I guess it's used internally by lwjgl or slick. Is there a way to find out where it's used?

@DrewLols
I never worked with the finalize method. In general, that's a good idea but in my case I don't have things like rooms that have to be removed. The whole map is created at the beginning and doesn't change at all.
12  Game Development / Newbie & Debugging Questions / Game gets slower on: 2013-01-25 10:47:03
Hey guys
I just finished the basic engine for my game, but the longer I play, the slower it gets. I checked if I create a huge amount of Objects somewhere that blocks the memory but I couldn't find any. Only some local Variables that should be removed by the GC after the method is finished. Could it be that the GC is too slow?
I have absolut no idea where the problem could be.

Are there some typical noob problems that cause such a behaviour?

Here is the github link if anybody wants to take a deeper look
https://github.com/skappler/BlockWorld

Any help is appreciated!
13  Game Development / Newbie & Debugging Questions / Re: Loading a static Texture inside a jar file on: 2013-01-25 08:35:30
Thank you VERY much! It worked perfectly. I didn't think this would be solved that quick Cheesy
14  Game Development / Newbie & Debugging Questions / Loading a static Texture inside a jar file on: 2013-01-25 08:21:43
Hey guys!
I'm currently trying to export my game into a single jar file. I used JarSplice to create a Fat Jar.
My Game loads the Spritesheet as a Slick2D Texture in a static variable.

At first I tried to load the Texture like this:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
public static Texture loadTexture(String path) {

      try {
         return TextureLoader.getTexture("PNG",new FileInputStream(path));
      } catch (FileNotFoundException e) {
         e.printStackTrace();
      } catch (IOException e) {
         e.printStackTrace();
      }

     
      return null;
   }


This worked in Eclipse, but not exported as a jar. I googled for a while and changed it to:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
public static Texture loadTexture(String path) {

      try {
         return TextureLoader.getTexture("PNG",MyTextureLoader.class.getResourceAsStream(path));
      } catch (FileNotFoundException e) {
         e.printStackTrace();
      } catch (IOException e) {
         e.printStackTrace();
      }

     
      return null;
   }


Now the Game won't even work in eclipse and I get a "Exception in thread "main" java.lang.ExceptionInInitializerError" when I try to run the game. More precisely when I try to bind the texture.

Could anyone help me?
15  Game Development / Newbie & Debugging Questions / Re: How to HANDLE collision? on: 2012-12-02 09:55:10
Really good idea. If I modify the system a bit by "collecting" all movement vectors (if 2 keys are pressed at the same time) this gets me also rid of the problem that I move slightly faster if I intend to move diagonal. Thank you!
16  Game Development / Newbie & Debugging Questions / Re: How to HANDLE collision? on: 2012-12-01 20:50:25
Yes I'm not interested in ways to detect if there is a collision. I've already dealt with this.

For the beginning I don't want to make it too complicated, because I'm just started to learn OpenGL and need a basic system for that.
Roll back the time seems to be the thing that namrog proposed. I think it's the easiest way.
To push the two objects apart I need to keep track of the movement vectors, right? Also I think this would be only useful for entity - entity collision as walls aren't supposed to move Tongue

I'm not scared of math as long as it's not too hard Cheesy Your link seems to be very helpful and I will definitely safe it for later, but for the moment this seems to be a bit too much as I only try to have a basic system to handle collision so that I can move around properly. You still have a good point that one collision handling may cause another one. I'll keep that in mind. Thank you very much!
17  Game Development / Newbie & Debugging Questions / Re: How to HANDLE collision? on: 2012-12-01 17:42:22
Hi

I explained how I plan to handle the collisions in my first person shooter here, look at the paragraph entitled "Improvement of collisions detection". I hope that helps a bit.

Thank you I'll check it out!

skappler, a lot of times people handle it by the first frame they 'intersect' simply 'push' the player back outside (can be a little more difficult to know which direction to 'push' the player)

or perhaps another way

keep an oldX and oldY of the 'last frame'(that they weren't intersecting) so if they intersect, set their currentX and currentY back to their oldX and oldY coordinate, back when they weren't intersecting.


Thank you! Seems like a good idea. Still I'm not sure where I should do this. If I handle it in the player class I need to pass the level to it, this may cause some overhead.
18  Game Development / Newbie & Debugging Questions / How to HANDLE collision? on: 2012-12-01 13:12:03
Hey guys.
At the moment I'm stuck at collision handling for my 3D game. If I search for it online I only find fancy algorithms to detect if two objects intersect, but not how to handle it correctly.
My problem is that if I check the collision for let's say the player and a wall and they do intersect it's basically to late to prevent them from colliding. So how should I handle this the best way especially in 3D space where I have no deltas that says I'm going up or down.
Also where should I handle this stuff. I have a player class that includes the input handling for the movement, I have a Level class that holds the player and the single chunks (yes it's some kind of minecraft game) and the Chunk class where the actual blocks are.
How does this all fit together?

I hope you have some tips for me =)
19  Games Center / Cube World Projects / Re: Slick Textures awefully slow on: 2012-11-27 20:12:39
Are there any other tutorials or resources about all this VBA and VBO stuff? I liked the way the redbook was written.
Also: I just started learning shaders, so would it be better to finish the shader stuff and stick with immediate mode / display lists till then, or first learn the "modern" OpenGL stuff?
20  Games Center / Cube World Projects / Re: Slick Textures awefully slow on: 2012-11-27 19:46:28
I think my fault was to learn OpenGL with the redbook. The version I read was last reviewed in 2002 Tongue
Thank you for the tip, I will check it out as soon as I have the time for it!
21  Games Center / Cube World Projects / Re: Slick Textures awefully slow on: 2012-11-27 19:32:14
And matheus you were right, I had to bind the Texture while compiling. Can anyone explain why?
What's also weird is that I haven't any blue texture like the one that was bound Cheesy

Phew... I'll try... tho I don't know much about DisplayLists...

So... probably it's more about the concept:
A Display list is really just for reducing the ammount of calls to OpenGL and being able to really pre-compile them when you compile them, instead of everytime interpreting all the commads you give to opengl.
Compiling also gives the ability to optimize it.

So to be more precise: it's about state-compiling.
Changing the texture would change your state, which means things are not like they used to be when compiling. Having a texture pre-compiled inside the list allows some optimization, for example terminate all glBindTexture calls, which are binding the same texture. Usually opengl couldn't do this, because it does not know, if you bind the same textures every frame. With display lists this is not possible anymore, so opengl is able to terminate those calls.


I don't get why display lists got deprecated... One cool thing about them is for example that you are able to let a glCallList compile inside a display list, so your display list calls another display list.
Now imagine your whole game world is one single display list and once a part of your world changes, you simply only recompile the specific display list and everything works...

Ok that makes sense. Thank you very much =)

I don't get why display lists got deprecated... One cool thing about them is for example that you are able to let a glCallList compile inside a display list, so your display list calls another display list.
Now imagine your whole game world is one single display list and once a part of your world changes, you simply only recompile the specific display list and everything works...
One of the problems is that compiling display lists is really slow. So yes, in theory you could make a hierarchy of display lists, but the moment you have to update content that is a bit large (a few thousand vertices) you get a noticable hickup in your framerate.

The only modern benefit of display lists today is compiling a bunch of state changes, not feeding geometry. It can massively reduce the number of calls to the driver, and if you're in luck the driver just passes the handle to the GPU which will apply all state changes.

Streaming geometry is so fast these days, using VBOs and mapped buffers, that there is no reason to use displaylists for them.

So the way I do it will give me laggs when I rebuild a display list? I wanted to have one List per chunk and update them when a block within a chunk changes. Is this inefficient? And would VBOs be a huge improvement?
22  Games Center / Cube World Projects / Re: Slick Textures awefully slow on: 2012-11-27 18:59:33
I did so. Before I changed the code it worked perfectly. I didn't change anything.
You've got to change your mentality a bit Smiley

Assuming the code is broken because you screwed up is usually correct and will help you finding the solution faster. Throwing your hands up in the air like 'it wasn't me' is understandable when you're new to all this, but eventually you'll see that your own code is at fault. (and if not, there is still nothing else to do than change your own code to work around some bug)

Yes I know I tend to do this Tongue
And matheus you were right, I had to bind the Texture while compiling. Can anyone explain why?
What's also weird is that I haven't any blue texture like the one that was bound Cheesy

@RobinB The texture coordinates remain the same, because the spritesheet didn't change.
Also I study Computer Science so I think I know what % does Wink
23  Games Center / Cube World Projects / Re: Slick Textures awefully slow on: 2012-11-27 18:52:00
I did so. Before I changed the code it worked perfectly. I didn't change anything. The texture is bound only once in the beginning.
24  Games Center / Cube World Projects / Re: Slick Textures awefully slow on: 2012-11-27 18:24:34
Oh thank you. I didn't know this is still required Tongue
It works but the textures are weird



It should be a brown block of dirt with some grass on the top. It worked in before.
25  Games Center / Cube World Projects / Re: Slick Textures awefully slow on: 2012-11-27 18:11:09
So I tried to implement the display lists but nothing is getting displayed. Here's the chunk class:

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  
public class Chunk {
   
   private Vector3f coordinates;
   private Block[] blocks;
   private int displayList;
   
   public Chunk(){
      blocks = new Block[16*16*16];
     
      loadChunk();
     
      displayList = GL11.glGenLists(1);

      createDisplayList();
   }
   
   public void render(){
     
      GL11.glCallList(displayList);
     
   }
   
   public void update(){
     
   }
   
   public void loadChunk(){
      for (int i = 0; i < 16; i++) {
         for (int j = 0; j < 16; j++) {
            for (int k = 0; k < 16; k++) {
               // if((i == 15 || i == 0) || (j == 15 || j== 0))
              blocks[16*16*i+16*j+k] = new GrassBlock(i, -k, j);
            }
         }
      }
   }
   
   private void createDisplayList(){
     
      GL11.glNewList(displayList, GL11.GL_COMPILE);
         for(Block b : blocks){
            if(b != null)
               b.create();
         }
      GL11.glEndList();
     
   }

}


And here the create() Method from the Block class:

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  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
81  
82  
83  
public void create() {
      float x = coordinate.x;
      float y = coordinate.y;
      float z = coordinate.z;

      float topTextureX = top / MyTextureLoader.SPRITESHEETWIDTH;
      float topTextureY = top % MyTextureLoader.SPRITESHEETWIDTH;

      float bottomTextureX = bottom / MyTextureLoader.SPRITESHEETWIDTH;
      float bottomTextureY = bottom % MyTextureLoader.SPRITESHEETWIDTH;

      float sideTextureX = side / MyTextureLoader.SPRITESHEETWIDTH;
      float sideTextureY = side % MyTextureLoader.SPRITESHEETWIDTH;

      float delta = (float) (1.0 / MyTextureLoader.SPRITESHEETWIDTH);

      // TOP
     glNormal3f(0f, 1f, 0f);
      glTexCoord2f(topTextureX, topTextureY);
      glVertex3f(x, y, z);
      glTexCoord2f(topTextureX, topTextureY + delta);
      glVertex3f(x, y, z + 1);
      glTexCoord2f(topTextureX + delta, topTextureY + delta);
      glVertex3f(x + 1, y, z + 1);
      glTexCoord2f(topTextureX + delta, topTextureY);
      glVertex3f(x + 1, y, z);

      // BOTTOM
     glNormal3f(0f, -1f, 0f);
      glTexCoord2f(bottomTextureX, bottomTextureY);
      glVertex3f(x, y - 1, z);
      glTexCoord2f(bottomTextureX, bottomTextureY + delta);
      glVertex3f(x, y - 1, z + 1);
      glTexCoord2f(bottomTextureX + delta, bottomTextureY + delta);
      glVertex3f(x + 1, y - 1, z + 1);
      glTexCoord2f(bottomTextureX + delta, bottomTextureY);
      glVertex3f(x + 1, y - 1, z);

      // BACK
     glNormal3f(0, 0, 1);
      glTexCoord2f(sideTextureX, sideTextureY);
      glVertex3f(x, y, z);
      glTexCoord2f(sideTextureX + delta, sideTextureY);
      glVertex3f(x + 1, y, z);
      glTexCoord2f(sideTextureX + delta, sideTextureY + delta);
      glVertex3f(x + 1, y - 1, z);
      glTexCoord2f(sideTextureX, sideTextureY + delta);
      glVertex3f(x, y - 1, z);

      // FRONT
     glNormal3f(0, 0, 1);
      glTexCoord2f(sideTextureX, sideTextureY);
      glVertex3f(x, y, z + 1);
      glTexCoord2f(sideTextureX + delta, sideTextureY);
      glVertex3f(x + 1, y, z + 1);
      glTexCoord2f(sideTextureX + delta, sideTextureY + delta);
      glVertex3f(x + 1, y - 1, z + 1);
      glTexCoord2f(sideTextureX, sideTextureY + delta);
      glVertex3f(x, y - 1, z + 1);

      // LEFT
     glNormal3f(-1, 0, 0);
      glTexCoord2f(sideTextureX, sideTextureY);
      glVertex3f(x, y, z);
      glTexCoord2f(sideTextureX, sideTextureY + delta);
      glVertex3f(x, y - 1, z);
      glTexCoord2f(sideTextureX + delta, sideTextureY + delta);
      glVertex3f(x, y - 1, z + 1);
      glTexCoord2f(sideTextureX + delta, sideTextureY);
      glVertex3f(x, y, z + 1);

      // RIGHT
     glNormal3f(1, 0, 0);
      glTexCoord2f(sideTextureX, sideTextureY);
      glVertex3f(x + 1, y, z);
      glTexCoord2f(sideTextureX, sideTextureY + delta);
      glVertex3f(x + 1, y - 1, z);
      glTexCoord2f(sideTextureX + delta, sideTextureY + delta);
      glVertex3f(x + 1, y - 1, z + 1);
      glTexCoord2f(sideTextureX + delta, sideTextureY);
      glVertex3f(x + 1, y, z + 1);

   }


I basically moved the rendering code to the create method and removed the glBegin and glEnd. It doesn't make any difference where I call the OpenGl commands, right?
26  Game Development / Newbie & Debugging Questions / Re: I Want to Learn LWJGL on: 2012-11-25 18:40:35
I'd say it's worth it. It's much faster to use OpenGl for either 2D and 3D.
I just started to learn 3D OpenGL using this book: http://fly.cc.fer.hr/~unreal/theredbook/chapter01.html
It's more about 3D stuff, but the first chapter(s) cope with general OpenGL concepts and techniques, and it's easy to understand. There's also a pdf version available. Just google "the redbook".

For 2D only stuff I have no good resources but I think you have to know something about OpenGL if you want to use Slick.
Nooooooo that is a *really* old book using *extremely* outdated OpenGL! Shocked

I just finished reading this and I found it pretty good Tongue I know that it must be outdated but it helped me to understand the basic concepts.
Thanks for the link though! Cheesy
27  Game Development / Newbie & Debugging Questions / Re: I Want to Learn LWJGL on: 2012-11-25 17:16:01
I'd say it's worth it. It's much faster to use OpenGl for either 2D and 3D.
I just started to learn 3D OpenGL using this book: http://fly.cc.fer.hr/~unreal/theredbook/chapter01.html
It's more about 3D stuff, but the first chapter(s) cope with general OpenGL concepts and techniques, and it's easy to understand. There's also a pdf version available. Just google "the redbook".

For 2D only stuff I have no good resources but I think you have to know something about OpenGL if you want to use Slick.
28  Games Center / Cube World Projects / Re: Slick Textures awefully slow on: 2012-11-25 15:13:52
Omg that's the original thread where notch posted minecraft? How awesome is that Cheesy

I understand what he tries to do, but not how he does it Cheesy But I have to care about other things at the moment anyway.
(Nevertheless I'm interested in how it works!)
29  Games Center / Cube World Projects / Re: Slick Textures awefully slow on: 2012-11-25 11:26:20
Quote
array2[x*16*16 + y*16 + z]

That access pattern causes horrible cache trashing and thus poor performance.

http://www.java-gaming.org/topics/minecraft/20505/msg/168294/view.html#msg168294 (algorithm)
http://www.java-gaming.org/topics/minecraft/20505/msg/168314/view.html#msg168314 (benchmark)

(~3x speedup purely by choosing an intelligent, cache aware memory layout within the array. needless to say i was disappointed by the lack of any feedback Emo)

Looks good. Even though I don't understand it yet Cheesy
But I know that you can do many things more efficient if you use bit operations. I'll take a deeper look into it and try to understand it. Thank you!
30  Games Center / Cube World Projects / Re: Slick Textures awefully slow on: 2012-11-24 22:54:32
Oh yes. I just tried to play around with the normals but they are not responsible for this (as I figured out Tongue)
I just thought wrong when writing my code. I copied the code for front and back and just changed the z coords Cheesy
Pages: [1] 2
 

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 (26 views)
2014-09-12 09:08:26

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

TehJavaDev (71 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 (41 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
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!