Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old January 5, 2008, 21:29   #1
momo125
Scout
 
Join Date: May 2007
Posts: 42
momo125 is on a distinguished road
C Language

I am not a programmer and have no experience. What is the easiest way to get into hacking the code. I understand how to change the edit files, but not the exe or source code
momo125 is offline   Reply With Quote
Old January 5, 2008, 22:35   #2
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,860
Donated: $60
Nick will become famous soon enough
It's best to have some game feature in mind when you start. Then if you search the source files for messages related to that, you can find where the relevant section of code is and start focusing on that. You will have to learn a bit of C at some point, but that will be easier if you have goals to understand specific bits of the game code.
__________________
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 January 6, 2008, 12:43   #3
momo125
Scout
 
Join Date: May 2007
Posts: 42
momo125 is on a distinguished road
I guess what I really need to know is what program to open the source.
momo125 is offline   Reply With Quote
Old January 6, 2008, 13:36   #4
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,860
Donated: $60
Nick will become famous soon enough
If you look at the first post in this thread, it has reasonably thorough (and mildly humorous) instructions for how to set up a compile environment, download source and compile in Windows. If you use Windows, this is probably what you want. If you use linux, you can just open stuff in your favorite text editor. I'm not sure about OSX, but something called xcode rings a bell.

Hope this helps; I (and other people) can give more info as you need it.
__________________
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 January 6, 2008, 17:03   #5
camlost
Sangband 1.x Maintainer
 
camlost's Avatar
 
Join Date: Apr 2007
Posts: 522
camlost is on a distinguished road
C source code files are stored as ascii text. You can open them in wordpad or notepad, but a programming editor would be vastly better suited, as they have lots of nice features for programming (including automatic coloring and/or indenting).

Another source for learning how to compile the angband source can be found here:
http://www.thangorodrim.net/compiling.html
__________________
a chunk of Bronze {These look tastier than they are. !E}
3 blank Parchments (Vellum) {No french novels please.}
camlost is offline   Reply With Quote
Old January 7, 2008, 18:48   #6
Daven_26d1
Adept
 
Daven_26d1's Avatar
 
Join Date: Jun 2007
Location: North of England.
Posts: 211
Daven_26d1 is on a distinguished road
When I used to program on Windows, I was fond of a text editor called Editplus 2.

It did all those neat tricks like syntax highlighting, function folding and control structure auto-completion, that us modern programmers feel naked without.
I found it very easy to use, and the features didn't get in my way until I wanted to learn to use them. Beyond all this, it loaded in about 1/10 of the time that Word did.

Looking about the internet, a shareware version still appears to be available for download.

As for C programming advice, a very popular beginners guide can be found here:

http://beej.us/guide/bgc/

Not my cup of tea, personally; I'd rate it as OKish, but then I wasn't a beginner when I looked at it.
Too many of my peers (who did read it when they started out with C) have raved about its value for me to ignore its potential use to you.

To reiterate Nick's point - have a goal in mind when you start reading the sources.
__________________
You sold a Broken Sword (1d2) (-2,-4) {average} (j) for 1 gold.
The shopkeeper howls in agony!
You say "Dude, the clue is in the name...".
Daven_26d1 is offline   Reply With Quote
Old January 29, 2008, 18:07   #7
strangeintp
Rookie
 
Join Date: Jan 2008
Posts: 13
strangeintp is on a distinguished road
Quote:
Originally Posted by momo125 View Post
I am not a programmer and have no experience. What is the easiest way to get into hacking the code. I understand how to change the edit files, but not the exe or source code
Step one: get a primer on C programming.
Step two: learn how to program.
Step three: hack Angband.
strangeintp is offline   Reply With Quote
Old February 26, 2008, 07:04   #8
priji
Rookie
 
Join Date: Feb 2008
Posts: 5
priji is on a distinguished road
I have no experience in the c language . i heard this language is one of the greatest computer languages. Its very powerful, simple to use and works lightning fast.C is an High level Programming language.
priji is offline   Reply With Quote
Old February 26, 2008, 09:37   #9
s0be
Apprentice
 
Join Date: Jan 2008
Posts: 96
s0be is on a distinguished road
The angband source is a good place to start hacking C. The code is pretty clean, and doesn't use a lot of fancy hand waving tricks.
s0be is offline   Reply With Quote
Old February 26, 2008, 12:10   #10
K.I.L.E.R
Apprentice
 
Join Date: May 2007
Posts: 56
K.I.L.E.R is on a distinguished road
Does it need to? lol
K.I.L.E.R 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


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


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