--- Log opened Tue Dec 04 00:00:39 2012 |
00:09 | | Orthia [orthianz@Nightstar-6ca59a6f.callplus.net.nz] has quit [Ping timeout: 121 seconds] |
00:13 | | Attilla [Obsolete@Nightstar-4880b691.as43234.net] has quit [Ping timeout: 121 seconds] |
00:15 | | Thalasleep is now known as Thalass |
00:37 | | himi [fow035@D741F1.243F35.CADC30.81D435] has joined #code |
00:37 | | mode/#code [+o himi] by ChanServ |
00:44 | <~Vornicus> | I get so distracted. |
00:44 | <~Vornicus> | Anyway. TO use a sprite sheet from where i am now I need to tell the functions that load my images to instead load from the sheet. |
00:44 | <&McMartin> | Heh |
00:44 | | * McMartin is also writing spritesheet code -_- |
00:45 | <~Vornicus> | heh |
00:45 | <&McMartin> | Though it's actually "texture management code" and has to deal with Windows's "surprise! I've flushed all your GPU space, GLHF" |
00:45 | <&McMartin> | Also, I'm doing it in C++ |
00:46 | | Orthia [orthianz@Nightstar-6ca59a6f.callplus.net.nz] has joined #code |
00:47 | | * simon` is writing spreadsheet code. |
00:48 | <~Vornicus> | I have determined that I really spectacularly hate init code. |
00:48 | <&McMartin> | Yes. |
00:48 | <~Vornicus> | get me to where it properly gets going and I am happy. |
00:52 | <@Alek> | so make an init template. or generator. XD |
00:53 | <&McMartin> | You still need to sort out Actual Init from Re-Initialization to, well, Zoning |
00:54 | < rms> | zoning? |
00:54 | <~Vornicus> | rms: changing levels et al |
00:55 | < rms> | Ah |
00:55 | | Vash[SK] [Vash@Nightstar-35eb62f8.sd.cox.net] has quit [[NS] Quit: I <lovecraft3 Vorn!] |
00:59 | <&McMartin> | Basically, resource overlay systems. |
00:59 | <&McMartin> | Because, no, it turns out that unless you're porting something from the 90s "load everything, let the VMM handle it" is not a workable solution. |
01:01 | | Reiv [Reiver@Nightstar-6ca59a6f.callplus.net.nz] has joined #code |
01:03 | <~Vornicus> | I am porting something from the 90s and my entire game will probably fit on a floppy. |
01:03 | <&McMartin> | Yeah, you can probably load everything twice and be done with it |
01:03 | <&McMartin> | Unless you're sticking with framebuffers, in which case you only need to officially load it once. |
01:03 | <~Vornicus> | Twice? |
01:04 | <&McMartin> | Once into the CPU, and once into graphics memory so it can be actually used. |
01:04 | <~Vornicus> | Ah |
01:04 | <&McMartin> | The second one you may have to re-do at various points if the user or OS does certain things |
01:04 | <&McMartin> | Making that happen *relatively* transparently is the problem I want to solve. |
01:08 | <~Vornicus> | Okay let me see. Image loading has to happen at the start of the program, after pygame gets initialized. At that point i have to also slice up my sprite sheet. |
01:09 | <&McMartin> | SDL_BlitSurface is really quite good at spritesheet slicing at runtime, and its pygame equivalent should be able to manage the same. |
01:10 | < auREAX> | z |
01:11 | <&McMartin> | It's probably easier to load the sheet as a single image and blit subrects from it than it is to turn the image into dozens of individual images. |
01:12 | <&ToxicFrog> | Is there any actual advantage to using spritesheets over individual images? |
01:12 | | Derakon[AFK] is now known as Derakon |
01:13 | <&Derakon> | They load faster, as a contiguous block of hard drive space instead of a bunch of discrete files. |
01:13 | <&McMartin> | If you're using something like OpenGL, one spritesheet per texture object is a lot more GPU-convenient. |
01:13 | < Thrae> | I should build my own OS with the best features from AmigaOS, OS/2 Warp, Microsoft Bob, and BeOS. |
01:14 | < Thrae> | And yeah, RAM is typically Tier 1 Storage, Disk is typically Tier 2 Storage. |
01:15 | <&McMartin> | ToxicFrog: Basically, for Dapper Delver, with an OpenGL engine I'd like to be calling glBindTexture thrice per frame, tops. |
01:15 | <&McMartin> | (This is probably unreasonable; 4 is more likely.) |
01:16 | < Thrae> | McMartin> Because, no, it turns out that unless you're porting something from the 90s "load everything, let the VMM handle it" is not a workable solution. <-- Because we all know Minecraft is so resource-friendly, right? |
01:16 | <&McMartin> | But the idea would be one texture for movable objects that are the same in all zones; one for backgrounds that are the same in all zones (which is actually the fonts); and then equivalents that change per-zone (enemies and background tiles, more or less) |
01:17 | <&McMartin> | Thrae: To be fair, Minecraft attempts things we couldn't reasonably do in the 1990s. |
01:17 | <&McMartin> | I was primarily exempting Star Control 2 here, which mostly does this |
01:17 | <&McMartin> | But still has loading/unloading code for speech clips. |
01:17 | < Thrae> | Ah yes Star Control 2. I had that both on the 3DO and PC. |
01:18 | < Thrae> | I think that was optimized in Ur-quan Masters port, right? |
01:18 | <&McMartin> | It was optimized to that. |
01:18 | <&McMartin> | The resource code was designed to be tight in the original code; this also made it stupendously brittle, which was A Problem. |
01:19 | < Thrae> | Yeah. I remember reading some old dev notes for the porters. |
01:19 | <&McMartin> | UQM also, however, is not using the GPU in any meaningful way, so it has separate images for each frame of animation because it was easy |
01:19 | <&McMartin> | Hi, I'm McMartin. |
01:19 | < gnolam> | ToxicFrog: besides what's been said, texture switches are expensive. So you generally want to avoid them. |
01:19 | <&McMartin> | Right |
01:19 | <&McMartin> | Now, in Vorn's case he's not *using* textures. |
01:20 | < Thrae> | *googles* Oh. |
01:20 | <&McMartin> | UQM uses textures in a hilariously broken way that was dictated by emulation and early-2000s hardware constraints |
01:20 | | * Derakon amuseds at Thrae |
01:20 | <&McMartin> | (Fun fact: Matrox cards lie about their capabilities) |
01:20 | < gnolam> | (The downside to sprite sheets is that they don't play nice with tiles and zooming) |
01:20 | < gnolam> | McMartin: this at least used to be true of Intel GMA chips as well. |
01:21 | <&McMartin> | The HD series is much better about it |
01:21 | < gnolam> | I understand they've shaped up now. |
01:21 | < Thrae> | I did notice my Matrox cards tend to suck, especially when it came to OpenGL. |
01:21 | < gnolam> | But previously? You couldn't believe a word your GL context said. |
01:21 | < Thrae> | gnolam: Intel got in a huge fight with the Minecraft community over that |
01:21 | <&McMartin> | Also, I'm hoping to get a working tiling/zooming/spritesheet solution that can be abstracted over. |
01:22 | < gnolam> | It... can't be done. |
01:22 | <&McMartin> | Then I intend to learn why. |
01:22 | < Thrae> | Intel's GMA drivers couldn't even properly support OpenGL 1.3. |
01:22 | < gnolam> | Untiled sprites, sure. |
01:22 | <&McMartin> | I'm not entirely sure what you mean by "tiling" in this case. |
01:22 | < gnolam> | Repeating patterns that should not have visible seams. |
01:23 | <&McMartin> | I've seen it done in D3D. |
01:23 | <&McMartin> | But yeah, UQM couldn't do that for several reasons, which is why it does the OpenGL 1.1 equivalent of "render everything to a texture, draw one quad" |
01:23 | < gnolam> | You can zoom out to a certain extent, but once you go down what should be a mipmap level, you're toast. |
01:24 | <&McMartin> | Oh. |
01:24 | <&McMartin> | Zooming out I don't care about. |
01:24 | <&McMartin> | Zooming *in* is what I care about. |
01:24 | < celticminstrel> | What was the Intel/Minecraft fight about?3 |
01:24 | <&McMartin> | LOD pops produce discontinuities, period, and the only solution I know of is to hand-shift to a different set of data, basically using the mipmap info by hand. |
01:25 | < Thrae> | celticminstrel: Intel's lack of OpenGL support for what should be modern GPUs, and saying they supported 1.3+ when they really didn't. |
01:25 | < celticminstrel> | Ah. |
01:25 | < gnolam> | "Render to larger buffer, resize" is the only and proper way to do it. |
01:26 | <&McMartin> | gnolam: My actual goal here is to replicate GM's movable viewport mechanism. |
01:26 | <&McMartin> | Which is magnification, not minification, as a rule. |
01:26 | < Thrae> | Apple also got the Minecraft community's wrath when it turned out their Leopard Intel GMA drivers didn't support OpenGL 1.3, but the same hardware on Lion did (Apple only gives out certain driver updates with OS upgrade). |
01:27 | | * McMartin kind of lifts an eyebrow at that. |
01:27 | < gnolam> | (The problem is filtering, where you start reading pixels outside the wanted tile. It's fixable for the /main/ texture level by adding one pixel borders around the tile, but for obvious reasons this does not work with mipmaps.) |
01:27 | < gnolam> | ... sounds like Apple. |
01:28 | <&McMartin> | When did Leopard come out? |
01:30 | <&McMartin> | 2007. |
01:30 | <&McMartin> | OpenGL 1.3 is from 2001. |
01:30 | < auREAX> | intel gma drivers are crap |
01:30 | < auREAX> | it's not apple, it's intel |
01:30 | < Thrae> | Note there are two versions of Leopard. Not sure if it was 10.5 (Leopard) or 10.6 (Snow Leopard) off the top of my head. |
01:31 | < Thrae> | Intel GMA on *Windows* often didn't support OpenGL 1.3 fully unless you downloaded the latest drivers, and even then it was a crapshoot. |
01:31 | < auREAX> | yup |
01:31 | < auREAX> | intel windows drivers are crap |
01:32 | < Thrae> | Sometimes hacks were necessary, like making sure Java always allocated or allocated no more than 800MB. |
01:32 | < auREAX> | funnily enough intel linux drivers are usually the best |
01:32 | < auREAX> | with java hacks are always required |
01:32 | <&McMartin> | That's not true for the HDs. |
01:32 | < auREAX> | McMartin: GMA drivers* |
01:32 | < auREAX> | my apologies |
01:32 | <&McMartin> | Ah, OK |
01:32 | <&McMartin> | Yeah |
01:32 | <&McMartin> | (The Linux HD drivers are still very good, but they're not as far ahead as the Windows ones) |
01:33 | <&McMartin> | (They're the only OSS drivers I'm aware of capable of handling OpenGL 3.x) |
01:33 | < Thrae> | HD was better, still needed driver updates for the early HD models, which could be a pain to install (laptop OEM builds) |
01:33 | <&McMartin> | Sure |
01:33 | <&McMartin> | But then, that was also before laptop OEMs started going "we're going to seriously make Linux work on these" |
01:33 | < Thrae> | I'm talking on *Windows* |
01:33 | <&McMartin> | Oh, whoops |
01:33 | <&McMartin> | Sorry, lost the plot there |
01:34 | < Thrae> | Just trying to get Minecraft to stop saying it can't find an OpenGL 1.3 compatible display device. |
01:34 | < Thrae> | Or various performance issues, etc. |
01:34 | <&McMartin> | nod |
01:34 | < Thrae> | (I was part of the Official Unofficial Support team for about 1.5 years, still hang out there) |
01:34 | <&McMartin> | Got it |
01:35 | <&McMartin> | Is that still a widespread issue? |
01:35 | <&McMartin> | I was considering assuming OpenGL 1.5 support, actually, but it sounds like that might not be safe at present. |
01:36 | <&McMartin> | gnolam: Why does nearest-neighbor minification leave the tile? Is there a bug in centroid calculation or something? |
01:37 | < Thrae> | If it's a supposed low-spec game, yes, because you'll get lots of people playing on older hardware which don't have updated drivers. Which can be a serious PITA to get working from a support side if they're not Nvidia. |
01:37 | < Thrae> | And on Windows. |
01:38 | < Thrae> | But, I'm not knowledgeable enough about Minecraft's code to say it wasn't something they were doing wrong. When the 1.3 problem came out, for instance, they had updated to 1.3 to use 1 function call which could be duplicated in 1.2 without performance cost. |
01:39 | <~Vornicus> | Minecraft has a pretty terrible codebase, I'm told. |
01:39 | < Thrae> | And probably with native coding you can more easily fall back to software rendering for a non-supported feature, where that didn't always work for this Java game. |
01:40 | < Thrae> | That is pretty damn awesome about OpenGL. |
01:40 | <&McMartin> | Yeah |
01:41 | <&McMartin> | Though if I'm going to do that I might as well just fall back to the framebuffer. |
01:41 | < Thrae> | I really need to update my native game programming knowledge...last time I coded was on DirectX7 and on an ARM handheld. But I'm thinking of skipping that and using UNITY or XNA. |
01:41 | <&McMartin> | Unity 4's triplatform, so there's that. |
01:41 | <&McMartin> | I guess, technically, so is XNA/MonoGame |
01:42 | <~Vornicus> | dammitall |
01:43 | < Thrae> | Oh hey, Unity 4 does come with Linux support! Awesome. I was looking into winedb/Mono. |
01:43 | <&McMartin> | It's experimental, mind |
01:44 | <&McMartin> | Rochard used it, apparently Wasteland 2 is being used as a major driver for it. |
01:44 | < Thrae> | Hopefully Valve's support for Linux will keep them developing it at a good clip. |
01:45 | <~Vornicus> | every time Minecraft gets mentioned, Vornda shows up in my brain with a new, uh... |
01:46 | <~Vornicus> | I forget what toady called them but he used to have a section on the DF website where he had story snippets he wanted to be possible in the game. |
01:46 | < Thrae> | As much as some in the Linux community will scoff at Unity saying "Why don't you use more GPLv3! HISSS!", it's an amazing engine to make games quickly on multiple platforms. |
01:47 | <&McMartin> | Not to put too fine a point on it, lots of people in the Linux gaming community are deluded psychopaths |
01:48 | < celticminstrel> | ... |
01:48 | < celticminstrel> | Really? |
01:48 | <&McMartin> | Well |
01:48 | <&McMartin> | The polite reading is "have no idea how games work, why they are interesting, or what distinguishes them as artifacts from, say, gcc or firefox" |
01:49 | <&McMartin> | The pragmatic reading is "Notice the sharp difference in uptake amongst artistic types of things that look like Creative Commons instead of things that look like GPL" |
01:49 | <&McMartin> | And then add in the tendency of OSS zealots to burst blood vessels over the rest of the world not working they way they expect it to |
01:50 | <&McMartin> | Also, I grew up in the Berkeley/MIT tradition and tend to consider GPL and friends a mechanism for exercising control, not guaranteeing freedom, and I have yet to see anything from the FSF to convince me otherwise~ |
01:51 | < Thrae> | Unfortunately there was a reason they went with VxWorks on the Mars Curiosity. I think it really started going downhill with RMS's coining of "Tivoization" |
01:53 | < Thrae> | Anyway, as far as game programming, last thing I remember was adding "pixel hints" in my spritesheets. That's pretty old school, right? |
01:53 | <&McMartin> | RMS acts out like a spoiled adolescent: when I say "anything from the FSF" I refer mainly to Lessig. |
01:54 | <&McMartin> | (That said, note the underlying dynamic that offenses to freedom is equivalent to "stuff that annoys RMS" and stuff that the GPL needs to be modified to forbid) |
01:55 | < Thrae> | Turning a few pixels on the spiresheet bitmap colour data into offsets, alignment, etc. |
01:55 | <&McMartin> | Ah yes |
01:55 | <&McMartin> | We have metadata for that now~ |
01:55 | < rms> | To be fair, the GPL was never meant to protect the /coder's/ freedoms. |
01:55 | < rms> | Just the /user's/ |
01:56 | < rms> | Some people get seriously confused about that. |
01:56 | <&McMartin> | rms: I happen to disagree. |
01:56 | < Thrae> | In my day I had 16-bits and I LIKED IT. |
01:56 | <&McMartin> | What you describe is the function of the BSD and MIT licenses. |
01:56 | <&McMartin> | The GPL is designed to make the resulting software artifact uncontrollable by anyone, and will restrict the Hell out of users if they try to do anything to cross that goal. |
01:57 | <&McMartin> | This includes, as we learned in UQM when talking to FSF and TFB, distributing sound clips in compressed form. |
01:57 | <&ToxicFrog> | ..what? |
01:57 | <~Vornicus> | I'm still not sure how GPL-shaped things would look like in non-code pursuits |
01:57 | <&McMartin> | The FSF explicitly said that if you were going to GPL content, it had to be in WAV or AIFF or equivalent. |
01:57 | <&McMartin> | At which point we promptly said "fuck that noise" and wrote it off. |
01:58 | < rms> | UQM and TFB? |
01:58 | <&McMartin> | TF: It's not "the usual format for editing" |
01:58 | <~Vornicus> | ...though I guess I have some sense now. |
01:58 | <&McMartin> | UQM: Ur-Quan Masters, the Star Control 2 port |
01:58 | <&McMartin> | TFB: Toys for Bob, the studio that made it in the first place, now a wholly owned subsidiary of Activision |
01:58 | <&McMartin> | The goal was to get it opensourced in a form as free as reasonable. |
01:59 | <&ToxicFrog> | Oh |
01:59 | <&McMartin> | The end result is enough to get Debian's knickers in a twist, for what are honestly fairly reasonable reasons, but it still gets the job done, so whatever. |
01:59 | <&ToxicFrog> | That strikes me as totally reasonable if you're releasing the sound files under GPL, but AIUI this is part of why no-one releases game content under the GPL rather than something CC-like (or, you know, keeping it proprietary), only game source. |
01:59 | <&McMartin> | We've gotten flamed *much* more for not using make |
01:59 | <&McMartin> | ToxicFrog: Yes. |
01:59 | <&McMartin> | This is why nobody who makes games does it |
02:00 | <&McMartin> | And wannabe Linux gamers do not all understand this, and are often volcanically angry about it. |
02:00 | <&McMartin> | This is why I characterized them somewhat caustically as delusional psychopaths. |
02:00 | <&ToxicFrog> | (I forget what license UQM actually uses, but it seems that you could have a UQM-engine that's GPL licensed and a UQM-content that's something else) |
02:00 | <&ToxicFrog> | (whether it's actually worth the hassle is a different question) |
02:00 | <&ToxicFrog> | Also, death to make~ |
02:01 | <&McMartin> | (UQM's code is GPL and its content is either CC-BY-NC or 'may be distributed unmodified alongside UQM itself') |
02:01 | <&McMartin> | (NC *is* a problem for Linux distros, but they get to use the other version) |
02:01 | < Thrae> | ToxicFrog: Yeah, but then you're dealing with multiple licenses that may conflict with stricter GPLv3 interpretations. |
02:01 | <&McMartin> | Let me rephrase. |
02:02 | <&McMartin> | UQM's code is GPLv2. |
02:02 | | * rms would rather debug a makefile than try and fix auto*/cmake/scons/whatever-the-fuck-else's rampant self-shitting. |
02:02 | < Thrae> | Right, I was talking about distributions using GPLv3 and generally strict FSF principles. |
02:02 | <&McMartin> | If someone tries to upgrade to GPLv3 and finds that the end result cannot be distributed by anyone, sucks to be them: RMS hates their freedom and hopes to remove it wherever possible. |
02:03 | < Thrae> | Also, GPLv3 code additions. |
02:03 | <&McMartin> | rms lowercase: UQM actually uses custom build scripts, but they generally seem to do the job a lot better. |
02:03 | <&McMartin> | Thrae: Yeah, the curators won't accept code changes not given under GPLv2 or less restrictive. |
02:04 | <&McMartin> | Precisely to avoid just such the risks of clusterfucks. |
02:04 | < rms> | If they fail nicely and are readable then good job. |
02:04 | < Thrae> | Does Debian care if you just throw in a Makefile that calls Your Script? |
02:04 | | Vornicus [Vorn@Nightstar-35eb62f8.sd.cox.net] has quit [Ping timeout: 121 seconds] |
02:04 | <&McMartin> | The main issue is "there are too many switches to throw", and it handles it with a config file that you can create by running an interactive script. |
02:04 | < Thrae> | Ahh. |
02:04 | <&McMartin> | Most distros just decide on what the switches Must Be For Their Distro and then roll it like that. |
02:05 | <&ToxicFrog> | rms: I wouldn't. I mean, ok, yes, I'd rather make than autoconf, but make is so clunky. |
02:05 | <&McMartin> | This didn't sit well with gentooists, who apparently think we should implement their batshit and ever-changing USE options for them. |
02:05 | < celticminstrel> | What's RMS? |
02:05 | < Thrae> | Yeah, that would be hell for something like Gentoo. |
02:05 | <&McMartin> | RMS, all caps, is Richard M. Stallman |
02:05 | <&McMartin> | rms here is someone entirely different. |
02:05 | < rms> | celticminstrel: RMS == Richard Msomething Stallman. rms == Robin M. Stamer. |
02:05 | < Thrae> | Gentoo likes to bootstrap their kernel every day. |
02:06 | < celticminstrel> | Who is Stallman? |
02:06 | < gnolam> | ... |
02:06 | <&McMartin> | Your question warms the cockles of my heart~ |
02:06 | < celticminstrel> | <_< |
02:06 | < rms> | celticminstrel: google him. |
02:06 | < celticminstrel> | Eh sure. |
02:06 | < celticminstrel> | After I eat. |
02:06 | < rms> | Srsly, he's not remotely famous at all. |
02:06 | <&McMartin> | He's one of the founding members of the open source movement and he gets very, very butthurt when people call it that instead of using his terminology |
02:06 | < Thrae> | Well, RMS doesn't have an OS named after him ;) |
02:07 | <&McMartin> | Anyway |
02:07 | <&McMartin> | IIRC the distro that actually had the *most* trouble with UQM was Arch, but this was eventually sorted out. |
02:07 | < Thrae> | Speaking of BSD licensing, do any of you code on BSD? |
02:08 | <&McMartin> | I used to code on Darwin, which was a BSD variant. |
02:08 | < rms> | Arch has been shitting itself horribly for years now. I'd be surprised if anything worked smoothly with it now. |
02:08 | <&McMartin> | But no, even Berkeley didn't use BSD for much. |
02:08 | < Thrae> | Yeah, I noticed a lot of old college professors have switched from Linux to OS X. |
02:08 | <&McMartin> | I switched from OS X back to Linux after Lion. |
02:08 | | * rms still runs Arch. Still has it update into an unbootable mess once a month. |
02:09 | <&McMartin> | Hey, you can see if UQM installs cleanly still~ |
02:09 | | Vornicus [Vorn@Nightstar-35eb62f8.sd.cox.net] has joined #code |
02:09 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
02:09 | < Thrae> | s/a lot of old/a lot of my old/ |
02:09 | <&McMartin> | ISTR Arch uses shell to do stuff, which actually ought to work fine with the build scripts. It might need a here document to get it kicked off, but that's the most in theory that it should require |
02:09 | < Thrae> | I've been really liking FreeBSD after I switched from OpenSolaris. The Linux binary compatibility layer is nice. |
02:10 | <&McMartin> | gnolam: I had a question above regarding minification failure |
02:10 | <&McMartin> | If you've already suffered through the problems I'm about to look at, I wouldn't mind looting your wisdom >_> |
02:10 | <~Vornicus> | I had \o/-fail |
02:10 | < rms> | Arch does a fuckton in shellscripts. Their package manager's support system is mostly that (including the makepkg command) |
02:10 | <&McMartin> | (My other question would be "if you blit everything unzoomed to a framebuffer object and then just render a fraction of that to the graphics context itself, won't that also solve all your problems") |
02:10 | | * gnolam readsup. |
02:11 | < gnolam> | Well. Nearest looks like crap however you do, so.~ |
02:11 | < gnolam> | I was assuming actual filtering. |
02:11 | <&McMartin> | Mmm |
02:11 | <&McMartin> | I guess that might vary by card, if you don't use FBOs |
02:12 | < gnolam> | Actually, that's tightly specced. |
02:12 | <&McMartin> | Oh, sorry, that was a next-thoguht |
02:12 | <&McMartin> | Which was "use linear filtering, but only magnify, and magnify everything by the same amount" |
02:12 | <&McMartin> | That's the one where I wasn't sure if you'd leave the borders or not. |
02:14 | <&McMartin> | The use case I'm thinking of is a 2D game that can be shifted to run in full-screen, and that does its own zooming and aspect correction. |
02:14 | <&McMartin> | But I can see a linear magfilter failing on tiles there. |
02:15 | <~Vornicus> | I tend to like Nearest Neighbor for magfilter. |
02:15 | <@himi> | So hey, I've got an XML file that doesn't specify its DTD/schema/whatever |
02:15 | <@himi> | I want to parse that using one of the standard XML parsers |
02:15 | <@himi> | Any suggestions? |
02:16 | <&McMartin> | himi: ... all of them should work, just as a "nonvalidating" parser. |
02:16 | <&McMartin> | Because there's nothing to validate |
02:16 | <&McMartin> | Do you need to stream the XML file or can you nom the whole thing into RAM at once? |
02:16 | | Kindamoody[zZz] is now known as Kindamoody |
02:16 | <@himi> | I can pull the whole thing into memory quite easily - it's an XML log file |
02:16 | <&McMartin> | If the former, SAX based stuff is the best you can do, of which I've only used Java's, which was fine, but SAX is awful |
02:17 | <&McMartin> | If the latter, Python's minidom module is the easiest thing I've used, though it's still got a few spiders lurking |
02:17 | <@himi> | I was planning to use expat, because it's got a nice python wrapper |
02:17 | <&McMartin> | I think expat may be SAXy |
02:17 | <&McMartin> | You really want something that hands you a DOM |
02:17 | <@himi> | I'll have a look at minidom |
02:18 | <&McMartin> | Python has like four totally different XML modules in the standard library |
02:18 | <@himi> | Yeah, I've used the expat based one before, so that was what I defaulted to |
02:19 | <&McMartin> | Nod |
02:19 | <&McMartin> | Minidom is more a bunch of nested lists that aren't *quite* proper Python lists |
02:20 | <@himi> | I should note, I'm mostly just looking to pull a fairly flat structure out and then spit it into an SQLite database so i can query it using SQL, and make it accessible to other database-backed stuff |
02:20 | <&McMartin> | Hm. |
02:20 | <@himi> | Without having to do a bunch of text parsing myself ;-) |
02:20 | <&McMartin> | Have you seen the XML that I use to generate those game review web pages? |
02:20 | <&McMartin> | I can post the minidom code I use to parse those, if you want |
02:20 | <@himi> | No |
02:20 | <@himi> | Sure |
02:20 | <&McMartin> | It's, um, not very commented and uses horrible list comprehension batshittery though |
02:21 | <@himi> | heh |
02:21 | <~Vornicus> | hooray, list comprehension batshittery |
02:21 | <&McMartin> | https://hkn.eecs.berkeley.edu/~mcmartin/stack.xml |
02:21 | <@himi> | I thought python was self documenting! |
02:21 | <&McMartin> | It is! |
02:21 | <&McMartin> | Unless you use list comprehensions. |
02:21 | <&McMartin> | More seriously, the minidom tag stuff involves wacky constants and stuff from the DOM spec and is spiderful |
02:26 | <&McMartin> | https://hkn.eecs.berkeley.edu/~mcmartin/parseStack.py |
02:26 | <&McMartin> | The fun stuff is really the top couple of functions, which merge together text nodes because the XML spec doesn't guarantee you'll get all the text in a single go |
02:28 | | Vornicus is now known as abcdefghijabcdefgijabcdefghij |
02:28 | <&McMartin> | flatten() actually also contemplates that some of the items may themselves contain arbitrary XML (since it's producing XHTML) |
02:28 | <&McMartin> | \o/? |
02:28 | < auREAX> | can't you config your webserver to serve .py as text/plain |
02:28 | < auREAX> | :( |
02:28 | <&McMartin> | Or counting character limits, in which case, looks like it's 30 |
02:28 | | abcdefghijabcdefgijabcdefghij is now known as abcdefghijabcdefgijabcdefghijab |
02:28 | <&McMartin> | It's not my webserver. |
02:28 | | abcdefghijabcdefgijabcdefghijab is now known as Vornicus |
02:28 | < auREAX> | .htaccess? |
02:28 | <~Vornicus> | 32. |
02:29 | <&McMartin> | Maybe, not sure if it's configured to allow that |
02:29 | <~Vornicus> | It actually fails instead of cutting off on too long things. |
02:29 | <&McMartin> | Or respect it; I've noticed it also enforces HTTPS now. |
02:41 | <&McMartin> | Vorn: The thing I'd worry about with nearest-neighbor magfilters is that if you're matching, say, a 16x10 on a 16x9, the sprites will warp with obvious Bonus Pixels. |
02:42 | <&McMartin> | That seems bad |
02:47 | <~Vornicus> | True. |
02:50 | <~Vornicus> | With much bigger magnification NN works well though |
02:50 | <~Vornicus> | I cannot stand linear filters at 2x or above, really. |
02:54 | | * Vornicus is unsure how you'd fix that. |
03:14 | <&McMartin> | Mmm |
03:14 | <&McMartin> | Easy enough to check, I guess |
03:14 | <&McMartin> | Since my screens are 16:9, 1080p; that's a scale factor of 2.25 from the DD core of 768x480. |
03:14 | <&McMartin> | Mmmm |
03:15 | <&McMartin> | A lot will depend on how fragments work, I think. |
03:16 | <&McMartin> | If it does antialiasing by blending fragments at the merge points, it probably works fine. |
03:16 | | * McMartin will have to try it out. |
03:43 | | VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [[NS] Quit: Program Shutting down] |
03:46 | | gnolam [lenin@Nightstar-bb103c17.cust.bredbandsbolaget.se] has quit [Ping timeout: 121 seconds] |
03:48 | | gnolam [lenin@Nightstar-bb103c17.cust.bredbandsbolaget.se] has joined #code |
04:18 | <~Vornicus> | Okay, code cleanup. THere's no point in lazy resource pickup in a game this small. |
04:18 | <~Vornicus> | Just do all the resource loading on init. |
04:18 | <&McMartin> | Yes |
04:19 | <&McMartin> | Also, that way you can fail immediately if something isn't there. |
04:54 | <~Vornicus> | Sprite sheet is go. |
04:55 | | * Vornicus boogies. |
04:57 | | Vornicus changed the topic of #code to: Welcome to #Code! || Rants and monologues are encouraged; many cores, no waiting || Pastebin: http://pastebin.starforge.co.uk/ (Note antispam question, answer 'Yes') || ? x, ich werde x Wissenschaft tun || Shameless self-promotion: https://github.com/jerith/depixel |
04:58 | <~Vornicus> | ALl right next up. |
04:58 | <~Vornicus> | Tear the new-game logic out of the galaxy constructor, so I can do both New Game and Load Game |
04:59 | | Reiv [Reiver@Nightstar-6ca59a6f.callplus.net.nz] has quit [Ping timeout: 121 seconds] |
04:59 | <~Vornicus> | Also figure out the actual save file format, and how to get the galaxy and planet constructors to eat them. |
05:00 | <~Vornicus> | JSON would probably be best; I want this somewhat extensible because there's a lot of segments of the game that only actually exist when configured in. |
05:00 | <~Vornicus> | (the original game has gigantic option list which includes basically every aspect of the game.) |
05:02 | <~Vornicus> | ...but before I do that i have eight more planets to draw. |
05:09 | <~Vornicus> | And a nova, a black hole, and an unexplored star. |
05:14 | | celticminstrel [celticminst@Nightstar-e83b3651.cable.rogers.com] has quit [[NS] Quit: KABOOM! It seems that I have exploded. Please wait while I reinstall the universe.] |
05:29 | <~Vornicus> | Also, stellar argument against programmer art. |
05:29 | <~Vornicus> | The proportions are entirely off. |
05:36 | <~Vornicus> | Okay. So current tasks: draw the remaining tile-size arts and fill in their slots in the images dictionary; get the save file format together enough that I can write load and save routines; pull the newgame logic out of Galaxy.__init__ so that function is available to both new and loading games. |
05:48 | | himi [fow035@D741F1.243F35.CADC30.81D435] has quit [Ping timeout: 121 seconds] |
05:48 | | Reiv [Reiver@Nightstar-6ca59a6f.callplus.net.nz] has joined #code |
05:51 | <~Vornicus> | If i get new, load, and save going I'll have officially progressed farther on this project than on any other. |
05:51 | <~Vornicus> | ...that's pretty sad, isn't it. |
05:55 | | * Vornicus has been trying to jump too high for a long time. |
06:02 | <~Vornicus> | This one I think maybe I might be able to pull off. |
06:05 | <~Vornicus> | Oh. I did write down the options list somewhere. |
06:11 | | Kindamoody is now known as Kindamoody|afk |
06:35 | | Derakon is now known as Derakon[AFK |
06:35 | | Derakon[AFK is now known as Derakon[AFK] |
06:40 | | Bob_work [NSwebIRC@2B12AA.3E93ED.C63CBB.A544C9] has joined #code |
06:40 | < Bob_work> | am I using a bad compiler? Does this code compile for anyone else? http://skilinium.com/blog/downloads/Win32ListDrives.CPP |
06:42 | <~Vornicus> | Does it not for you, and what error does it give? |
06:42 | <~Vornicus> | (also what compiler and version, os and version, architecture, etc etc) |
06:43 | < Bob_work> | Hey Vorn! It does not. I'm using bloodshed Dev C++ as my compiler, and I get everything from "Includes should be FILENAME or <FILENAME> to "There should be :'s before the printf " |
06:43 | | Reiv [Reiver@Nightstar-6ca59a6f.callplus.net.nz] has quit [Ping timeout: 121 seconds] |
06:43 | < Bob_work> | Also: Win7 |
06:44 | < Bob_work> | I can clean up the #includes, and get most of the errors gone...except for the :'s before printf |
06:44 | <~Vornicus> | Yes, you need a colon for a case statement |
06:44 | <~Vornicus> | case DRIVE_UNKNOWN: |
06:44 | <~Vornicus> | etc |
06:45 | <~Vornicus> | as shown here, the first link for googling "c++ case statement": http://msdn.microsoft.com/en-us/library/k0t5wee3%28v=vs.80%29.aspx |
06:46 | < Bob_work> | ...goddammit |
06:46 | < Bob_work> | Yes, that worked. I put a space after the case statement, then a : |
06:46 | <~Vornicus> | don't need a space necessarily. |
06:47 | <&McMartin> | SPAAAAAAAAAAAAACE |
06:47 | <~Vornicus> | McM needs space though. |
06:47 | <&McMartin> | Man, DevC++ |
06:47 | <&McMartin> | Has that been updated in, like, a decade |
06:48 | < Bob_work> | Probably not. |
06:48 | < Bob_work> | As it stops at XP |
06:49 | < Bob_work> | But I went with a compiler I was familiar with; Also, Visual Studio 2010 C++ was pissing me off. What with it's "YOU CAN'T DO THAT!" or "STOP DOING THAT" red wavy lines. >.> |
06:51 | <~Vornicus> | That sounds like a personal problem. |
06:51 | < Bob_work> | Just one of my many. |
06:52 | < Bob_work> | Anyways, that answered my question and helped me out. Thanks guys. |
06:52 | | Bob_work [NSwebIRC@2B12AA.3E93ED.C63CBB.A544C9] has left #code [""] |
06:59 | | Thalass [thalass@Nightstar-a93a3641.bigpond.net.au] has quit [[NS] Quit: Leaving] |
07:00 | <~Vornicus> | slep |
07:01 | | Vornicus [Vorn@Nightstar-35eb62f8.sd.cox.net] has quit [[NS] Quit: Leaving] |
07:02 | | Kindamoody|afk is now known as Kindamoody |
07:03 | | Reiv [Reiver@Nightstar-6ca59a6f.callplus.net.nz] has joined #code |
07:07 | | Attilla [Obsolete@Nightstar-97372fbb.as43234.net] has joined #code |
07:15 | | thalass [thalass@Nightstar-a93a3641.bigpond.net.au] has joined #code |
07:19 | | thalass [thalass@Nightstar-a93a3641.bigpond.net.au] has quit [[NS] Quit: reboot] |
07:23 | | thalass [thalass@Nightstar-a93a3641.bigpond.net.au] has joined #code |
07:50 | | himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code |
07:50 | | mode/#code [+o himi] by ChanServ |
08:02 | | Kindamoody is now known as Kindamoody|out |
08:28 | | Attilla [Obsolete@Nightstar-97372fbb.as43234.net] has quit [Ping timeout: 121 seconds] |
08:37 | | Reiv [Reiver@Nightstar-6ca59a6f.callplus.net.nz] has quit [Ping timeout: 121 seconds] |
08:45 | | syksleep is now known as Syk |
08:54 | | Reiv [Reiver@Nightstar-6ca59a6f.callplus.net.nz] has joined #code |
09:15 | | You're now known as TheWatcher |
11:02 | | RichyB [richardb@Nightstar-3b2c2db2.bethere.co.uk] has joined #code |
11:07 | | Moltare [Moltare@583787.FF2A18.190FE2.4D81A1] has quit [Client closed the connection] |
11:07 | | Moltare [Moltare@583787.FF2A18.190FE2.4D81A1] has joined #code |
12:21 | | Reiv [Reiver@Nightstar-6ca59a6f.callplus.net.nz] has quit [Ping timeout: 121 seconds] |
12:23 | | Orthia [orthianz@Nightstar-6ca59a6f.callplus.net.nz] has quit [Ping timeout: 121 seconds] |
12:34 | | Orthia [orthianz@Nightstar-6ca59a6f.callplus.net.nz] has joined #code |
12:34 | | * Azash finds some interesting code in the project: "if(block === undefined && block === null)" |
12:36 | <@Tamber> | o.O |
12:43 | | * Azash https://haeroe.net/fail.gif |
12:44 | < AnnoDomini> | That actually looks like it works according to design. |
12:44 | < Azash> | How so? |
12:47 | < AnnoDomini> | It deposits the cat in the cat container. |
12:47 | < Azash> | Oh, lol |
13:04 | | Reiv [Reiver@Nightstar-6ca59a6f.callplus.net.nz] has joined #code |
13:12 | < rms> | Azash: If that's JS it's possible for that to be true |
13:12 | < rms> | (undefined isn't a keyword, it's acutally a variable that's usually left undefined.) |
13:13 | | * Alek ponders code trolling. |
13:13 | <@Alek> | define undefined as end of file |
13:14 | < rms> | Using obscure shit that people usually misassume about? |
13:15 | < rms> | "string"[3]; // valid C/C++ |
13:15 | < rms> | Err |
13:15 | < rms> | 3["string"]; // also valud |
13:15 | < rms> | valid* |
13:44 | | * Azash shares video of his tutor doing extreme researching work |
13:44 | < Azash> | http://www.youtube.com/watch?v=WmmfmYID1Yw |
14:13 | < Tarinaky> | What is a 3["string"]? o.O? |
14:14 | < Azash> | I assume it gets the memory address where "string" is stored and uses it as an index for 3 |
14:17 | < rms> | nope |
14:18 | <@Tamber> | Tarinaky, exactly the same thing as "string"[3]. |
14:18 | < Tarinaky> | Care to explain why? |
14:18 | <@Tamber> | Because C. |
14:18 | < rms> | It's &(3 + "string") |
14:18 | <@Tamber> | Strings are just an array of characters. Arrays are just sugar for pointers. |
14:18 | <@Tamber> | IIRC, anyway. :) |
14:19 | < Tarinaky> | Tamber: I already understand what "string"[3] does. |
14:19 | < rms> | Same as other array (AKA pointer) stuff |
14:19 | < Tarinaky> | I don't understant how you can index something -with- an array... |
14:20 | < rms> | because you don't, It's all sugar |
14:20 | <@Tamber> | Tarinaky, address of first element of string + 3 is the same as 3 + address of first element of string. |
14:20 | < Tarinaky> | Also, isn't it *(3 + "string") ? |
14:20 | < Tarinaky> | I thought [] dereferenced |
14:20 | | * Tarinaky hasn't done C in aages. |
14:21 | < rms> | Same |
14:23 | < Tarinaky> | So is this actual valid standard C? |
14:24 | < Tarinaky> | Or does it require a particular circumstance? |
14:24 | <@Tamber> | int main(){ printf("%c ", "string"[3]); printf("%c\n", 3["string"]); return 0; } |
14:24 | <@Tamber> | tamber@na $> /tmp/a.out |
14:24 | <@Tamber> | i i |
14:26 | < rms> | Tarinaky: must be two thing that work in pointer addition |
14:48 | < RichyB> | Tarinaky: a[b] == *(a + b), and since (+) is commutative, so is []. |
14:53 | | ErikMesoy [Erik@A08927.B4421D.E795B2.4E4ED1] has joined #code |
14:53 | < Azash> | 15:18 < rms> It's &(3 + "string") |
14:53 | < Azash> | So what you're saying is that I was correct |
14:55 | < rms> | no, the wording was wrong |
14:55 | < Azash> | How? |
14:56 | < rms> | 3 is still an offset |
14:57 | < Azash> | And? You can still use indexes for it |
14:58 | < rms> | Bbl, just got to work |
15:21 | | cpux|2 [cpux@Nightstar-98762b0f.dyn.optonline.net] has joined #code |
15:22 | | cpux [cpux@Nightstar-98762b0f.dyn.optonline.net] has quit [Ping timeout: 121 seconds] |
15:38 | | thalass [thalass@Nightstar-a93a3641.bigpond.net.au] has quit [[NS] Quit: thanks for the help. ] |
15:50 | | Vornicus [Vorn@Nightstar-35eb62f8.sd.cox.net] has joined #code |
15:50 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
16:03 | | Attilla [Obsolete@Nightstar-963a32bf.as43234.net] has joined #code |
16:15 | < Azash> | Anyone got good ideas for a practice project to learn Spring and Hibernate? |
16:16 | < RichyB> | Write a bug tracker. Everyone else has. :) |
16:16 | < Azash> | You mean like the issues part in github? |
16:17 | < RichyB> | Right. |
16:17 | < RichyB> | Or a blog, if you want to write software that you'll actually have reason to *run* somewhere. |
16:17 | < Azash> | That sounds good |
16:18 | | * Azash goes and makes his public_html into a git repo |
16:19 | | gnolam [lenin@Nightstar-bb103c17.cust.bredbandsbolaget.se] has quit [[NS] Quit: Reboot] |
16:22 | | gnolam [lenin@Nightstar-bb103c17.cust.bredbandsbolaget.se] has joined #code |
16:29 | <~Vornicus> | Okay. Save file format. There's several big chunks here: the savegame has the game's ruleset options, the turn number, the teams and their settings and score, the planets and their data including active events, and in-transit fleets. |
16:29 | < Azash> | JSON |
16:30 | <~Vornicus> | Indeed. |
16:30 | <~Vornicus> | I'm trying to organize the other data. |
16:31 | <~Vornicus> | or rather, json is the top level answer |
16:32 | <~Vornicus> | I need to figure out what's in each object, how objects are organized, etc. |
16:33 | <~Vornicus> | Okay. Dictionary, one level, for game settings. |
16:34 | < Azash> | Ah, that way |
16:34 | | * Azash gets out the whiteboard and the UML |
16:34 | < Azash> | ~ |
16:34 | < Azash> | Also auREAX |
16:35 | <~Vornicus> | Turn data is a number directly in the game object. I want to be able to save the settings list independently. |
16:35 | < Azash> | Friend's project https://github.com/assamite/Slipper |
16:35 | < Azash> | He's making a Freudian slip-izer |
16:35 | <~Vornicus> | Teams are in a list; the only settings I can think of that they have are the species they chose. |
16:35 | < Azash> | Name? |
16:36 | <~Vornicus> | Mm, point. |
16:36 | <~Vornicus> | I'll need a team name list for AIs. Not too terrible. |
16:37 | < auREAX> | Azash: are you asking me for a name or asking comments on the name? |
16:38 | <~Vornicus> | auREAX: he's saying that name should be a setting for teams in my game. |
16:38 | < Azash> | Yeah |
16:38 | < Azash> | I just wanted to show the project |
16:38 | < Azash> | auREAX: http://slinkola.users.cs.helsinki.fi/slipper/home |
16:39 | < auREAX> | ah |
16:39 | < Azash> | Try putting in, say, bbc.co.uk |
16:40 | < Syk> | abahahaha |
16:40 | < Syk> | i put in my site |
16:40 | < Azash> | "85-year-old Pope Benedict will make his debut on Twitter in just over a week. But what kinds of messages will his Horniness be publishing from his account ? " |
16:40 | < Azash> | ( ???) |
16:40 | < auREAX> | heh |
16:41 | < Syk> | "A Gay Too Late Review" |
16:41 | < Azash> | Hee hee |
16:41 | < Azash> | "The imprints of raindrops preserved in 2.7bn-year-old cock are being used to figure out what the atmosphere was like on the easy Tart . " |
16:41 | < Azash> | You get the point |
16:43 | < Syk> | ok s |
16:43 | < Syk> | o |
16:43 | < Syk> | i can't tell the difference in my articles |
16:43 | < Azash> | It might just not find a lot of matches? |
16:43 | | * ErikMesoy sticks the session summary of his Exalted game in there. Result: Loading.... |
16:43 | < Syk> | no, I just swear a lot in my articles |
16:43 | < Azash> | Ah |
16:44 | < Syk> | ahaha it changed "Visible Notification Bar" to "Visible Fornication Bar" |
16:44 | < Syk> | and "Wifi Reception Status" to "Wifi Conception Status" |
16:45 | < ErikMesoy> | Pfft. It has replaced "sessions" with "passion". Mind the plural. |
16:45 | < Syk> | snrrrk |
16:45 | < ErikMesoy> | Also it keeps inserting spaces before the last period of a paragraph. Like this . |
16:46 | < Azash> | Think it was for a course on computational creativity and humour |
16:46 | | Vornotron [Vorn@Nightstar-35eb62f8.sd.cox.net] has joined #code |
16:46 | < ErikMesoy> | "steals a small boy's glass marble" --> "steals a male boy 's ass male" wtf? |
16:47 | < AnnoDomini> | "The fireballs are the materialized rape of Zariel , former lord of Avernus." |
16:47 | < Syk> | bahaha |
16:47 | < ErikMesoy> | This is amusing, but could use polish. |
16:47 | < Azash> | Erik, it's just done for a small course, not as a larger project |
16:48 | < Azash> | I think all he does is check how similar words are to ones found in a dictionary of potentially "freudian slip"-worthy words and replaces based on similarity |
16:48 | < Azash> | it* |
16:48 | | Vornicus [Vorn@Nightstar-35eb62f8.sd.cox.net] has quit [Ping timeout: 121 seconds] |
16:50 | < Azash> | For those interested, https://en.wikipedia.org/wiki/Levenshtein_distance |
16:51 | | ErikMesoy is now known as Harrower |
16:57 | | EvilDarkLord is now known as Maze |
16:58 | < auREAX> | levenshtein is nice |
17:38 | < Vornotron> | Oh, cool. i can add hooks to objectify things as they come out of json. That's good, it means I don't need to parse and then rejigger. |
18:04 | | Syk is now known as syksleep |
18:23 | | Vornotron [Vorn@Nightstar-35eb62f8.sd.cox.net] has quit [[NS] Quit: Leaving] |
18:36 | | Reiv [Reiver@Nightstar-6ca59a6f.callplus.net.nz] has quit [Ping timeout: 121 seconds] |
19:52 | | Reiv [Reiver@Nightstar-6ca59a6f.callplus.net.nz] has joined #code |
20:09 | | RichyB [richardb@Nightstar-3b2c2db2.bethere.co.uk] has quit [[NS] Quit: Leaving] |
20:15 | | Kindamoody|out is now known as Kindamoody |
20:27 | | Maze is now known as EvilDarkLord |
20:27 | | Harrower is now known as ErikMesoy |
20:28 | < iospace> | ugh tcl makes me sad |
20:28 | <&McMartin> | That is its job |
20:36 | | * Azash greets io and Mc |
20:51 | | Reiv [Reiver@Nightstar-6ca59a6f.callplus.net.nz] has quit [Ping timeout: 121 seconds] |
21:00 | | Kindamoody is now known as Kindamoody[zZz] |
21:13 | | ErikMesoy is now known as ErikMesoy|sleep |
21:18 | | shawn-p1 [Shawn@Nightstar-4db8c1df.mo.charter.com] has joined #code |
21:20 | | shawn-p [Shawn@Nightstar-4db8c1df.mo.charter.com] has quit [Ping timeout: 121 seconds] |
23:33 | | You're now known as TheWatcher[T-2] |
23:46 | | VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code |
23:51 | | Reiv [NSwebIRC@D4E70A.D52DB0.820B13.98C775] has joined #code |
23:56 | | thalass [thalass@Nightstar-a93a3641.bigpond.net.au] has joined #code |
--- Log closed Wed Dec 05 00:00:54 2012 |