Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old November 9, 2019, 09:55   #11
backwardsEric
Swordsman
 
Join Date: Aug 2019
Posts: 434
backwardsEric is on a distinguished road
Quote:
Originally Posted by Nick View Post
I've filed this as a bug, but I have some doubts about my ability to resolve it (most of the work on the Mac port has been done by other people). I'm also finding the Mac port generally a bit laggy and unstable; I will have a look at this some time, but I can't promise when.
The "overdraw cache" used currently does have the potential to render the same grid location multiple times depending on how many times text_hook is invoked to update a row. When porting the Cocoa interface to Hengband, the "overdraw cache" didn't work so I used an approach of noting the changes requested by the text_hook, pict_hook, and wipe_hook calls but did all the actual drawing when xtra_hook was called with TERM_XTRA_FRESH. Putting those changes back into Angband makes the drawing somewhat more efficient - at least according to profiling results of a half-troll warrior blundering around 650'-1000'. Though, for me, both stock 4.2.0 and the modified version felt good enough on the hardware I have.

The changes to main-cocoa.m, from git format-patch, are attached. They do have the disadvantage of taking up more screen real estate to show the same information: the rectangle for one grid location will typically be two pixels wider and taller than in 4.2.0. The changes also don't do anything to address the request to allow the tile size to be separated from the text size.

The profiling results are below. All used an 80 x 24 main window in 13 pt Verdana Bold along with message and inventory windows, both in 10 pt Verdana Bold. The show_target and hp_changes_color display options were on; other system-independent display options were off. The hardware was an early 2015 MacBook Pro (13' Retina, Intel Iris Graphics 6100). The XCode Instruments, either Counters or Time Profiler, were run with the default options. No attempt was made to keep the rendered content the same between runs - the half-troll warrior got progressively deeper in the dungeon and acquired better light sources and telepathy along the way.

Code:
                                         % of total time in Term_fresh() and its children
Instrument        Tiles       Run#       4.2.0  Modified
Counters          None        1          19.7%  11.2%
Counters          None        2          22.0%  13.8%
Counters          Original    1          22.2%  17.8%
Time Profiler     None        1          21.2%  18.1%
Attached Files
File Type: zip updated-cocoa-rendering-patch.txt.zip (11.3 KB, 234 views)
backwardsEric is offline   Reply With Quote
Old November 9, 2019, 11:58   #12
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 58
Posts: 9,561
Donated: $60
Nick will become famous soon enoughNick will become famous soon enough
Quote:
Originally Posted by backwardsEric View Post
The changes to main-cocoa.m, from git format-patch, are attached. They do have the disadvantage of taking up more screen real estate to show the same information: the rectangle for one grid location will typically be two pixels wider and taller than in 4.2.0. The changes also don't do anything to address the request to allow the tile size to be separated from the text size.
Thanks, I'll add those in some time.

While I have the attention of someone with current macOS programming knowledge - I don't suppose you have any idea why the lore.txt and window.prf files are filing to rewrite on Catalina, do you? I suspect it's not liking writing lore.txt.new when lore.txt already exists, but am not sure. I think I have a couple of ideas for a workaround, but any extra info would help.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old November 9, 2019, 20:12   #13
backwardsEric
Swordsman
 
Join Date: Aug 2019
Posts: 434
backwardsEric is on a distinguished road
Quote:
Originally Posted by Nick View Post
While I have the attention of someone with current macOS programming knowledge - I don't suppose you have any idea why the lore.txt and window.prf files are filing to rewrite on Catalina, do you? I suspect it's not liking writing lore.txt.new when lore.txt already exists, but am not sure. I think I have a couple of ideas for a workaround, but any extra info would help.
This documentation, https://developer.apple.com/document...?language=objc
, has some discussion about what's implicitly allowed for access in ~/Documents and what will trigger a user prompt. The Info.plist key that's described there is listed as optional so I doubt that its absence in Angband's Info.plist is causing the problem. The console messages could indicate which file access is getting blocked (i.e. whether it's writing the *.new version or the renaming) and why a user prompt to allow access doesn't appear. I haven't installed Catalina so that's all the possibly useful information I have.
backwardsEric is offline   Reply With Quote
Old November 9, 2019, 20:20   #14
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 58
Posts: 9,561
Donated: $60
Nick will become famous soon enoughNick will become famous soon enough
Quote:
Originally Posted by backwardsEric View Post
This documentation, https://developer.apple.com/document...?language=objc
, has some discussion about what's implicitly allowed for access in ~/Documents and what will trigger a user prompt. The Info.plist key that's described there is listed as optional so I doubt that its absence in Angband's Info.plist is causing the problem. The console messages could indicate which file access is getting blocked (i.e. whether it's writing the *.new version or the renaming) and why a user prompt to allow access doesn't appear. I haven't installed Catalina so that's all the possibly useful information I have.
Thanks, that helps
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old November 10, 2019, 05:29   #15
mrfy
Swordsman
 
Join Date: Jul 2015
Location: Seattle, WA
Posts: 316
mrfy is on a distinguished road
I still have Catalina installed so if you need me to try something, let me know.
mrfy is offline   Reply With Quote
Reply

Tags
font size, graphics, text size, tiles


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
v4 osx crash saarn v4 5 June 19, 2012 15:50
Cocoa build on OSX Derakon Development 9 December 21, 2011 23:33
getting started on OSX cinereaste Development 8 August 6, 2010 04:13
OSX Tileset help? ZorroRoaster Variants 1 March 31, 2009 00:09
Graphics glitch in OSX version willpax Vanilla 5 January 15, 2009 15:07


All times are GMT +1. The time now is 01:12.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.