Friendband 0.0.1, an unangband variant / branch

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • droof
    Apprentice
    • Dec 2013
    • 71

    Friendband 0.0.1, an unangband variant / branch

    Friendband is my Unangband branch and playground for many ideas. I'm not sure if it counts as a variant.

    With Friendband I'm trying to make Unangband easier and faster to play. I want to simplify the game as much as possible while still offering the core experience of Unangband. My tweaks are partially inspired by Brogue, DoomRL, EyAngband and Vicious Orcs among others.

    Features:
    - player does not get hungry
    - player always has light, range changes based on terrain
    - 3 always-active movements controls: arrows/numpad, hjkl and wsad
    - all item interactions go through the inventory: open inventory, choose item and choose action for item
    - press space to target enemy, press again to shoot
    - press o to open chests and M in towns to view the world map
    - the sidebar gives information about the surrounds and current room, including travel directions
    - touch the thinnest north/east/south/west map edge to travel in that direction
    - no race and class choice
    - player auto-levels
    - items display all known stats averages for the current player level
    - no character screen
    - main menu with campaign mode and single dungeon mode
    - press ? for controls, the game is playable with only 7 buttons excluding movement

    This is of course highly experimental. I have fixed as many crashes as I could find through playthroughs and GCC warnings, but no guarantees. If you're interested, here is the link: ZIP and TAR.GZ.
  • fph
    Veteran
    • Apr 2009
    • 1030

    #2
    Nice! I like your idea to fix targeting, in particular.
    --
    Dive fast, die young, leave a high-CHA corpse.

    Comment

    • jupiter999
      Scout
      • Nov 2012
      • 29

      #3
      Is there any documentation or webpage?

      Comment

      • droof
        Apprentice
        • Dec 2013
        • 71

        #4
        Sorry for the very late reply. I'm here now.

        Originally posted by fph
        Nice! I like your idea to fix targeting, in particular.
        Thank you! I love the idea of a stealthy archer in games. DoomRL made shooting look so easy in a rogue-like. I really wanted to be able to just fire arrows rapidly at groups of enemies and make bow quick & fun to use. So now it does. Groups of dogs, beware

        Originally posted by jupiter999
        Is there any documentation or webpage?
        Not yet. I'm just getting started. I still have a lot to figure out. If I can help with anything, please ask away.

        Comment

        • t4nk
          Swordsman
          • May 2016
          • 336

          #5
          Wow, Unangband actually looks pretty cool. Why is there "no race and class choice", though?
          Also, what's the deal with __attribute__ ((fallthrough))? Was that your idea? (I think it's only supported in gcc 7, so I had to remove -Werror from the makefile to compile).

          Comment

          • t4nk
            Swordsman
            • May 2016
            • 336

            #6
            Originally posted by t4nk
            Wow, Unangband actually looks pretty cool. Why is there "no race and class choice", though?
            Also, what's the deal with __attribute__ ((fallthrough))? Was that your idea? (I think it's only supported in gcc 7, so I had to remove -Werror from the makefile to compile).
            edit: Also, ncurses frontend seems utterly broken. The colors are wrong, and when I quit the game, strange things happen in the emulator (xterm). I guess it doesn't restore the terminal to canonical mode (or cooked mode? something like that). ncurses is bad, though, so maybe just remove it?
            Last edited by t4nk; February 18, 2018, 12:10.

            Comment

            • droof
              Apprentice
              • Dec 2013
              • 71

              #7
              Originally posted by t4nk
              Wow, Unangband actually looks pretty cool. Why is there "no race and class choice", though?
              Also, what's the deal with __attribute__ ((fallthrough))? Was that your idea? (I think it's only supported in gcc 7, so I had to remove -Werror from the makefile to compile).
              Thank you! I'm glad you like it. I wish I had played Zangband before working on this, then I would've made a few very different design choices. I'm correcting for them now.

              I removed race and class just to reduce the playtest scope for me. The choices were overwhelming, but I'm confident to put them back now along with their stats. I'm renaming the "new game" option to "quick start". I didn't like the 2d4 and 18/40 D&D-style stats, but I do like the Zangband-style clean average stats. So I'm returning the screens and make them easier to read Z-style.

              Those explicit fallthroughs were GCC 7 warnings, but I think they are convenient. I might've fixed one code bug while conservatively checking and adding them. I wanted to remove all kinds of warnings, so I can easily spot any mistakes I'd make in the code and fix anything that could overflow. Unangband crashed occasionally and I didn't experience that with my version anymore. But I should've removed the -g -Werror flags before releasing. I should probably suppress all warnings for release.

              Originally posted by t4nk
              edit: Also, ncurses frontend seems utterly broken. The colors are wrong, and when I quit the game, strange things happen in the emulator (xterm). I guess it doesn't restore the terminal to canonical mode (or cooked mode? something like that). ncurses is bad, though, so maybe just remove it?
              I accidentally broke it. The X11 and win32 interface day and night colors were broken and the night lightning didn't make any sense at all, so I optimized colors and nights for these interfaces. Meanwhile I forgot to check the GCU interface. I usually play variants in GCU, so it's on my "important" fix list.

              I tried to add unicode symbols for some terrain and monsters using char32_t, where unicode fits in a single char or single array element for convenience. But I had a lot of trouble with integrating it and unicode icons are very incomplete on my system. 95% of the useful animal icons are missing. So I might drop this idea.

              Other ideas are just to fix GCU, optimize for its 16 colors and have better sound support for all interfaces. X11 still supports tiles here, so I could construct a Dawnlike tileset with minor edits to use for both X11 and win32. I think the current tiles use too harsh bright colors, don't fit seemlessly together and are not very eligible when made small. I like both ascii and tiles, but I'm not a fan of the original tiles. 1000 terrain features and 1000 monsters is a lot for tiles though.

              Maybe I should put some effort into fixing the win32 menus or use default terminals like Zangband does. I didn't care for multiple terminals until Zangband defaulted with them and showed me how convenient they are. Unfortunately the "display monsters" terminal can't replace my own integrated "display surroundings" yet. Maybe I should expand the "display monster" terminal in favor of my integrated sidebar, since terminals are more dynamic and are the standard in angband variants probably for a good reason. Not single-window integrated UI elements like GCU and Sangband SDL, although I'm used to single-window integration because most other games I play do that.

              Comment

              • t4nk
                Swordsman
                • May 2016
                • 336

                #8
                Another thing I've noticed is that J (shift+j, run to the south in roguelike keyset) doesn't make @ run, but instead drops stuff from inventory (edit: now that I look at the stack trace, I realize that @ sets traps ). And sometimes it makes the program crash (in x11). Backtrace:
                Code:
                Program received signal SIGSEGV, Segmentation fault.
                book_sort_comp_hook (u=0x7fffffffdcb0,
                    v=<optimized out>, a=<optimized out>, b=<optimized out>)
                          at object2.c:9763
                9763			if (s1_ptr->cast[i].class == *why) break;
                (gdb) bt
                #0  book_sort_comp_hook (u=0x7fffffffdcb0,
                        v=<optimized out>, a=<optimized out>, b=<optimized out>)
                            at object2.c:9763
                #1  0x0000555555693bf2 in ang_sort_aux (u=u@entry=0x7fffffffdcb0,
                        v=v@entry=0x7fffffffdc3e, p=p@entry=0, q=29)
                            at xtra2.c:4187
                #2  0x0000555555693c6a in ang_sort (u=u@entry=0x7fffffffdcb0,
                        v=v@entry=0x7fffffffdc3e, n=<optimized out>)
                            at xtra2.c:4221
                #3  0x0000555555632a3e in fill_book (o_ptr=o_ptr@entry=0x7ffff7f6e0a8,
                        book=book@entry=0x7fffffffdcb0, num=num@entry=0x7fffffffdca0)
                            at object2.c:9912
                #4  0x000055555559bea9 in get_spell (sn=sn@entry=0x7fffffffdf1c,
                        prompt=prompt@entry=0x5555556c3f55 "use",
                        o_ptr=0x7ffff7f6e0a8, known=known@entry=0 '\000')
                            at cmd5.c:163
                #5  0x000055555563130a in pick_trap (y=9, x=39, player=player@entry=1 '\001')
                            at object2.c:8143
                #6  0x0000555555587381 in player_set_trap_or_spike (item=<optimized out>) at cmd2.c:2912
                #7  0x000055555559ef7d in do_cmd_item (command=command@entry=41) at cmd6.c:254
                #8  0x00005555555a3392 in process_command () at dungeon.c:2458
                #9  0x00005555555a8725 in process_player () at dungeon.c:3286
                #10 dungeon () at dungeon.c:3659
                #11 play_game (new_game=<optimized out>) at dungeon.c:4094
                #12 0x000055555556da4d in main (argc=1, argv=0x7fffffffe268) at main.c:614
                Originally posted by droof
                Those explicit fallthroughs were GCC 7 warnings, but I think they are convenient. I might've fixed one code bug while conservatively checking and adding them. I wanted to remove all kinds of warnings, so I can easily spot any mistakes I'd make in the code and fix anything that could overflow. Unangband crashed occasionally and I didn't experience that with my version anymore. But I should've removed the -g -Werror flags before releasing. I should probably suppress all warnings for release.
                Or you can just
                Code:
                #ifndef RELEASE
                    __attribute__ ((fallthrough));
                #endif
                Or some such, and then compile with -DRELEASE for release.

                I tried to add unicode symbols for some terrain and monsters using char32_t, where unicode fits in a single char or single array element for convenience. But I had a lot of trouble with integrating it and unicode icons are very incomplete on my system. 95% of the useful animal icons are missing. So I might drop this idea.
                Yes. The C language doesn't have much support for Unicode. As for symbols, that depends on the font, some are more capable than others. I think ultimately, .png tilesheet is the right (and easiest) way for a roguelike game, or, alternatively, libfreetype + some font guaranteed to have necessary symbols, distributed with the game (and not some default one from x11 or terminal emulator on the user's system, since you don't know what that might be).

                Maybe I should expand the "display monster" terminal in favor of my integrated sidebar, since terminals are more dynamic and are the standard in angband variants probably for a good reason.
                Well, the reason is that it was easy to do it like that...

                Not single-window integrated UI elements like GCU and Sangband SDL, although I'm used to single-window integration because most other games I play do that.
                Multiple windows some have drawbacks: their decorations (the header, with the "close" and "minimize" and other buttons) take some space, and they look unprofessional and lazy (which is true ). Few applications use multiple windows, even though it's easy, and the users always demand "docked" mode (some examples: Lazarus (IDE for Pascal), GNU Image Manipulation Program).
                I'm pretty sure most people prefer single window UI (I'm one of them).
                Last edited by t4nk; February 19, 2018, 09:15.

                Comment

                • Gwarl
                  Administrator
                  • Jan 2017
                  • 1025

                  #9
                  Originally posted by droof
                  Other ideas are just to fix GCU, optimize for its 16 colors and have better sound support for all interfaces.
                  256 color terminal support for Unangband. GitHub Gist: instantly share code, notes, and snippets.


                  This is Unangband's main-gcu.c patched using code from Vanilla to support 256 color terminals (added to ncurses in 2005 hence missing from older variants).

                  Note the changes to Term_xtra_gcu_react function.

                  Some discussion on the patch (as applied to Sil) here:

                  Comment

                  • droof
                    Apprentice
                    • Dec 2013
                    • 71

                    #10
                    Originally posted by t4nk
                    Another thing I've noticed is that J (shift+j, run to the south in roguelike keyset) doesn't make @ run, but instead drops stuff from inventory (edit: now that I look at the stack trace, I realize that @ sets traps ). And sometimes it makes the program crash (in x11).
                    I spoke too soon about "no crashes". Thanks! I fixed the shift+j running. I'll look into the segfault soon.

                    Originally posted by t4nk
                    Or you can just
                    Code:
                    #ifndef RELEASE
                        __attribute__ ((fallthrough));
                    #endif
                    Or some such, and then compile with -DRELEASE for release.
                    That'll be in a lot of places, but looks like there's no easy way to suppress the warning. I'll use your solution.

                    I dislike the window borders for the terminals too, though I hide the top borders behind other windows. Borderless would be nice or the option for integrated terminals like in GCU. I have no idea how to pull that off yet.

                    Originally posted by Gwarl
                    https://gist.github.com/OwenGHB/1ea8...f672f1a8d190f5

                    This is Unangband's main-gcu.c patched using code from Vanilla to support 256 color terminals (added to ncurses in 2005 hence missing from older variants).
                    Thanks! I compared my main-gcu.c with the patched version and there was only one "raw()" line in difference.

                    Unfortunately, it doesn't fix the color problem. My term and framebuffer both have 16 colors default. Within the 16 colors are a dark, normal and bright green, blue, red and gray. The Unangband defined colors only correctly map half of them. Once all colors are properly mapped, that should be plenty to achieve the same effect as I have in X11 and win32 now.

                    Comment

                    • Gwarl
                      Administrator
                      • Jan 2017
                      • 1025

                      #11
                      My term and framebuffer both have 16 colors default.
                      Join us here in 2005 we have so many new features!

                      Term_xtra_react_gcu is where most of the changes are made but they only help if you have more than 16 colors

                      Comment

                      • droof
                        Apprentice
                        • Dec 2013
                        • 71

                        #12
                        Originally posted by Gwarl
                        Join us here in 2005 we have so many new features!

                        Term_xtra_react_gcu is where most of the changes are made but they only help if you have more than 16 colors
                        I just want to make sure my variant works and looks fine on the latest clean Ubuntu install without additional libraries and configuration. It's part of the fun

                        Comment

                        Working...
                        😀
                        😂
                        🥰
                        😘
                        🤢
                        😎
                        😞
                        😡
                        👍
                        👎