Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old September 9, 2011, 05:52   #1
BreathesFire
Rookie
 
Join Date: Aug 2011
Posts: 9
BreathesFire is on a distinguished road
New to Angband programming

I've played this game since 2.9.x, enjoyed it (almost beat it =p), and I am interested in contributing. I actually can code, but after viewing the size and scope of the bug tracker and source code, it's a little overwhelming. Is there a good place to start? I haven't found any master design or flow documentation.

I have a bunch more questions as well:

1- Does angband implement threading? I've noticed multi-hue monsters have an option to flicker, and actions can have delay intervals, which would suggest it exists
2- What exactly is going on in Makefile.inc? The for loop in particular. I'm new to makefiles (sheltered by IDEs, I know), and I just couldn't figure this code out.
3- Is there a way to run the MingGW shell, cd, and run makefile all within an editor such as NotePad++?
3b- Should I just work and compile in MSVS?
4- Should I be concerned with AngbandBase?
5- If I wanted to access the game fonts, should I be looking at the lib/xtra/font files, or should I be looking elsewhere?
6- Let's pretend I am overambitious and want to build a opengl "port" of the game. Should I be hacking apart z-term.c or should I be working a layer underneath?
7- Do the "z-" files denote something important?
8- How does the GNU GPL interact with the Tolkien part of this game?
9- How do you beat Sauron without pillar dancing?
10- Is the codebase attempting to switch to OO design?

Sorry to bother anyone!
BreathesFire is offline   Reply With Quote
Old September 9, 2011, 06:01   #2
fizzix
Prophet
 
Join Date: Aug 2009
Location: Madison, Wisconsin, US
Posts: 3,002
fizzix is on a distinguished road
Quote:
Originally Posted by BreathesFire View Post
I've played this game since 2.9.x, enjoyed it (almost beat it =p), and I am interested in contributing. I actually can code, but after viewing the size and scope of the bug tracker and source code, it's a little overwhelming. Is there a good place to start? I haven't found any master design or flow documentation.

I have a bunch more questions as well:

1- Does angband implement threading? I've noticed multi-hue monsters have an option to flicker, and actions can have delay intervals, which would suggest it exists
2- What exactly is going on in Makefile.inc? The for loop in particular. I'm new to makefiles (sheltered by IDEs, I know), and I just couldn't figure this code out.
3- Is there a way to run the MingGW shell, cd, and run makefile all within an editor such as NotePad++?
3b- Should I just work and compile in MSVS?
4- Should I be concerned with AngbandBase?
5- If I wanted to access the game fonts, should I be looking at the lib/xtra/font files, or should I be looking elsewhere?
6- Let's pretend I am overambitious and want to build a opengl "port" of the game. Should I be hacking apart z-term.c or should I be working a layer underneath?
7- Do the "z-" files denote something important?
8- How does the GNU GPL interact with the Tolkien part of this game?
9- How do you beat Sauron without pillar dancing?
10- Is the codebase attempting to switch to OO design?

Sorry to bother anyone!
I can't answer nearly all of your questions, but I can answer two of them.
3. I don't know about running MinGW from notepad++, but I do all my programming in Notepad++ and compile with MinGW in the command line with the windows Makefile. The only problem (and it may be a killer) is that I can't get debug tools to work with MinGW. Of course, if you succeed with this, I'd love to know how you did it.
9. Have enough healing. Sauron wastes a lot of moves with stupid spells that don't hurt you much, like fireballs. If you have enough healing you can heal when he manastorms you. Also, you'll need to deal with the summons, but there are plenty of ways to do that.
fizzix is offline   Reply With Quote
Old September 9, 2011, 07:32   #3
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 8,918
Derakon is on a distinguished road
Nobody's trying to switch to an OO design at the moment. That'd be a monumental task, and if you're going to go to that much effort you might as well simply rewrite the game in a friendlier language -- an effort that's been started probably a dozen times now and never really made it all that far. Sorry.
Derakon is offline   Reply With Quote
Old September 9, 2011, 12:21   #4
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,057
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
Quote:
Originally Posted by BreathesFire View Post
I've played this game since 2.9.x, enjoyed it (almost beat it =p), and I am interested in contributing. I actually can code, but after viewing the size and scope of the bug tracker and source code, it's a little overwhelming. Is there a good place to start? I haven't found any master design or flow documentation.
Welcome - I hope you get to the stage of enjoying adding some code. There's no master design or flow documentation because the code has evolved over >20 years, and its original authors had no idea what it would become. There is a group of people who hang out on #angband-dev at irc.freenode.net - few of us know every single quirk but between us we have a pretty good knowledge of how the code fits together. If you are happy to use IRC, please drop by. Was there are particular aspect of the game you were interested in improving?
Quote:
1- Does angband implement threading? I've noticed multi-hue monsters have an option to flicker, and actions can have delay intervals, which would suggest it exists
2- What exactly is going on in Makefile.inc? The for loop in particular. I'm new to makefiles (sheltered by IDEs, I know), and I just couldn't figure this code out.
3- Is there a way to run the MingGW shell, cd, and run makefile all within an editor such as NotePad++?
3b- Should I just work and compile in MSVS?
4- Should I be concerned with AngbandBase?
5- If I wanted to access the game fonts, should I be looking at the lib/xtra/font files, or should I be looking elsewhere?
6- Let's pretend I am overambitious and want to build a opengl "port" of the game. Should I be hacking apart z-term.c or should I be working a layer underneath?
7- Do the "z-" files denote something important?
8- How does the GNU GPL interact with the Tolkien part of this game?
9- How do you beat Sauron without pillar dancing?
10- Is the codebase attempting to switch to OO design?
1. I don't think so, but I'm not an expert on this - the flicker option was added recently by d_m (last year or two), so he can give more info, but I don't think it uses threading, just waits for a keypress. The delay factor is solely to do with animations, and I'm pretty sure that doesn't involve threading.

2. AFAIK Makefile.inc is used only by the OSX build - almost all the others use Makefile.src. The primary OSX dev is myshkin, who may be able to explain what's going on in Makefile.inc.

Can't help with 3. as I don't use Windows.

4. Not at the moment. At the moment AngbandBase is derived from V and offered as a quickstart for variants. Personally I think it would be good in future if AngbandBase was developed first and V followed, but not sure when or how that shift would happen.

5. Yes, the fonts are all in lib/xtra/font. The exception is the X11 port, which uses X-windows system fonts (ugh). But note that both the X11 and GTK ports should be going soon - both are on borrowed time (and have no champion).

6. You arrive in the midst of takkaria's ambition to split the UI from the core game completely - see this article for more details. The layers are not yet properly split, so you would need to help work on that before you could easily build an opengl front-end. If you were impatient, you could just try writing main-gl.c instead ...

7. Yes, they are all intended to define a set of underlying mechanisms rather than aspects of the game itself. Theoretically you could rip them all out, replace them with completely different functions doing the same things, and the gameplay would be the same.

8. My understanding is that there is no official Tolkein connection, nor any official D&D connection. Both are obvious significant influences on the game, but no licensing or copyright adventures have ever been undertaken (c.f. the change from PernAngband to ToME to ToME4 because of copyright hassle). If there are copyright restrictions on using names like Sauron and Morgoth, nobody has bothered enforcing them for the last twenty years. The game is now entirely GPL, though it is dual-licenced for the benefit of variants which require the original pre-GPL licence. Note that certain additional resources are non-GPL (in particular Dubtrain's sound pack uses CC-BY-NC-SA, and Shockbolt's tiles will too).

9. At the moment he's still vulnerable to acid, so hitting him over the head enough times with a Scythe of Slicing of Acid usually does the trick.

10. Not systematically, no. Our current ambition is to move from static arrays to linked lists, which perhaps shows you how far we have to go.

Good luck - and please feel free to ask more questions!
__________________
"3.4 is much better than 3.1, 3.2 or 3.3. It still is easier than 3.0.9, but it is more convenient to play without being ridiculously easy, so it is my new favorite of the versions." - Timo Pietila
Magnate is offline   Reply With Quote
Old September 9, 2011, 13:30   #5
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,936
Donated: $40
takkaria is on a distinguished road
Quote:
Originally Posted by Derakon View Post
Nobody's trying to switch to an OO design at the moment. That'd be a monumental task, and if you're going to go to that much effort you might as well simply rewrite the game in a friendlier language -- an effort that's been started probably a dozen times now and never really made it all that far. Sorry.
Hmm, while I wouldn't say we're trying to switch to an OO design, code refactorings are certainly moving in that direction, slowly.
__________________
takkaria whispers something about options. -more-
takkaria is offline   Reply With Quote
Old September 9, 2011, 15:41   #6
d_m
Angband Devteam member
 
d_m's Avatar
 
Join Date: Aug 2008
Location: Philadelphia, PA, USA
Age: 39
Posts: 1,516
d_m is on a distinguished road
Quote:
Originally Posted by BreathesFire View Post
1- Does angband implement threading? I've noticed multi-hue monsters have an option to flicker, and actions can have delay intervals, which would suggest it exists
No we aren't using threading for this. The way I implemented flickering was to use "half blocking" for keypresses, and update flickering monsters in-between those intervals (so e.g. every 100ms or so it stops waiting, updates display, goes back to waiting for key press).

Quote:
Originally Posted by BreathesFire View Post
6- Let's pretend I am overambitious and want to build a opengl "port" of the game. Should I be hacking apart z-term.c or should I be working a layer underneath?
This would be awesome!

For starters, I would just try to implement something like main-sdl.c but using your GL library (e.g. Glut) for graphics.

If (or really, when) you hit points where you can't do the things you want, you'll then want to burrow down and refactor the underlying z-term code (as well as possibly other code) to allow the flexibility you want.

While Takkaria does have a UI upgrade planned, I personally would not wait on that if I had a good idea for a new front-end. In fact, having an ambitious front-end design goal would probably help guide/motivate that refactor itself.

Quote:
Originally Posted by BreathesFire View Post
10- Is the codebase attempting to switch to OO design?
No, not so far. The current movement (at least from my POV) is really toward "modern" software design. That is, reducing the number of global variables, enforcing something like the Law of Demeter, reducing the degree to which developers must "keep in their heads" the dependencies between seemingly unrelated things, etc.

The old design requires a lot of setting variables in concert, knowing exactly when certain functions need to be called to recalculate things, etc. The goal is to move to a world where a developer doesn't need to know these things, but rather can look at an API and figure out which function to call to effect the desired outcome.

We're simultaneously trying to reduce the total number of lines of code, improve documentation, and add exciting features. What could possibly go wrong?

Quote:
Originally Posted by BreathesFire View Post
Sorry to bother anyone!
Not at all. Thanks for asking. As Magnate said, if you use IRC come hang out in #angband-dev on Freenode and you can ask more questions in real time!
__________________
linux->xterm->screen->pmacs
d_m is offline   Reply With Quote
Old September 9, 2011, 20:07   #7
nppangband
NPPAngband Maintainer
 
Join Date: Dec 2008
Location: Stat Gain, Angband
Posts: 926
nppangband is on a distinguished road
Quote:
Originally Posted by d_m View Post
No we aren't using threading for this. The way I implemented flickering was to use "half blocking" for keypresses, and update flickering monsters in-between those intervals (so e.g. every 100ms or so it stops waiting, updates display, goes back to waiting for key press).
@d_m - by the way, when I put the flicker monsters feature in NPP, I couldn't find any any code changes for the mac port (main.crb). It that not supported at this time, or did somebody eventually figure out how to do it?
nppangband is offline   Reply With Quote
Old September 9, 2011, 20:15   #8
d_m
Angband Devteam member
 
d_m's Avatar
 
Join Date: Aug 2008
Location: Philadelphia, PA, USA
Age: 39
Posts: 1,516
d_m is on a distinguished road
Quote:
Originally Posted by nppangband View Post
@d_m - by the way, when I put the flicker monsters feature in NPP, I couldn't find any any code changes for the mac port (main.crb). It that not supported at this time, or did somebody eventually figure out how to do it?
Honesty I think I forgot to do it. Shameful!

I will let you know when I get main-cocoa and main-crb fixed.
__________________
linux->xterm->screen->pmacs
d_m is offline   Reply With Quote
Old September 9, 2011, 21:15   #9
nppangband
NPPAngband Maintainer
 
Join Date: Dec 2008
Location: Stat Gain, Angband
Posts: 926
nppangband is on a distinguished road
Quote:
Originally Posted by d_m View Post
Honesty I think I forgot to do it. Shameful!

I will let you know when I get main-cocoa and main-crb fixed.
I haven't tried to create a cocoa port of NPP. When was that created? It wasn't in Angband 3.1.2v2.

Thanks, and I hope your home is on high ground & not underwater these days.
nppangband is offline   Reply With Quote
Old September 10, 2011, 01:33   #10
Max Stats
Swordsman
 
Join Date: Jun 2010
Posts: 324
Max Stats is on a distinguished road
Quote:
Originally Posted by BreathesFire View Post
9- How do you beat Sauron without pillar dancing?
For me, I usually choose a missile weapon with extra shots combined with acid-branded ammo. This usually at least gets him softened up.
Max Stats is offline   Reply With Quote
Reply


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
Reviving Iso-Angband, an isometric view addon for Angband Hajo Development 111 August 3, 2014 20:44
Windows Programming Question Kyle Development 5 July 29, 2009 04:52
Morgothian programming language zaimoni Idle chatter 2 April 22, 2009 10:26


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


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