Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Minecraft style game is really laggy

Hey i was wondering if anyone would no a good way to go about optimizing a minecraft style game. I have already set up the noise so there is hills and an inventory system with multiple blocks and stuff but if i go into the game with the depth of the terrain set to one so if i dig down one block you can fall out of the world it runs pretty well since there is not that much on screen but is i start making it 4-5 blocks deep it is unplayable. I am using hierarchical instanced static mesh and have set it to be an occluder but it is still laging is there a way to make it that only visible faces are shown or something. Anyone have any advice.

Product Version: UE 4.15
more ▼

asked Sep 27 '17 at 07:55 PM in Blueprint Scripting

avatar image

1 1 2 1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

it depends very much on the game mechanics you have made. a trivial approach seems like starting with all blocks disabled, and then enable these that in range of the viewer. it can be an intense task for calculation because there are many blocks and checking each one will be very hot, so you may adopt original minecraft rendering tactic, in which the blocks are arranged in chunks, and these chunks are loaded instead of single blocks.

more ▼

answered Sep 27 '17 at 08:01 PM

avatar image

893 20 42 62

avatar image Pallidinn Sep 29 '17 at 04:31 PM

Thanks for the reply but i forgot to mention that i do already have a chunk system made that loads in the chunks within a certain distance. The main problem i think is that the blocks underground are being loaded witch is making it very hard to run. I am loading in all the blocks with a couple for loops spawning blocks along the X Y Z for each chunk so if i change the Z to say 2 there will be 2 blocks when you dig down and that works petty good but when i start to change it to 5+ blocks deep it is very laggy but if i make it 10+ blocks deep the game crashes and gives me an error saying it found an infinite loop.

avatar image Arty-McLabin Sep 29 '17 at 06:31 PM

that's why you have to unload these blocks that you don't see. then upon every time a block is getting destroyed, call an event, which loads the missing nearby blocks. it is up to you to initially load all the visible blocks though. there are many algorithms to make it and i can't supply a way for it in comment because it is too much work for a forum answer.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question