Create 500 tiles X and Y (500x500) quickly?

Non-platform specific questions.

Create 500 tiles X and Y (500x500) quickly?

Postby Hblade » Sat Apr 27, 2013 4:17 am

How can I make a map 500x500 instantly (with "air" tiles)? I've tried using for loops but it just hangs, or takes a very long time to create all 500x500 (Which I understand is a poop load of tiles). Whats the most optimized way to do this? (500 tiles wide and 500 tiles high)
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Create 500 tiles X and Y (500x500) quickly?

Postby tzoli » Sat Apr 27, 2013 5:19 am

What do you need it for?
For FreeCity I used a map system that shows only 16x13 from the map and the tiles only exist as datas.
But If you need them as real tiles(actually actors) I can't help you.
Creepers are capable of climbing ladders, despite lacking arms. (Minecraft wiki)
User avatar
tzoli
 
Posts: 343
Joined: Sat Jun 12, 2010 6:54 pm
Location: Behind you
Score: 15 Give a positive score

Re: Create 500 tiles X and Y (500x500) quickly?

Postby skydereign » Sat Apr 27, 2013 5:22 am

There isn't a more efficient way to do this. The reason it is slow when you create 250000 is because you are creating 250000. Optimization has to do with the number of commands run, and how long each takes. In your case, you are running only one command, 250000 times.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Create 500 tiles X and Y (500x500) quickly?

Postby Hblade » Sat Apr 27, 2013 7:17 am

Ahh ok thanks sky =) I have a simple workaround though
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Create 500 tiles X and Y (500x500) quickly?

Postby lcl » Sat Apr 27, 2013 6:00 pm

You could do it so that you create only 1 row (500 tiles) of tiles in one frame.
Then the program won't need to create them all in one frame and
it won't lag. You could even make a progress bar to indicate the progress. :)

Sorta like what I did with the level loading of the unfinished Worm War game. :)
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score

Re: Create 500 tiles X and Y (500x500) quickly?

Postby Hblade » Mon Apr 29, 2013 4:47 am

Lcl! I love you haha, thanks man =)
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron