The ability to put you own logo on your bot rather than having to keep asking you all the time ender
suggestions
|
|
Administrator |
I held off on this mostly for security reasons. It's something I'd like to eventually offer, but allowing user upload of arbitrary data increases the attack surface of the game a bit, so I need to research and implement it properly. Since in general, I am online daily, this is fairly low priority. |
|
Since today you havent been on it 5 days ender.. |
|
Couldn't you use a hosted service like imgur for the logos? |
Administrator |
Fair point, though that is the exception, not the rule. I'm usually online every night, so most requests are serviced within 24 hours.
This could be possible with a little magic that checks the dimensions of the linked image. This assumes that the image hosted at a particular imgur url can't change, which I'd have to look into. The other issue with this is that unlike imgur-hosted profile images which are restricted to individual profiles pages, logos appear on tons of pages and can affect a lot of page loads. It's possible that imgur, being a well-built dedicated image-hosting service, is faster at loading this type of static content than if it were served directly by the game server (as it is now), but I'd also have to look into this. Both of those combined are probably the same amount of work as doing the security review though, and I like that option best long-term, so I'll probably go with that. |
|
You could also make sure the logo was under a certain size. |
|
Having your own upload thingy would probably be the best solution, but until that time, imgur seems like a quick, workable fix. Why would you need to check the dimensions? Like you do with profile pics, simply force them to be shown at 70x25, no matter what size was uploaded at imgur. Btw, i'm wondering, why do you use JS to scale profile pics when it could be done by just CSS? Sometimes when i'm on a slow comp/browser, i can see the resizing process taking place after the page has loaded. This is not something you'd want for a page that displays many logos, like the online page (or Eternals profile >_<). When scaling is done by css, there should be no delay. Displaying images hosted elsewhere won't slow down the game. In fact, since your server only has to come up with the source, and not the files, it'll be faster. And imgur seems reliable enough. There is the possibility of people uploading huge images as logos though. That's something beyond your control, so having your own upload would be preferable in the end. |
<Apex>
|
Forcing a picture to 70x25, oh God there's gonna be some fugly logos. |
|
Haha indeed |
Administrator |
Since logos appear on so many pages, this could make the site load slower if people upload logos that are too large. Yes, hosting them offsite is less strain on the bots4 server, but large images would increase overall loading time. I admit it's unlikely people would abuse this, but that was enough to stop me from doing a half-baked implementation that I eventually want to replace with direct server uploads.
It's been awhile, but I believe it scales it vertically or horizontally depending on which dimension of the image is larger (see image-sizer.js). I'd have to dig into this some more to really explain why, but if I overlooked how to do this sort of dependent scaling with pure CSS, I'd be curious to hear. I too have occasionally noticed the resizing happen in front of me. Also, I deleted a couple posts that were way off topic. |
<Apex>
|
Yea the resize is really funky. I remember adding random black "borders" on some of my stuff so it doesn't stretch. I put borders in quotes because it can be like 100 pixels on each side lol. And if you look at the picture on its own. I didn't look into it much but it's definitely odd. |
Fishwick [131] Moderator |
Ender, this should resize all images to 70x25 reliably: |
|
@Fishwick: to keep the original ratio of the image, you'd need to use something like img { |
Fishwick [131] Moderator |
Oh I thought you wanted to make all images 70x25 ignoring any ratio change |
Administrator |
I was referring to profile image resizing in the second half of my previous post, not logo resizing. |
Stegerous [35] |
How do I get met ender trophy |
|
you have to meet him in person |