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.
Thanks man. I actually found culling pretty easy I looked back at a tutorial on culling and it turns out that the counter clockwise vertex arrangement was for culling not transparency. You have to arrange your drawing order for transparencies but since I drew the entire map as a huge mesh then it didn't matter. ( Not the whole map obviously that would kill any PC )
For the "draw as one whole mesh", do you go through the blocks, check to see if it's in line of sight, then render it? Or do you do something else to prevent having the whole map render at once?
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.
Ginto8 wrote:For the "draw as one whole mesh", do you go through the blocks, check to see if it's in line of sight, then render it? Or do you do something else to prevent having the whole map render at once?
are you referring to occlusion culling(figuring hidden surfaces), or loading only visible chunks? for example, not the building 12 feet to the left of you (because you can't see it).
While Jesus equipped with angels, the Devil's equipped with cops
For God so loved the world that he blessed the thugs with rock
Ginto8 wrote:For the "draw as one whole mesh", do you go through the blocks, check to see if it's in line of sight, then render it? Or do you do something else to prevent having the whole map render at once?
ROFL, Even I wouldn't render a 512x512x128 map all at once. Can you imagine how slow that would be?
I just render a chunk of the map within 30 blocks of distance from the camera and use fog to hide anything further from that (so you wouldn't see it even if it were being rendered).
If something is beside you or behind you etc then at this time I just let backface culling do it's best with that stuff.
back face culling is god. Yea usually culling does the trick but definitely 30 blocks render distance sounds reasonable. When I wasn't thinking and just started copying code from another project I worked on a long time ago my game ran for shit and I couldn't figure out why for DAYS. Till finally I realized even though I was rendering a reasonable distance horizontally, I was rendering the god damn caves and NPC's that were under me and not even accessible, like 300 feet down!
While Jesus equipped with angels, the Devil's equipped with cops
For God so loved the world that he blessed the thugs with rock
MadPumpkin wrote:Till finally I realized even though I was rendering a reasonable distance horizontally, I was rendering the god damn caves and NPC's that were under me and not even accessible, like 300 feet down!
Haha! Oops.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches!
Looking sweet, your clearly making some great progress with this.
How are you factoring lighting?
Just wondering, because I've found that just a vertex lightmap can make things look great. Like take the 3D position of each vertex, add a little adjustment for the vertex normal so you get a position that you can project your light source to - then if there's a collision between those points, set the vertex diffuse colour to nothing, otherwise base it on the light colour, strength and direction. I'm making a mining game a little like Minecraft, and that's all I'm doing - it's all underground so that sort of lighting suits it... like no moving lights, each block could be lightmapped on-the-fly and that sort of thing. The reason that I like this method though, is that you don't have to worry too much about normals and dot products and stuff - the vertexes could just be lit, or not, and it tends to look better than standard normal vector lighting - allows for shadows and stuff.
Van-B wrote:Looking sweet, your clearly making some great progress with this.
How are you factoring lighting?
Just wondering, because I've found that just a vertex lightmap can make things look great. Like take the 3D position of each vertex, add a little adjustment for the vertex normal so you get a position that you can project your light source to - then if there's a collision between those points, set the vertex diffuse colour to nothing, otherwise base it on the light colour, strength and direction. I'm making a mining game a little like Minecraft, and that's all I'm doing - it's all underground so that sort of lighting suits it... like no moving lights, each block could be lightmapped on-the-fly and that sort of thing. The reason that I like this method though, is that you don't have to worry too much about normals and dot products and stuff - the vertexes could just be lit, or not, and it tends to look better than standard normal vector lighting - allows for shadows and stuff.
To get the initial Minecraft kind of lighting deal, you'd want to be doing emissive lighting, such that you might have values [0,10] which says something about how much light it emits. Let's say that a block has a emission value of 10, then the next block would have 9, and then 8 asf; which gives that blocky kind of feel to the lighting as well.
Van-B wrote:Looking sweet, your clearly making some great progress with this.
How are you factoring lighting?
Just wondering, because I've found that just a vertex lightmap can make things look great. Like take the 3D position of each vertex, add a little adjustment for the vertex normal so you get a position that you can project your light source to - then if there's a collision between those points, set the vertex diffuse colour to nothing, otherwise base it on the light colour, strength and direction. I'm making a mining game a little like Minecraft, and that's all I'm doing - it's all underground so that sort of lighting suits it... like no moving lights, each block could be lightmapped on-the-fly and that sort of thing. The reason that I like this method though, is that you don't have to worry too much about normals and dot products and stuff - the vertexes could just be lit, or not, and it tends to look better than standard normal vector lighting - allows for shadows and stuff.
Thanks for the kind words
At the minute lighting is nothing special I'm initializing some ambient, diffuse and specular lighting and setting it at the top right corner of the camera.
However I know in the original Minecraft there is a square for the sun, but I'm not going to be a total rip-off
I do like your idea for lighting though and lighting definitely isn't finished yet, for things such as torches I'll need to figure out how to give blocks an attribute so they can produce light etc.