eikofee / nene-quest

Reproduction of Nene Sakura's game "Nene quest" from the japanese anime "New Game!!" with SFML
MIT License
76 stars 5 forks source link

Gameroom and window sizes #3

Closed eikofee closed 1 month ago

eikofee commented 6 years ago

Currently, the game room and the window's size are alike, and we must separate each other soon. Small games like Nene Quest are usually running for 1280x720 or even 1024x576 monitors but ours is only working on 1920x1080 monitors.

We should soon define a proper minimal window size our game is supporting, and thus place every game element according to the window size and not on a absolute 1920x1080 canvas.

To this adds another question, how are we going to structure that ? We should probably make a rendering class between Game and Main, but remains which values should we use in the game's code : ratio (between 0 and 1) or on a virtual canvas (like 1280x720) that is upscaled or downscaled in the rendering class ?

We also should check if the current sprites can be easily downscaled to inferior resolutions without glitching.

engboris commented 6 years ago

Actually we were quite naive in that aspect. It wasn't really done on purpose but I agree that we must do something about that.

I think because the size of our sprites relies on screenshots from the anime (1920x1080) we should start from that as the maximum screensize then downscale down to say, 1280x720. In SFML we can get the user's screensize so it shouldn't be a problem.

As for the "glitching" it shouldn't be a problem for ""self-made"" sprites.

hokolomopo commented 6 years ago

I think we can just force the 1280*720 windowed , so we won't have to worry about other sizes, it's just a small game we don't have to make several screen sizes.

engboris commented 6 years ago

If we want to follow the original game it should be in fullscreen. So what I suggest :

engboris commented 6 years ago

Should we restrict our program to the following screensizes (the most common ones) ?

So we won't have to do relative rescaling. Moreover the game will run in fullscreen by default (as in the original game). Should we allow the player to run the game in windowed mode ?

eikofee commented 6 years ago

We could add more option later but yeah 16:9 screensizes should be used. Also, I think it's always good practice in a game, small as it can be, to let the player to run the game in fullscreen or in windowed mode.

Another question just popped : where should we place the option menu ? Adding such a menu would alter the original game's main menu. Maybe we should use an external config file as suggested in #6, allowing the player to edit such options. But the resolution choices won't be an easy task to force. Right now, I suggest we bind two keys on the keyboard to both upscale and downscale the game resolution on the fly, giving such resolution an ID thing (1 = 1080p, 2 = 768p, 3 = 720p, etc...) and put it in the config file from earlier.

engboris commented 6 years ago

Maybe we should use an external config file as suggested in #6, allowing the player to edit such options.

That's what I had in mind. As for the other solution (key binding), I think it's better to allow rescaling only in a "static way" (when starting the game). Unless you really think "dynamic rescaling" should be fine, efficient and easy to implement. But it's true that suggesting an external configuration file isn't really "user-friendly".

How do you want to implement that ?

eikofee commented 6 years ago

I don't think it will be a hassle to implement the dynamic rescaling if we use fixed values, but allowing the user to set their own resolution might be a bit problematic for us (absurd values, sprite ratio, etc...), that's why I would implement theses keybinds. We could also add a keybind to switch between windowed-mode and fullscreen-mode, I noticed such a practice in a lot of dōjin-style games.

How to implement these features is something I haven't given too much deep thoughts about tho. 🤔

engboris commented 6 years ago

There is a small bug regarding the rescaling. It behaves quite well but if you change the size of the window during the titlescreen then press ひとりであそぶ, the rescaling is wrong (white bands appear).