Official Everybody Edits Forums

Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?

You are not logged in.

#1 Before February 2015

hiimsomething
Guest

Super Fill/Clear

Is there a faster way to clear/fill blocks without using /loadlevel or /clear on a very large world.

I stored 40000 blocks onto a list and how can I do it like
clear 5000 blocks per second. I saw other bots could possibly do that.

/loadlevel can auto d/c players
/clear would clear every thing

Last edited by hiimsomething (Aug 10 2014 1:37:02 pm)

#2 Before February 2015

Koya
Fabulous Member
From: The island with those Brits
Joined: 2015-02-18
Posts: 6,310

Re: Super Fill/Clear

Basically it:

for (int x = 0; x < worldx; x++) {     for (int y = 0; y < worldy; y++)     {         SendBlock(l,x,y,b);     } }
Private void SendBlock (int l, int x, int y, int b) {     //distribute jobs to multiple bots (I can do 334blocks/sec with 6 bots) }


Po9cnQh.png

PLNQVL8.png
Thank you eleizibeth ^

1SYOldu.png

I stack my signatures rather than delete them so I don't lose them
giphy.gif

WfSi4mm.png

Offline

#3 Before February 2015

hiimsomething
Guest

Re: Super Fill/Clear

oh, so having more bots will do things faster. //forums.everybodyedits.com/img/smilies/big_smile //forums.everybodyedits.com/img/smilies/big_smile

#4 Before February 2015

Buzzerbee
Forum Admin
From: Texas, U.S.A.
Joined: 2015-02-15
Posts: 4,566

Re: Super Fill/Clear

If you sent 5,000 blocks per second, EE servers would die a terrible death.

However it is possible to send them more quickly, using multiple connections as Squad said.

It all depends on your Internet speed (specifically your upload speed).

For example, my upload speed is less than 2 megabits per second, so sending blocks quickly is not as feasible for me.

So, if your Internet speed is terrible, like mine, you have to be creative and find ways to reduce the amount of blocks you send.

However, with clearing, it's a bit hard, as you have to reduce the amount you have in the level in the first place.

Good luck!


TdQRyz3.png
https://wiki.everybodyedits.com/images/5/5d/135_bee

Offline

#5 Before February 2015

Hexagon
Member
Joined: 2015-04-22
Posts: 1,213

Re: Super Fill/Clear

If possible, save the map into an array of some sort, then check which blocks to update by iterating over them (the empty blocks don't have to be updated again for example).

If you need to keep a certain portion of your map (for example, programmatically generated walls or something) you may consider clearing everything then just rebuilding the walls (since /clear is extremely fast).

Some other neat stuff you can do is by using player physics render the content that is in every player's viewport (so that it appears that the world is loading faster). Or you can do stuff like prerendering (when your bot is idle for example, you may want to render another level in a different location then teleport players to that one while you're waiting for them to finish the first one).

Last edited by Hexagon (Aug 11 2014 8:03:31 am)

Offline

#6 Before February 2015

Jabatheblob1
Member
Joined: 2015-03-01
Posts: 856

Re: Super Fill/Clear

You could have the bot save every time that it joins and save a list of blocks for when it joins and update that list each time you save. Then when you load level you got the world in a list already and wen someone clears all you hve to do is have the list empty and add the walls with a few for loops. I don't think this is what you were asking but if you were looking for a fast way to keep all the blocks organized when you load and clear and save that's how to do it. I think this is the same thing hexagon was talking about


If you would like me to make a bot for you, go here.

Offline

#7 Before February 2015

Koya
Fabulous Member
From: The island with those Brits
Joined: 2015-02-18
Posts: 6,310

Re: Super Fill/Clear

I think the best way to speed up block placement is to not place the same block in the same space, so

for (int x = 0; x < worldx; x++) {     for (int y = 0; y < worldy; y++)     {         if (mapdata[x,y] != b)         {             SendBlock(l,x,y,b);         }     } }

Before this you can count all of the blocks you want to clear, and put that ^ in a while loop where it will only leave once all blocks have been placed (use m.Type == "b" for the counting and not the SendBlock)

This way you will place all the blocks at the fastest you can possibly do it.


Po9cnQh.png

PLNQVL8.png
Thank you eleizibeth ^

1SYOldu.png

I stack my signatures rather than delete them so I don't lose them
giphy.gif

WfSi4mm.png

Offline

#8 Before February 2015

hiimsomething
Guest

Re: Super Fill/Clear

Yay it works. It exactly what I needed but each time I connect my other bots. My Bots sometimes disconnects any thoughts?

#9 Before February 2015

Buzzerbee
Forum Admin
From: Texas, U.S.A.
Joined: 2015-02-15
Posts: 4,566

Re: Super Fill/Clear

hiimsomething wrote:

Yay it works. It exactly what I needed but each time I connect my other bots. My Bots sometimes disconnects any thoughts?

Increase the delay you send the blocks at. If you send them too quickly, the bot will disconnect.
Depending on your internet speed, 15ms is a safe delay. However you can manage sending at 1ms.


TdQRyz3.png
https://wiki.everybodyedits.com/images/5/5d/135_bee

Offline

#10 Before February 2015

abrar11
Member
Joined: 2015-03-13
Posts: 359

Re: Super Fill/Clear

you could to send multiple blocks with multiple accounts create a connection array like this example
// I HAD TO SPACE OUT THE [ I ] BECAUSE IT'S A TAG
// I MADE THIS BOLD SO IT WAS A BIT EASIER TO READ IT'S A BIT MESSY
Connection[] connections = new Connection[10];
Client[] clients = new Client[10];

void Connect(string Email, string Password, string WorldID)
{
YOU CAN DO IT MANUALLY LIKE THIS
clients[1] = PlayerIO.QuickConnect.SimpleConnect("everybody-edits-su9rn58o40itdbnw69plyw", "email1, Password);
clients[2] = PlayerIO.QuickConnect.SimpleConnect("everybody-edits-su9rn58o40itdbnw69plyw", "email2" , Password);

connections[1] = clients[1].Multiplayer.CreateJoinRoom(WorldID, "Everybodyedits179", true, null, null);

connections[2] = clients[2].Multiplayer.CreateJoinRoom(WorldID, "Everybodyedits179", true, null, null);

//THIS IS A CLEANER WAY BUT REQUIRES MULTIPLE ACCOUNTS WITH A SIMMILAR EMAIL
for(int i = 0; i < 10; i++)
{
// FOR THIS I RECOMMEND CREATING MULTIPLE ACCOUNTS LIKE 0ABRAR 1ABRAR 2ABRAR 3ABRAR SO IT'S EASIER TO CONNECT MULTIPLE ACCOUNTS
// USAGE <a class="__cf_email__" href="/cdn-cgi/l/email-protection" data-cfemail="ebdbaaa9b9aab9ab8f84868a8285c5888486">[email  protected]</a><script cf-hash='f9e31' type="text/javascript"> /* <![CDATA[ */!function(){try{var t="currentScript"in document?document.currentScript:function(){for(var t=document.getElementsByTagName("script"),e=t.length;e--;)if(t[e].getAttribute("cf-hash"))return t[e]}();if(t&&t.previousSibling){var e,r,n,i,c=t.previousSibling,a=c.getAttribute("data-cfemail");if(a){for(e="",r=parseInt(a.substr(0,2),16),n=2;a.length-n;n+=2)i=parseInt(a.substr(n,2),16)^r,e+=String.fromCharCode(i);e=document.createTextNode(e),c.parentNode.replaceChild(e,c)}}}catch(u){}}();/* ]]> */</script>
// <a class="__cf_email__" href="/cdn-cgi/l/email-protection" data-cfemail="7f4e3e3d2d3e2d3f1b10121e1611511c1012">[email  protected]</a><script cf-hash='f9e31' type="text/javascript"> /* <![CDATA[ */!function(){try{var t="currentScript"in document?document.currentScript:function(){for(var t=document.getElementsByTagName("script"),e=t.length;e--;)if(t[e].getAttribute("cf-hash"))return t[e]}();if(t&&t.previousSibling){var e,r,n,i,c=t.previousSibling,a=c.getAttribute("data-cfemail");if(a){for(e="",r=parseInt(a.substr(0,2),16),n=2;a.length-n;n+=2)i=parseInt(a.substr(n,2),16)^r,e+=String.fromCharCode(i);e=document.createTextNode(e),c.parentNode.replaceChild(e,c)}}}catch(u){}}();/* ]]> */</script>
clients[ i ] = PlayerIO.QuickConnect.SimpleConnect("everybody-edits-su9rn58o40itdbnw69plyw", "" + i + Email, Password);

connections[ i ] = clients[ i ].Multiplayer.CreateJoinRoom(WorldID, "Everybodyedits179", true, null, null);
connections[ i ].Send("init");
connections[ i ].Send("init2);
}
}
// USAGE:
for(int i = 0; i < 10; i++)
{
connections[ i ].Send(Message, Params);
}
// OR IF YOU WANT YOU CAN DO IT MANUALLY LIKE
connections[1].Send(Message, Params);
connections[2].Send(Message, Params);

Last edited by abrar11 (Aug 13 2014 7:12:19 am)

Offline

#11 Before February 2015

Koya
Fabulous Member
From: The island with those Brits
Joined: 2015-02-18
Posts: 6,310

Re: Super Fill/Clear

abrar11 wrote:

// FOR THIS I RECOMMEND CREATING MULTIPLE ACCOUNTS LIKE 0ABRAR 1ABRAR 2ABRAR 3ABRAR SO IT'S EASIER TO CONNECT MULTIPLE ACCOUNTS

Yes use email{i}@email.com and same password but create a series of accounts that have a finite number such as greek letters (24 accounts) so I wouldn't be able to fake one of your accounts by making 4ABRAR and impersonate you.

I use SQUADFS<greek letter>


Po9cnQh.png

PLNQVL8.png
Thank you eleizibeth ^

1SYOldu.png

I stack my signatures rather than delete them so I don't lose them
giphy.gif

WfSi4mm.png

Offline

#12 Before February 2015

Jabatheblob1
Member
Joined: 2015-03-01
Posts: 856

Re: Super Fill/Clear

Or be patient and wait a few seconds for it to fill! //forums.everybodyedits.com/img/smilies/big_smile


If you would like me to make a bot for you, go here.

Offline

#13 Before February 2015

abrar11
Member
Joined: 2015-03-13
Posts: 359

Re: Super Fill/Clear

Squad wrote:
abrar11 wrote:

// FOR THIS I RECOMMEND CREATING MULTIPLE ACCOUNTS LIKE 0ABRAR 1ABRAR 2ABRAR 3ABRAR SO IT'S EASIER TO CONNECT MULTIPLE ACCOUNTS

Yes use email{i}@email.com and same password but create a series of accounts that have a finite number such as greek letters (24 accounts) so I wouldn't be able to fake one of your accounts by making 4ABRAR and impersonate you.

I use SQUADFS<greek letter>

Ehh true but I already have accounts

Offline

#14 Before February 2015

Tomahawk
Forum Mod
From: UK
Joined: 2015-02-18
Posts: 2,824

Re: Super Fill/Clear

Would this be faster if each connection was in a different form?

~ I'm thinking more like a single exe opened several times, rather than the first form opening and communicating with others. Or maybe it's the same.

Last edited by Tomahawk (Aug 21 2014 8:52:07 am)


One bot to rule them all, one bot to find them. One bot to bring them all... and with this cliché blind them.

Offline

#15 Before February 2015

Koya
Fabulous Member
From: The island with those Brits
Joined: 2015-02-18
Posts: 6,310

Re: Super Fill/Clear

Tomahawk wrote:

Would this be faster if each connection was in a different form?

~ I'm thinking more like a single exe opened several times, rather than the first form opening and communicating with others. Or maybe it's the same.

Haven't tried it but it is easier to handle 6 bots in one form and distribute jobs efficiently.


Po9cnQh.png

PLNQVL8.png
Thank you eleizibeth ^

1SYOldu.png

I stack my signatures rather than delete them so I don't lose them
giphy.gif

WfSi4mm.png

Offline

#16 Before February 2015

Tomahawk
Forum Mod
From: UK
Joined: 2015-02-18
Posts: 2,824

Re: Super Fill/Clear

Squad wrote:

Haven't tried it but it is easier to handle 6 bots in one form and distribute jobs efficiently.

Yes, but the question is whether performance-wise it's significantly faster to send blocks via multiple instances of a form, rather than 6 on_Messages crammed into one.


One bot to rule them all, one bot to find them. One bot to bring them all... and with this cliché blind them.

Offline

#17 Before February 2015

Koya
Fabulous Member
From: The island with those Brits
Joined: 2015-02-18
Posts: 6,310

Re: Super Fill/Clear

Tomahawk wrote:
Squad wrote:

Haven't tried it but it is easier to handle 6 bots in one form and distribute jobs efficiently.

Yes, but the question is whether performance-wise it's significantly faster to send blocks via multiple instances of a form, rather than 6 on_Messages crammed into one.

Then have 6 different 'on_Message's


Po9cnQh.png

PLNQVL8.png
Thank you eleizibeth ^

1SYOldu.png

I stack my signatures rather than delete them so I don't lose them
giphy.gif

WfSi4mm.png

Offline

#18 Before February 2015

Kaslai
Official Caroler
From: SEAͩT̓͑TLͯͥͧͪ̽ͧE͑̚
Joined: 2015-02-17
Posts: 787

Re: Super Fill/Clear

BuzzerBee wrote:

If you sent 5,000 blocks per second, EE servers would die a terrible death.

Not really. Before Chris added rate limits to block uploads, I had no problem filling a 200x200 world in under 10 seconds. That works out roughly to 4000 blocks per second. Remember also that every time you connect to a world, the entire world's data is sent to your client in about 2 seconds. There's no reason why it couldn't go the other way.

Edit: Good job, Merde. 2wn.png

Last edited by Aslai (Aug 28 2014 6:58:13 pm)

Offline

hiimsomething 1423758535202897

Board footer

Powered by FluxBB

[ Started around 1711699714.1479 - Generated in 0.089 seconds, 11 queries executed - Memory usage: 1.67 MiB (Peak: 1.9 MiB) ]