code logs -> 2015 -> Sun, 26 Jul 2015< code.20150725.log - code.20150727.log >
--- Log opened Sun Jul 26 00:00:16 2015
00:01 JustBob [justbob@Nightstar.Customer.Dissatisfaction.Administrator] has left #code []
00:01 JustBob [justbob@Nightstar.Customer.Dissatisfaction.Administrator] has joined #code
00:01 mode/#code [+o JustBob] by ChanServ
00:54 jeroud [sid10043@Nightstar-6br85t.irccloud.com] has quit [[NS] Quit: ]
00:54 jeroud [sid10043@Nightstar-h2b233.irccloud.com] has joined #code
00:54 mode/#code [+ao jeroud jeroud] by ChanServ
00:54 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed]
01:06
<&McMartin>
https://bumbershootsoft.wordpress.com/2015/07/26/vic-ii-interrupt-timing-or-how- i-learned-to-stop-worrying-and-love-unstable-rasters/
02:15
<&McMartin>
"Next time: I admit to cheating in this demo, bust myself, and then make amends."
02:22
<&ToxicFrog>
Ok, next up is not level generation but a reworking of some fundamentals of the entity system
02:30
<&ToxicFrog>
...hmm. Maybe.
02:30 * ToxicFrog warms up the ducks
02:31
<&ToxicFrog>
So, right now, all entities are stored in a big honkin' array, mapping entity ID to entity.
02:31
<&ToxicFrog>
If an entity needs to refer to another entity, it gets a Ref object, which wraps the entity's ID, rather than directly referencing the entity object itself.
02:32
<&McMartin>
Ducks?
02:32
<&McMartin>
Oh, right.
02:32
<&ToxicFrog>
To save the game, it just reprs this array into a file.
02:33
<&ToxicFrog>
This has one big disadvantage: it's impossible to swap individual parts of the game to disk.
02:33
<&ToxicFrog>
Which is not a big problem if I'm only generating 10-15 floors, but if I want to add DoomRL-style 100 or 666-floor challenge modes, or a ToME4 style infinite dungeon, that's a problem.
02:34
<&ToxicFrog>
(under testing 100 floors uses about 100MB of memory and produces a 45MB save file, which is quite reasonable, but that's with just terrain, which is really, really cheap)
02:34
<&ToxicFrog>
So.
02:34
<&ToxicFrog>
The proposal is to instead have a Container trait that lets entities own other entities, not just Refs to them.
02:35
<&ToxicFrog>
The top-level game structure only owns the top-level maps + a container ("the Void") for mapless entities.
02:35
<&ToxicFrog>
Each map then owns all the stuff it contains, the player owns their inventory, etc.
02:36
<&ToxicFrog>
The game still maintains a lookup table by object ID, but the table now only owns refs, not the actual objects.
02:36
<&ToxicFrog>
When moving from level N to level M, then, it does this:
02:36
<&ToxicFrog>
- move player from level N to the Void
02:36
<&ToxicFrog>
- invalidate all Refs to level N
02:36
<&ToxicFrog>
- write level N to disk
02:36
<&ToxicFrog>
- drop N from the game
02:37
<&ToxicFrog>
- load M from disk
02:37
<&ToxicFrog>
- create Refs to all objects in M
02:37
<&ToxicFrog>
- move the player from the Void to M
02:37
<&ToxicFrog>
Saving the entire game consists of saving all currently loaded levels (without moving the player) + saving the void.
02:38
<@Alek>
what's the void? is there some specific reason to save it?
02:38
<@macdjord>
<ToxicFrog> The top-level game structure only owns the top-level maps + a container ("the Void") for mapless entities.
02:39
<&McMartin>
aka "backstage"
02:39
<@Alek>
hm. what kind of mapless entities would those be?
02:39
<&ToxicFrog>
Or "the blueroom".
02:39
<@Alek>
and thanks, mac, I'd missed that line.
02:40
<&ToxicFrog>
Alek: not sure. I may end up not having any.
02:40
<&ToxicFrog>
Stuff that needs to be persistent across levels can be owned by the player.
02:40
<&ToxicFrog>
In which case I don't need a blueroom at all, but it's good to at least think about how it would work.
02:41
<&ToxicFrog>
Anyways. This complexifies the entity system somewhat, but I think it may be worth it.
02:42
<&ToxicFrog>
It permits infinite persistent level generation without worrying about memory, keeps the game's memory usage low and somewhat predictable, and makes autosaves and load/save in general much, much faster.
02:42
<&ToxicFrog>
Since it only needs to write a single level file when saving rather than the entire dungeon.
02:43
<&ToxicFrog>
In describing it out loud I haven't noticed any gaping flaws in this design, so if you've noticed any now is the time to mention them~
02:45
<&McMartin>
The only obvious one is that you can no longer have full cycles of containment.
02:45
<&McMartin>
That is probably a thing you don't want.
02:45
<&ToxicFrog>
Yeah, that's something that the current design permits, but it's not used anywhere and, AFAICT, never will be used.
02:46
<&McMartin>
(This was a standard catastrophic failure mode for Infocom games, where this wasn't defended against by the runtime. This was the first thing Inform blocked~)
02:46
<&ToxicFrog>
(oooooops)
02:47
<&McMartin>
(IIRC every version of Zork ever published let you put the box in the raft and then the raft in the box, causing both to vanish from the universe along with all their contents)
02:47
<&McMartin>
And now, preposterously rapid followup: https://bumbershootsoft.wordpress.com/2015/07/26/vertical-splitscreen-part-1-a-g ood-start/
02:47
<&McMartin>
(I've actually done the code work now for parts 2 and 3, but I don't think I'll do all that at once~)
02:48
<&ToxicFrog>
And I mean -- with the new design you could actually have a containment cycle, just not an ownership cycle, which the current design also disallows (everything is owned by the Game)
03:12
<&ToxicFrog>
McMartin: what do you mean by "VBLANK ending alarmingly early, on raster line 15"? I thought VBLANK was the time between the electron beam finishing scanning the last raster line and starting scanning the first one of the next refresh.
03:16 Kindamoody[zZz] [Kindamoody@Nightstar-180u8i.tbcn.telia.com] has quit [Connection closed]
03:17 Kindamoody|autojoin [Kindamoody@Nightstar-180u8i.tbcn.telia.com] has joined #code
03:17 mode/#code [+o Kindamoody|autojoin] by ChanServ
03:52 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
03:52 mode/#code [+qo Vornicus Vornicus] by ChanServ
04:14
<&McMartin>
TF: Those are accounted amongst the full raster lines.
04:14
<&McMartin>
And the index numbers are "as counted by the chip itself"
04:14 * McMartin points Vorn to two new articles at https://bumbershootsoft.wordpress.com/
04:15
<&McMartin>
TF: This means if you set the top-of-frame IRQ to, say, raster line 1, as one normally would do, as opposed to, oh, raster line $F8 on the previous frame, you are giving up thousands of cycles of being able to mess around without getting caught
04:17
<&McMartin>
That said, accounting VSYNC and VBLANK signals amongst the raster lines goes back at least to the NTSC standard itself, since the Atari 2600's screen guide said "three lines of VSYNC, 37 of VBLANK, 192 of display, 30 of overscan"
04:17
<&McMartin>
And IIRC VSYNC is the signal that you're really starting a new frame for real; VBLANK is just "turn off the beam"
04:18 * McMartin also points Vornicus to two new posts at https://bumbershootsoft.wordpress.com/
04:20
<~Vornicus>
Hoorah
04:21 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [Connection closed]
04:22
<&McMartin>
And IIRC you actually tended to turn on the VBLANK signal during overscan
04:22
<&McMartin>
(overscan is the worst)
04:22 Kindamoody|autojoin [Kindamoody@Nightstar-180u8i.tbcn.telia.com] has quit [Connection closed]
04:23 Kindamoody|autojoin [Kindamoody@Nightstar-180u8i.tbcn.telia.com] has joined #code
04:23 mode/#code [+o Kindamoody|autojoin] by ChanServ
04:57 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed]
05:05 Derakon is now known as Derakon[AFK]
05:08 celticminstrel [celticminst@Nightstar-c0l57i.dsl.bell.ca] has quit [[NS] Quit: KABOOM! It seems that I have exploded. Please wait while I reinstall the universe.]
06:39 Checkmate [Z@Nightstar-pdi1tp.customer.tdc.net] has quit [Ping timeout: 121 seconds]
06:48 Thalass [thalass@Nightstar-m49.o7s.158.104.IP] has quit [Ping timeout: 121 seconds]
06:53 macdjord is now known as macdjord|slep
08:11 Kindamoody|autojoin is now known as Kindamoody
11:10 gizmore [kvirc@Nightstar-vmrtsb.dip0.t-ipconnect.de] has joined #code
11:32 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code
12:19 gizmore [kvirc@Nightstar-vmrtsb.dip0.t-ipconnect.de] has quit [[NS] Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
12:33 Kindamoody is now known as Kindamoody|afk
13:27 Thalass [thalass@Nightstar-m49.o7s.158.104.IP] has joined #code
13:27 mode/#code [+o Thalass] by ChanServ
13:40 Checkmate [Z@Nightstar-r9lk5l.cust.comxnet.dk] has joined #code
13:40 mode/#code [+o Checkmate] by ChanServ
14:14 celticminstrel [celticminst@Nightstar-c0l57i.dsl.bell.ca] has joined #code
14:14 mode/#code [+o celticminstrel] by ChanServ
15:05 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
15:05 mode/#code [+qo Vornicus Vornicus] by ChanServ
16:25 Thalass [thalass@Nightstar-m49.o7s.158.104.IP] has quit [Connection closed]
16:28 thalass [thalass@Nightstar-m49.o7s.158.104.IP] has joined #code
16:28 mode/#code [+o thalass] by ChanServ
16:48
<&ToxicFrog>
I can't brain today. I have the dumb.
16:48
<&ToxicFrog>
Possibly this is not a good day to make sweeping changes to the entity system.
17:36 thalass [thalass@Nightstar-m49.o7s.158.104.IP] has quit [Ping timeout: 121 seconds]
17:45
<@froztbyte>
ToxicFrog: good way to get started on code you avoided, though!
17:47 thalass [thalass@Nightstar-m49.o7s.158.104.IP] has joined #code
17:47 mode/#code [+o thalass] by ChanServ
17:47 thalass [thalass@Nightstar-m49.o7s.158.104.IP] has quit [Connection closed]
17:47 thalass_ [thalass@Nightstar-m49.o7s.158.104.IP] has joined #code
17:53
<&ToxicFrog>
froztbyte: ?
17:53
<@froztbyte>
so I have this problem
17:53
<@froztbyte>
where I can't webs
17:53
<@froztbyte>
combination of knowing it's all awful, and being /that good/ (comparatively) in other stuff
17:54
<@froztbyte>
and then I just get annoyed and stop touching webs
17:54
<@froztbyte>
whenever I'm slightly tipsy, or tired, this is less of a problem, and I can punch through
17:54
<@froztbyte>
similar things have happened whenever I need to read some terrible code from some or other system
17:54
<@froztbyte>
(so if there is any such code in a piece of software you've often avoided, now's the time)
17:55
<@froztbyte>
(just like I'm punching some PHP around)
17:56
<@celticminstrel>
Is there a way to add a header to PCM data that states it's unsigned 8-bit, mono, and a particular sample rate? The .au file format would be good but only seems to support signed 8-bit.
17:56
<@celticminstrel>
I suppose I could also interleave 0 bytes and write it as 16-bit.
17:56
<&ToxicFrog>
froztbyte: oh. Not relevant here.
17:57
<&ToxicFrog>
celticminstrel: isn't that what RIFF WAVE (.wav) format is?
17:57
<@froztbyte>
ToxicFrog: fair
17:57
<@celticminstrel>
I was looking for something a bit simpler.
17:58
<@celticminstrel>
WAVE/AIFF look a lot more complicated based on Wikipedia.
17:59
<@celticminstrel>
Is it in fact as simple as .au, then?
17:59
<&ToxicFrog>
To be honest I have no idea how complicated it is, I have tools for that
17:59
<&ToxicFrog>
I've never needed to write code to directly manipulate one
17:59
<&ToxicFrog>
froztbyte: in this case I know what changes I need to make and it's next on my list, I just can't get my brain in gear for any coding right now
18:00
<@froztbyte>
oh
18:00
<&ToxicFrog>
And as far as "things that are easy to fuck up when you're tired" goes, the core entity ownership system is pretty high on that list
18:02
<@celticminstrel>
Hmm. Which is easier, then... adding a RIFF header, adding an AIFF header, or interleaving 0-bytes so I can call it 16-bit... (would the third one actually work?)
18:04
<@celticminstrel>
AIFF apparently uses an 80-bit floating-point. I have no idea how I would deal with that.
18:04
<@celticminstrel>
I guess I'll try the third option.
18:07 catadroid [catalyst@Nightstar-7227l9.pobb.as13285.net] has quit [Ping timeout: 121 seconds]
18:09
<@celticminstrel>
It doesn't quite work.
18:10
<@celticminstrel>
I was hoping to avoid a situation where I have to specify the formats when calling ffmpeg. Maybe it's better to call ffmpeg directly from this script.
18:10 * celticminstrel will need to review how to do that in python
18:50
<~Vornicus>
long double
18:58
<@froztbyte>
TheWatcher: ping
18:58
<@froztbyte>
I have a question regarding your preferred devilscript
18:59
<~Vornicus>
celmin: numpy.longdouble
19:04 Derakon[AFK] is now known as Derakon
19:06
<@celticminstrel>
Vornicus: Huh?
19:07
<~Vornicus>
80-bit floating point. dealing with it in python, use numpy.longdouble
19:07
<@celticminstrel>
Okay, but how would I pass that to struct.pack?
19:07
<@celticminstrel>
(Or otherwise put it in a binary file.)
19:13
<@celticminstrel>
Also, it looks like longdouble is 128-bit, which makes the above harder (obviously that wouldn't matter for calculations or whatever, but the issue is putting it in a file).
19:16
<@celticminstrel>
Oh, apparently it's not actually 128-bit. Hmm.
19:22
<@celticminstrel>
Or, might not be.
19:25
<@celticminstrel>
So basically, if I'm going to write it as an AIFF, I need to be able to convert the 4-byte fixed-point sample rate to a 10-byte floating-point sample rate (which involves a division by 0x10000), and write it to a binary file.
19:26
<@celticminstrel>
Maybe it would be easier to do WAV, let me see if I can find something better than Wikipedia on that...
19:27
<@celticminstrel>
I think WAV (and .au for that matter) loses precision in the sample rate. I dunno if that's important.
19:28
<@celticminstrel>
(Because they store it as an integer.)
19:33
<@celticminstrel>
Given a block of PCM data, would it really make a difference between interpreting it at a sample rate of 11127.0 vs interpreting it at a sample rate of 11127.232...?
19:43 thalass_ [thalass@Nightstar-m49.o7s.158.104.IP] has quit [Ping timeout: 121 seconds]
20:05 macdjord|slep is now known as macdjord
20:23 catadroid [catalyst@Nightstar-nafmrq.dab.02.net] has joined #code
20:45 thalass [thalass@Nightstar-m49.o7s.158.104.IP] has joined #code
20:45 mode/#code [+o thalass] by ChanServ
20:58 catadroid [catalyst@Nightstar-nafmrq.dab.02.net] has quit [[NS] Quit: Bye]
21:09 Checkmate [Z@Nightstar-r9lk5l.cust.comxnet.dk] has quit [Ping timeout: 121 seconds]
21:15 macdjord is now known as macdjord|out
21:49 catadroid [catalyst@Nightstar-bil2u1.dab.02.net] has joined #code
22:00 catadroid` [catalyst@Nightstar-h4tgqi.dab.02.net] has joined #code
22:00 catadroid [catalyst@Nightstar-bil2u1.dab.02.net] has quit [A TLS packet with unexpected length was received.]
22:23
<@TheWatcher>
froztbyte: Sorry, been AFK most of the day, what's up?
22:27
<@froztbyte>
hi
22:27
<@froztbyte>
uhm; context: freeradius RLM things
22:27
<@froztbyte>
have you touched them?
22:28
<@froztbyte>
they're perly extensions with freeradius-namespaced things, but I'm not outright sure how to test these changes I'm making without a full duplicate daemon
22:28
<@froztbyte>
the daemon itself isn't the hardest part, but simulating accurate requests is a bit messy
22:29
<@froztbyte>
also, beyond just running the linter, can you recommend anything for sanity checking perl code reasonably automatically?
22:29
<@froztbyte>
(again slightly complicated by freeradius crap)
22:33
<@TheWatcher>
I've never touched freeradius or RLM stuff, sorry - and checking perl code automatically? Beyond checking whether it actually loads, there's pretty much nothing you can do other than hope the code comes with a comperehensive test suite
22:34
<@froztbyte>
yeah, that's the stupid part
22:34
<@froztbyte>
the code itself is proxyloaded by freeradius
22:34
<@froztbyte>
was hoping I could maybe get a nice way around that
22:34
<@froztbyte>
oh well
22:35
<@froztbyte>
well, thanks
22:35
<@froztbyte>
at least I know I'm not missing something then :)
22:35
<@TheWatcher>
Good luck with it
22:35 Checkmate [Z@Nightstar-pdi1tp.customer.tdc.net] has joined #code
22:35 mode/#code [+o Checkmate] by ChanServ
22:36
<@froztbyte>
TheWatcher: I think I'll take the https://www.youtube.com/watch?v=eUFY8Zw0Bag approach when I feel comfortable enough with my changes
22:37
<@froztbyte>
I could probably get the subprocs tested far enough
22:37
<@froztbyte>
(some memcache bits, some json-webservice interaction)
23:16
<@celticminstrel>
I think the only way to deal with an 80-bit float might be to read it as a 10-byte string and somehow fiddle with it.
23:16
<@celticminstrel>
I probably need to know the number of bits in the mantissa and exponent.
23:19
<@celticminstrel>
It looks like it's a 64-bit mantissa and a 16-bit exponent...which is convenient, since it means I don't need to split bytes up. In fact... I could probably read them separately as integers and then do some math to get the proper value...
23:20
<@celticminstrel>
(Assuming they're not infinite or NaN, but I think that's a reasonable assumption here.)
23:21
<@celticminstrel>
15-bit, to allow room for the sign bit. Forgot about that.
23:23
<@celticminstrel>
...I could also ignore it, since it's actually duplicate information. The sample rate is given both in 4-byte fixed-point and in 10-byte floating-point.
23:27 himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
23:32
<@celticminstrel>
...this header appears to specify 3-bit sound samples.
23:50 Kindamoody|afk is now known as Kindamoody
--- Log closed Mon Jul 27 00:00:31 2015
code logs -> 2015 -> Sun, 26 Jul 2015< code.20150725.log - code.20150727.log >

[ Latest log file ]