Skip to content
This repository has been archived by the owner on Oct 2, 2021. It is now read-only.

Connect to specific servers by IP address (slither-nest functionality) #283

Open
3 tasks
clemens-tolboom opened this issue Jun 3, 2016 · 11 comments
Open
3 tasks
Assignees

Comments

@clemens-tolboom
Copy link
Collaborator

clemens-tolboom commented Jun 3, 2016

Asked in #275 (comment) to 'port' https://github.com/LukeeeeBennett/slither-nest

  • Add two preference variables window.serverConnection and window.serverConnectionKeep
  • Add UI checkbox when checked use the same server binds to window.serverConnectionKeep
  • Add UI textbox for editing server binds to window.serverConnection
@ermiyaeskandary
Copy link
Owner

ermiyaeskandary commented Jun 3, 2016

I'm doing the custom server connect functionality - 👍
Much easier way

@ermiyaeskandary ermiyaeskandary self-assigned this Jun 3, 2016
@clemens-tolboom
Copy link
Collaborator Author

clemens-tolboom commented Jun 4, 2016

I had this in mind. No fuss

slither_io

            oContent.push('<input type="checkbox" title="Connect to same server"/><input type="text" title="Game server" size="20" placeholder="111.222.333.444:555" pattern="((^|\.)((25[0-5])|(2[0-4]\d)|(1\d\d)|([1-9]?\d))){4}$"/>' );

When playing we can set the textbox and when check it keeps connecting to same arena.
When not playing one can edit the textbox / checkbox

Please make the IP/port a bot variable so others can reach it/set it too. Like my C&C

Pattern is incomplete and was found on http://html5pattern.com/Miscs
Somehow the z-index (or something else) is not good as I cannot edit it.

@ermiyaeskandary
Copy link
Owner

Somehow the z-index (or something else) is not good as I cannot edit it.

You know why ?
Because of where you put it -
// Set static display options here.

@ChadSki ChadSki changed the title Build-in slither-nest functionality Connect to specific servers by IP address (slither-nest functionality) Jun 6, 2016
@ChadSki ChadSki modified the milestone: Choose Server by IP Jun 6, 2016
clemens-tolboom added a commit that referenced this issue Jun 8, 2016
@clemens-tolboom
Copy link
Collaborator Author

clemens-tolboom commented Jun 8, 2016

// Set static display options here.

lol ... that's not quite true. 'onPrefChange' is zapped on mouse clicks.

I added some code to branch feature/283-fixed-server-option (quite bad code)

Questions

  • how to integratie with default settings?
  • when to set the values?
  • I added jQuery as a dependency which would make lots of stuff easier. I have no problem with jQuery unless we use it in a tight loop for updating lots.

@clemens-tolboom
Copy link
Collaborator Author

Updated the summary and made my #283 (comment) more stand out.

@ermiyaeskandary
Copy link
Owner

@clemens-tolboom We should do it without jQuery... An extra dependency just makes it slower and it's possible. We should do it on the screen with the play button not within the overlays... like slither-nest.

@ermiyaeskandary
Copy link
Owner

@clemens-tolboom We have to set the values after we die
force-server is a built in slither.io function which forces a server after death.
I'll double check and report back.

@ermiyaeskandary
Copy link
Owner

@clemens-tolboom We can integrate with default settings by saving it after it is set and loading it before we play the game - but then run it after each death. I need to double check force-server but you should only need to set it once with that function and it would stay there until page refresh. I disagree with saving it as a setting anyway. We would want to switch servers regularly and we can always set it to something else manually after refresh - we just want the bots to be on the same server when testing. Which server it is doesn't matter TBH.

@clemens-tolboom
Copy link
Collaborator Author

@ermiyaeskandary I'm still learning. I did some coding to get this issue started. Please take over :p
(I know it is assigned to you but was struggling today with my C&C so needed a break).

@clemens-tolboom
Copy link
Collaborator Author

Is your solution scriptable? And without the extra button?
slither_io

@ermiyaeskandary
Copy link
Owner

@clemens-tolboom Yeah - we can just put an input box. I can start working on this soon but really busy currently :(
Thanks for having a go by the way!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants