Minecraft remake- Crafter

Anything related in any way to game development as a whole is welcome here. Tell us about your game, grace us with your project, show us your new YouTube video, etc.

Moderator: PC Supremacists

User avatar
MrDeathNote
ES Beta Backer
ES Beta Backer
Posts: 594
Joined: Sun Oct 11, 2009 9:57 am
Current Project: cocos2d-x project
Favorite Gaming Platforms: SNES, Sega Megadrive, XBox 360
Programming Language of Choice: C/++
Location: Belfast, Ireland
Contact:

Re: Minecraft remake- Crafter

Post by MrDeathNote »

How the fuck was I not sub'd before?
http://www.youtube.com/user/MrDeathNote1988

Image
Image

"C makes it easy to shoot yourself in the foot. C++ makes it
harder, but when you do, it blows away your whole leg." - Bjarne Stroustrup
User avatar
LeonBlade
Chaos Rift Demigod
Chaos Rift Demigod
Posts: 1314
Joined: Thu Jan 22, 2009 12:22 am
Current Project: Trying to make my first engine in C++ using OGL
Favorite Gaming Platforms: PS3
Programming Language of Choice: C++
Location: Blossvale, NY

Re: Minecraft remake- Crafter

Post by LeonBlade »

Looks awesome! And yes, I can see the blocks better now :P
There's no place like ~/
N64vSNES
Chaos Rift Devotee
Chaos Rift Devotee
Posts: 632
Joined: Thu Aug 12, 2010 11:25 am

Re: Minecraft remake- Crafter

Post by N64vSNES »

Hooray for building things!




Image

Image

Image

Sorry for the shitty video camstudio completely screwed up and I was too lazy to rebuilt the house again :lol:


Anyway this is fairly old (account issues) so I'll be doing a newer one soon :)
User avatar
Ginto8
ES Beta Backer
ES Beta Backer
Posts: 1064
Joined: Tue Jan 06, 2009 4:12 pm
Programming Language of Choice: C/C++, Java

Re: Minecraft remake- Crafter

Post by Ginto8 »

I'm curious, how did you get the transparent textures to work?
Quit procrastinating and make something awesome.
Ducky wrote:Give a man some wood, he'll be warm for the night. Put him on fire and he'll be warm for the rest of his life.
N64vSNES
Chaos Rift Devotee
Chaos Rift Devotee
Posts: 632
Joined: Thu Aug 12, 2010 11:25 am

Re: Minecraft remake- Crafter

Post by N64vSNES »

Ginto8 wrote:I'm curious, how did you get the transparent textures to work?
When dealing with 3D you just have to fill the vertices counter clockwise. there are other alternatives but this is the easiest in my opinion.

Not sure how specific you want me to be so do say if you want me to elaborate :lol:

EDIT:
I think I know why you asked, if it's about part of the inner house showing in one of the screen shots then it's because I'm drawing the faces of each cube only if it's visible to the camera and obviously it needs to ignore this for transparent ones. I've got to finish block attributes before I can add this kind of functionality though.
User avatar
Ginto8
ES Beta Backer
ES Beta Backer
Posts: 1064
Joined: Tue Jan 06, 2009 4:12 pm
Programming Language of Choice: C/C++, Java

Re: Minecraft remake- Crafter

Post by Ginto8 »

I was asking how you got transparency to work in 3D because I've heard that it's very difficult to pull of with the depth buffer, because you end up with transparent things being drawn and, instead of allowing things behind them to be visible, it blocks them out via the depth buffer.
I think that's clear, but I might just be babbling from my headache. If you didn't understand it, I'll clarify when it goes away ;)
Quit procrastinating and make something awesome.
Ducky wrote:Give a man some wood, he'll be warm for the night. Put him on fire and he'll be warm for the rest of his life.
N64vSNES
Chaos Rift Devotee
Chaos Rift Devotee
Posts: 632
Joined: Thu Aug 12, 2010 11:25 am

Re: Minecraft remake- Crafter

Post by N64vSNES »

Ginto8 wrote:I was asking how you got transparency to work in 3D because I've heard that it's very difficult to pull of with the depth buffer, because you end up with transparent things being drawn and, instead of allowing things behind them to be visible, it blocks them out via the depth buffer.
I think that's clear, but I might just be babbling from my headache. If you didn't understand it, I'll clarify when it goes away ;)
I agree I've read that when using depth you should always draw your polygons and then your transparent ones each frame so that OpenGL can handle the rendering order correctly.

So far though minus my little map bug which will be fixed soon I've had no problems rendering transparent ones as they are found. However the entire portion of the map that gets drawn is rendered as a single mesh for performance reasons so I'm *guessing* this has something to do with it.
User avatar
Ginto8
ES Beta Backer
ES Beta Backer
Posts: 1064
Joined: Tue Jan 06, 2009 4:12 pm
Programming Language of Choice: C/C++, Java

Re: Minecraft remake- Crafter

Post by Ginto8 »

so you ARE using the depth buffer right?

Anyway, for your bug it just looks like an error when calculating which faces to draw. You're not drawing faces that are either touching glass or touching the "selection" block, and that's causing the "I can see inside blocks!" glitch. Also, you might want to set up backface culling.
Quit procrastinating and make something awesome.
Ducky wrote:Give a man some wood, he'll be warm for the night. Put him on fire and he'll be warm for the rest of his life.
N64vSNES
Chaos Rift Devotee
Chaos Rift Devotee
Posts: 632
Joined: Thu Aug 12, 2010 11:25 am

Re: Minecraft remake- Crafter

Post by N64vSNES »

Ginto8 wrote:so you ARE using the depth buffer right?

Anyway, for your bug it just looks like an error when calculating which faces to draw. You're not drawing faces that are either touching glass or touching the "selection" block, and that's causing the "I can see inside blocks!" glitch. Also, you might want to set up backface culling.
Yip I'm definitely using the depth buffer and I've already got backface culling. Like I said it is in fact a glitch with the way I'm drawing the faces of each cube.

For example if I'm about to draw the left face of a cube then I'd do something like this:

Code: Select all

// If there is a block to the left then the player wouldn't see this face. (0 = no empty space)
if ( Blocks[x-1][z][y] == 0 ) {
    // Draw the face
}
If there is already something there then that face wouldn't be visible to the player and as you said to me on the IRC it was causing those problems with the textures, but there needs to be an exception for this because if the block that's hiding that specific face is transparent then the face is in fact visible thus causing "I can see through blocks!".

Once I've set it up so that each type of block I.E. grass, dirt, water etc have their own attributes I can give an exception so that if the block is at all transparent it will ignore this logic.
User avatar
LeonBlade
Chaos Rift Demigod
Chaos Rift Demigod
Posts: 1314
Joined: Thu Jan 22, 2009 12:22 am
Current Project: Trying to make my first engine in C++ using OGL
Favorite Gaming Platforms: PS3
Programming Language of Choice: C++
Location: Blossvale, NY

Re: Minecraft remake- Crafter

Post by LeonBlade »

Awesome job man! This looks great! :D
There's no place like ~/
User avatar
TheBuzzSaw
Chaos Rift Junior
Chaos Rift Junior
Posts: 310
Joined: Wed Dec 02, 2009 3:55 pm
Current Project: Paroxysm
Favorite Gaming Platforms: PC
Programming Language of Choice: C++
Contact:

Re: Minecraft remake- Crafter

Post by TheBuzzSaw »

Source code or it didn't happen!

I'm actually curious as to how you built your scene graph. Are you just using a massive array as hinted at in that code sample above?
N64vSNES
Chaos Rift Devotee
Chaos Rift Devotee
Posts: 632
Joined: Thu Aug 12, 2010 11:25 am

Re: Minecraft remake- Crafter

Post by N64vSNES »

TheBuzzSaw wrote:Source code or it didn't happen!

I'm actually curious as to how you built your scene graph. Are you just using a massive array as hinted at in that code sample above?
You're correct I use a simple 3D array 256x256x64. Let's be fair this seems the simplest way to do this and from what I've heard of interviews with Notch he does it the same way too only you can go higher than this (Crafter will too eventually)
User avatar
MadPumpkin
Chaos Rift Maniac
Chaos Rift Maniac
Posts: 484
Joined: Fri Feb 13, 2009 4:48 pm
Current Project: Octopia
Favorite Gaming Platforms: PS1-3, Genesis, Dreamcast, SNES, PC
Programming Language of Choice: C/++,Java,Py,LUA,XML
Location: C:\\United States of America\Utah\West Valley City\Neighborhood\House\Computer Desk

Re: Minecraft remake- Crafter

Post by MadPumpkin »

The issue you and Ginto8 are talking about with the depth is mostly ancient and USUALLY doesn't happen with a handy dandy depth buffer. Honestly this still comes up from time to time, but until it does (even once) you really shouldn't worry about it too much. I've not had a problem with it for a long time.(But, shit happens)

EDIT: But I have had problems with it, just not since I got better at rendering techniques.
While Jesus equipped with angels, the Devil's equipped with cops
For God so loved the world that he blessed the thugs with rock
Image
Image
Image
N64vSNES
Chaos Rift Devotee
Chaos Rift Devotee
Posts: 632
Joined: Thu Aug 12, 2010 11:25 am

Re: Minecraft remake- Crafter

Post by N64vSNES »

MadPumpkin wrote:The issue you and Ginto8 are talking about with the depth is mostly ancient and USUALLY doesn't happen with a handy dandy depth buffer. Honestly this still comes up from time to time, but until it does (even once) you really shouldn't worry about it too much. I've not had a problem with it for a long time.(But, shit happens)

EDIT: But I have had problems with it, just not since I got better at rendering techniques.
Don't worry I think I'm not describing what's causing the issue too well ;)

Some of my optimization is having a lot of strange but expected affects such as this one. Just you wait until I've finished the block attributes and I promise this issue will be gone forever :)
User avatar
THe Floating Brain
Chaos Rift Junior
Chaos Rift Junior
Posts: 284
Joined: Tue Dec 28, 2010 7:22 pm
Current Project: RTS possible Third Person shooter engine.
Favorite Gaming Platforms: PC, Wii, Xbox 360, GAME CUBE!!!!!!!!!!!!!!!!!!!!!!
Programming Language of Choice: C/C++, Python 3, C#
Location: U.S

Re: Minecraft remake- Crafter

Post by THe Floating Brain »

Its looking good :-)
"Why did we say we were going to say we were going to change the world tomorrow yesterday? Maybe you can." - Myself

ImageImage
Post Reply