Jump to content

Max Size world gen structures?


EliteCreature

Recommended Posts

@Mazetar

If you have organized the generation in chunks, it is a good idea, indeed.

Don't expect much improvement though.

 

I know how to reduce lag a fair bit.

 

I had a friend who built a testing structure that used world.setBlock ( args ) for every block he wanted. He had a solid rectangle of dimensions 10 x 10 x 60.

My game lagged like crazy when I generated it.

 

I used a nested for loop to do the exact same structure. I didn't lag at all.

 

So my piece of advice, use as many for loops as you can... Unless it absolutely pointless to do so.

I am Mew. The Legendary Psychic. I behave oddly and am always playing practical jokes.

 

I have also found that I really love making extremely long and extremely but sometimes not so descriptive variables. Sort of like what I just did there xD

Link to comment
Share on other sites

I used a nested for loop to do the exact same structure. I didn't lag at all.

 

So my piece of advice, use as many for loops as you can... Unless it absolutely pointless to do so.

 

I really don't see the logic here

If you guys dont get it.. then well ya.. try harder...

Link to comment
Share on other sites

im more concerned at how he did it WITHOUT loops ....

 

Schematic to Java converter makes a class file full of stuff like thos:

 

world.setblock(x+1,y,z, 1)

world.setblock(x+2,y,z, 1)

etc.

 

but I can't imagine the computation of the addition would be the difference between an noticeable amount of lag for 6000 blocks? :P

If you guys dont get it.. then well ya.. try harder...

Link to comment
Share on other sites

im more concerned at how he did it WITHOUT loops ....

 

Schematic to Java converter makes a class file full of stuff like thos:

 

world.setblock(x+1,y,z, 1)

world.setblock(x+2,y,z, 1)

etc.

 

but I can't imagine the computation of the addition would be the difference between an noticeable amount of lag for 6000 blocks? :P

 

Hell... It lagged for a couple seconds! I don't have a top of the range computer, but it is still good. And yes it lagged. I redid it with the for loops and it didn't lag a bit. hell... My computer lagged just READING the code for it.

 

That convertor SUCKS anyway... The amount of editing you have to do to the files after it converts is horrendous... You have to edit the name of every method, you have to CALL every method.... Oh yeah, and you also get an error in every method because there is too much information in it. So you have to cut ALL the methods into a third of their original size. All in all, I could do an okay structure in one third of the time it would take to build it, convert to a schematic, convert to code, fix the code, and run it.

 

 

I used a nested for loop to do the exact same structure. I didn't lag at all.

 

So my piece of advice, use as many for loops as you can... Unless it absolutely pointless to do so.

 

I really don't see the logic here

 

The logic? I failed that class in school. But what I meant was. Say I wanted to place one block. Don't use a for loop. Say I wanted to place a wall 3 x 3 x 10. Use a for loop.

I am Mew. The Legendary Psychic. I behave oddly and am always playing practical jokes.

 

I have also found that I really love making extremely long and extremely but sometimes not so descriptive variables. Sort of like what I just did there xD

Link to comment
Share on other sites

Hell... It lagged for a couple seconds! I don't have a top of the range computer, but it is still good. And yes it lagged. I redid it with the for loops and it didn't lag a bit. hell... My computer lagged just READING the code for it.

 

That convertor SUCKS anyway... The amount of editing you have to do to the files after it converts is horrendous... You have to edit the name of every method, you have to CALL every method.... Oh yeah, and you also get an error in every method because there is too much information in it. So you have to cut ALL the methods into a third of their original size. All in all, I could do an okay structure in one third of the time it would take to build it, convert to a schematic, convert to code, fix the code, and run it.

 

yeah but if i was doing a converter i would do that too

btw the method too big is a java thing, and it make sens that the converter doesnt check for that, they probably made it for 5x5x5 and less structure so yeah if you have a 1000x1000x1000 you might/will get bytecode too big exception :P

 

about the code having errors, probably because its outdated, kinda like techne having error when you try to import it

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Link to comment
Share on other sites

No with logic I meant, I fail to see any logical reason as to why it would have a significant impact on performance :P

Don't assume any logic behind it, benchmarking on Minecraft terrain generation is useless.

Mew probably felt like it had an impact, while any other change could have done that.

 

Obviously you need to iterate over the blocks, it would be utterly stupid not to.

I prefer to use Iterator by the way :P

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.