code logs -> 2009 -> Sun, 22 Mar 2009< code.20090321.log - code.20090323.log >
--- Log opened Sun Mar 22 00:00:03 2009
00:50 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Connection reset by peer]
00:50 Attilla_ [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code
02:06 AnnoDomini [~farkoff@Nightstar-29210.neoplus.adsl.tpnet.pl] has quit [Quit: The pig go. Go is to the fountain. The pig put foot. Grunt. Foot in what? Ketchup. The dove fly. Fly is in sky. The dove drop something. The something on the pig. The pig disgusting. The pig rattle. Rattle with dove. The dove angry. The pig leave. The dove produce. Produce is chicken wing. With wing bark. No Quack.]
02:27 Attilla_ [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Quit: <Insert Humorous and/or serious exit message here>]
03:45 gnolam [lenin@Nightstar-1382.A163.priv.bahnhof.se] has quit [Quit: Z?]
04:11 Tarinaky [~Tarinaky@88.83.110.ns-10776] has quit [Client exited]
05:02 Syloqs-AFH [Syloq@Admin.Nightstar.Net] has quit [Connection reset by peer]
06:43 Derakon is now known as Derakon[AFK]
07:29 Tarinaky [~Tarinaky@88.83.110.ns-10776] has joined #code
07:38 Reiver [~reaverta@Admin.Nightstar.Net] has quit [Quit: Reblooting.]
07:42 Reiver [~reaverta@Admin.Nightstar.Net] has joined #Code
07:42 mode/#code [+o Reiver] by ChanServ
07:48 Rhamphoryncus [~rhamph@Nightstar-7184.ed.shawcable.net] has quit [Quit: Rhamphoryncus]
08:00 Orthia [~Orthianz@Nightstar-11349.xdsl.xnet.co.nz] has joined #Code
08:01 Orthia is now known as Reiv
08:18 Vornicus [Vornicus@Admin.Nightstar.Net] has quit [Quit: ]
09:19 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code
09:19 mode/#code [+o Attilla] by ChanServ
09:42 AnnoDomini [~farkoff@Nightstar-29210.neoplus.adsl.tpnet.pl] has joined #Code
09:42 mode/#code [+o AnnoDomini] by ChanServ
09:52 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Ping Timeout]
09:53 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code
09:53 mode/#code [+o Attilla] by ChanServ
10:01 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Connection reset by peer]
10:02 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code
10:02 mode/#code [+o Attilla] by ChanServ
10:24 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Connection reset by peer]
10:24 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code
10:24 mode/#code [+o Attilla] by ChanServ
10:43 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Ping Timeout]
10:44 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code
10:44 mode/#code [+o Attilla] by ChanServ
11:56 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Connection reset by peer]
11:56 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code
11:56 mode/#code [+o Attilla] by ChanServ
12:03 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Connection reset by peer]
12:03 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code
12:03 mode/#code [+o Attilla] by ChanServ
12:15 gnolam [lenin@Nightstar-1382.A163.priv.bahnhof.se] has joined #Code
12:15 mode/#code [+o gnolam] by ChanServ
12:22 Reiv [~Orthianz@Nightstar-11349.xdsl.xnet.co.nz] has quit [Quit: ]
13:00 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Connection reset by peer]
13:01 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code
13:01 mode/#code [+o Attilla] by ChanServ
13:10 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Ping Timeout]
13:10 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code
13:10 mode/#code [+o Attilla] by ChanServ
13:49 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Connection reset by peer]
13:50 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code
13:50 mode/#code [+o Attilla] by ChanServ
15:03 Syloqs_AFH [Syloq@Admin.Nightstar.Net] has joined #code
15:04 Syloqs_AFH is now known as Syloqs-AFH
15:14 KBot [AnnoDomini@Nightstar-29356.neoplus.adsl.tpnet.pl] has joined #Code
15:15 AnnoDomini [~farkoff@Nightstar-29210.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
15:16 KarmaBot [AnnoDomini@Nightstar-29210.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
15:17 KBot is now known as KarmaBot
15:20 AnnoDomini [~farkoff@Nightstar-29356.neoplus.adsl.tpnet.pl] has joined #Code
15:20 mode/#code [+o AnnoDomini] by ChanServ
16:07 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Ping Timeout]
16:09 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code
16:09 mode/#code [+o Attilla] by ChanServ
16:22 Vornicus [Vornicus@Admin.Nightstar.Net] has joined #code
16:22 mode/#code [+o Vornicus] by ChanServ
17:01 Derakon[AFK] is now known as Derakon
17:04 Rhamphoryncus [~rhamph@Nightstar-7184.ed.shawcable.net] has joined #code
17:33
<@AnnoDomini>
It's curious how many things one can come up with when developing just a class that handles basic hit point operation, like damage, healing and stuff like that.
17:45
<@Vornicus>
What do you mean?
17:46
<@AnnoDomini>
Out of being depressed by work I have to do, I'm trying to familiarize myself with C++ classes by making a Creature class that follows some d20-ripoff rules.
17:48
<@Vornicus>
Define "things" here
17:48
<@AnnoDomini>
Methods.
17:48
<@Vornicus>
Aha.
17:55 ToxicFrog [~ToxicFrog@69.171.150.ns-11163] has quit [Ping Timeout]
17:57
<@AnnoDomini>
I have ten now, and that's just for four fields.
18:01
< Derakon>
Are eight of them getters and setters, the ninth a constructor, and the tenth a destructor?
18:02
<@AnnoDomini>
Didn't counte constructor, four getters, didn't think of setters for some reason yet, didn't do a destructor.
18:02
<@AnnoDomini>
Well. There's one setter.
18:04 * AnnoDomini likes this line: setState(divineState());
18:05 * Derakon quirks an eyebrow.
18:05
< Derakon>
Initiate god mode?
18:05
<@AnnoDomini>
Nay. Different meaning of 'divine'.
18:07
<@AnnoDomini>
It's supposed to figure out what the state should be, given the field values.
18:11 ToxicFrog [~ToxicFrog@69.171.150.ns-11163] has joined #code
18:11 mode/#code [+o ToxicFrog] by ChanServ
18:15
<@AnnoDomini>
If I don't dynamically declare anything, what do I need to put in the destructor?
18:15 ToxicFrog [~ToxicFrog@69.171.150.ns-11163] has quit [Ping Timeout]
18:20
<@Vornicus>
There is a reason to do so but I don't remember it.
18:22
<@gnolam>
AnnoDomini: nothing.
18:25
<@AnnoDomini>
http://pastie.org/423573 <- How's this look? Any atrocities or blatant errors?
18:28
<@gnolam>
Use an initializer list in the construcotr.
18:28
<@gnolam>
*constructor
18:28
<@Vornicus>
Oh.
18:29
<@Vornicus>
You may need to have an explicit destructor exist, but I don't remember why.
18:29
<@Vornicus>
Even if you do, without any dynamic stuff it will be empty.
18:30
<@AnnoDomini>
gnolam: Is that necessary?
18:30
<@gnolam>
Nope. But it's A Better Way Of Doing It (TM).
18:31
<@Vornicus>
Why?
18:31 ToxicFrog [~ToxicFrog@69.171.150.ns-11163] has joined #code
18:31 mode/#code [+o ToxicFrog] by ChanServ
18:31
<@gnolam>
Vornicus: Nah. Destructors are implicitly declared.
18:32
<@Vornicus>
gnolam: yes, but I was under the impression that there was some reason that you'd want to explicitize a destructor even if it would otherwise be empty. Something about inheritance, probably involving the virtual keyword.
18:33
<@gnolam>
Virtual destructors are a special case, yes.
18:33
<@gnolam>
And there are several reasons to use initialization lists.
18:34
<@gnolam>
One is performance.
18:34
<@gnolam>
Another is readability - initialization is not assignment (it involves it, but isn't the same thing).
18:35
<@gnolam>
Another is the ability to initialize const members.
18:37
<@gnolam>
And it's simply the Preferred Way.
18:37
<@gnolam>
AnnoDomini: anyway, other than that it looks good.
18:38
<@gnolam>
Or... well... I don't like using comparison operators without spaces, but I guess that could be chalked up to personal taste.
18:38
<@gnolam>
Even if my taste in this case is objectively better. ;-)
18:39
<@gnolam>
(For example, Foo>Bar can very easily be mistaken for Foo->Bar)
18:40
<@AnnoDomini>
I suppose.
18:41
<@gnolam>
And actually, looking at it again I found an error. :)
18:42
<@AnnoDomini>
Le gaspe.
18:42
<@gnolam>
You're using & when you mean &&.
18:42
<@AnnoDomini>
Ah.
18:43
<@AnnoDomini>
Well, that springs from a conversation I had with some dood who I assumed knew more about C than me.
18:43 * AnnoDomini reverts that in his mind.
18:44
<@AnnoDomini>
What does & do, anyway? Bitwise?
18:44
<@gnolam>
Bitwise AND, yeah.
18:46
<@Vornicus>
& is bitwise; && is logical. && and || both short-circuit: if it does not need to evaluate the right side then it won't.
18:47
<@gnolam>
(Sidenote: & will actually work /in this specific code snippet/, but that's just by chance. So don't do it.)
18:47
<@AnnoDomini>
So if you've got (...) && (...) and the first is negative, then even if the second would segfault or something, it won't?
18:47
<@Vornicus>
There is no logical xor, you have to do that by hand.
18:47
<@gnolam>
Yep.
18:47
<@Vornicus>
AnnoDomini: indeed.
18:47
<@Vornicus>
YOu'll see people doing that, but I recommend explicitness.
18:47
<@gnolam>
So you can do if (p && p->doSomething()).
18:48
<@Vornicus>
Though that there is a common idiom.
18:54 somnolence [~somnolenc@203.160.1.ns-3171] has quit [Client exited]
19:22
<@AnnoDomini>
Oh, gods, armour class is such a bastard.
19:22
< Derakon>
Just make it subtract directly from damage.
19:24
<@AnnoDomini>
Hm?
19:24
< Derakon>
Oh wait, you're using D&D rules, aren't you?
19:24
<@AnnoDomini>
Something like that.
19:26
<@AnnoDomini>
Armour class is a bitch primarily because there's like a bajilion types of bonus, and they have different properties.
19:28 * AnnoDomini mumbles, fucks it, leaves it at ARMOUR, DEXTERITY, and SIZE.
19:32
<@AnnoDomini>
Oh, well. At least I'm not doing something like 2e. That would suck bad.
19:45 somnolence [~somnolenc@203.160.1.ns-3171] has joined #code
19:55
< GeekSoldier>
Yes. Yes it would. That's what I did in my 11th grade Pascal class.
19:59 * gnolam twiddles his thumbs as he commits ~3500 files to SVN
20:03
<@jerith>
Small files?
20:10
< Derakon>
Enh, he just did 'find . | grep -v svn | xargs touch && svn commit'
20:19
<@jerith>
You have to change the content, not just the timestamp...
20:19
<@AnnoDomini>
Already this is longer than my entire snake game code.
20:20
<@gnolam>
jerith: a pristine Source mod.
20:21
<@gnolam>
~150 MiB total.
20:27
<@AnnoDomini>
Using gcc with a commandline, which files do I include in the arcane incantation? Only the cpps or the hs too?
20:27
< Derakon>
Just the .cpps, IIRC.
20:27
<@jerith>
You want gpp for C++, iirc.
20:27
< Derakon>
Isn't it g++?
20:27
<@AnnoDomini>
The line starts with g++, yes.
20:27
<@jerith>
Maybe.
20:28
<@gnolam>
Just the .cpps.
20:28
< McMartin>
g++ for C++.
20:28
< McMartin>
"cpp" is in fact the C preprocessor.
20:30
<@jerith>
Oh, right.
20:31
<@gnolam>
(The header files get #included - i.e. copy & pasted - so you don't have to add them to the argument list anywhere. You do mention them in makefiles though, to make sure relevant object files get recombined if they change.)
20:31
<@jerith>
Been almost long enough since I've last used C++. ;-)
21:30 * McMartin downloads the latest NSIS, girds his thews for combat
21:35 Rhamphoryncus [~rhamph@Nightstar-7184.ed.shawcable.net] has quit [Quit: Rhamphoryncus]
21:36
<@AnnoDomini>
Are they mighty thews?
21:36
<@AnnoDomini>
Hmm. How do you do 'wait until keypress' using SDL?
21:37
< McMartin>
Not particularly mighty
21:38
< McMartin>
And it depends on your engine design.
21:38
< McMartin>
IF you're doing the standard "process events, update game world, repeat" thing...
21:38
< McMartin>
YOu make "update game world" do nothing until a key-down event is processed.
21:39
<@AnnoDomini>
Uhuh.
21:40
< McMartin>
If you've got no update game world step explicitly and are processing events inline...
21:41
< McMartin>
... well, first you might want to reconsider that since it'll becomea a crawling nightmare eventually...
21:41
< McMartin>
... but you'd read events with SDL_GetEvent or what have you until you saw an SDL_KEYDOWN event.
21:43 * McMartin boggles a little. HM NIS Edit has gotten *much* more impressive since the last time he's checked.
21:58 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Ping Timeout]
21:59 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code
21:59 mode/#code [+o Attilla] by ChanServ
22:16 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Connection reset by peer]
22:16 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code
22:16 mode/#code [+o Attilla] by ChanServ
22:42 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Ping Timeout]
22:42 * McMartin gets his NSIS uninstaller working.
22:43
< McMartin>
At some point, I'm going to need to get some minimal level of confidence in my ability to do registry hacks.
22:44 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code
22:44 mode/#code [+o Attilla] by ChanServ
23:12
<@AnnoDomini>
Mumble. I'd like a textbox or something. Displaying text by coordinates isn't exactly pleasant.
23:13
< McMartin>
SDL is terrible for proper GUI tools, yes.
23:15
<@AnnoDomini>
In any case, I have a mostly workable Creature class. It needs tweaking, probably, but it works.
23:17
<@AnnoDomini>
Which reminds me why I hate d20 so much. :E
23:18
< McMartin>
Heh.
23:18 * McMartin wonders if SDL and Qt4 integrate properly yet.
23:20
<@AnnoDomini>
Trouble is I don't really know any mechanics, except DnD, that work for video game hack'n'slash.
23:21
< McMartin>
Nethack used them too.
23:21
< McMartin>
Or something close.
23:21
< McMartin>
A lot of CRPGs just seem to use flat percentage rolls and linear damage ranges.
23:21
<@AnnoDomini>
SR3 would be nice, since there are few stats to go around, but its combat mechanic requires lots of player choices everywhere, and tends to go "BOOM HEADSHOT" when someone runs out of combat pool and their enemies don't.
23:22
< McMartin>
And GURPS does that from point 1, which is one reason it was the basis for Fallout's system.
23:22
<@AnnoDomini>
McMartin: Nethack uses, I think, modified 1st edition DnD rules.
23:22
< McMartin>
Yes.
23:22
< McMartin>
Which isn't that far from modified 2nd edition AD&D rules.
23:24
<@AnnoDomini>
Well, yeah. Only in 2e you'd have saving throws. :P
23:29
< McMartin>
There are saves of a sort in Nethack.
23:30
< McMartin>
"The death ray whizzes by you!"
23:30
< McMartin>
That's basically what save vs. wand was. =D
23:30
<@AnnoDomini>
Uh, I think those are failed attack rolls.
23:30
< McMartin>
Ssssssssort of.
23:30
< McMartin>
It's affected by AC once it goes negative, but only then.
23:30
< McMartin>
This is therefore a custom rule of sorts, but I'd manifest it as a bonus to save vs. wand, not as a "now you roll attack for your magic missile/force bolt/finger of death".
23:31
<@AnnoDomini>
I see.
23:31
< McMartin>
It's been fairly persuasively argued that all this boils down to is who's holding the die.
23:31
< McMartin>
In a computer RPG sim, the answer is always "the GM".
23:32
< McMartin>
Which in turn means any linear attack/defense range, plus a more bellcurvy damage range, works out to "feeling" like D&D.
23:32
<@AnnoDomini>
(I imagined a prompt window telling the player to roll a die, input the number, and click OK.)
23:32
< McMartin>
While SR and GURPS would have bellcurvy attack rolls
23:33
< McMartin>
And other wackiness on the side.
23:33
< McMartin>
Resource management for SR, stacking situational modifiers for GURPS.
23:33
< McMartin>
(THey also have active defense rules which I'm ignoring for now)
23:34
<@AnnoDomini>
Using Threat Rating rules back from 2e, it's possible to take the resource management out of the player's hands, but there's still the issue that SR is really, really, really not good for hack'n'slash because of the wound penalties.
23:35
<@AnnoDomini>
"You're lightly wounded! Everything you do suffers a 30% penalty!"
23:39
< McMartin>
Yeah. GURPS is slightly better about that but only slightly. It ends up translating into chain-stun.
23:39
< McMartin>
(It makes up for it by having basic attacks one-shot nearly any unarmored target)
23:40
< McMartin>
(And makes it more like -90% on the round after you are hit)
23:40 * AnnoDomini nods.
23:50
<@AnnoDomini>
It's funny how easy I find the 3.5e mechanics when I use them for their intended purpose, but when I try to make a program that implements them, they're a bloody complex mess. This may be caused by me knowing most of that mess by heart.
--- Log closed Mon Mar 23 00:00:15 2009
code logs -> 2009 -> Sun, 22 Mar 2009< code.20090321.log - code.20090323.log >