Jump to content

Recommended Posts

Posted

Hello,

 

I would like to create a cube but don't assign it to a variable like create unlimited,

but i only found entity::copy...

 

i have a cube that i want copied but it seems like i need somthing to copy it to.

 

 

any solution?

 

 

 

- Mex

C++ :3

Posted

You won't be able to create unlimited number of these. At some point you'll hit a major slowdown if you make boxes like this. There is a way that'll give you more on screen as it creates instances instead of a new, however they will share the same material so changing a material on 1 will change it on all. I think a parameter to the instanced function will allow you to have new materials but again it'll hit limits faster.

 

Are you thinking of a minecraft type game because if you are it's not going to be as simple as you are thinking. Nothing ever is in game development. If you haven't already you'll want to see what minecraft does to make things an acceptable speed.

 

Create a cube via code

http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/model/modelbox-r346

 

You'll most likely want to save these in variables or you'll get memory leaks. Just store them in a std::list or vector.

Posted

Thought about this :/ and yes i think minecraft running not extremely laggy because minecraft doesnt render any blocks that you can't see (you see it when you stuck in glowstone if the bug isn't fixed)

 

But it should not be a second minecraft, it should be a puzzle game with block placement ;) (puzzle game with voxel elements)

 

Will try The list (forgot about that...)

 

- Mex

C++ :3

Posted

Entity::Instance() will be faster, but for Minecraft style scenery there is a special algorithm you should look into.

My job is to make tools you love, with the features you want, and performance you can't live without.

Posted

Google marching cubes - it's an old naive approach but for minecraft style landscapes it's perfect. ( just Need to alter the look up tables to squares )

System:

Linux Mint 17 ( = Ubuntu 14.04 with cinnamon desktop ) Ubuntu 14.04, AMD HD 6850, i5 2500k

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...