VirusGame
VirusGame copied to clipboard
Window too large
I ran the program on Processing and the window was too big for my 13" MacBook Pro.
Workaround: change display settings and scale everything down.
I'm having the same problem. How do you change the display settings to scale everything down?
Hello everyone! I don't know an easy solution for this, but a quick workaround I've found is this:
Find the line that says "void draw(){" Then, add a line directly below it that says scale(0.5);
...now, run it. It should scale all the graphics down by 50%! The only problem is, I think the mouse controls are still looking for the larger-screen-coordinates :(
I guess what I should've done is not hard-coded in the the window resolution and UI-dimensions to be such a weird resolution (1728 by 972 is very strange).
I did a pull request with carykh's workaround but I solved the mouse looking for larger-screen-coordinates too
I'm having the same problem. How do you change the display settings to scale everything down?
On macOS, go to your System Preferences > Displays > toggle Scaled > click More Space (all the way to the right). Windows and Linux should have something similar to adjust the scale of the display.
if you go to line 61 (you can see what line you are on on the left side of the window) there should be a bit of code that looks like this size(1728,972) if you find the size of ur screen in pixels and replace the numbers it will change the size of the game so you can fine tune it to ur screen size
I have a working solution but it's not easy.
- Change the
size(1728,972);
on line 61 tofullScreen();
(or i window size you like i don't care) - Go to line 44 and and
float scalefactor;
on the next line - Go to line 62 and insert
scalefactor = (float)width/1728;
on the next line - Go to line 98 and insert
scale(scalefactor);
on the next line - Lastly, change every occurrence of
mouseX
andmouseY
to(mouseX/scalefactor)
and(mouseY/scalefactor)
respectively.