Don’t take me too seriously, just a pet peeve of mine that most voxel-games after Minecraft seem to use the grass on dirt block that is, literally, Minecraft’s icon
The reality is that the basic voxel engine will always be very similar to Minecraft until you get to developing more advanced content. Just steer away from creepers and everything will be ok.
Is it so hard to try and use textures that aren’t an almost exact match to Minecraft’s?
When at first glance voxel engines (even in development stages) look like Minecraft clones, then it is to be expected that people will think they are clones.
When engines like the one on this thread feel and behave pretty much like Minecraft, up to how broken blocks fall as spinning smaller versions of themselves, then the “I’m doing something different” defense wears thin.
Mind you, it is perfectly fine if you want to make a Minecraft clone as a way to learn stuff (I’m not one to speak of originality myself), but just don’t get pissed when someone inevitably points it out.
But seriously, people, come up with a different standard block instead of dirt with grass on top.
A Minecraft clone is actually a pretty good way to learn OpenGL and 3D concepts. Who cares what the product looks like – this is a programming forum, after all.
Thanks for your comments. I will take this in a new direction eventually, like I’m planning water shaders etc. I will try to make the graphics different! But I do take what you mean. Actually part of the idea is replication, it’s like having a specific goal, sure the problems of playability and what makes a good game is solved, but my quest is to try learn how to implement things. And being original, without the underpinning skills is a bit much for me.
In short, it’s a way to focus and solve specific problems.
Thanks Davedes, also thank you for the amazing tutorials on shaders. This is what I’m reading!
My tests showed the same so it isn’t as weird as you may think :). Display lists are actually very well optimized in the drivers, so from a performance point of view when rendering is a toss up between the two. Sometimes the one is quicker and sometimes the other. The huge performance gain you get from VBO’s are when doing something that updates. For example, in my game the fps drops with about 10-20% when using VBO’s on my gfx card, but the time it takes to load in the landscape into memory is about 200-400% quicker.
If you want to support all kind of computers you can give the players the option what to use (like minecraft does). If not just take one and go with it, the difference in switching isn’t big enough to rewrite everything.
Don’t take me too seriously, just a pet peeve of mine that most voxel-games after Minecraft seem to use the grass on dirt block that is, literally, Minecraft’s icon
The reality is that the basic voxel engine will always be very similar to Minecraft until you get to developing more advanced content. Just steer away from creepers and everything will be ok.
//first I give the blocks random horizontal velocity at a random angle
//when its constructed
this.yVel = 2;
yRot = (float) Rand.nextInt(360);
hVelocity = (float) 1/50f;
//then I do the transformations on each entity like this in the update loop
for(Entity Ent : entities){
//find the ground level for the entity
ground = getGroundLevel(Ent.getX(), Ent.getY(), Ent.getZ());
//apply vertical calculation ie, its vertical velocity
Ent.setY((float) (Ent.getY()+Ent.getyVel()*TIME_STEP*2));
Ent.setYVel( Ent.getyVel() +((float) (GRAVITY*TIME_STEP)));
if(Ent.getY()<=ground+0.7f) {
Ent.setYVel(-(Ent.getyVel()/4));
Ent.setY(ground+0.7f);
Ent.sethVelocity(Ent.gethVelocity()/1.8f);
}
//move the enity horizontally
Ent.setX(Ent.getX() + ((float) Math.sin(Ent.getyRot() * piover180) * Ent.gethVelocity()));
Ent.setZ(Ent.getZ() + ((float) Math.cos(Ent.getyRot() * piover180) * Ent.gethVelocity()));
Ent.tick();
//I also check if it needs removing, or if player is near it.
//first I give the blocks random horizontal velocity at a random angle
//when its constructed
this.yVel = 2;
yRot = (float) Rand.nextInt(360);
hVelocity = (float) 1/50f;
//then I do the transformations on each entity like this in the update loop
for(Entity Ent : entities){
//find the ground level for the entity
ground = getGroundLevel(Ent.getX(), Ent.getY(), Ent.getZ());
//apply vertical calculation ie, its vertical velocity
Ent.setY((float) (Ent.getY()+Ent.getyVel()*TIME_STEP*2));
Ent.setYVel( Ent.getyVel() +((float) (GRAVITY*TIME_STEP)));
if(Ent.getY()<=ground+0.7f) {
Ent.setYVel(-(Ent.getyVel()/4));
Ent.setY(ground+0.7f);
Ent.sethVelocity(Ent.gethVelocity()/1.8f);
}
//move the enity horizontally
Ent.setX(Ent.getX() + ((float) Math.sin(Ent.getyRot() * piover180) * Ent.gethVelocity()));
Ent.setZ(Ent.getZ() + ((float) Math.cos(Ent.getyRot() * piover180) * Ent.gethVelocity()));
Ent.tick();
//I also check if it needs removing, or if player is near it.
Using shaders now. Added Scrolling water effect, and discarding fragments.
Added glass with translucency, and Leafs with transparency.
Water now scrolls slowly.
I can post the shaders if anyone would like them- but they are only basic.
Using shaders now. Added Scrolling water effect, and discarding fragments.
Added glass with translucency, and Leafs with transparency.
Water now scrolls slowly.
I can post the shaders if anyone would like them- but they are only basic.
In your java program - to communicate with the shaders you use the uniform variables:-
glUseProgram(shaderProgram);
int loc = GL20.glGetUniformLocation(shaderProgram, "u_texture");
GL20.glUniform1i(loc, 0);
int loc1 = GL20.glGetUniformLocation(shaderProgram, "iGlobalTime");
GL20.glUniform1f(loc1, f); //f is a float that is based on a counter or delta time
//set scroll mode to 1 (scroll)
int loc2 = GL20.glGetUniformLocation(shaderProgram, "scroll");
GL20.glUniform1i(loc2, 1);
//Do rendering stuff
glUseProgram(0); //stop using the shader program
This example instructs the shader to enable the scrolling for the water. You need 2 textures in the texture atlas adjacent to each other horizontaly.
In your java program - to communicate with the shaders you use the uniform variables:-
glUseProgram(shaderProgram);
int loc = GL20.glGetUniformLocation(shaderProgram, "u_texture");
GL20.glUniform1i(loc, 0);
int loc1 = GL20.glGetUniformLocation(shaderProgram, "iGlobalTime");
GL20.glUniform1f(loc1, f); //f is a float that is based on a counter or delta time
//set scroll mode to 1 (scroll)
int loc2 = GL20.glGetUniformLocation(shaderProgram, "scroll");
GL20.glUniform1i(loc2, 1);
//Do rendering stuff
glUseProgram(0); //stop using the shader program
This example instructs the shader to enable the scrolling for the water. You need 2 textures in the texture atlas adjacent to each other horizontaly.