Jump to content

create new instances of entities


MexSource
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

 Share

×
×
  • Create New...