code logs -> 2011 -> Sat, 23 Jul 2011< code.20110722.log - code.20110724.log >
--- Log opened Sat Jul 23 00:00:29 2011
00:48 Derakon[AFK] is now known as Derakon
--- Log closed Sat Jul 23 00:59:17 2011
--- Log opened Sat Jul 23 00:59:24 2011
00:59 TheWatcher[zZzZ] [chris@Nightstar-3762b576.co.uk] has joined #code
00:59 Irssi: #code: Total of 23 nicks [0 ops, 0 halfops, 0 voices, 23 normal]
01:00 Irssi: Join to #code was synced in 48 secs
01:00 * Derakon finds himself wanting to write turn-based Diablo, more or less. >.<
01:02
< Derakon>
The theory being to make a combat-oriented roguelike with a heavy tactical emphasis, where the only way to recover health/mana while in the dungeon is to kill things (which drop used-on-pickup healing items that vanish if left alone) or by finding fixed regen altars that each work only once.
01:03
< Derakon>
And maybe to have some mechanic where the longer you spend in the dungeon, the nastier the monsters the dungeon throws at you, but the better the stuff they have.
01:03
< Derakon>
Call it an alert level or something.
01:05
< McMartin>
... now I'm thinking GTA The Roguelike
01:06
< Derakon>
...hee.
01:06
< Derakon>
Well, NetHack already has succubi.
01:06
< McMartin>
And the Keystone Kops!
01:06
< Derakon>
And the Key...yes.
01:06
< McMartin>
I should really get back into Spelunky.
01:07
< Derakon>
It's apparently changed a lot since I was last able to play it.
01:07
< Derakon>
Altars to Kali and so on.
01:08
< McMartin>
1.1 is p. huge, yeah.
01:08
< McMartin>
(And I have the code~)
01:09
< McMartin>
Also, they're polishing up an even bigger XBLA version.
01:10
< Derakon>
Now the question is, will that version get backported to Steam?
01:10
< McMartin>
That would be p. awesome if so
01:10
< McMartin>
Yet another local-only multiplayer game though =(
01:11
< Derakon>
MP Spelunky?
01:11
< Derakon>
How many games would end in the first room from one guy beaning the other with a rock?
01:13
< Derakon>
Hm, Spelunky Race. Every time you start a new level, the game waits for 2-3 other players, then you all start the same level and race each other to the exit, with or without interaction.
01:14
< Derakon>
Though shotguns and the like would break that a bit. Maybe in this version you'd have to start each level naked.
01:19 GeekSoldier [Rob@42F7BC.2D44AA.6F437F.1E0D7E] has quit [[NS] Quit: Praise "BOB"!]
01:32 Kindamoody is now known as Kindamoody[zZz]
01:33
< McMartin>
Derakon: Yeah, the trailer implies lots of mayhem.
01:39
< Derakon>
That does look rather hectic, yes.
01:39
< Derakon>
I like how the last bit of gameplay shown is a four-way mutual annihilation.
01:57
< celticminstrel>
It's incorrect to assume that this in the subclass and this in the superclass are the same memory address, right?
01:57
< McMartin>
In C++?
01:57
< celticminstrel>
Yeah.
01:57
< McMartin>
That's right, it's incorrect.
01:58
< McMartin>
There is however a way to do it
01:58
< McMartin>
I will need to look it up when I get home.
01:58
< McMartin>
It involves reinterpret-casting a constant value -_-
01:58
< celticminstrel>
I need the address of the most derived subclass from within the superclass.
01:58
< McMartin>
Right. So, there are vtable offsets computed.
01:58
< celticminstrel>
I could do it by passing it to the constructor though/
01:58
< McMartin>
I think in single inheritance you can actually properly assume this
01:59
< celticminstrel>
I think it'd be better if it didn't rely on that.
01:59
< McMartin>
Right
02:00
< McMartin>
There's a way to get the offset by hand
02:00
< McMartin>
However, doing the static cast is also supposed to be good enough to get that for you.
02:00
< McMartin>
Unless you're going through void *
02:00
< McMartin>
What's the actual use case?
02:00
< celticminstrel>
Doesn't static cast assume you know what the subclass is?
02:00
< McMartin>
Er, right
02:00
< McMartin>
dynamic_cast<>, sorry.
02:01
< celticminstrel>
I don't get it...
02:01
< McMartin>
static casts will handle the sub-to-super shift.
02:01
< McMartin>
If you've got class A : public class B
02:01
< McMartin>
And in one of A's methods you pass "this" to a function expecting a B*
02:01
< McMartin>
This works
02:01
< celticminstrel>
On the other hand, maybe I don't actually need to do this.
02:01
< McMartin>
The compiler may however modify the value on the way in, so the bit pattern the function gets isn't guaranteed to be the bit pattern of "this" in the caller.
02:02
< McMartin>
In 99% of cases the compiler does this bookkeeping for you.
02:02
< McMartin>
As long as you aren't breaking the type system I believe it is actually 100% of the cases.
02:02
< celticminstrel>
If I use the address of the superclass, cast it to void*, then later cast it back to the superclass and eventually downcast to the subclass, would that work?
02:02
< McMartin>
That is safe.
02:02
< McMartin>
Just remember to use dynamic_cast<> to do the downcast.
02:02
< celticminstrel>
Alright then.
02:02
< celticminstrel>
Of course.
02:03
< McMartin>
(The 1% is when you have a template method that needs to break the type system generically and work right in the presence of multiple inheritance.)
02:04
< McMartin>
C++ carefully organizes things so that every superclass of an object has its binary representation perfectly embedded as a subset of the subclass's binary representation.
02:05
< McMartin>
A lot of its astounding douchebaggery comes from having to maintain this.
02:05
< McMartin>
(Which it in turn needs so it can do transparent C interop.)
02:09 Derakon is now known as Derakon[AFK]
02:10 Attilla [Some.Dude@Nightstar-f29f718d.cable.virginmedia.com] has quit [Ping timeout: 121 seconds]
02:39
< ToxicFrog>
Derakon[AFK]: re turn-based Diablo: a big part of Diablo is choosing what to take into the dungeon in your fairly limited inventory and belt space, and what to pick up (at least until you reach the point of being able to cast Town Portal at will), so having everything use-on-pickup seems kind of odd.
03:13 kwsn [t1gg@31356A.5FD175.3E1307.550A93] has joined #code
04:33
< Omega>
I wouldn't mind a co-op Spelunky. XD
04:33
< Omega>
sure, you can bean the others - but you can bean yourself if you're unlucky.
04:46 Vash [Vash@Nightstar-f03c5637.sd.cox.net] has joined #code
05:35 kwsn is now known as kw\t-2
05:37 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
05:37 * kw\t-2 waves
05:38 kw\t-2 [t1gg@31356A.5FD175.3E1307.550A93] has quit [[NS] Quit: moo]
07:07 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code
07:15 Derakon[AFK] is now known as Derakon
07:45 Kindamoody[zZz] is now known as Kindamoody
07:49 Derakon is now known as Derakon[AFK]
07:53 Omega [omegaboot@Nightstar-853936c8.il.comcast.net] has quit [Ping timeout: 121 seconds]
08:04 Vash [Vash@Nightstar-f03c5637.sd.cox.net] has quit [[NS] Quit: I <lovecraft3 Vorn!]
08:05 Stalker [Z@Nightstar-3602cf5a.cust.comxnet.dk] has quit [Ping timeout: 121 seconds]
08:14 Vornicus is now known as Vornicus-Latens
08:14 GeekSoldier [Rob@42F7BC.2D44AA.6F437F.1E0D7E] has joined #code
08:16 gnolam [lenin@Nightstar-202a5047.priv.bahnhof.se] has joined #code
08:56 You're now known as TheWatcher
09:52 jeroid [jerith@687AAB.FD4DA7.F49AC1.4C2362] has joined #code
10:19 jeroid [jerith@687AAB.FD4DA7.F49AC1.4C2362] has quit [[NS] Quit: Bye]
11:00 Stalker [Z@Nightstar-3602cf5a.cust.comxnet.dk] has joined #code
11:02 AnnoDomini [annodomini@Nightstar-1f149fa6.adsl.tpnet.pl] has joined #code
11:13 Attilla [Some.Dude@Nightstar-f29f718d.cable.virginmedia.com] has joined #code
11:28 Kindamoody is now known as Kindamoody|noms
11:51 Kindamoody|noms is now known as Kindamoody
11:54 Stalker [Z@Nightstar-3602cf5a.cust.comxnet.dk] has quit [[NS] Quit: If the world didn't suck, we'd all fall off.]
12:14 Kindamoody is now known as Kindamoody|out
12:49 GeekSoldier [Rob@42F7BC.2D44AA.6F437F.1E0D7E] has quit [[NS] Quit: Praise "BOB"!]
12:53 kw\t-2 [t1gg@31356A.5FD175.3E1307.550A93] has joined #code
13:21 Kindamoody|out is now known as Kindamoody
13:30 kw\t-2 [t1gg@31356A.5FD175.3E1307.550A93] has quit [Ping timeout: 121 seconds]
13:52 Kindamoody is now known as Kindamoody|out
14:13 Rhamphoryncus [rhamph@Nightstar-7be32fa4.abhsia.telus.net] has quit [Client exited]
14:27 You're now known as TheWatcher[afk]
14:43 cpux is now known as shade_of_cpux
14:53 AnnoDomini [annodomini@Nightstar-1f149fa6.adsl.tpnet.pl] has quit [[NS] Quit: Switching OS.]
15:35 You're now known as TheWatcher
16:27 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Connection reset by peer]
16:49 shade_of_cpux is now known as cpux
17:00 Derakon[AFK] is now known as Derakon
17:24
< Reiver>
Say, ToxicFrog
17:24
< Reiver>
Any progress on Felt?
17:36 AnnoDomini [annodomini@Nightstar-1f149fa6.adsl.tpnet.pl] has joined #code
18:09 Alek [omegaboot@Nightstar-853936c8.il.comcast.net] has joined #code
19:12 Kindamoody|out is now known as Kindamoody
19:15 Phox [Phox@Nightstar-3e5deec3.gv.shawcable.net] has quit [Ping timeout: 121 seconds]
19:15 Phox [Phox@Nightstar-3e5deec3.gv.shawcable.net] has joined #code
19:26 Kindamoody is now known as Kindamoody|noms
19:32 Attilla [Some.Dude@Nightstar-f29f718d.cable.virginmedia.com] has quit [[NS] Quit: ]
19:55 kw\t-2 [t1gg@31356A.5FD175.3E1307.550A93] has joined #code
19:55 kw\t-2 is now known as kwsn
19:57 AbuDhabi [annodomini@Nightstar-47962f42.adsl.tpnet.pl] has joined #code
19:59 AnnoDomini [annodomini@Nightstar-1f149fa6.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds]
20:13 Kindamoody|noms is now known as Kindamoody
21:15 Phox is now known as Phoxzilla
21:29 Phoxzilla is now known as Phox
23:15 Stalker [Z@26ECB6.A4B64C.298B52.D80DA0] has joined #code
23:46
< celticminstrel>
Huh, Time Machine says there's 13.37 GB to backup.
23:47 You're now known as TheWatcher[T-2]
23:53 You're now known as TheWatcher[zZzZ]
--- Log closed Sun Jul 24 00:00:44 2011
code logs -> 2011 -> Sat, 23 Jul 2011< code.20110722.log - code.20110724.log >

[ Latest log file ]