Git Product home page Git Product logo

Comments (10)

coolwanglu avatar coolwanglu commented on June 11, 2024

Probably we can set the background color to grey, then put a 80x24 black rectangle on top of it and below all the tiles.

Another solution, which I prefer, is to create a 3rd zoom mode, which fit the whole dungeon to the map area, and there will be no map scrolling. But maybe normal tile images won't work well.

And how about a minimap, maybe we can draw an ASCII version, or just pure color tiles.

from browserhack.

freddyb avatar freddyb commented on June 11, 2024

I just became aware that this black/grey distinction does'nt exist on all ports. It's up to us if we consider it cheating or just a usability enhancement ;)

I'm not too convinced about a minimap, but I think panning (click & drag) would be more interesting. Especially for mobile (touch & drag, obviously)

from browserhack.

coolwanglu avatar coolwanglu commented on June 11, 2024

Not sure if dragging will work well, currently I usually use ; or _ to explore the whole map.

from browserhack.

coolwanglu avatar coolwanglu commented on June 11, 2024

In fact I think that the border is kind of a limit of the original implementation. In modern games, or imagine a real adventure, you wouldn't know the border unless you go through the edges yourself. So the border is merely an advantage of the players.

On the other hand, as I'm still new to NetHack, I wonder if this is a crucial affect for playing, otherwise I'd prefer not showing the borders.

from browserhack.

Tenchi2xh avatar Tenchi2xh commented on June 11, 2024

Tried a simple and not-too-intrusive solution by giving a size to the #browserhack-map-content div everytime a tileset is applied, and styling it via CSS:

nethack_lib.js, l. 177

      // update whole map size
      nethack.map_win_content.style.width = nethack.tile_width * 80 + 'px';
      nethack.map_win_content.style.height = nethack.tile_height * 24 + 'px';

browserhack.css, l. 92

  background-color: rgba(255, 255, 255, 0.025);
  box-shadow: 0 0 15px 10px rgba(255, 255, 255, 0.025);

Result looks like this:

image

image

from browserhack.

coolwanglu avatar coolwanglu commented on June 11, 2024

Hi Hamza,

It looks good to me, yet I think border could be more clear (less blur),
but it's your call.

Would you create a PR for this?

In fact one of the reasons that I didn't make the border is that I didn't
know the size is 80x24.

Thanks!

regards,

  • Lu

from browserhack.

Tenchi2xh avatar Tenchi2xh commented on June 11, 2024

Not really sure about the size either! 80x24 appears to be the minimum terminal size requirement, I have seen sources claiming a map is about 78x20. Also, the Big Room has a size of 75x18 so I guess 78x20 looks like a good number. The number doesn't have to be precise anyway since this feature is just a means to tell the player when to stop trying to find more rooms.

I also agree that the blur is too much, I didn't try for a long time.
0 0 10px 0 rgba(255, 255, 255, 0.025); works a lot better.

The 4 lines I provided are the only changes, but I could do a PR. I'm not sure how to do it though: should I simply add the changes and commit to my already altered fork, or checkout the current version on a separate branch ?

from browserhack.

coolwanglu avatar coolwanglu commented on June 11, 2024

Please checkout the 'master' branch, apply the changes, commit and submit a
PR.

On Fri, Aug 14, 2015 at 5:12 PM, Hamza Haiken [email protected]
wrote:

Not really sure about the size either! 80x24 appears to be the minimum
terminal size requirement, I have seen sources
https://nethackwiki.com/wiki/NetHack_units claiming a map is about
78x20. Also, the Big Room https://nethackwiki.com/wiki/Big_room has a
size of 75x18 so I guess 78x20 looks like a good number. The number doesn't
have to be precise anyway since this feature is just a means to tell the
player when to stop trying to find more rooms.

I also agree that the blur is too much, I didn't try for a long time.
0 0 10px 0 rgba(255, 255, 255, 0.025); works a lot better.

The 4 lines I provided are the only changes, but I could do a PR. I'm not
sure how to do it though: should I simply add the changes and commit to my
already altered fork, or checkout the current version on a separate branch ?


Reply to this email directly or view it on GitHub
#9 (comment)
.

from browserhack.

freddyb avatar freddyb commented on June 11, 2024

80x24 is correct, as it is the default amount of columns/rows for a terminal window, e.g. echo $COLUMNS $ROWS in your non-maximized terminal.

from browserhack.

freddyb avatar freddyb commented on June 11, 2024

That wasn't completely correct :-) It must be less than 24.
I am not sure if there's a margin above and below the map, but at the very least we "lose" 2 lines for the status at the bottom (lvl, experience, name etc.)

Unknown command ' '.

                                                                ------
                                                                |....|
                        --------------------------------        ..<..|
                        -..............................|        |....|
                        |.------|--------------..-----.|        |....|
                        |.|....|..|...|.   |.....|...|.|        --.---
                        |.|....|..|...|.   |..|..-...|.|          #
                        |.--|-----|...||------|..|...|.|##        #
                        |......|   ...|.|..|..|.-----|[|##        #
                        |.----.|  --|--.|..|.%|)-....|..##        #
                        |.|  + -|--..{..-|-|..|.|.._.|.|#         #
                        |.|  |.........%...-|--d|....|.|#         #
                        |.|---+---.----|--..!.@.|....|.|#         #
                        |.|..|   |.+  |..|--|--------|.|##############
                        |.|..|   |.|  |..| ...|#.|.%.-.-#          +
                        |.|..|   |.---|.[|....|..|.%.|.|
                        |.-|------..{.---------|------.|
                        |........................../...|
                        --------------------------------

freddy the Thaumaturge    St:10 Dx:14 Co:16 In:17 Wi:8 Ch:10  Chaotic
Dlvl:7  $:278 HP:49(49) Pw:43(73) AC:8  Xp:7/767

from browserhack.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.