--- Log opened Thu Jan 14 00:00:08 2010 |
00:01 | < Derakon[work]> | Well, he cannibalized a screw off of a junk card we found, got it put in, and hooked everything back up, and it is working now... |
00:01 | < Derakon[work]> | I suspect it was just a matter of reseating the connections, but whatever. |
00:11 | < Alek> | quite possibly. |
00:11 | < Alek> | it's amazing how often that works, really. |
00:33 | | Vornicus-Latens [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: ] |
00:34 | | Derakon[work] [Derakon@Nightstar-1ffd02e6.ucsf.edu] has quit [[NS] Quit: Leaving] |
00:35 | | Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code |
00:35 | | mode/#code [+o Vornicus] by Reiver |
00:41 | | gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has quit [Ping timeout: 121 seconds] |
01:13 | <@Vornicus> | Hey McM, what was the line about underspecified behavior (I think in reference to a particular bit of C)? |
01:40 | <@McMartin> | "Upon encountering [a given undefined construct] it is legal for the compiler to cause demons to fly out your nose" |
01:46 | <@Vornicus> | Ah, thank you |
01:48 | | Derakon[AFK] is now known as Derakon |
01:48 | | * Derakon eyes that line. |
02:00 | | Attilla [Attilla@FBC920.DDABA2.60661C.0EE0F8] has quit [Client closed the connection] |
02:36 | | celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has joined #code |
04:06 | | Alek [omegaboot@Nightstar-f0a534a1.emhril.sbcglobal.net] has quit [Client closed the connection] |
04:13 | | Alek [omegaboot@Nightstar-f0a534a1.emhril.sbcglobal.net] has joined #code |
04:31 | | * Derakon eyes VirtualBox. |
04:32 | <@Derakon> | Apparently I deleted the XP system I'd created earlier, and I have no idea where I put the image. |
04:33 | <@McMartin> | ~/.VirtualBox/ should be where all the disk drives go. Deregistering the VM shouldn't be enough to trash the .vdi files. |
04:33 | <@McMartin> | Or, on Mac, ~/Library/.VirtualBox |
04:33 | <@Derakon> | What I'm afraid of is that I deleted it in an attempt to free up disk space. |
04:34 | <@Derakon> | I currently have 36GB available, though. |
04:34 | <@Derakon> | And what I'm looking for isn't the system I created, but the XP install disc image. |
04:35 | <@McMartin> | Oh. |
04:35 | <@McMartin> | Spotlight? |
04:35 | <@Derakon> | Working on it now... |
04:35 | | * Derakon eyes Finder's search. |
04:35 | <@Derakon> | I tried to type "iso" into the "file kind" option. It let me get to "is" before trying to start the search, and is now apparently hung. |
04:36 | < celticminstrel> | Why is it different on a Mac? |
04:36 | <@Derakon> | Ask the OSX designers. |
04:36 | <@McMartin> | Because they half-remembered where data is supposed to go on Macs. |
04:37 | <@McMartin> | It *should* be at ~/Library/Application Support/VirtualBox if they followed the naming conventions |
04:37 | < celticminstrel> | Half-remembered is right... it should be in ~/Library/Application Supprt/VirtualBox. |
04:37 | <@McMartin> | And on Windows, that would be %APPDATA%\VirtualBox, which is one of four or five locations depending on other aspects of the install. |
04:38 | <@McMartin> | They put that in %APPDATA%\.VirtualBox, presumably because they couldn't be arsed to change both the directory and the leaf name. |
04:38 | | * Derakon facepalms. |
04:38 | <@McMartin> | For added fun, this pisses Explorer the fuck off, since it interprets it as an extension with no actual filename. |
04:40 | <@Derakon> | I very much fear I deleted the thing. Damnation. |
04:40 | <@McMartin> | VirtualBox is fantastic for the price, but after using it, VMware, and Parallels extensively, it is *such* a distant third, holy damn. |
04:42 | | Alek [omegaboot@Nightstar-f0a534a1.emhril.sbcglobal.net] has quit [Ping timeout: 121 seconds] |
04:43 | <@Derakon> | The goal here was to try out FCEUX, the TASer's NES emulator, in its native environment. |
04:43 | <@Derakon> | Since the version of FCEU I compiled is a bit unpleasant to use. |
04:44 | <@McMartin> | Yeeeeees. |
04:44 | <@McMartin> | Is it still so rigid that you can't change the key bindings without recompilation? |
04:45 | < Namegduf> | McMartin: I don't know about on other systems... |
04:45 | < Namegduf> | But on my 64bit Linux host? |
04:45 | <@McMartin> | Mac host. |
04:46 | < Namegduf> | VMWare crashed several times (luckily not taking down the host) in the process of installing Windows XP into a guest. |
04:46 | <@Derakon> | McM: apparently there's a commandline flag to change the bindings...not that I managed to find it before I found the source code for the controls. |
04:46 | < Namegduf> | I got rid of it and reinstalled VirtualBox. |
04:46 | <@McMartin> | The VBox dev list implies rather strongly that VBox's stability varies wildly by distro. |
04:46 | <@McMartin> | Ubuntu host is almost the ideal though, AIUI. |
04:46 | | Alek [omegaboot@Nightstar-3f3964f1.emhril.sbcglobal.net] has joined #code |
04:47 | <@McMartin> | (the "Fair comparison" is VirtualBox vs. VMWare Workstation/Fusion vs. Parallels Workstation.) |
04:47 | < Namegduf> | That's curious, because that doesn't make much sense |
04:47 | < Namegduf> | It works fine on Debian for me, though, at any rate. |
04:47 | <@McMartin> | Off-Major-Brand Kernel upgrades seem to have a nasty tendency to break the vboxdrv device. |
04:47 | < Namegduf> | (While VMWare blew up and died repeatedly, and having heard other complaints about stability around the same time, I just disposed of it and switched back) |
04:47 | <@Derakon> | I guess I get to go find an XP disk image now. |
04:47 | <@Derakon> | Fun. :( |
04:48 | <@McMartin> | (Yeah, Linux VMware is based on a crusty old version of VMware Player, which is inferior in every respect) |
04:48 | <@McMartin> | (Well, except for VirtualBox 2.x on Mac, which was pretty comical. Shutting down a VM with a disc in the CD drive would crash the system.) |
04:48 | < Namegduf> | Ew. |
04:48 | <@Derakon> | Which system? |
04:48 | <@McMartin> | Finder. |
04:48 | <@Derakon> | Ow. |
04:49 | <@McMartin> | Something about negotiating the handing of the disc back to Finder wedged the shit out of both. |
04:49 | <@McMartin> | It's gotten better; the most recent version I've tested thoroughly (3.0.12) merely performs an unclean shutdown of the VM ("Aborted" state) and makes the drive spin like a jet engine for a few seconds. |
04:50 | | * Derakon eyes Finder Search. |
04:51 | <@Derakon> | Fucking let me finish typing! I don't want to find all items bigger than 4KB! |
04:52 | <@Derakon> | Yeah, it appears to be literally impossible to stop the search utility from going off to the races as soon as you type a single character. |
04:52 | <@McMartin> | :wtc: |
04:57 | | Kazriko [kaz@Nightstar-e09690fa.client.bresnan.net] has quit [Ping timeout: 121 seconds] |
04:59 | | Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code |
05:11 | < Tarinaky> | Derakon: Type is into a text editor, copy+paste? |
05:14 | <@McMartin> | Well, it's "iso" he wants. |
05:15 | | celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has quit [[NS] Quit: *hums* Can't stay now!] |
05:20 | | AnnoDomini [annodomini@Nightstar-f15906b2.adsl.tpnet.pl] has joined #code |
05:20 | | mode/#code [+o AnnoDomini] by Reiver |
05:28 | <@Derakon> | Hm. Now Finder's just randomly hanging when I try to interact with it. |
05:28 | <@Derakon> | Even after I relaunched the Finder app. |
05:40 | <@Vornicus> | That's unawesome. |
05:53 | <@Derakon> | Okay, I think I need to reboot. This compy's been up 42 days and something is wrong. BBIAB. |
05:53 | | Derakon [Derakon@Nightstar-5abd3ac9.ca.comcast.net] has quit [[NS] Quit: And poof! I am gone.] |
06:03 | | Derakon [Derakon@Nightstar-5abd3ac9.ca.comcast.net] has joined #code |
06:03 | | mode/#code [+o Derakon] by Reiver |
06:03 | <@Derakon> | Okay, compy seems happier now. |
06:19 | | Alek [omegaboot@Nightstar-3f3964f1.emhril.sbcglobal.net] has quit [Connection reset by peer] |
06:27 | | Alek [omegaboot@Nightstar-3f3964f1.emhril.sbcglobal.net] has joined #code |
06:55 | | Derakon is now known as Derakon[AFK] |
06:55 | | Kazriko [kaz@Nightstar-e09690fa.client.bresnan.net] has joined #code |
06:55 | | mode/#code [+o Kazriko] by Reiver |
07:15 | | Zedidiah [zag@Nightstar-d0088b95.or.comcast.net] has joined #code |
07:46 | | Alek [omegaboot@Nightstar-3f3964f1.emhril.sbcglobal.net] has quit [Client closed the connection] |
07:48 | | crem [moo@Nightstar-8ca3eea7.adsl.mgts.by] has joined #code |
07:53 | | Alek [omegaboot@Nightstar-3f3964f1.emhril.sbcglobal.net] has joined #code |
08:39 | | Vornicus is now known as Vornicus-Latens |
08:55 | | Rhamphoryncus [rhamph@Nightstar-a62bd960.abhsia.telus.net] has quit [Client exited] |
09:27 | | Attilla [Attilla@FBC920.DDABA2.60661C.0EE0F8] has joined #code |
09:27 | | mode/#code [+o Attilla] by Reiver |
09:37 | | You're now known as TheWatcher |
09:58 | | Tarinaky_ [jes55@Nightstar-203b3f66.le.ac.uk] has joined #code |
10:35 | < Tarinaky_> | Hey. |
10:37 | | Tarinaky_ [jes55@Nightstar-203b3f66.le.ac.uk] has quit [Client closed the connection] |
10:38 | | * TheWatcher vaguely ponders the fact that the 'current' version of MinGW appears to include a version of gcc that is 4 years old |
10:43 | <@McMartin> | And it's still too recent to compile VirtualBox right. >_< |
10:46 | <@TheWatcher> | hah |
10:48 | <@McMartin> | (VirtualBox's build instructions are a mess of madness wrapped in lies that are themselves madness. Building Windows on Windows is either outright impossible (x64) or requires five simultaneously installed, different C compilers.) |
10:49 | <@TheWatcher> | O.o |
10:49 | <@McMartin> | (Win64 VBox actually compiles stuff to ELF and uses a custom link loader, thanks to gaps in MinGW making 64-bit DLLs not work right.) |
10:50 | <@McMartin> | (Did I mention that it also requires hand-patching the Windows DDK? Because it does.) |
10:50 | <@McMartin> | (That, at least, was MS's fault, though.) |
10:51 | <@TheWatcher> | Ow. >.< |
10:52 | | gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code |
12:56 | | Tarinaky [Tarinaky@Nightstar-e9569ece.adsl.virginmedia.net] has quit [Operation timed out] |
13:10 | | Tarinaky [Tarinaky@Nightstar-d4a75d4a.adsl.virginmedia.net] has joined #code |
13:27 | | Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Client closed the connection] |
14:14 | | AbuDhabi [annodomini@Nightstar-5a2d1dbb.adsl.tpnet.pl] has joined #code |
14:17 | | AnnoDomini [annodomini@Nightstar-f15906b2.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds] |
14:28 | < gnolam> | Yay! |
14:28 | | * gnolam does a little happy dance. |
14:30 | < gnolam> | I aced my Advanced Game Programming course. \o/ |
14:30 | < gnolam> | (Which, BTW, is a silly name for it. It's really Advanced Computer Graphics with a tiny bit of AI, networking and physics thrown in.) |
14:42 | | PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds] |
14:42 | < Tarinaky> | <gnolam> (Which, BTW, is a silly name for it. It's really Advanced Computer Graphics with a tiny bit of AI, networking and physics thrown in.) << Like most modern games? :p |
14:51 | | PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has joined #code |
15:26 | < gnolam> | Honestly? It's the entity/script/state/etc handling that takes up most of the effort in a game engine. |
15:26 | < gnolam> | +/resource |
15:33 | | Alek [omegaboot@Nightstar-3f3964f1.emhril.sbcglobal.net] has quit [Ping timeout: 121 seconds] |
15:33 | | Alek [omegaboot@A2BA3E.D9488C.D07174.2236AE] has joined #code |
15:34 | | celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has joined #code |
16:03 | < Tarinaky> | gnolam: I read that it was art that used up most the budget though :x |
16:03 | <@TheWatcher> | game engine != game |
16:05 | < Tarinaky> | I think gnolam said 'game' originally. He only just dragged out engine to argue against me. |
16:10 | < gnolam> | Art does not fall under "Game Programming". |
16:10 | < gnolam> | But yes. |
16:11 | < gnolam> | Resource creation for a modern game takes at least an order of magnitude more man hours than the programming. |
17:18 | | Tarinaky [Tarinaky@Nightstar-d4a75d4a.adsl.virginmedia.net] has quit [Operation timed out] |
17:33 | | Tarinaky [Tarinaky@Nightstar-6874546e.adsl.virginmedia.net] has joined #code |
17:42 | | Rhamphoryncus [rhamph@Nightstar-a62bd960.abhsia.telus.net] has joined #code |
18:10 | | gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has quit [Ping timeout: 121 seconds] |
18:12 | | gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code |
19:13 | < AbuDhabi> | Is there any way to generate a class diagram from an ASP.NET website coded in Visual Studio 2005? |
19:15 | < AbuDhabi> | And by 'generate' something more or less as involved as installing a piece software, telling it where my project is and pressing a button. |
19:49 | < AbuDhabi> | Nevermind... I think I found a built-in generator... it's running... |
19:49 | < AbuDhabi> | But it won't work. |
19:50 | < AbuDhabi> | It seems I can't generate a class diagram for this kind of project. |
19:51 | < AbuDhabi> | Bugger that, then. |
19:58 | < celticminstrel> | Gah, this function is over 200 lines... |
19:58 | < AbuDhabi> | What does it do? |
19:59 | < celticminstrel> | Parses the command-line arguments into a list of tasks. |
20:00 | < celticminstrel> | It's a giant if-then-else structure inside a while loop. |
20:02 | | * AbuDhabi is using Google Translate to speed up translation of sections of the documentation that pertain the technology used, quoted straight from MSDN. |
20:03 | < AbuDhabi> | It's English->Polish and the lecturer is Ukrainian, speaking only a somewhat broken version of Polish. I don't envy him. :p |
20:05 | < AbuDhabi> | On the up-side, he probably won't notice the Polish text is a little wonky (even after my corrections of the glaring syntax errors.) |
20:11 | < AbuDhabi> | His nickname is "Kontrolku", as he consistently fails to use nasal vowels, twisting words into something closer to their Russian/Ukrainian equivalents. |
20:19 | < AbuDhabi> | The only people who have an idea what conjugation/declination he's using are the ones who took Russian last semester. :D |
20:20 | < AbuDhabi> | Curiously enough, he's the only Russki lecturer who speaks oddly. The others have weird accents sometimes, but generally speak very good Polish. |
20:30 | < AbuDhabi> | What the fuck? |
20:30 | < AbuDhabi> | GTranslate translated "exist to lay out" into "instniej± by zabiæ" which is "exist to kill". o_O |
20:36 | < AbuDhabi> | This reminds me of that picture of a knight, a dragon, a half-dragon and a king. The confusion was about the similarity of "lay" and "slay". |
20:50 | < AbuDhabi> | There. This motherfucker is 15 pages long. I hope it appeases Kontrolku. |
20:51 | < AbuDhabi> | I must say that I've learned something from writing my engineer diploma paper - that you can use citations to cover up laziness without the stigma of plagiarism. |
20:51 | < AbuDhabi> | All you have to do is append [number] after each paragraph and list the sources in the appendix somewhere. |
20:58 | | Alek [omegaboot@A2BA3E.D9488C.D07174.2236AE] has quit [Client closed the connection] |
21:06 | | Alek [omegaboot@Nightstar-3f3964f1.emhril.sbcglobal.net] has joined #code |
21:43 | | Derakon[work] [Derakon@Nightstar-1ffd02e6.ucsf.edu] has joined #code |
21:43 | < Derakon[work]> | I took the built-against-Python2.5 version of the progarm into the lab today to test-drive it. |
21:43 | < Derakon[work]> | And now Pyro (the remote object invocation library we're using) complains about multiple threads trying to use the same proxy. |
21:44 | < Derakon[work]> | So I read up on the error, determined that the recommended course of action is to upgrade to a newer version of the library. |
21:44 | < Derakon[work]> | Which I did. |
21:44 | < Derakon[work]> | And now I get an error that I'm trying to use incompatible versions of the Pyro protocol. |
21:44 | < Derakon[work]> | So I get to upgrade Pyro on all of the other machines in the lab. ?.? |
21:59 | <@Vornicus-Latens> | wheee |
22:00 | | * McMartin dubs this "Operation Spy-Check" |
22:01 | | * Derakon[work] lays a hand dramatically over his eyes. |
22:01 | < AbuDhabi> | McMartin: Does it have to do with spies or checks? |
22:01 | <@McMartin> | Yes. Spies are extremely flammable; this is how you check if someone is one. |
22:02 | < AbuDhabi> | Well, it's bad practice. Operation names should be random and not have anything to do with what they are supposed to entail. |
22:05 | < Derakon[work]> | As it happens, this operation does not in fact involve playing Team Fortress 2, so that's fine. |
22:20 | < AbuDhabi> | I think I may need a lecture on stuff communicating in a game engine. |
22:21 | < AbuDhabi> | So far I'm imagining my options to be: a) pointers, b) global variables, c) OOP magic. |
22:21 | <@Vornicus-Latens> | OOP is good. |
22:21 | < Derakon[work]> | Yeah, of those, OOP is the clear winner. |
22:22 | <@Vornicus-Latens> | But that doesn't say much |
22:22 | < AbuDhabi> | But it is also magical, and rather more involved to code, while its advantage of being easier to maintain by others isn't applicable here. |
22:22 | < Derakon[work]> | Generally in a game, you have some data structure that holds all of the dynamic game objects. That structure will tell them when they need to interact, and accepts requests from one object to find other objects |
22:22 | < Derakon[work]> | Define "magical". |
22:23 | < Derakon[work]> | Also, "you in a month" counts as "someone else". |
22:23 | < Derakon[work]> | Writing crappy code because you're the only person that has to see it is just going to come back and bite you. |
22:23 | <@Vornicus-Latens> | Try "you tomorrow morning after you've slept and had a cup of joe" |
22:23 | < Derakon[work]> | That too. |
22:24 | < AbuDhabi> | Magical: Pertaining magic. Magic: Science not completely understood, yet functioning. |
22:24 | < AbuDhabi> | Noted. |
22:24 | < Derakon[work]> | OOP <=/=> magic |
22:25 | < AbuDhabi> | This application is magic to me. I know people use it, but I don't know where to start to accomplish what I did with use of pointers in the Snake game I did. |
22:25 | < AbuDhabi> | +of it |
22:26 | < Derakon[work]> | What language, what problem, what application? |
22:27 | < AbuDhabi> | C++, stuff talking with other stuff, game engine. |
22:28 | < AbuDhabi> | Like, I want a command executing function to interact with the current game state. |
22:28 | < Derakon[work]> | Is this a specific game engine? |
22:28 | < AbuDhabi> | Roguelike. |
22:28 | < Derakon[work]> | You're making your own, not using an engine someone else wrote, then? |
22:29 | < AbuDhabi> | Yes. |
22:29 | < Derakon[work]> | Okay. |
22:29 | < Derakon[work]> | Let me just sketch out what I've done in Jetblade. |
22:30 | < Derakon[work]> | I have a Map class that has all of the map tiles. It also contains all the static objects that don't fit/align with tiles (e.g. large statues). |
22:30 | < Derakon[work]> | I have a GameObjectManager class that holds all of the dynamic objects. |
22:30 | < Derakon[work]> | (Dynamic objects being ones that move) |
22:31 | < Derakon[work]> | Each frame, the GameObjectManager checks to see which dynamic objects are close to other dynamic objects, and tells them to run collision checks against each other. It also hands each to the Map class and asks it to see if they hit anything in the map. |
22:32 | < Derakon[work]> | If two objects do collide, they have each other right there, so they can do whatever communication is needed, directly. |
22:32 | < Derakon[work]> | I have plans for objects to be able to query the GameObjectManager for other objects meeting certain criteria, too, but I haven't implemented that. |
22:33 | < Derakon[work]> | There's also an EventManager class that handles user input; any object can query the EventManager to get information on that input as of the last frame. So the Player object uses this to let you control it, for example. |
22:34 | < Derakon[work]> | And there's a bunch of other *Manager classes that handle other specific subdomains like sound, images, fonts, etc. |
22:35 | < Derakon[work]> | As a general rule, each Manager is a global singleton. Some of them should be local -- specifically, GameObjectManager, Map, and EventManager shouldn't be so I can run two games side-by-side in the same program (or have one backgrounded, etc.). Switcihng to that basically just means passing those managers along from the main update loop down through all the relevant functions. |
22:35 | < Derakon[work]> | Is that any help? |
22:36 | < AbuDhabi> | I think so. |
22:37 | < Derakon[work]> | In your case, presumably your roguelike is tile-based, so you could conflate the Map and GameObjectManager classes. |
22:37 | < AbuDhabi> | Are there non-tile-based roguelikes? |
22:38 | < Derakon[work]> | Diablo 3 might be. |
22:38 | < Derakon[work]> | Diablo 2 just does a good job of hiding that it is tile-based. |
22:38 | < Derakon[work]> | I haven't played Torchlight. |
22:39 | <@Vornicus-Latens> | Torchlight is pretty freeform, but the map is still a bit tiley. |
22:39 | <@Vornicus-Latens> | (object placement however is decidedly untiley.) |
22:40 | < AbuDhabi> | It seems also riddled with minor bugs, from reports of one guy who plays it and comments in another channel. |
22:40 | <@Vornicus-Latens> | There are a lot of little bugs, yeah. |
22:40 | <@Vornicus-Latens> | But it is all told Good Game. |
22:42 | <@McMartin> | You've logged implausible amounts of time in it. |
22:42 | <@Vornicus-Latens> | certainly worth the five-spot I put down for it. |
22:42 | <@Vornicus-Latens> | McM: yeah sometimes I accidentally leave it on overnight? |
22:42 | < Derakon[work]> | Heh. Reminds me of the Gauntlet II game I once ran for over a week on my NES. |
22:43 | < Derakon[work]> | I had the most absurdly pimped-out Warrior ever. Multiple speed bosts is pretty sick in that game. |
22:50 | < Derakon[work]> | Must go, work to do. |
22:50 | | Derakon[work] [Derakon@Nightstar-1ffd02e6.ucsf.edu] has quit [[NS] Quit: Leaving] |
23:18 | | crem [moo@Nightstar-8ca3eea7.adsl.mgts.by] has quit [Ping timeout: 121 seconds] |
23:19 | | Netsplit *.net <-> *.split quits: AbuDhabi, Reiver, KazWork, PinkFreud, Tarinaky, @Kazriko, Zedidiah, @jerith, @Vornicus-Latens, gnolam, (+3 more, use /NETSPLIT to show all of them) |
23:20 | | Netsplit over, joins: PinkFreud, Zedidiah, @jerith, @Kazriko, ~Reiver, KazWork, EvilDarkLord, @Vornicus-Latens, gnolam, SmithKurosaki (+3 more) |
23:20 | | mode/#code [+o Syloqs-AFH] by Reiver |
23:21 | | crem [moo@Nightstar-8ca3eea7.adsl.mgts.by] has joined #code |
23:31 | < AbuDhabi> | Hmmm. Message handling thingy, map handling thingy, player handling thingie. |
23:33 | < AbuDhabi> | Is there a practical difference between the declarations of "Object object;" and "Object object();"? |
23:33 | < celticminstrel> | The second declares a function returning an object. |
23:33 | < celticminstrel> | ^ an Object |
23:33 | < celticminstrel> | The first declares a variable of type Object and initializes it with the default constructor. |
23:34 | < AbuDhabi> | So if I want to use the default constructor, I should use the former. |
23:34 | < celticminstrel> | Yes. |
23:34 | < celticminstrel> | In a declaration, at least. |
23:37 | < AbuDhabi> | Using global variables never really occurred to me as a worthwhile solution. From my programming experience at Uni, global variables were never used. Anywhere. |
23:38 | < celticminstrel> | Global variables are occasionally necessary. |
23:38 | < celticminstrel> | It's best to avoid them if possible, though. |
23:38 | < AbuDhabi> | Like in situations where everything needs to talk to object X? |
23:38 | < celticminstrel> | Sure. |
23:38 | < celticminstrel> | Also, if there's a global that is only ever accessed from one function, I would make it a static local. |
23:39 | < celticminstrel> | (that's kind of unrelated, but whatever) |
23:40 | <@McMartin> | If everything needs to talk to Object X, a Singleton setup is probably best. Lets you control initialization (which C++ is really bad at) and it lets you swap out managers at will. |
23:41 | < AbuDhabi> | What's a singleton? |
23:43 | < celticminstrel> | It's an object that can only have one instance. |
23:43 | < celticminstrel> | You do this by making the constructors private, and having a static function that returns the instance... or something like that, anyway. |
23:47 | | You're now known as TheWatcher[T-2] |
23:50 | <@McMartin> | It works out to being a guarded global |
23:50 | < AbuDhabi> | I just imagined OBJECT THIEVES trying to steal unguarded variables. |
23:51 | <@McMartin> | Heh heh. |
23:51 | <@McMartin> | That's as good a description as any of stale pointers. |
23:51 | | You're now known as TheWatcher[zZzZ] |
23:53 | < AbuDhabi> | Why, oh why did I code x to be the vertical and y to be horizontal? |
--- Log closed Fri Jan 15 00:00:09 2010 |