dinosaur-exploder icon indicating copy to clipboard operation
dinosaur-exploder copied to clipboard

[Feature]: Add size options for the game window

Open NoahAldahan opened this issue 3 years ago • 1 comments

👉 Please confirm the following

🤔 Is your proposal related to a problem?

I personally have a 2560 by 1600 pixels screen, and Julien for example has a more classic 1920*1080 screen. When I usually code on it, the game looks perfect, but it is too big for Julien

😍 Describe the solution you'd like

A prompt at the start of the game asking what kind of size the user wants (it could be for example : big medium and small).

👍️ Describe alternatives you've considered

A much more difficult approach could be to add a whole menu of options where the player could select the size.

✍ Additional context

The size change would be harder than it seems, because the speed of movement of everything inside the game is in pixels. So that change would also need to include dynamic speeds for everything that depend on the size of the window

NoahAldahan avatar Mar 30 '22 11:03 NoahAldahan

Hey guys! I am new to github and JavaFX, but I decided to give this a go for some practice and came up with what is (I hope) a simple solution. I added a method to the DinosaurMenu class that will default the game window to a set height in relation to the screen size, and enabled window resizing so the user can manually resize the window to their hearts content. This way the default size should look the same in relation to the screen size, even if screens have different resolutions. You can see the result in the video below:

https://github.com/dylan-power/dinosaur-exploder/assets/102972695/716c74a3-4762-440c-9ec9-38a1a44ad6f3

I know this doesn't address the preferred solution of having a prompt or menu to choose window size, but if you think it would be useful I can create a pull request. Otherwise I'd be happy to try and make the menu when I have more time.

felwun avatar Jan 13 '24 18:01 felwun