Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old January 10, 2010, 22:58   #1
billiam106
Rookie
 
Join Date: Jan 2010
Posts: 4
billiam106 is on a distinguished road
Help for a Newbie Programmer

Hello Angband community! I'm hoping to get a little help with working with the Angband source code. I have a rudimentary knowledge of C, so really all I need is a push in the right direction.

I've been a long time player, and I *really* enjoy OoD monsters/pits/vaults. They are to me the type of thing that keeps me coming back. So imagine my dismay when I finally get around to upgrading to the newest version of Angband, and there is no autoscummer!

I know a lot of people don't like it, but I would like to ask for some help in hacking it back in there -- Is the level autoscumming code still floating around somewhere?

I run a mac with xcode installed, and I'm pretty sure I can compile Angband that way (I don't really want to install code warrior). So here is what I'm asking you fine fellow Angband-ers

1) A link (or perhaps an email including) the scumming code
2) A hint of where/how to put it in. I'm fairly sure it goes in the generate.c, but clarification on this would be awesome
3) A quick explanation of if/how to use the makefile. I've read some of the stuff on how to compile Angband, but it is all with CodeWarrior, so perhaps an xcode explanation would be rad.

Or maybe one of you fearless coders has already done all this and can send me a version! Who knows.

Anyway, THANKS!!! This is a sort of needy first post, and I appreciate any and all help
billiam106 is offline   Reply With Quote
Old January 10, 2010, 23:43   #2
tummychow
Apprentice
 
Join Date: Sep 2009
Posts: 93
tummychow is on a distinguished road
I'm sure you can find it if you look in back builds on rephial's code repository.
By the way, Angband is done in C++, and advanced C++ at that. C++ is far beyond C in nature and, in addition, Angband implements a heavy dose of curses (at least for windows, but probably also for mac). (I program C++ in my spare time and let me tell you, curses is at least upper-mid-level.) If your programming knowledge really reaches that deep into C++, I believe you can find the code for current versions pretty easily. The old code however I'm not sure where to find. This directory, whose purpose I cannot quite ordain, might be of service: http://trac.rephial.org/browser
tummychow is offline   Reply With Quote
Old January 10, 2010, 23:44   #3
konijn_
Hellband maintainer
 
konijn_'s Avatar
 
Join Date: Jul 2007
Location: New York, the Big Apple
Age: 40
Posts: 351
Donated: $120
konijn_ is on a distinguished road
Quote:
Originally Posted by billiam106 View Post
<big snip>

Anyway, THANKS!!! This is a sort of needy first post, and I appreciate any and all help
Greetings & Welcome,

since you love the 'unusual rooms' I would not put in the scum patch, but consider changing the DUN_UNUSUAL constant.

If you look at the following statement in generate.c

/* Attempt an "unusual" room */
if (randint0(DUN_UNUSUAL) < p_ptr->depth)

In current angband DUN_UNUSUAL is 200, reducing this constant will give you more special rooms, or you replace p_ptr->depth with a constant, whatever suits you.

I don't know how to build within XCode, but from the command line,
Code:
make -fmakefile.osx
should work.

Cheers,
T.
__________________
* Are you ready for something else ? Hellband 0.8.7 is out! *
konijn_ is offline   Reply With Quote
Old January 11, 2010, 00:21   #4
billiam106
Rookie
 
Join Date: Jan 2010
Posts: 4
billiam106 is on a distinguished road
konijn: GREAT idea!! I fiddled with that and now Angband is creating some truly devilish rooms *cackles*

thanks!
billiam106 is offline   Reply With Quote
Old January 11, 2010, 00:37   #5
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 4,345
Donated: $40
Pete Mack is on a distinguished road
Also, use:
$ make -f Makefile.osx OPT=-g
for debug symbols. (Debugger won't work fully without them.)
Pete Mack is offline   Reply With Quote
Old January 11, 2010, 00:57   #6
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 52
Posts: 6,702
Donated: $60
Nick is on a distinguished road
Quote:
Originally Posted by tummychow View Post
By the way, Angband is done in C++, and advanced C++ at that.
No, it's all C.
__________________
One Ring to rule them all, One Ring to find them,
One Ring to bring them all and in the darkness bind them.
Nick is offline   Reply With Quote
Old January 11, 2010, 01:03   #7
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 4,345
Donated: $40
Pete Mack is on a distinguished road
@Nick: whoosh.
Pete Mack is offline   Reply With Quote
Old January 11, 2010, 01:05   #8
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 52
Posts: 6,702
Donated: $60
Nick is on a distinguished road
Quote:
Originally Posted by Pete Mack View Post
@Nick: whoosh.
Twice, apparently...
__________________
One Ring to rule them all, One Ring to find them,
One Ring to bring them all and in the darkness bind them.
Nick is offline   Reply With Quote
Old January 11, 2010, 02:03   #9
konijn_
Hellband maintainer
 
konijn_'s Avatar
 
Join Date: Jul 2007
Location: New York, the Big Apple
Age: 40
Posts: 351
Donated: $120
konijn_ is on a distinguished road
Quote:
Originally Posted by Pete Mack View Post
Also, use:
$ make -f Makefile.osx OPT=-g
for debug symbols. (Debugger won't work fully without them.)
Actually, I would use -ggdb.
Without it I could not attach XCode to the process, YMMV.

T.
__________________
* Are you ready for something else ? Hellband 0.8.7 is out! *
konijn_ is offline   Reply With Quote
Old January 11, 2010, 02:08   #10
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 4,345
Donated: $40
Pete Mack is on a distinguished road
@konijn - Didn't know about that one.

You can also make an XCode project, so long as you use the same -D and -I flags as in Makefile.osx (the link flags too, though XCode will give most of those by default.)
Pete Mack is offline   Reply With Quote
Reply

Tags
autoscummer, hack, source code, vanilla


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
Help a newbie konijn_ Development 7 January 2, 2010 22:15
Newbie question konijn_ Development 2 December 5, 2009 03:00
Newbie Player - Need Help hotbeef Vanilla 26 October 31, 2009 08:18
Programmer wanted... buzzkill Development 10 October 3, 2009 06:03
Newbie mage... Azoth Vanilla 16 June 17, 2009 19:58


All times are GMT +1. The time now is 20:14.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.