Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old September 7, 2013, 22:31   #1
TricksterWolf
Scout
 
Join Date: Sep 2012
Posts: 43
TricksterWolf is on a distinguished road
Sound/Message Use

So, after a lot of headdesk, I think I figured something out.

variable.c defines const char** angband_sound_name, and z-msg.h contains a corresponding enum of const ints. Neither one of these has any description or documentation, but they have to be in perfect sync for the sounds and messages to work properly. Is this correct?

I have no idea how I was supposed to figure this out by myself, and I'm honestly gobsmacked by all the concrete dependencies between separate files with no documentation. I mean, I expect free software source to be bad, but not nearly this bad, particularly given the length of time Angband has been around. Is there something fundamental I'm missing about how to read and interpret the code base?
TricksterWolf is offline   Reply With Quote
Old September 7, 2013, 23:18   #2
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 9,024
Derakon is on a distinguished road
I think what you're missing is that Angband has been around for 20 years and has only ever been worked on by hobbyists, who tend to lack the kind of dedicated energy needed to perform major overhauls of the codebase. Honestly Angband's code is in fantastic shape, considering that. There's a reason there've been so many more variants of Angband than, say, NetHack.

I do sympathise with you though. The code isn't always easy to understand. My best advice is to hang out in the #angband-dev IRC channel on irc.freenode.net and ask for help there. Or post threads in the development forum here. There's really no need to try to go it alone.
Derakon is offline   Reply With Quote
Old September 8, 2013, 01:25   #3
TricksterWolf
Scout
 
Join Date: Sep 2012
Posts: 43
TricksterWolf is on a distinguished road
I appreciate the response and am not trying to criticize (you guys are all awesome srsly), though I did need to vent a bit. I just don't know why:

// Names must match enum order in z-msg.h.

...isn't somewhere around line 245 of variable.c. I'm not requesting a rewrite of the entire code base*, just a clue here or there about where the large, game-destroying dependencies lie. Fortunately, it seems there is a strong correlation between "commonly edited" and "documented", at least, so this isn't popping up in every situation.

* I'd love to rewrite it in Java, but honestly, that would be a bigger project than what I'm currently attempting.
TricksterWolf is offline   Reply With Quote
Old September 8, 2013, 01:27   #4
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 9,024
Derakon is on a distinguished road
We're working on the rewrite. Seriously. That's what Pyrel is -- a rewrite in Python with an eye towards keeping things easy to modify and better-documented. It's a slow process though, especially when developers are short on spare time.
Derakon is offline   Reply With Quote
Old September 8, 2013, 02:03   #5
TricksterWolf
Scout
 
Join Date: Sep 2012
Posts: 43
TricksterWolf is on a distinguished road
Oh, that's fantastic news!

Python is a natural choice for the text version; but with the graphics and sound, wouldn't it be easier to write a platform-independent version in Java...?
TricksterWolf is offline   Reply With Quote
Old September 8, 2013, 02:14   #6
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 9,024
Derakon is on a distinguished road
Java has no inherent advantages in terms of making GUIs compared to Python, and they're both about equally cross-platform.

In any event, 15k lines have been written so far, so I doubt we'll be switching languages.
Derakon is offline   Reply With Quote
Old September 8, 2013, 04:03   #7
TricksterWolf
Scout
 
Join Date: Sep 2012
Posts: 43
TricksterWolf is on a distinguished road
Neat. I'd love to help out sometime after my current project set cools off a bit, if you wouldn't mind.
TricksterWolf is offline   Reply With Quote
Old September 8, 2013, 04:33   #8
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 9,024
Derakon is on a distinguished road
Contributors are welcome. The project is on Bitbucket; the wiki should help get you started. Feel free to ask questions here or on IRC.
Derakon is offline   Reply With Quote
Old September 8, 2013, 14:02   #9
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,947
Donated: $40
takkaria is on a distinguished road
Quote:
Originally Posted by TricksterWolf View Post
I appreciate the response and am not trying to criticize (you guys are all awesome srsly), though I did need to vent a bit. I just don't know why:

// Names must match enum order in z-msg.h.

...isn't somewhere around line 245 of variable.c. I'm not requesting a rewrite of the entire code base*, just a clue here or there about where the large, game-destroying dependencies lie. Fortunately, it seems there is a strong correlation between "commonly edited" and "documented", at least, so this isn't popping up in every situation.
You make a fair point. It is really unclear how the bits can fit together but we are actively working on fixing that so that the bits fit together in a more obvious way and you don't have two lists of the same things in different places. Takes time though!
__________________
takkaria whispers something about options. -more-
takkaria is offline   Reply With Quote
Old September 8, 2013, 14:41   #10
molybdenum
Apprentice
 
Join Date: May 2013
Posts: 84
molybdenum is on a distinguished road
Quote:
Originally Posted by TricksterWolf View Post
Is there something fundamental I'm missing about how to read and interpret the code base?
I've taken to thinking that working on Angband is like playing Angband. Some areas a nice and well lit and others are just nasty mazes filled with things that you should just run away from.

But yeah, it's a tricky code base to learn. Just keep poking around and eventually it will start to make some sense as to how things fit together.
molybdenum is offline   Reply With Quote
Reply

Tags
sound message wat


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
mimic message bug fizzix v4 7 March 26, 2012 23:01
Another amusing message Max Stats Vanilla 4 March 17, 2011 11:06
Reply to which message Timo Pietilš Oook! 1 December 6, 2010 20:39
message display improvements DaviddesJ Vanilla 9 April 3, 2008 10:35
Stange message Diogenes Vanilla 4 October 25, 2007 15:04


All times are GMT +1. The time now is 21:52.


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