Java-Gaming.org Hi !
Featured games (81)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (119)
games submitted by our members
Games in WIP (576)
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 ... 8
1  Games Center / Cube World Projects / Re: A different Cube World on: 2013-05-18 18:53:21
This could be good ;-)
2  Games Center / Cube World Projects / Re: Voxby - my source code give away on: 2013-05-18 17:40:22
Quarry - if you read my posts you will see I've moved to using shaders and thus the programmable pipeline, the voxel engine was a learning experience for me and as Pauler says, it uses display lists - I moved to VBO and got same results. 



3  Java Game APIs & Engines / OpenGL Development / Re: Programmable pipeline on: 2013-05-12 17:33:00
Thanks,

Stack trace:

1  
2  
3  
4  
5  
6  
7  
8  
9  
Exception in thread "main" org.lwjgl.opengl.OpenGLException: Invalid operation (1282)
   at org.lwjgl.opengl.Util.checkGLError(Util.java:59)
   at org.lwjgl.opengl.GL20.glGetProgram(GL20.java:551)
   at Square.printLogInfo(ShaderBox2.java:219)
   at Square.createVertShader(ShaderBox2.java:192)
   at Square.<init>(ShaderBox2.java:127)
   at ShaderBox2.init(ShaderBox2.java:71)
   at ShaderBox2.<init>(ShaderBox2.java:26)
   at ShaderBox2.main(ShaderBox2.java:75)


My gfx card supports shading language upto 1.20 and OGL 3.0 (except shading language 1.30) - Using GLview it reports OpenGL version as 2.1 Apple-8.0.61.

Is there any tutorials which show rendering using a vertex shader, what I've seen they still use glBegin?!

Thanks

4  Java Game APIs & Engines / OpenGL Development / Re: Programmable pipeline on: 2013-05-12 16:08:54
Hi,

Here is the code that seems to cause the crash:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
private static boolean printLogInfo(int obj) {
        IntBuffer iVal = BufferUtils.createIntBuffer(1);
        glGetProgram(obj, GL_INFO_LOG_LENGTH, iVal);   // <-- THIS LINE CAUSES CRASH, IF I REMOVE THEN OK

        int length = iVal.get();
        if (length > 1) {
            // We have some info we need to output.
            ByteBuffer infoLog = BufferUtils.createByteBuffer(length);
            iVal.flip();
            glGetProgramInfoLog(obj, iVal, infoLog);
            byte[] infoBytes = new byte[length];
            infoLog.get(infoBytes);
            String out = new String(infoBytes);
            System.out.println("Info log:\n" + out);
        } else return true;
        return false;
    }


Thanks,
Steve
5  Java Game APIs & Engines / OpenGL Development / Re: Programmable pipeline on: 2013-05-10 19:48:11
Thanks,

What is the programHandle parameter?

6  Java Game APIs & Engines / OpenGL Development / Programmable pipeline on: 2013-05-10 17:12:01
Hi,

I've tried to use OGL2.0 with a vertex shader, doing it with LWJGL - fails on compiling the vertex shader which is fine as the shader compiles fine when I use ARB extensions - could it be my gfx card which is a intel hd 3000 on my macbook pro?

1  
2  
3  
4  
5  
6  
7  
vertex shader:

varying vec4 vertColor;
void main(){
           gl_Position = gl_ModelViewProjectionMatrix*gl_Vertex;
           vertColor = vec4(0.0, 0.0, 1.0, 1.0);
}

Thanks for any help
7  Games Center / Cube World Projects / Re: Voxby - my source code give away on: 2013-05-10 17:05:57
No probs ;-)

Loving the new project by the way, I really need to get into doing something similar - could I ask, I'm at a crossroad, fixed pipeline or programmable...I've tried a bit of programmable with LWJGL and OGL2.0 but get errors on my vertex shader yet using ARB extensions it is fine?!
8  Games Center / Cube World Projects / Voxby - my source code give away on: 2013-05-10 12:30:11
Here is a link to the code for my voxel project:


https://sites.google.com/site/voxbygame/


Hope it helps somebody!  (Note - collision not fully implemented).

Keys wads, space to jump (infinitely), b to drop block, u to remove block, 4 to toggle through
block player holding.
9  Games Center / Cube World Projects / Re: Voxel Engine Problems on: 2013-05-10 12:23:13
It's just a value that is calculated to get a bobbing effect - I got the idea from Vermeer who I believe got it from one of nehe's tuts.

You can just do:

GL11.glTranslatef(-0.05f, 0.9f, 0.4f);

You may have to play around with the values dependant on your camera position.
10  Games Center / Cube World Projects / Re: Voxel Engine Problems on: 2013-05-10 12:12:47
I don't translate the position - just set identity and position the cube after.

I just do:

1  
2  
3  
4  
5  
6  
   glLoadIdentity();  

   GL11.glRotatef(10, 0, 0, 1);
   GL11.glTranslatef(-0.05f, (walkbias / 2.3f) + 0.9f, 0.4f);

       // draw cube


The above is called after my camera has been translated.
11  Games Center / Cube World Projects / Re: Voxel - a start on: 2013-05-10 06:33:45
Many thanks @davedes, will certainly look at your tutorials.

I have used LibGdx in the past when doing an Android game, although didn't go that low level with it.

I like LWJGL, it makes setting stuff up a lot simpler and a lot less tedious.

Thanks again,
Steve
12  Games Center / Cube World Projects / Re: Voxel - a start on: 2013-05-09 15:54:46
Thanks for your advice,

How difficult a task is it to switch to using shaders as opposed to fixed pipeline?
Such as transformations, camera system, object placement, lighting.

Programmable pipeline I believe was introduced in OpenGL3.0 - is this correct? Would not pretty
much everybody have this support on their GFX card now?

I do a lot of mobile dev work although not done any opengl on it, but that uses the programmable pipeline so if porting to say android, using programmable pipeline seems the way to go?

13  Games Center / Cube World Projects / Re: Voxel - a start on: 2013-05-09 14:32:27
Update with how my port going to C++ - well, must admit, wishing hadn't bothered, lol. Just wasted
a load of time of time I don't really have! 

I use to enjoy coding in C++, but I guess since using java for now over 8 years, I'm enjoying it  a lot more.

Lesson learned, time to get back to my vox project with Java.

Would I be wise to switch to the programmable pipeline and use shaders as opposed to fixed pipeline?
It seems a lot of people doing the voxel engines on here are using fixed pipeline.

Thanks,
Steve
14  Games Center / Cube World Projects / Re: 3D Turnbased Rougelike (LWJGL) on: 2013-05-05 17:50:09
Hi,

Looking really, really good this ;-)

Are you using shaders for this or fixed pipeline?

Thanks,
Steve
15  Games Center / Cube World Projects / Re: Sparky's little Cube World Project on: 2013-05-01 21:35:28
Thats looks sweet ;-)

Not been on for a while as porting code to C++, will keep you posted!
16  Games Center / Cube World Projects / Re: Voxel - a start on: 2013-04-29 20:59:40
Thanks for that,

I don't believe it is one language back, like I said, I've been coding in C++ for 16 years, mostly on windows platforms and embedded systems.

Both C++ and java have there place and for games development, C++ is suited.

I've used Java for around 8 years, mainly for back end server code (JSP, Servlets, EJB's, Struts,  Spring) but not much for gaming, in fact, the voxel engine I was doing is my first attempt at using Java for gaming.

Texture loader - this is what I've ended up using, looks cool:

http://www.lonesock.net/soil.html

Anyway, I've ported frustum culling, camera, game loop, skybox, vector3f over, just a little matter of actually rendering something ;-) - should I go straight with shaders or first draw something with the fixed pipeline?!

Thanks



17  Games Center / Cube World Projects / Re: Voxel - a start on: 2013-04-28 21:48:43
I know what you mean.

Need to find a good C++ texture loader...next mission!
18  Games Center / Cube World Projects / Re: Voxel - a start on: 2013-04-28 21:19:40
Will do, hoping to have something up by weekend...hoping!

19  Games Center / Cube World Projects / Re: Voxel - a start on: 2013-04-28 17:44:11
Thanks again Longor,

I'm fine with C++ though, been coding in it for 16 years ;-)

Not sure myself if Java is as fast, what with the JVM and all.

Ive started writing it in C++ now, just basically porting my java code to it. Got
my chunk class and block class sorted.  I'm using FreeGLUT and FreeGLEW and OGL 3.2 (that is the highest my gfx card supports). 

Thanks

20  Games Center / Cube World Projects / Re: Voxel - a start on: 2013-04-28 16:22:16
Thanks Longor,

I'm changing mine now to be coded in C++ and using Shaders...

Will take on board what you have said and try the 1d array, I've heard that does speed things up a lot on other forums.

Not so sure about using a singleton pattern for blocks though...as there are many of these.
21  Games Center / Cube World Projects / Re: Voxel - a start on: 2013-04-26 17:56:24
Yeah, quads are depreciated like most things in GL 3.2+

Think VBO's should give speed increase and is way to go with modern hardware, same as using the programmable pipeline.  Luckily I have some experience with this with using Direct3D!
22  Games Center / Cube World Projects / Re: Voxel - a start on: 2013-04-26 17:41:36
Think I'm going to next do:

1. Convert display lists to VBO's
2. Use triangles instead of quads
3. Switch to programmable pipeline...

Wish me luck!
23  Java Game APIs & Engines / OpenGL Development / Re: Triangles or quads on: 2013-04-26 17:40:01
Hi,

I'm ok with shaders etc, come from Direct3D 10.  OpenGL I've been messing with for around 6 weeks, but started with fixed pipeline, immediate mode then display lists.

Think will convert to VBO's and triangles as a first go.  Any good lwjgl tutorials on VBO's or any place, I've looked at nehe's.

Thanks
24  Java Game APIs & Engines / OpenGL Development / Re: Triangles or quads on: 2013-04-26 15:10:56
Thanks,

I'm using display lists, guess should convert these this to VBO and then use triangle primitives?

25  Java Game APIs & Engines / OpenGL Development / Re: Triangles or quads on: 2013-04-26 10:51:58
Thanks for that, and is the reason down to speed - I also know quads are supported in OpenGL 3.x

Thanks

26  Java Game APIs & Engines / OpenGL Development / Triangles or quads on: 2013-04-26 10:11:11
Hi,

I've been coding a voxel engine for a couple of months and got it using some standard optimization techniques ( frustum culling, only draw blocks that have no neighboring blocks, only draw faces that can be seen).  Now, was wondering, should I change my rendering of blocks to use triangles as opposed to quads?  I've read that triangles are quicker as the GPU doesn't have to do any vertex conversion  as opposed to splitting quad up into triangles?

Any advice is appreciated,
Thanks,
Steve
27  Games Center / Cube World Projects / Re: Voxel - a start on: 2013-04-26 07:31:23
3-4% CPU, what GPU was that running with?

How did you manage to get so many chunks running? I'm struggling with 16x16x16!

Regards,
Steve
28  Games Center / Cube World Projects / Re: Voxel - a start on: 2013-04-25 20:57:28
Hi,

Thanks  Grin

Dynamic loading has to be next to keep the memory stamp down and the fps up, at the moment you are seeing 16^3 chunks with a draw distance of 200.  This consumes around 170mb ram and 48% CPU on average - hence need dynamic loading of chunks if wanting more.

May put water in soon.  Wouldn't mind looking at some perlin 3d noise stuff so can get caves...



29  Games Center / Cube World Projects / Re: Voxel - a start on: 2013-04-25 20:30:28
Update:

Frustum culling
Further field of view
Some spatial portioning
Updates to camera vectors
Few bug fixes


https://www.youtube.com/watch?v=fSp-54tGgLU



Thanks
30  Games Center / Cube World Projects / Re: Voxel Engine Problems on: 2013-04-25 20:19:48
Looking cool, keep up the good work!
Pages: [1] 2 3 ... 8
 

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

The first screenshot will be displayed as a thumbnail.

Longarmx (38 views)
2014-10-17 03:59:02

Norakomi (28 views)
2014-10-16 15:22:06

Norakomi (24 views)
2014-10-16 15:20:20

lcass (28 views)
2014-10-15 16:18:58

TehJavaDev (53 views)
2014-10-14 00:39:48

TehJavaDev (54 views)
2014-10-14 00:35:47

TehJavaDev (43 views)
2014-10-14 00:32:37

BurntPizza (64 views)
2014-10-11 23:24:42

BurntPizza (36 views)
2014-10-11 23:10:45

BurntPizza (78 views)
2014-10-11 22:30:10
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

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
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!