Read, study, go over, and do all these about 5 more times. THEN, post on here. If you don't try at all and just copy and paste code like a script kiddie, then no one is going to help you. I repeat, NO ONE is going to help you, and if they do, than that sucks for them, because it's a waste. If you want people to give you the time of day, then you have to, at the least, try for your self first. So, I say, go through the first link. Then go through the third link. Now, go through the second link on all the major things, and learn a little bit before you just post random things for us to fix for you... The problem with the script you posted is something so minor, that you should be able to point out in a second. But to hell if I'm going to tell you, because if you took but 2 minutes of your own time to actually go through a script, you'd see it, you'd know how to create a script, and how to add it to a scene...
I think the biggest problem was that he wasn't able to figure out when to run it. When the game starts? When a rocket explodes? When Chuck Norris descend from the heavens? Beats me. Start looks like a place good as any :)
Drawcalls will skyrocket with just a small set. Imagine 64x64x64 cubes. 262144 cubes. And they all will have colliders? Unity/Physx only support 64k objects and it would require 260k objects. Making a game like minecraft isn't an easy task. It sounds simpler than it is. Culling has to be performed in order for it to run, and mesh merging would be required for smooth frame rates.
I am not surprised. It seems every kid, granny and programmer want to create a minecraft clone. I enjoy it for the sheer replayability. It's a really nice foundation to build other gameplay upon.
Grow some hair and it'll become evident. :) Seriously though, neither do I. What is your intent?
"im working on a fps game"
It doesn't help a lot to guess where to put it.
var blockPrefab : GameObject;
var gridX : int = 5;
var gridY : int = 5;
var spacing : float = 1;
function Start()
{
for(var y = 0; y < gridY; y++)
{
for (var x = 0; x < gridX; x++)
{
var pos = Vector3(x, 0, y) * spacing;
Instantiate(blockPrefab, pos, Quaternion.identity);
}
}
}
im making a minecraft game so wat im trying to do is placing blocks beside eachother and stacking
I think the biggest problem was that he wasn't able to figure out when to run it. When the game starts? When a rocket explodes? When Chuck Norris descend from the heavens? Beats me. Start looks like a place good as any :)
– StatementHe's been posting a ton of questions about the same thing for a couple of days now. Maybe it was a bad idea to feed.
– StatementDrawcalls will skyrocket with just a small set. Imagine 64x64x64 cubes. 262144 cubes. And they all will have colliders? Unity/Physx only support 64k objects and it would require 260k objects. Making a game like minecraft isn't an easy task. It sounds simpler than it is. Culling has to be performed in order for it to run, and mesh merging would be required for smooth frame rates.
– StatementFriendly reminder: Dont feed the trolls :)
– FLASHDENMARKI second that very valid point!
– anon61858128