![]() |
#11 | |
Veteran
Join Date: Apr 2007
Posts: 1,947
Donated: $40
![]() |
Quote:
__________________
takkaria whispers something about options. -more- |
|
![]() |
![]() |
![]() |
#12 |
Prophet
Join Date: Apr 2007
Location: Seattle, WA
Posts: 6,682
Donated: $40
![]() |
|
![]() |
![]() |
![]() |
#13 |
NPPAngband Maintainer
Join Date: Dec 2008
Location: Stat Gain, Angband
Posts: 926
![]() |
Yes. It would be incredibly difficult to compile or code NPP with anything but QT creator from this point out.
Thanks Takkaria for the suggestion about the directory structure. Once I got everything in the right place, QT made the bundle on its own. Assuming it included all of the dependencies, it should work now.
__________________
NPPAngband current home page: http://nppangband.bitshepherd.net/ Source code repository: https://github.com/nppangband/NPPAngband_QT Downloads: https://app.box.com/s/1x7k65ghsmc31usmj329pb8415n1ux57 |
![]() |
![]() |
![]() |
#14 | |
NPPAngband Maintainer
Join Date: Dec 2008
Location: Stat Gain, Angband
Posts: 926
![]() |
Quote:
__________________
NPPAngband current home page: http://nppangband.bitshepherd.net/ Source code repository: https://github.com/nppangband/NPPAngband_QT Downloads: https://app.box.com/s/1x7k65ghsmc31usmj329pb8415n1ux57 |
|
![]() |
![]() |
![]() |
#15 | |
Prophet
Join Date: Apr 2007
Location: Seattle, WA
Posts: 6,682
Donated: $40
![]() |
I hate to be the one to say it, but I don't think I would want to contribute to that code. The Qt stuff is not well isolated, so a lot of stuff that was handled by simple menus is more complicated now.
It isn't great, but Angband has at least some amount of MVC* abstraction, and it was developing ever so slowly in that direction.** I don't see that plan in the Qt port. Going by what I was familiar with, the knowledge code is something like 3x longer than it is in V, and it is no longer automatic to add new knowledge groups. For example, compare knowledge-monster.c with lines 1048-1325 in V ui-knowledge.c. Similarly compare qt_commands.c with cmd-core.c. In both examples, the controller and view have been separated in V but are now mixed together in the Qt port. And the separation took a lot of effort from various individuals (UnAndrew, Nick, Andrew, "magnate", myself, and many others.) *Model-view-controller. https://en.wikipedia.org/w/index.php...iew-controller ** At least to the extent that unsightly display stuff should be hidden from polite view. Quote:
|
|
![]() |
![]() |
![]() |
#16 |
Knight
Join Date: Dec 2008
Posts: 639
![]() |
I can confirm loading seems to be working now on OSX- I was able to slip the last savefile into the package and it opens on initial and subsequent launches.
I don't have a ton of time now but I'll try to give some UI/gameplay feedback when I have a chance to head back into the dungeon. |
![]() |
![]() |
![]() |
#17 |
Rookie
Join Date: Oct 2014
Posts: 13
![]() |
Using the roguelike keyset here in NPPMoria... when moving the cursor while targeting, vi keys don't seem to work.
|
![]() |
![]() |
![]() |
#18 | |
NPPAngband Maintainer
Join Date: Dec 2008
Location: Stat Gain, Angband
Posts: 926
![]() |
Quote:
The knowledge code is a great example. It is the same code in 5 different places with some re-named variables and slightly different criteria for determining content (terrain, objects, ego items, artifacts, and monsters) It could be done much cleaner and better, but then it would have taken me much longer, especially since I am learning as I go. On the other hand, IMHO the hotkey interface is one of the more pronounced improvements. I also agree there is no way the vanilla code could adopt this as one of its ports. The QT port would be an all-or-nothing venture. The biggest advantage is this: So far, the total # of lines of code unique to a single operation systems is........6. And it works on Windows, OSX, and any Linux OS that supports QT. With a few more optional toolbars the QT port is close to being easier and quicker to play with a mouse than with a keyboard. After that, a version that is playable on an IPad and android tablets, using a complete touchscreen interface. Then hopefully a new audience of players for Angband who would have never given it a chance with the old UI.
__________________
NPPAngband current home page: http://nppangband.bitshepherd.net/ Source code repository: https://github.com/nppangband/NPPAngband_QT Downloads: https://app.box.com/s/1x7k65ghsmc31usmj329pb8415n1ux57 |
|
![]() |
![]() |
![]() |
#19 | |
Prophet
Join Date: Apr 2007
Location: Seattle, WA
Posts: 6,682
Donated: $40
![]() |
I totally see the benefit of Qt. My complaint is that the Q* stuff is showing up where I would least expect it. My recommendation would have been be to first write a main-qt.c file, then start taking chunks out by replacing the stat panel, rewriting ui-menu.c for Qt menus, character page, etc. Study up on MVC (or more properly MVP) and see how your application can benefit from the idea. As an example of a negative result, your changes have pretty much guaranteed that html dump files broken, and will be painful to re-implement.
The old view was just a grid that automatically displayed grid elements. This was hugely useful for basic cave features. It's not so good for menus and the stats panel. So figure out how to break those out of the grid view. Take a look at what Andrew Doull (UnAndrew) has done with UnAngband. He has done a lot of the work in a very clean manner. And I see from his blog page that he just made a new release, though GitHub does not reflect it. Quote:
|
|
![]() |
![]() |
![]() |
#20 | ||||
NPPAngband Maintainer
Join Date: Dec 2008
Location: Stat Gain, Angband
Posts: 926
![]() |
Quote:
Quote:
Quote:
Quote:
As for separating the It is impractical to separate the view and the controller code because in Qt they are one and the same. The whole game is event-driven. Part of the process of creating a widget the player sees onscreen is to add the commands for what to do when the player interacts with the widget. As an example: Here is the code from inside the loop that adds the birth option checkboxes to the birth screen: Code:
QCheckBox *this_checkbox = new QCheckBox(opt_ptr->description); this_checkbox->setChecked(op_ptr->opt[idx]); this_checkbox->setToolTip(get_help_topic(QString("option_info"), opt_ptr->name)); group_options->addButton(this_checkbox, idx); return_layout->addWidget(this_checkbox); connect(group_options, SIGNAL(buttonClicked(int)), this, SLOT(option_changed(int))); The setToolTip command instructs the game what to display during a mouse hover . in this case, the option description from the help menus. (Another view command) Group_options is a single command for all the checkboxes (Controller). The connect command a couple lines down links together the core code, the view, and the controller. The game gives off a SIGNAL when the checkbox is clicked, which instructs the game to run the command listed in the SLOT (the controller). The SLOT command must be part of the same class as the widget to which it is connected. The option_changed function interacts with the core code to change the option. Finally, the return_layout command in an instruction for where on the dialog box the widget appears. Qt takes care of everything else, such as waiting or inputs, checking/unchecking the box or deciding if the mouse is hovering over the widget. To break that code apart defeats the whole purpose of Qt. I might be completely missing your point. Again, my knowledge of coding and computers is a small fraction of the members of the devteam.
__________________
NPPAngband current home page: http://nppangband.bitshepherd.net/ Source code repository: https://github.com/nppangband/NPPAngband_QT Downloads: https://app.box.com/s/1x7k65ghsmc31usmj329pb8415n1ux57 |
||||
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Announce] NPPAngband and NPPMoria 8.0.0 (Qt Port) released | nppangband | Variants | 28 | January 25, 2016 22:46 |
NPPAngband/NPPMoria QT port | nppangband | Variants | 109 | November 14, 2015 02:18 |
Final NPPMoria and NPPAngband 7.1.0 released | nppangband | Variants | 8 | January 30, 2014 10:55 |
Final NPPMoria and NPPAngband 7.0.0 released! | nppangband | Variants | 34 | September 6, 2013 22:21 |
NPPAngband and NPPMoria 7.0.0 beta-1 released! | nppangband | Variants | 15 | May 9, 2013 21:26 |