revvv / gdash-export-CrLi

GDash with new features
MIT License
15 stars 3 forks source link

See the entire 40x22 cave #21

Closed renyxadarox closed 1 year ago

renyxadarox commented 1 year ago

If I want to see the entire 40x22 cave on the screen, is it possible to expand the cave view to full screen/window?

Motivation: I believe a 40x22 cave would be fully visible with a scaling factor of 1 or even 2 on my screen. I'm forced to set the scaling factor to 5 to make the visible box close to the size of my screen, but all the elements look quite huge with these settings.

zsommk commented 1 year ago

In early versions of Gdash this was the case /versions until 2010/, later Cirix eliminated this possibility. All in all, maybe it's a good thing, the current view is similar to that of the commodore 64.

zsommk commented 1 year ago

I installed the 2010 version of Gdash to remind myself what it looked like, that is, this large cave view. And I admit now that as an option it would be an interesting solution. Could it be done?

revvv commented 1 year ago

Where can I get the 2010 version? Or can you make screenshots (game and settings)?

zsommk commented 1 year ago

I tried to send you the 2010 version after win, but I got a message that the message is too large .

revvv commented 1 year ago

Well then just attach the screenshots here.

revvv commented 1 year ago

As a quick solution you can set the visible area here: GAME_RENDERER_SCREEN_SIZE_X and GAME_RENDERER_SCREEN_SIZE_Y

The scaling factor still has to be suitable for your monitor.

Unfortunately I don't know how to add this setting yet without ruining the code...

cwscws commented 1 year ago

I assume you mean playing a cave without scrolling? Because in the editor you see the full cave on the screen.

But what sense does it make to play the game without scrolling? His would look weird.

revvv commented 1 year ago

And it's also some kind of cheating! ;-)

renyxadarox commented 1 year ago

Playing the game almost without scrolling: https://www.youtube.com/watch?v=DPD6NlFFuSQ Cheating?

Zoom in the video to full screen to see what it will look like.

cwscws commented 1 year ago

Somehow this wouldn’t seem like Boulder Dash anymore for me

renyxadarox commented 1 year ago

@cwscws Don't worry, we will keep C64 resolution as default for connoisseurs of the original Boulder Dash. )

revvv commented 1 year ago

New release for Windows: Preferences -> Game graphics -> Full cave view

zsommk commented 1 year ago

This option has a lot of potential in itself. In 1920x1080 resolution I normally play on scale 5 and it's ok. The new option on a scale of 5 or even 4 is unplayable, I can't see Rockford, it's out of view of the monitor. Only changing the scale to 3 shows me the whole cave. The idea is good. On higher scales from 4 onwards, the image should center on the Rockford as in the non-fullscreen version.

renyxadarox commented 1 year ago

Nice. Almost perfect, except for the title. Scaling factor: 3. Screen size: 1920x1080

Screenshot 2023-08-08 22-13-49

renyxadarox commented 1 year ago

Just for comparison: Scroll view: https://youtu.be/zalm1LKr5ZY Full cave view (without the title): https://youtu.be/_fPfWIpQjYM

Playing in full cave view was definitely easier.

renyxadarox commented 1 year ago

Some fractional scaling factor is required, to accommodate a header that has 85px height. For instance, with scaling factor 2.75 a cave 40x22 will occupy 1760x968 and enough space (112px) for a title on a 1920x1080 screen.

Other option: Integer scaling factor remains, but need to know full screen resolution, calculate visible area sizes as visible area width = min(16 scaling factor width, full screen width) visible area height = min(16 scaling factor height, full screen height - header height) and scroll when visible area width > full screen width or visible area height > (full screen height - header height).

zsommk commented 1 year ago

At a scale of 4 and above, the cave behaves like "Intermission". Surely on a 2k monitor it will work, but I have to reduce it on a scale of 3. Question: The editor has its own scaling level The Commodore64 style game has a level of scaling, Can the fullscreen option have its own C64 independent scaling level?

renyxadarox commented 1 year ago

Yet another option: to play "Full cave view" in Window mode (instead of Full screen). Looks very nice, all header inscriptions are visible.

https://youtu.be/-BLwwlogpV4

I love it and it solves all my purposes, I'm completely satisfied! @revvv, thank you very much for the new feature!

Screenshot 2023-08-08 22-13-49

cwscws commented 1 year ago

It's interesting to play that way. But Boulder Dash also lives from the unknown lurking around the next screen it scrolls to... ;) So I prefer regular cave view.

revvv commented 1 year ago

My last checkin allows now a double value for the scaling factor, so you can use your complete screen. I had to touch a lot of code, hope I haven't destroyed too much... The title screen does not like double values... looks odd, so I forced an integer for it. Not sure if there is a better solution.

New release is out.

renyxadarox commented 1 year ago

Not bad at all. Looks good for me with scaling factor 2.9

Just as minor issue, maybe the better step is .125 ? If the original size of cell is 16x16, the result of scaling with step .125 should always lead to some integer sizes: 1.125 -> 18x18 -> 720x396 1.250 -> 20x20 -> 800x440 1.375 -> 22x22 -> 880x484 1.500 -> 24x24 -> 960x528 ... 2.875 -> 46x46 -> 1840x1012 3.000 -> 48x48 -> 1920x1056 and so on.

I don't know, what is a size of header, probably it is also subjected to scaling...

zsommk commented 1 year ago

This is now great for the cave test in the editor. I set the scaling to 2.4 in the editor and in the game in full screen, and ... it's a revelation. Thank you

revvv commented 1 year ago

@zsommk wrote:

Can the fullscreen option have its own C64 independent scaling level?

Yet another scaling level that is only relevant for full screen mode? IMHO we already have enough options.

revvv commented 1 year ago

Looks like OpenGL does not like double values: Full screen game is not centered. Right now I don't know how to fix that...

renyxadarox commented 1 year ago

It seems to me full screen game was never centered with OpenGL engine, even when there was integer scaling factor. Try some older GDash-export version with OpenGL engine, scaling factor 1, full screen, the visible area is aligned to left bottom corner. I can make a screenshot, if you want.

revvv commented 1 year ago

Oh, good to know. Thought I have something destroyed...

renyxadarox commented 1 year ago

The size of app after cold start appropriate to the Scaling factor 5: image image Make some changes, for example, switch on Particle effects. The size of application after that becomes appropriate to the "perfect scaling factor for full cave view" image

Each time after app start I am foced to change something in the Settings to adjust app size to the "perfect scaling factor for full cave view".

revvv commented 1 year ago

Are you sure you are using the latest version? Now if you change the "Full cave view" setting GDash gets restarted. I added the restart flag.

renyxadarox commented 1 year ago

Why don't I change the Scaling factor to 2.875 (as a perfect for full cave view)? Bacause I am forced to switch off Full cave view and enable full screen mode for recording Intermissions. A scaling factor for perfect for full cave view is calculated for 40x22 caves and don't change for Intermissions, so the header is far from Intermission cave, and that is not suitable for video recording: image When I turn off Full cave view for Intermission, Scaling factor 5 is good for video recording: image

renyxadarox commented 1 year ago

Are you sure you are using the latest version? Now if you change the "Full cave view" setting GDash gets restarted. I added the restart flag.

Yes, GDash gets restarted after changing "Full cave view", it's true, but I say about a cold start. The preserved scaling factor (5) is used instead of "the perfect scaling factor for full cave view" (2.875) after a cold start.

renyxadarox commented 1 year ago

In fact, another inconvenience also appears after the implementation of Full cave view feature: Every time I run a new cave from the Start screen, the size of app window resizes, so OBS Studio needs some time (~ 2-10 sec) to catch the new window to be able to record it.

I have no idea how to fix it. I understand that window resize is required as a result of Full cave view scaling factor adjustment. So I'm forced to wait 2-10 sec for OBS Studio catch the window before start a recording.

With "Full cave view" off window size remains the same from the Start screen through all caves, so it's convenient to immediately video recording without interruptions, but then there is no "Full cave view"...

revvv commented 1 year ago

Ok, I see that after a cold start there the window size is different compared with right after changing something in the settings.

revvv commented 1 year ago

@renyxadarox Thanks for reporting. SDL/OpenGL initalization is different than GTK. Your OBS concerns: Yeah, the title screen resolution is a different story. I'm on. And yes intermissions don't look good in full cave view. I'm on, too.

renyxadarox commented 1 year ago

@revvv regarding Intermissions and full cave view I see 2 options:

  1. recalculate optimal scaling factor before each cave start and resize the window. Probably not good case, because there also bypass effect between previous and current caves.
  2. align cave header to the top of cave visible area. Something like that: image

It's not a big deal, to crop video in video editor.

revvv commented 1 year ago

Released a new version. Windows seems OK, Mac has problems, but did only a quick test. Therefore marked as pre-release.

renyxadarox commented 1 year ago

Looks weird after a cold start, even after the second cold start image image (Full cave view on)

revvv commented 1 year ago

Sorry, I messed it up. I fear I can't do more today...

renyxadarox commented 1 year ago

I'd rather return back to 1.8.6

revvv commented 1 year ago

My problem was I tested with SDL, looked find, but OpenGL looks terrible. Then I always started a game after startup, but if I enter settings immediately you notice a weird font...

So if anybody out there wants to do an endless trial and error session... join me ;-)

revvv commented 1 year ago

New release is out. Title screen and cave now have always the same size.

renyxadarox commented 1 year ago

@revvv, nice. The OBS issue has been resolved now.

revvv commented 1 year ago

Great to hear that.

Unfortunately I was not aware that you can create caves bigger than 40x22. In this case a full cave view makes no sense... I'll try to fix that...

cwscws commented 1 year ago

I think the title screen should be enlarged to the window size - otherwise it just looks weird.

revvv commented 1 year ago

I think the title screen should be enlarged to the window size - otherwise it just looks weird.

That's not so easy...

renyxadarox commented 1 year ago

Intermissions look very good in Full cave view with Gdashexport-1.9-fork! @revvv A lot-lot-lot-lot-lot thanks to you for that briliant enhancement!

I have no idea what needs be done to made the Full cave view further better. I think you can close the issue. Or do you have other ideas of what else can be done?

revvv commented 1 year ago

Thanks! I just waited politely for feedback :-)