Please report any buggy or annoying behaviour of the client here.
1. The zoom levels are following a curve 1.189207115002721^x where x ranges from -8 to 24, or alternatively 2^x where x is sampled at every 1/4 from -2 to 6. That means, that every zoom level is ~1.19 more zoomed in than the last one and that every 4 levels, the zoom level doubles. The values are truncated to a low number of decimals but it shouldn't have a large effect. Using exponential zoom means that the intervals should be the consistent at all levels. So I have to assume that the problem is not of consistency, but that the differences between the levels are too big? The zoom tool (to differentiate from the scroll wheel) on the other hand zooms the canvas 4 levels at a time (= doubles zoom), and should had had a way to zoom one level at a time, but that was broken, I'll fix that asap and add a slider for changing the zoom strength for good measure. Adding more fine grained zoom (e.g. doubling every 8 levels) would make zooming in and out slower especially on large doodles as this still redraws everything for every level when zooming with scroll wheel. If I manage to fix the lag with zooming with scroll I'll be able to add more fine grained zoom as well. If the problem was not any of this, and is somehow solvable, lmk.
2. Can I ask what your screen resolution is, I'm having a lot of difficulty trying to see if a dot or a part of line is one pixel in any direction because the pixels are very small. I changed the part of code that translates screen coordinates to add half a pixel to the screen coordinate so it should now use the center of the pixel instead of the top left corner of the pixel. I can't see a big difference but maybe the results are a tiny bit better now?
3. I don't know why the zoom level would affect the tool positions on the screen, other than that the zoom level gets changed even when the cursor is on the side panel. The scroll wheel is no longer used for zooming if it's on the layer or tool panels. I can't recreate the situation where the tools are off screen. I did, however manage to break the ui even more than it originally was.
4. insert "UI coding is my passion" meme or something here. I thought using an image would had been easier but apparently displaying images properly is too difficult for java or whatever so I'll just code the circle directly as a function of x and y positions of the pixels, the cpu usage likely won't be the best but at least it should stay intact when it's moving.
5. I thought I fixed that last year. At least on my machines the only time it's using more cpu is when it's redrawing the canvas but not if the cursor is not moving. I'll need to check that at some point when I have more energy.
I pushed a new build where at least some of those should be fixed.
Thanks a bunch!
Now, if I only knew what I could do to prevent DoD from timing out the images I'm drawing.
Thanks for this amazing program Qazhax! Hower, i tried running the client today but i can't seem to login through it either normal means (Which i assume is because doodleordie's https certificate isn't set-up properly) or through the cookie. When i try the cookie login, screen just flashes and it goes back to the login screen. Is there some update with the JRE that's maybe screwing something up? Or did they change something with the doodleordies website? (Which i assume is unlikely) I am using windows 10 with jre-8u261.
The site recently switched to a full https site, which is causing this. Earlier only the login page was using https, so it was possible to just go around the login page when the certificate is expired, but now the cert expiring just breaks the entire client. And the cert expired last Thursday. I don't have access to any of the server things so I can't fix it on my own. I suppose I should try to notify the admins as soon as possible when sth breaks on the server side.. I'll try to change the error messages to reflect the change when I have time.
That's a great idea, thanks!
The more complex save files often get over a megabyte in size and trying to paste the save data to the browser directly would likely be pretty slow. When I last tried playing around with the saves on site I could freeze the browser trying to access the saves, but that was years ago and directly from the localstorage tab in the inspector. The save/load script I made (possibly the same you're talking about) accesses the localstorage from javascript and doesn't seem to lag much at all, so making a function that could load save data from the client shouldn't be impossible. I'll try if I can make a js script that could load the contents of a text file into the localstorage, that should make it possible to load doodles from the client.
The client technically can produce save files that the site can read, but the functionality is not linked to any button, so I'll have to add some keybind to save the doodles in that format once I get the javascript working.
edit: I got the javascript mostly working but it's late so I'll continue later.
The workaround now mostly works, but it induces a few limitations on the doodles. The colours in the browser saves are saved as the #aabbcc form, but without the first #, so it's not possible to export semitransparent lines. The save format is also unable to save numbers beyond [0,520] so the locations to up, left and right of the canvas get squished back inside the canvas, the lines going below the bottom of the canvas aren't affected as they are still inside the range.
I'll check if I can automatically cut off the parts of the lines outside the canvas and post the workaround a bit later once I've eaten and stuff.
The dod browser format saves are also unable to use higher accuracy than 0.5. adding a file with filename "config" and contents "accuracy=2" will make the client use the same accuracy to help avoid drawing too detailed and having it get destroyed in the conversion.
The browser script for loading the file contents to localstorage is available at http://qazhax.herp.io/scripts/. I uploaded a new version of the client here, in the new version ctrl+shift+s saves in the browser format. The saved file can then be dragged and dropped onto the popup created by the browser script and the script will load it into the active room.
I also finally changed the error messages while I was at it.
Very cool stuff. Thank you for your work Qaz! Edit: I'm a bit confused by the Config thing, i assume you mean either a .txt file or a regular file with no extension with the accuracy=2 but when launching and going into offline mode the whole app crashes, not sure if it's just me missing something or not
The config file should not cause any crashes no matter what it contains. The filename it's looking for is just "config" without an extension or the quotes. I recently added support for pen pressure and that requires the files "libjpen-2-3.jnilib" and "jpen-2-3-64.dll" that should be included in the zip to be in the same folder as the .jar file or it might crash. I'll look into this later.