language?

Error message

Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /var/www/pied-piper.ermarian.net/includes/common.inc).

Pages

AuthorTopic: language?
Apprentice
Member # 2509
Profile #0
Does anyone know what language Jeff used to write the avernum games? Or is it a combination of several? I ask because i am just starting to get into learning how to write applications and so on, and was wondering if something like avernum can be done in C, or Objective-C
Posts: 9 | Registered: Sunday, January 19 2003 08:00
Law Bringer
Member # 335
Profile Homepage #1
Jeff's advice on shareware development indicates that he uses C++, or did as of the time he wrote it. Geneforge and Avernum use a scripting language that also closely resembles C++.

—Alorael, who would take that as good enough circumstancial evidence. If you email Jeff and ask you might get a more conclusive answer, but speculation is fun too.
Posts: 14579 | Registered: Saturday, December 1 2001 08:00
Off With Their Heads
Member # 4045
Profile Homepage #2
I can't find a good place where he talks about how he codes, but he primarily uses C (and I think a bit of C++). He uses Codewarrior Gold for Macs, I believe, and, er, well, the best I could come up with was his statement on this thing.

But yes, he uses C.

Ack, Alorael got there first.

EDIT: As a sidenote, Arenax claimed that as he was looking through the BoA Editor source code, he noticed that at some point Jeff had actually switched from C to C++. Has anyone else observed this?

[ Sunday, December 12, 2004 18:17: Message edited by: Kelandon ]

--------------------
Arancaytar: Every time you ask people to compare TM and Kel, you endanger the poor, fluffy kittens.

Kelandon's Pink and Pretty Page!!: the authorized location for all things by me
The Archive of all released BoE scenarios ever
Posts: 7968 | Registered: Saturday, February 28 2004 08:00
Apprentice
Member # 2509
Profile #3
hey thanks that link is helpful
Posts: 9 | Registered: Sunday, January 19 2003 08:00
Shock Trooper
Member # 4557
Profile #4
quote:
Originally written by Kelandon:


EDIT: As a sidenote, Arenax claimed that as he was looking through the BoA Editor source code, he noticed that at some point Jeff had actually switched from C to C++. Has anyone else observed this?

Jeff's code in the BoA Editor is, I'd say, 99% C-Style programming. He does use classes, which is a C++ thing, but does very little with them. There is no inheritence of any kind, no evident templating and not one of his classes goes so far to include a copy constructor.

Of course this is just his editor. Jeff says in the source code this was a heavily modified version of the old BoE editor, and that if he would do it again, the source would look nothing like what it does now. Taking this into account, I seriously doubt he did his newer games in anything but C++ ( or some other OO language ). If done in C, projects that big would make for some incredibly messy code.

[ Sunday, December 12, 2004 18:58: Message edited by: KernelKnowledge12 ]
Posts: 264 | Registered: Wednesday, June 16 2004 07:00
Guardian
Member # 2238
Profile Homepage #5
Uhh, Jeff clearly uses English.

Ok sorry... couldn't resist.

--------------------
The critics agree!

Demonslayer is "a five star hit!" raves TIMES Weekly!

"I've never heard such thoughtful comments. This man is a genious!" says two-time Nobel Prize winning physicist Erwin Rasputin!
Posts: 1582 | Registered: Wednesday, November 13 2002 08:00
BANNED
Member # 5219
Profile #6
As he lives in the USA and his website is all english. :) :) :)
^^^stating the obvious :D

--------------------
You can take my Windows XP when you pry my cold, dead fingers off the mouse!
Posts: 394 | Registered: Saturday, November 20 2004 08:00
Law Bringer
Member # 335
Profile Homepage #7
The joke was worth a guilty snicker and a glare, if that. (Incidentally, I appreciate it, but I am aware that my sense of humor has been deemed criminal in come circles.) The explanation of the joke doesn't get the snicker at all.

—Alorael, who has nothing to add to make this post relevant. Carry on with your pre-grouching business.
Posts: 14579 | Registered: Saturday, December 1 2001 08:00
Shock Trooper
Member # 5181
Profile Homepage #8
It's C, but using a lot of C++ syntax and coding.

Like what's been already said, he uses classes, but none of their extra features. I can't find fault in that--I do the same--but the problem is that his code is so friggin' ugly.

Commenting and Jeff seem to be at odds through some of his editor code.
Posts: 262 | Registered: Thursday, November 11 2004 08:00
Warrior
Member # 5091
Profile #9
Why would you use classes if you aren't using their features? Why not just use structs?
Posts: 180 | Registered: Friday, October 15 2004 07:00
Shock Trooper
Member # 4557
Profile #10
In C++, and in, I'm guessing, all modern C++ compilers, structs and classes are interchangeable. Anything a class can do, a struct can do (although there might be something I'm overlooking). I'm pretty sure this feature of C++ is mainly used for creating C compliant code with optional OO functionality. (DirectX does this). Because of this, the choice between using a class or a struct is mainly just a keyword choice. For me, adding OO functionality to a struct is just odd.
Posts: 264 | Registered: Wednesday, June 16 2004 07:00
Warrior
Member # 5091
Profile #11
Mostly true. Only semantic difference is that class members are private by default, and structs are public. Thus

class A {
public:
// ...
};

is equivalent to

struct A {
// ...
};

Still, if you're using a struct, call it a struct. If you're using a class, call it that. A spade's a spade.
Posts: 180 | Registered: Friday, October 15 2004 07:00
Shock Trooper
Member # 5181
Profile Homepage #12
In some cases, a modicum of OO makes sense. For graphics and such (especially with DirectX), it doesn't make sense not to use classes.

My main issue with classes is protection and inheritance. I understand the theories just fine, but I really dislike protection. I don't believe that variables that can affect other parts of the program (for example, a player's stats in a game) should be locked down and unable to be reached without functions. To me, set_health(get_health + 25); is excessive. The alternative is a modify_health routine, continuing with the example, which I feel is awkward. player.health += 25 makes more sense to me.
Posts: 262 | Registered: Thursday, November 11 2004 08:00
Shock Trooper
Member # 4557
Profile #13
Protection is a concept that has more to do with programming style than it does programming in general. Other than idiot-proofing code (which I believe is a very important thing to do) I can't see it's other uses. If it has another use (which it should) I'd guess it have to do with extensive templating.
Posts: 264 | Registered: Wednesday, June 16 2004 07:00
Warrior
Member # 5091
Profile #14
quote:
Originally written by ARRR-enax:

In some cases, a modicum of OO makes sense. For graphics and such (especially with DirectX), it doesn't make sense not to use classes.

My main issue with classes is protection and inheritance. I understand the theories just fine, but I really dislike protection. I don't believe that variables that can affect other parts of the program (for example, a player's stats in a game) should be locked down and unable to be reached without functions. To me, set_health(get_health + 25); is excessive. The alternative is a modify_health routine, continuing with the example, which I feel is awkward. player.health += 25 makes more sense to me.

class Percentage
def initialize(v = 0)
self.value = v
end

def value=(v)
if v > 100 or v < 0 then
raise RangeError, "a Percentage must be between 0 and 100 (inclusive)"
else
@value = v
end
end

attr_reader :value
end

pct = Percentage.new
pct.value # --> 0
pct.value = 50 # --> 50
pct.value += 25 # --> 75
pct.value += 100 # --> ERROR
Don't blame concepts for inferior implementations.
Posts: 180 | Registered: Friday, October 15 2004 07:00
Shock Trooper
Member # 5181
Profile Homepage #15
I was referring to C++ more than anything. That sort of code doesn't fly in C++ (or, if it does, me and two C++ references can't decipher it; not that that's necessarily saying much), unless you make the variable public, which is self-defeating.

[ Tuesday, December 14, 2004 12:47: Message edited by: ARRR-enax ]
Posts: 262 | Registered: Thursday, November 11 2004 08:00
Warrior
Member # 5091
Profile #16
So a guy is complaining about how hard it is to dig with a toothbrush. He goes on and on, blaming the entire digging process, the bristles, etc. Someone suggests using a shovel instead. Angrily, he replies: "We're talking about toothbrushes here, not shovels!"
Posts: 180 | Registered: Friday, October 15 2004 07:00
Shock Trooper
Member # 4557
Profile #17
Just remembered, in template metaprogramming, templated structs are used to create metafunctions (among other things). I think its easier on the compiler.
Posts: 264 | Registered: Wednesday, June 16 2004 07:00
Shock Trooper
Member # 5181
Profile Homepage #18
quote:
Originally written by The Dog And Pony Show:

So a guy is complaining about how hard it is to dig with a toothbrush. He goes on and on, blaming the entire digging process, the bristles, etc. Someone suggests using a shovel instead. Angrily, he replies: "We're talking about toothbrushes here, not shovels!"
...I don't see many people using Ruby. I do see many people using C++.

So you can use a (horribly designed) shovel that nobody else uses for a (less horribly designed) pick--it ain't a toothbrush and you know it--that is widely used and has genuine commercial applications.

Gee! That's a hard one.
Posts: 262 | Registered: Thursday, November 11 2004 08:00
Warrior
Member # 5091
Profile #19
quote:
Originally written by ARRR-enax:

quote:
Originally written by The Dog And Pony Show:

So a guy is complaining about how hard it is to dig with a toothbrush. He goes on and on, blaming the entire digging process, the bristles, etc. Someone suggests using a shovel instead. Angrily, he replies: "We're talking about toothbrushes here, not shovels!"
...I don't see many people using Ruby. I do see many people using C++.

So you can use a (horribly designed) shovel that nobody else uses for a (less horribly designed) pick--it ain't a toothbrush and you know it--that is widely used and has genuine commercial applications.

Gee! That's a hard one.

You know, PHP is also wildly popular. Just because a language is popular doesn't mean it doesn't suck.

And Ruby is actually used widely in commercial applications in Japan. Just because it hasn't made its splash here yet doesn't mean it won't.

Care to give an example of Ruby's horrible design? Do you even know anything about language design, you poseur? You've got all the CS knowledge of my mom.

[ Thursday, December 16, 2004 08:58: Message edited by: The Dog And Pony Show ]
Posts: 180 | Registered: Friday, October 15 2004 07:00
Infiltrator
Member # 154
Profile #20
Perhaps it's time you told us exactly why PHP sucks then.

--------------------
Inconsistently backward.
SWOH. IM, PATF, ND.
Posts: 612 | Registered: Saturday, October 13 2001 07:00
Warrior
Member # 5091
Profile #21
Keep in mind here I'm speaking of PHP 4 and below; PHP 5 is not yet deployed enough to be worth discussing.

PHP is a poorly designed language. It has a very weak module system, and almost all of the standard library is loaded by default. It takes the atrocious and ugly syntax of Perl (universal sigils, etc.) without the actual useful bits (primitive regexes). In general, you can't choose what parts of the standard library get loaded or not at runtime. Oh, and I haven't seen any evidence of namespaces at all.

Until recently, the default behavior was to automatically load CGI arguments into global variables, which is of course absurdly foolish.

PHP encourages the mixing of data and code. Some people might consider its HTML embedding to be an advantage; I consider it to be a major flaw. Any good code would eschew such obfuscation, and most significant PHP projects do.

Its object model has been historically either nonexistent or hackish. This may not be interesting to procedural programmers, but it is a major flaw in my eyes.

It depends heavily on pragmas and other global configuration settings, due to the aforementioned lack of granularity.

PHP is, in general, an ugly, hackish language that shows its original purpose as a glorified SSI system in every wrinkle and crack.

EDIT: Oh, and I found this:
http://www.bitstorm.org/edwin/en/php-sucks/

[ Thursday, December 16, 2004 15:26: Message edited by: The Dog And Pony Show ]
Posts: 180 | Registered: Friday, October 15 2004 07:00
Off With Their Heads
Member # 4045
Profile Homepage #22
It occurred to me while reading one of the linked articles at the bottom of that page that the subheading, "PHP has inconsistent function naming," could apply even better to Avernumscript. Jeff couldn't decide whether it was going to be char or character in call names, so we have erase_char, but relocate_character, etc. This is why I script with the docs in front of me, which shouldn't really be necessary.

--------------------
Arancaytar: Every time you ask people to compare TM and Kel, you endanger the poor, fluffy kittens.

Kelandon's Pink and Pretty Page!!: the authorized location for all things by me
The Archive of all released BoE scenarios ever
Posts: 7968 | Registered: Saturday, February 28 2004 08:00
Shock Trooper
Member # 5181
Profile Homepage #23
And yet PHP is incredibly popular and used way more often than Ruby is.

So the market decrees you are wrong, Djur. :D (Not that I don't disagree--PHP is rather hackish--but it's good for what it does. I just pity the people who don't know any other language.)

[ Thursday, December 16, 2004 15:46: Message edited by: ARRR-enax ]
Posts: 262 | Registered: Thursday, November 11 2004 08:00
Bob's Big Date
Member # 3151
Profile Homepage #24
quote:
Originally written by ARRR-enax:

And yet PHP is incredibly popular and used way more often than Ruby is.

So the market decrees you are wrong, Djur. :D

t arenax grep "marketplace of ideas"

[ Thursday, December 16, 2004 15:49: Message edited by: Fear Uncertainty and Custer ]

--------------------
The biggest, the baddest, and the fattest.
Posts: 2367 | Registered: Friday, June 27 2003 07:00

Pages