#pentagram@irc.freenode.net logs for 6 May 2003 (GMT)

Archive Today Yesterday Tomorrow
Pentagram homepage

[01:27:51] --> Kirben has joined #pentagram
[01:27:52] --- ChanServ gives channel operator status to Kirben
[04:42:46] <-- Kirben has left IRC (Read error: 104 (Connection reset by peer))
[04:50:45] --> Kirben has joined #pentagram
[04:50:45] --- ChanServ gives channel operator status to Kirben
[06:10:00] --> servus has joined #pentagram
[07:36:54] --> Colourless has joined #Pentagram
[07:36:59] --- ChanServ gives channel operator status to Colourless
[07:39:00] <Colourless> slow speeds in windows seem strange
[07:39:40] <Colourless> my 'guess' would be optimizations are not enabled, but makefile says they are
[07:48:25] --> Dominus has joined #pentagram
[07:48:57] <Dominus> hi
[07:49:36] <Dominus> Colourless: are you there and awake?
[07:49:37] <Colourless> hi
[07:49:43] <Dominus> obviously :-)
[07:49:49] <Colourless> it is 5:20 pm here :-)
[07:50:05] <Dominus> one never knows :-)
[07:50:18] --- servus is now known as servus_sominus
[07:51:00] <Dominus> Colourless: any chance for me to play with your optimized pentagram.exe?
[07:51:22] <Dominus> (to play does not mean that with Colourless' exe you can play U8 :-))
[07:52:34] <Colourless> sure
[07:54:31] <Dominus> upgraded to the freshly released gcc 3.23 but that didn't help...
[07:57:06] <Colourless> http://www.users.on.net/triforce/pentagram.zip
[07:57:48] <Dominus> with a capital P :-)
[07:58:34] <Kirben> hmm shouldn't an mingw build include the current optimisations (asm) ?
[07:59:01] <Kirben> only difference I can see is configure offering O3 instead of O2
[07:59:07] <Colourless> ah yes. Pentagram.zip
[07:59:09] <Colourless> Kirben: it should
[07:59:29] <Colourless> most of the optimizations weren't asm
[07:59:59] <Dominus> k, with your exe I get 38 FPS fullscreen and 34 windowed
[08:00:18] <Colourless> in 3dfx tools disable vsync for direct3d
[08:01:41] <Dominus> it was disabled
[08:02:09] <Colourless> strange. your speeds are quite low. what times does pentagram give you for rendering?
[08:02:31] <Dominus> 26
[08:03:34] <Colourless> gives you 4 numbers. ms, fps, sort and paint
[08:03:43] <Colourless> what are sort and paint
[08:04:06] <Dominus> 26 39 5 12
[08:04:20] <Colourless> 5 for paint!?!
[08:04:31] <Colourless> no 12 for paint
[08:04:33] <Colourless> that's really slow
[08:04:38] <Dominus> sort 5 12 paint
[08:05:55] <Colourless> i get 4 and 4
[08:06:11] <Colourless> or 5 and 5 (likely timer resolution issue)
[08:07:04] <Colourless> you have amd or intel?
[08:07:14] <Dominus> intel 1 GHz
[08:09:07] <Dominus> I could check the behaviour on WinME...
[08:09:46] <Colourless> redownload. compiled with ppro optimizations
[08:11:23] <Dominus> same
[08:11:44] <Dominus> what I get with both versions: some grey flicker
[08:12:01] <Dominus> fullscreen
[08:12:05] <Colourless> most odd
[08:12:25] <Colourless> that would indicate it was hardware single buffering in fullscreen
[08:12:47] <Colourless> what ver of sdl are you using>
[08:13:02] <Dominus> in windowed I have sort 6 and paint 8-10 ms
[08:13:10] <Dominus> 1.25 last official
[08:13:25] <Kirben> thats odd, I get higher fps in window instead of full screen
[08:13:41] <Dominus> that was the same behaviour for me with gcc build
[08:13:58] <Dominus> when I leave it running I get now 40-41 fps windowed
[08:14:14] <Dominus> when it is in the background running
[08:14:27] <Kirben> Around 20-21 average in full screen and around 27 average in window.
[08:14:32] <Colourless> strange i'm using 1.2.5 here. i should check on my v5 later tonight
[08:14:44] <Dominus> cpu usage: as much as possible
[08:14:47] <Kirben> I'm only on Celeron 850 though.
[08:14:58] <Colourless> kirben vsync is probably causing you to loose fps in fullscreen
[08:15:37] <Colourless> if it stays at an exact divisor of your refresh rate, then it's vsync
[08:16:12] <Colourless> such as if you are running at 60 fps and it stays at 30, 20, 15, 12, 10 and so on, it's vsync limiting your rate
[08:16:17] <Dominus> hmm, it stays on that (my refresh rate is 75 Hz)
[08:16:22] <Colourless> s/60 fps/60hz.
[08:16:41] <Kirben> Well full screne refresh rate is 84
[08:17:04] <Colourless> ok, it shouldn't stay at 20 then
[08:17:05] <Kirben> So I guess that is about right, a quarter.
[08:17:51] <Colourless> what bit depths are you 2 using for your desktop? 16 or 32?
[08:18:06] <Dominus> 32
[08:18:28] <Dominus> same with 16
[08:18:50] <Kirben> Desktop is 1024 x 768 16 bit, full screen is 640 x 480
[08:20:57] <Colourless> hmm, odd.
[08:21:02] <Colourless> well, i've got to go now
[08:21:09] <-- Colourless has left IRC ("l8tr")
[08:21:10] <Dominus> hmm, when I enable vsync, I get same fps but not the grey flicker, seems it will go higher but something is hindering it
[08:24:30] <Kirben> Can't see an option to disable vsync for directdraw, nvidia only seems to offer it for opengl.
[08:25:01] <Dominus> by eanbling triple buffering I get 50 FPS in windowed mode now
[08:25:26] <Dominus> there should be some way
[08:26:17] <Dominus> huh, now it goes to 50 even without triple buffering...
[08:26:32] <Kirben> bbl
[08:26:42] <Dominus> bye
[08:28:32] <Dominus> going as well now
[08:28:59] <-- Dominus has left IRC ("enough for now")
[09:45:43] --> Darke has joined #pentagram
[09:51:11] * Darke flicks through his notes and thinks he was going to ramble on about function definitions around now.
[09:53:13] <Darke> Basically there are two different types of functions 'routine's and 'process'es. Though technically there are three, the inbuilt 'intrinsic' functions, but you can't declare those with llc.
[09:54:30] <Darke> Routines are your standard function. Processes are your standard function, except they're run in their own... process! *Tadah!* *ahem*
[09:54:54] <Darke> The basic routine declaration is of the form:
[09:55:23] <Darke> routine FunctionName(ArgumentList) : ReturnType { ... function stuff goes here... }
[09:56:46] <Darke> ie: routine DoStuff(Arg1 : Integer, Arg2 : String List, Arg3 : Really Long Long Pointer) : Bool { ... STUFF ... }
[09:57:21] <Darke> (Don't ask me what a 'Really Long Long Pointer' is, ask Colourless. Though I would guess it would be something that points to a galaxy far, far away...)
[09:59:02] <Darke> Or alternately a process: process SpawnMe() { ... STUFF ... }
[10:00:35] <Darke> The `: ReturnType` is optional. As is the `ArgumentList` (though the parens () must be there), as is the 'STUFF' between the braces {}, but very few people find a use for something that does nothing useful.
[10:02:48] <Darke> I'm really not sure what all the possible return types are from looking at the usecode. So I would guess, technically, that all are possible, though we'd probably have to do quite a bit more study of usecode to be certain.
[10:08:10] --> wjp has joined #pentagram
[10:08:10] --- ChanServ gives channel operator status to wjp
[10:08:42] <wjp> hi
[10:09:47] --- wjp is now known as wjp|busy
[10:09:50] <DarkeZzz> Hi.
[10:21:26] * Darke watches wjp take up 10% of the cpu. He's not sure that sort of usage really qualifies as 'busy', more just above 'not-idle'.
[10:22:25] <Darke> Now to add a little complexity to the already amazingly simple (*cough*) function declarations. Overloading.
[10:23:03] <Darke> Fur example, say we wished to overload our 'look' function of our particular object this class is attached to, you'd write something like this:
[10:23:53] <Darke> overloadable [look] routine FnordLook(...) {...}
[10:24:31] <Darke> Or perhaps 'overload' or something instead of 'overloadable'.
[10:26:39] <Darke> The do-dah between the []'s can be either one of our (intended) defined constants to point to look/use/enterFastArea/whatever, or an integer constand (42, 0x13, etc), basically referring to the particular function that you're overloading.
[10:27:28] <Darke> IIRC, u8 supported up to 16 user-defined functions, and crusader up to 32, but I'm probably remebering wrong, since I haven't looked at it in a while. *grin*
[10:29:03] * Darke thinks it's quite possible that u8 didn't allow any functions to have overloads, she remembers twgds to be superior in this reguard in someway, but can't remember precicely how.
[10:43:16] * Darke hmms... and thinks that's all that's really to function declarations. Except all this 'implies' stuff that we really don't know much about. But that's probably more relevant to calling functions, which I'll hopefully get around to dealing with later. *grin*
[10:54:41] <Darke> Anyway, next up seems to be the various random operators and operations and oddities that any programming language has.
[10:54:59] <Darke> An int constant: 42
[10:55:13] <Darke> A string constant, including the double-quoties: "Fnord"
[10:55:36] <Darke> A list constant: << ... STUFF ... >>
[10:56:03] <Darke> A list constand example (string list): << "String 1", "String 2", "String *gasp!* 3!" >>
[10:56:12] <Darke> Ye olde null list: <<>>
[10:56:34] <Darke> A null string, if you didn't guess (and yes, the double-quotes are important here too!): ""
[10:57:16] <Darke> A random variable: Var21
[10:59:42] <Darke> Referencing a sub-variable of a variable (or whatever): Var21.something
[11:00:39] <Darke> (Currently irrelivant since I haven't described the more complex variable types, which resemble C-structs, containing multiple bits of data. The standard 'Item' and 'NPC' are both of these.)
[11:01:01] <Darke> Anyway, back to simple stuff again...
[11:01:58] <Darke> Getting the address of a variable (we have pointers, so it's kinda necessary...): &Var21
[11:02:15] --> CashZzz has joined #pentagram
[11:02:30] <CashZzz> yaw!! lots of peoples in the house tonite!
[11:02:36] <Darke> (Of course something like "VarPointer = address of Var21;" would read nicer, but that's something to think about as an alt.)
[11:03:00] <Darke> Yup. And I'm doing all the talking for all of them. *grin*
[11:03:53] <CashZzz> hehe of course Darke! you are! - hey there you go again with ghost hostnames! - have only just sorta set up that work/sleep network sys for irc
[11:04:15] <Darke> Indirect reference of a variable pointed to by a pointer (bleah, hopefully we find out that none of this pointer stuff is necessary, it's not only messy to describe, but I guess it's probably messy to code too *grin*): *VarPointer
[11:04:57] <CashZzz> heheh wjp|busy! - thats nice! very origional, I'
[11:05:06] <CashZzz> i'm getting sick of this away business!
[11:05:21] * CashZzz |away
[11:05:32] <CashZzz> how are things going darke
[11:05:44] <CashZzz> i'm just babbling about nothing - not mind me
[11:05:46] <Darke> Nah. It's just me on two machines. I haven't got bitchx setup to log, and my xchat client does logs for me. It's easier just to leave myself logged in upstairs so I get a complete set of logs. Also makes it easy to chat wherever.
[11:06:04] <CashZzz> yeah fair enolu
[11:06:14] <Darke> I'm rambling about usecode, seemingly as usual. *grin*
[11:06:14] <CashZzz> enough just that I havent seen 2 of ya in here before
[11:06:21] <CashZzz> well not since like a few days ago
[11:06:33] --- CashZzz is now known as Cashman
[11:06:50] <Darke> Ye olde routine call: Will have to remember to detail it later.
[11:06:55] <Cashman> I had lots of fun preparing a speech on our planet today and fiddling around with routers!!
[11:06:57] <Cashman> oh joy!
[11:07:10] <Darke> Yayfun. *grin*
[11:07:24] <Darke> Addition: Foo + Bar
[11:07:29] <Cashman> cisco is part of my dip!
[11:07:31] <Darke> Subtraction: Foo - Bar
[11:07:41] <Cashman> whos falso!?
[11:07:48] <Darke> (Yeah, I'm going to wander through all of these just for completeness sake.)
[11:07:52] <Darke> No idea.
[11:08:00] <Darke> Multiplication: Foo * Bar
[11:08:07] <Darke> Division: Foo / Bar
[11:08:08] <Cashman> did you get sleep at all lastnite/today! hehe
[11:08:36] <Darke> Modulo: Foo mod Bar
[11:08:44] <Cashman> eh hehe
[11:08:49] <Darke> Modulo: Foo modulo Bar
[11:09:14] <Darke> Yep. Slept. Got up. Worked for about 10 hours. Got home. Chatted. Started rambling about usecode.
[11:09:38] <Cashman> nice! usually good old things
[11:09:42] <Darke> Modulo: Foo (whatever-the-mod-sign-is-in-C-since-it-has-momentarially-escaped-my-mind) Bar
[11:10:08] <Darke> (% of something innit? Not the most clear, probably won't include it. *grin*)
[11:11:33] <Cashman> eh I'm probably the only non c/c++ programmer in here
[11:11:43] <Cashman> oh well not to worry!
[11:11:43] <Darke> Bit and (really need a 'normal' alternative rather then this too): Foo & Bar
[11:11:56] <Cashman> hehe
[11:11:56] <Darke> Bit or (same here): Foo | Bar
[11:12:05] <Cashman> again!? whos falos
[11:12:12] <Cashman> "falso" I mean
[11:12:18] * Cashman slaps falso around a bit with a large trout
[11:12:20] <Darke> Bit not (ditto): ~ Foo
[11:12:27] <Cashman> that should do it
[11:12:35] <Darke> Again. No idea.
[11:12:38] * Cashman slaps DarkeZzz around a bit with a large trout
[11:12:52] * Cashman hides again!
[11:13:19] <Darke> Left shift: Foo <<< Bar
[11:13:22] * Cashman doesn't know where he is hiding!
[11:13:27] <Darke> Right shift: Foo >>> Bar
[11:13:33] <Cashman> hehe noce one!
[11:13:38] <Cashman> nice one!
[11:13:49] <Cashman> this really looks good for the logs - oh shocker!
[11:14:32] <Darke> Exclusive add (did we really find out what this does? Only works on lists or something doesn't it?): Foo ^ Bar
[11:15:53] * Darke hides Cashman in a large crate and mails it to the Antarctic.
[11:16:45] * Cashman wakes up and finds himself outside! under a sign readying "scott base"
[11:16:48] <Darke> Index an element in a list (for obvious reasons, Bar kinda needs to resolve into a number, and Foo into a list): Foo[Bar]
[11:17:37] * Cashman then yelps for a taxie! and something did turn up! - the avatar from ultima 8 jumping up and down about some pandora's box project called pentagram
[11:18:16] <Cashman> I then find myself beaming back to my workstation through what appears to be a 5x5 grid portal from the crusader series!
[11:18:54] <Cashman> hmm must be WEC technology - suss
[11:19:01] <Darke> Typecasts: No idea really. The 'logical' syntax 'Var : Bool', the equilivant of (Bool)Var, to typecast Var into a Bool looks a little clunky.
[11:20:17] * Cashman slaps wjp|busy around a bit with a large trout
[11:20:47] <Darke> Obviously necessary in some areas though, I don't particularly want to have implicit typecasts everywhere, since it could make code rather icky (for example the logical conversion with something like DWord + Word is to convert Word to a DWord, thus any mixed math operation's result would implicitly be using DWords.
[11:22:21] * Cashman agrees that any effort to kill ickyness in the sort term and patients to do so will be a smile later on!
[11:23:23] <Cashman> I kinda get what you mean Darke - its jut that I heardly understand c/c++ at all, I have to therefore try and think of a possibly a similar situation in a basic language form
[11:23:50] <Cashman> hmm but then again you probably waiting for wjp etc. to return
[11:24:00] <Cashman> or just rambling on for the sake of it like we all do sometimes!
[11:24:20] <Darke> Comparison for equality: Take your pick of 'Foo = Bar' or 'Foo == Bar'. Would prefer the former and just disallow any of the weirdness that C allows by having them both being different, such as `int i, j; if((i=42)==(j=42)) {}`
[11:25:32] <Darke> I'm just rambling so people have a log of my notes and so that people who understand can point out any holes I'm missing before I get too far ahead in my coding.
[11:25:54] <Cashman> hmm I get you now
[11:26:18] <Cashman> well I kinda get you but I cant help sorry!
[11:26:29] <Cashman> is wjp sleeping
[11:26:34] <Cashman> sounds like it
[11:26:58] * Darke has about 20 pages of looseleaf notes on this stuff, along with other paperwork that he needs to turn into electronic form. This is the easiest. *grin*
[11:27:04] <Darke> That's what logs are for. *grin*
[11:27:22] <Cashman> yeah I've seen that before - some of you guys read back the logs, I do as well sometimes!
[11:27:35] <Cashman> hehe even if I dont understand it
[11:28:23] * Darke doesn't understand himself in the logs on a regular basis. He always suspected this was not a unique event. *grin*
[11:28:24] <Cashman> I like reading stuff I dont understand sometimes and then finding out what it is, sometimes I learn something new and interesting with that approach
[11:28:43] <Darke> Greater thean comparison: Foo > Bar
[11:28:46] <Cashman> hehe
[11:28:54] <Darke> Less than comparison: Foo < Bar
[11:29:07] <Darke> Greater than or equal to comparison: Foo >= Bar
[11:29:10] <Cashman> yeah takes a bit to absorb and comprehend
[11:29:19] <Darke> Less than or equal to comparison: Foo <= Bar
[11:29:33] <Darke> Not equal comparison: Foo != Bar
[11:29:56] <Darke> Not equal comparison (for those who worship basic, or just think it makes more sense): Foo <> Bar
[11:30:20] <Cashman> practising! are we! that constant rythm of foo bar examples to keep the brain chemical's woorling
[11:30:27] * Darke always wondered what 'Foo >< Bar' would logically be then.
[11:30:43] <wjp|busy> Cashman: I'm not sleeping, I'm busy :-)
[11:30:53] <Darke> Not (ye standard inversion): not Foo
[11:31:06] <Cashman> sorry I'm just messing with ya
[11:31:11] <Darke> Not (yet another alternative for the less verbose of us): !Foo
[11:31:29] <wjp|busy> and |away isn't appropriate since I actually am behind the computer
[11:31:34] <wjp|busy> (different desktop, but still... :-) )
[11:32:13] <Darke> Or: Foo or Bar
[11:32:29] <Cashman> true true!! applying the real life approach!
[11:32:36] <Darke> Or (maybe for those picky c-addicts): Foo || Bar
[11:32:38] <Cashman> in the sence of being away etc.
[11:32:42] <Cashman> busy
[11:32:43] <Darke> And: Foo and Bar
[11:32:57] <Darke> And (you know...): Foo && Bar
[11:33:11] <Cashman> wjp is this normal of Darke every nown and then
[11:33:28] <Cashman> or actually Darke I'll direct that to you
[11:33:37] * Darke is always a noun. No one can 'darke' something.
[11:33:46] <wjp|busy> endless rambling? quite normal ;-)
[11:33:54] <Cashman> hehe what next a "hello world" example full of foo bars!
[11:34:06] <Darke> Confusing people? Standard practice.
[11:34:10] * wjp|busy continues with being busy
[11:34:19] <Cashman> what do we have so far well, ummmmm "hello pentagram" code
[11:35:07] <Cashman> ok good good
[11:35:25] * Cashman likes to ramble as well
[11:36:22] <Darke> Can't. Haven't detailed intrinsics or function calling yet. So we've got no way to output.
[11:39:48] <Cashman> I got Ryan on icq now Darke - maybe so I can bug him about the build engine etc without rambling on etc in this channel
[11:40:45] <Darke> Have fun!
[11:41:22] <Cashman> well hes not currently online!
[11:41:37] <Cashman> but I have him on my list is what I meant to say
[11:44:14] <Darke> Test if an item is inside a list (returns true/false Bool, I think, this is a guess from the usecode): Foo in Bar
[11:45:02] <Darke> And ye, olde parenthesis to enclose an expression: ( ... STUFF ... )
[12:01:14] <Cashman> eh
[12:01:26] <Cashman> snooz
[12:01:34] <Cashman> snooze
[12:01:34] <Cashman> zzz
[12:01:43] <Cashman> ZzzZzz
[12:09:06] <Darke> Now to the 'left side' of things, that use all the results of the operations and stuff above. We'll call those bits above 'Expressions' of which singular or combinations of them form bits to be used below. Or something along that line.
[12:10:23] <Darke> (For obvious reasons, though unstated reasons, the 'Foo' and 'Bar' above need not be singular identifiers, but instead compounds of identifiers, if Foo=(A+B) and Bar=(B-C), then it's possible an expression might be (A+B)*(B-C))
[12:12:43] * Darke has, so far, resisted describing the language in terms of a form of BNF. This can't last long, all good intentions must be corruped in the end. *grin*
[12:13:58] <Darke> The obvious one being assignment: Foo = Bar;
[12:14:56] <Darke> (I must admit I've been tempted to make the statement terminator '.', so it reads a bit more like a sentence to the unitiated, but thankfully the ; reflex remains true. *grin*)
[12:16:14] <Darke> The standard variable declaration: Foo : Number;
[12:16:31] <Darke> (Initialised, of course, to 'null' as defined above.)
[12:16:57] <Darke> The also standard variable assignment: Foo : Number = Bar;
[12:18:02] <Darke> Of course, logically that could be extended to: Foo, Bar : Number = Baz; which would assign Baz to both Foo and Bar, but that might be confusing. *grin*
[12:20:17] <Darke> Make a process have exclusive use of the current item: exclude;
[12:23:03] --- Cashman is now known as Cash|FuzzedOut
[12:25:15] * Darke sticks a Vandegraff (spelling?) static generator beside Cash|FuzzedOut to refuzz him.
[12:26:02] --- Cash|FuzzedOut is now known as Cashman|Dynamic
[12:26:11] <Cashman|Dynamic> all systems go
[12:26:17] --- Cashman|Dynamic is now known as Cashman
[12:26:47] * Cashman discharges via Darkes earth
[12:26:47] * Darke replaces Cashman's dynamic_cast with a static_cast, we don't use the former in pentagram. *grin*
[12:26:56] <Cashman> virtual earth!
[12:27:11] <Cashman> hehe
[12:27:19] <Cashman> true true!
[12:27:44] <Darke> Hmm... that's what I'd have to call a world if I made one up some sort of module in pentagram, once we get it working. DarkeEarth.
[12:28:22] * Darke thinks most of the pagan scenery (giant mushrooms and such) would fit nicely in it.
[12:28:34] <Cashman> hehe! what you mean a world hack! low level made world without an editor called DarkeEarth
[12:29:05] * Cashman says! cheap majic mus shroomz! at DarkeWorld!
[12:29:35] <Darke> Nah. Would have to be a scripting language to write a world then, I wouldn't go to all the effort of byte-editing a world together. *grin*
[12:30:44] --> Dark-Star has joined #pentagram
[12:30:57] <Cashman> hehe! yeah I'd love to help come up with ideas for such a language oneday! if it ever gets to that point
[12:31:57] <Cashman> since there is so called backgound work going on from all angles - probabally a lot of it isnt implemented yet?? whats gonna be happening next to the pentagram source!
[12:32:16] * Darke would prefer an integrated editor. There's still nothing like creating a world using the miracle of drag&drop.
[12:32:35] <Cashman> I mean for those of us that will be more interested in the visible compiled aspects of the engine/os
[12:32:46] <Cashman> drag/drop yeah!
[12:32:52] <Darke> Umm... I dunno. Whatever strikes out fancy to work on at the time probably. *grin*
[12:33:04] <Cashman> ok
[12:34:06] <Cashman> just wondering if the usecode might start doing somthing useful shortly!? animation?? - is npc movement a big big big thing to program!
[12:34:07] <Darke> Inline functions: *giggle* *cackle* *rofl!* Yeah! *gigglesnork* Riiiight! *snerk* Like as if I'm *ever* going to implement something that silly unless I'm forced to.
[12:34:18] <Cashman> handling of such things as npc movement
[12:34:46] <Darke> Erm... I dunno. I think we're still working on getting map rendering working, or at least I think that's what Colourless is working on.
[12:34:58] <Cashman> hehe!
[12:35:24] <Cashman> sorry I just ask - oh so are you gonna have map scrolling ability put in as a demo test
[12:35:32] <Cashman> like the older project source
[12:35:38] <Cashman> that had map animation working right?
[12:35:51] <Darke> Compiled conditional: #if (Expression) { ...STUFF... }
[12:36:14] <Darke> Umm... no, I don't think so. Usecode controls most of the animation, it's only npc movement animation that's apparently automatic.
[12:36:54] <Cashman> auto? nice...
[12:37:12] <Cashman> so usecode fully controls such things as nps! coolz
[12:37:18] <Cashman> sound sensible
[12:37:23] <Darke> (Compiled conditional) This is presumably what was used to compile out large chunks of code that looks to be missing from the usecode, leaving odd sized (aka, nothing 'cept headers) functions.
[12:37:58] <Darke> Actually, I think npcs are the only thing that wasn't controlled by usecode. We're still not sure where the 'ai' for that is.
[12:38:33] <Darke> If statement: if (Foo) { ...STUFF... }
[12:39:03] <Darke> if/else statement: if (Foo) { ...STUFF... } else { ...MORE-STUFF... }
[12:39:06] <Cashman> ok
[12:39:13] <Darke> (Yeah, I'm going through the entire lot.)
[12:39:59] <Darke> if/else if statement: if (Foo) { ...STUFF... } else if (Bar) { ...MORE-STUFF... }
[12:41:08] <Darke> Also under consideration is potentially using a different keyword instead of 'else if', maybe 'elseif' as a single token.
[12:41:48] <Darke> if/else if/else statement: if (Foo) { ...STUFF... } else if (Bar) { ...MORE-STUFF... } else { ...EVEN-MORE-STUFF... }
[12:42:28] <Darke> Of course, the other alternative again is to go more verbose once more and have stuff like:
[12:43:40] <Darke> if (foo) then { do this } elseif (Bar) then { do this } else { do this } endif
[12:44:47] <Darke> You could get rid of most of the braces and brackets then. *shrug* I still prefer the C way myself, and I find it's easier to teach then the more pascaly and verbose stuff in this instance.
[12:55:04] * Cashman watching some trailer for a gamne
[12:57:05] <Cashman> you not killing urself there Darke?
[12:57:43] <DarkeZzz> Eh?
[12:58:56] <Cashman> killing urself with all the foo bar talk! rambling waffling!
[13:00:30] <Cashman> no? ok
[13:01:18] <DarkeZzz> No, not really. More falling asleep at the moment.
[13:02:33] <-- Darke has left IRC ("*flee!*")
[13:05:55] <Cashman> hehe - the work ghost has fleed
[13:10:33] <DarkeZzz> Mmm... sleep... Night!
[13:10:38] --- Cashman is now known as CashZzz
[13:10:45] <CashZzz> nite Darke!
[13:18:09] <-- CashZzz has left IRC ()
[13:24:33] --> Colourless has joined #Pentagram
[13:24:33] --- ChanServ gives channel operator status to Colourless
[13:25:53] <Colourless> ok, i tested my voodoo 5 and drawing on it takes 12 ms, which is 3 times slower than my r300... this wasn't something i expected... being 2d limited???
[13:26:15] <Colourless> i think i'll enquire with people in the know as to why this is so
[13:32:52] <wjp|busy> hi
[15:19:00] <-- Kirben has left IRC ("System Meltdown")
[15:41:25] <-- wjp|busy has left IRC ("going home")
[16:04:13] --> wjp has joined #pentagram
[16:04:13] --- ChanServ gives channel operator status to wjp
[16:18:28] <wjp> hm, those speed differences are kind of weird
[16:20:56] <wjp> isn't the "paint" number just swsurface blits?
[16:22:03] <wjp> (although I guess they aren't really "blits" but rather paints)
[16:22:43] <Colourless> not blits just linear writes
[16:23:03] <Colourless> should be direct to the hardware framebuffer
[16:23:26] <wjp> aren't we using software surfaces?
[16:23:46] <Colourless> nope, i set sdl to use a hardware double buffered surface
[16:24:10] <Colourless> we 'were' using a software surface, but i changed it
[16:24:16] <wjp> hm, would that be faster?
[16:24:38] <Colourless> well, it depends
[16:24:40] <wjp> it might be faster to first build the entire screen in ram and then blit it to the video card at once
[16:25:12] <wjp> it does depend on things like amount of translucency of course
[16:25:13] <Colourless> if writing to hardware is slow, the using a memory buffer might be faster
[16:25:15] <wjp> (and amount of overdraw)
[16:26:43] <Colourless> hmm, didn't think about translucency
[16:26:55] <Colourless> i'll have to do a test sometime
[16:28:21] <Colourless> heh, you may not believe it, but here, the actual painting to a software surface is slower. software 7-8 ms vs hardware 4-5 ms
[16:28:47] <wjp> weird
[16:29:07] <Colourless> fps is way done software 45, hardware 75
[16:29:20] <wjp> maybe we should try looping the paint a couple of times to get rid of any timer resolution issues
[16:29:32] <wjp> that's fullscreen?
[16:29:52] <Colourless> yes fullscreen
[16:30:21] <Colourless> directdraw acts funny in a window
[16:30:50] <Colourless> i.e. it doesn't actually seem to use hardware surfaces
[16:34:12] <Colourless> of course it might just be sdl's doing
[16:34:35] <wjp> hm, I wonder how high my fullscreen framerate would be without vsync
[16:34:55] <wjp> (or a better question would be how to disable vsync here :-) )
[16:38:33] <Colourless> i have no idea how you'd do that in linux. it's normally a driver setting
[16:41:08] <wjp> hm, one hack appears to be disabling SDL_DOUBLEBUF
[16:42:03] <wjp> (obviously causes huge amounts of tearing)
[16:42:22] <wjp> paint time alternates between 8ms and 24ms strangely :-)
[16:42:41] <Colourless> SDL forces a software surface in windowed mode
[16:42:56] <Colourless> for directx
[16:43:57] <wjp> hm, I'm getting depressing framerates in fullscreen with dga
[16:44:09] <wjp> paint is 24ms most of the time
[16:44:37] <Colourless> thats... pretty slow
[16:45:07] <wjp> using a swsurface puts it back at 60
[16:46:02] <wjp> (i.e., a real hwsurface is really not a viable option for me)
[16:46:29] <Colourless> i guess it will probably need to be made an option, like i originally intended
[16:50:13] <wjp> under linux hardly anybody will get a hwsurface anyway, though
[16:50:20] <wjp> (since it requires root)
[16:50:53] <Colourless> heh, as i expected my rendering times dropped dramatically when i enabled hardware windowed surface in sdl
[16:51:50] <wjp> hm, so my rendering time goes through the roof when using hw and yours improve? :-)
[16:52:00] <wjp> s/improve/improves/
[16:52:22] <wjp> driver issues?
[16:52:46] <Colourless> hardware i think
[16:53:35] <wjp> if I understand things correctly, blitting the full screen to hardware is fast, but drawing individual pixels to it is slow?
[16:53:40] <wjp> (here, anyway)
[16:54:40] <Colourless> drivers have almost nothing to do with linear frame buffer writing other than setting it up. it's entirely a hardware operation. The graphics card is memory mapped into a region of your systems virtual address space
[16:55:22] <wjp> any dma issues here?
[16:55:44] <wjp> I'd expect a full-screen blit might be dma-accelerated or something
[16:55:53] <wjp> (while that would be harder for individual pixel access)
[16:56:01] <wjp> (if at all possible?)
[16:56:15] <Colourless> could be. depends how the fullscreen blitting is done
[16:57:19] <Colourless> for instance, many graphics cards CAN blit from sys mem
[16:59:37] <Colourless> you have TNT2 correct?
[16:59:41] * wjp nods
[16:59:56] <Colourless> only AGP2x
[17:00:40] <wjp> that doesn't mean much to me I'm afraid :-)
[17:00:46] <Colourless> doesn't support 'Fast Write'
[17:01:02] <wjp> that's individual pixel writes?
[17:01:15] <Colourless> AGP 4x cards support a Fast Write mode, not exactly sure what it would do if i turned it off
[17:01:43] <Colourless> well, lets find out
[17:01:50] <-- Colourless has left IRC ("brb, restarting")
[17:05:02] --> Colourless has joined #Pentagram
[17:05:02] --- ChanServ gives channel operator status to Colourless
[17:05:34] <Colourless> turning fast writes off has increased my writing times to... 12 ms
[17:05:48] <wjp> that number sounds very familiar :-)
[17:06:44] <Colourless> aye
[17:06:54] <Colourless> and people thought that fast writes were useless :-)
[17:09:34] <Colourless> my guess is if i was running at 4x (which while i can, tends to cause image corruption) or 8x then it would be a bit faster again
[17:10:13] <wjp> hm, according to this there's a jumper on my video card to enable agp4x
[17:10:30] <wjp> (this = piece of paper I got with my video card)
[17:10:43] <wjp> I wonder if I did that when I installed it
[17:10:49] <Colourless> still may not support fast writes...
[17:11:10] <wjp> true :-)
[17:11:36] <wjp> any idea if that's card (as opposed to chipset) dependant?
[17:12:01] <Colourless> it's a chip thing.
[17:12:38] <wjp> hm, shouldn't nvidia.com have some specs?
[17:13:15] <Colourless> they might, but tnt2 is pretty old. try searching google or something instead
[17:13:22] <wjp> yay, the tnt2 is in the 'legacy products' category :-)
[17:14:06] <wjp> doesn't give much other than memory bandwidth though
[17:14:20] <wjp> (which is apparently 2.9Gb/s)
[17:15:13] <Colourless> that's the bandwith of the graphics memory
[17:15:18] <wjp> yeah
[17:15:23] <Colourless> mine should have 19.6 GB/s
[17:15:25] <wjp> I wish the bus would support that :-)
[17:15:42] <wjp> agp4x is about 1Gb/s right?
[17:16:06] <Colourless> i think so
[17:16:34] <wjp> I could of course just enable fast write in the driver and see what happens :-)
[17:17:04] <wjp> ok, at least the tnt2m64 supports fast write it seems
[17:17:07] <wjp> (googling...)
[17:17:31] <Colourless> then you should too
[17:19:45] <wjp> hm, dinner first
[17:19:45] <wjp> bbl
[17:23:01] <Colourless> k
[17:37:49] <wjp> hm, what's "side band addressing"?
[17:37:54] <wjp> (and do I want that? :-) )
[17:38:08] <Colourless> i don't know what exactly it does
[17:38:18] <Colourless> in fact i have no idea of what it does
[17:38:30] <wjp> I'll look it up later
[17:38:55] <wjp> now, let's see about these fast writes...
[17:39:10] <wjp> brb, reloading module/restarting X and stuff
[17:39:18] <-- wjp has left IRC ("brb")
[17:40:33] --> wjp has joined #pentagram
[17:40:34] --- ChanServ gives channel operator status to wjp
[17:41:09] <wjp> ok, let's see what this did
[17:41:23] <Colourless> :-)
[17:41:54] <wjp> hm
[17:42:07] <wjp> paint time is now alternating between 5 and 19
[17:42:24] <wjp> (but 19 is now rather rare)
[17:42:36] <Colourless> 5... and 19?
[17:42:49] <wjp> getting only 31 FPS though
[17:42:59] <Colourless> something in the background could be causing a problem. vsync then
[17:43:04] <Colourless> what refresh rate you running a
[17:43:05] <Colourless> t
[17:43:11] <wjp> 85 I think
[17:43:27] <wjp> yes, 85
[17:43:52] <wjp> hm, I wonder if I re-enabled hwsurface
[17:44:17] <wjp> (I didn't :-) )
[17:44:23] <wjp> (or rather I did, but I didn't rebuild)
[17:44:30] <wjp> framerate is now 42FPS
[17:44:35] <wjp> (guess where that comes from)
[17:44:39] <wjp> paint is 8ms
[17:44:42] <Colourless> yeah, not hard :-)
[17:45:25] <wjp> getting rid of SDL_DOUBLEBUF (so no vsync) puts it at 52fps
[17:45:32] <wjp> paint 8-9ms
[17:45:58] <Colourless> my calculations indicate it takes about 450 cpu cycles on average to draw 1 shape (on my system)
[17:46:12] <wjp> hm, not bad
[17:46:57] <Colourless> of course i may have made a mistake somewhere
[17:47:17] <wjp> anyway, painting to a swbuf is definitely faster here
[17:47:27] <wjp> (paint 5ms)
[17:47:42] <Colourless> you probably have much nicer memory than i do :-)
[17:47:46] <wjp> but that's probably the ddr, yes
[17:48:08] <wjp> ok, this was quite educational :-)
[17:48:16] <Colourless> i'm guess... oh twice the speed.... and your drawing to software are... just over twice the speed
[17:48:54] <wjp> must be a coincidence :-)
[17:50:23] <Colourless> i think i made a mistake with my calc there about cycles per shape...
[17:51:16] <Colourless> nano = 1 millionth correct?
[17:51:27] <Colourless> if so, then i did make a mistake :-)
[17:51:35] <wjp> less
[17:51:42] <wjp> micro is 10E-6
[17:51:46] <wjp> nano is 10E-9 I think
[17:51:48] <Colourless> ah yeah :-)
[17:52:06] <Colourless> so a 1 ghz, each cycle lasts only 1 nano second
[17:52:12] <wjp> yes
[17:52:22] <Colourless> there for there are 1000 cycles per ms
[17:52:26] <wjp> s/10E/1E/
[17:52:27] <wjp> ugh
[17:52:43] <wjp> (anyway, you got what I meant :-) )
[17:52:53] <Colourless> no milli, micro, then nano
[17:52:54] <wjp> no, 1000 cycles per micros
[17:53:21] <Colourless> so it's 4 million cylces for the 4 ms it takes to draw
[17:53:27] * wjp nods
[17:53:46] <wjp> but if it's memory bandwidth limited it might be far less
[17:53:51] <Colourless> ok so it actully takes about 6000 cylces to draw a shape
[17:54:01] <wjp> sounds more reasonable
[17:54:20] <Colourless> not much you can do if the cpu is bandwith starved, idle cylces still count
[17:54:34] <wjp> true
[17:54:44] <Colourless> that is why i thought that a p4 with dual channel would be rather speedy
[17:55:23] <wjp> know anybody with a p4? :-)
[17:55:32] <Colourless> nope
[17:56:06] <wjp> someone I know is getting one soon
[17:56:22] <wjp> our CS department used to have some, but they got stolen...
[17:56:39] * Colourless sighs
[17:56:46] <wjp> (fast CPUs, lots of ram, geforces, *sigh*)
[17:57:25] <wjp> robbers actually broke into our (=math department's) student pc rooms too, but left everything... guess nothing was worth stealing :-)
[17:57:32] <wjp> (low-end P3's)
[17:58:51] <Colourless> you know, you do realize that if you were getting 42 fps with hardware and 31 with software, than hardware is faster even if the actual paint time is less :-)
[17:59:11] <Colourless> s/less/less with software/
[17:59:14] <wjp> I'm getting 58fps in software
[17:59:17] <Colourless> ah
[17:59:22] <Colourless> i see
[17:59:47] <wjp> I did get 31fps with something, though
[18:00:19] <wjp> but not sure what it was... (I had changed the source but not yet rebuilt)
[18:00:31] <wjp> so no way to see what that binary was compiled with
[18:00:50] <wjp> probably some weird combo of dga with a double buffered swsurface
[18:11:33] <wjp> is there any way to get the number of cache hits/misses while rendering?
[18:11:58] <Colourless> no idea
[18:12:41] <wjp> I'm guessing the hit/miss ratio could be quite bad
[18:13:02] <wjp> (since it might constantly be jumping from one place to another)
[18:13:28] <Colourless> perhaps, hard to say
[18:13:34] <Colourless> most of the rendering is fairly sequential
[18:16:54] <Colourless> it would probably be nice if the entire shape got prefetched into the l2 or l1 cache
[18:21:23] <Colourless> probably wouldn't end up doing too much though i think
[18:30:21] <wjp> hm, nice; valgrind apparently has a 'cachegrind' mode
[18:32:09] <wjp> (makes pentagram run at ~1-2fps :-) )
[18:36:17] <wjp> according to this, we have a write miss rate of about 2.2% (of both L1 and L2 caches)
[18:36:34] <wjp> read miss rate of about 0.2%
[18:37:15] <wjp> (not that I have any idea which part of those numbers is from the which part of pentagram)
[18:37:43] <wjp> hm, but it wrote a file which seems to contain per-function stats
[18:37:57] <Colourless> now that is slow :-)
[18:38:09] <Colourless> and darke was complaining about profiling being slow
[18:41:16] <Colourless> as for how the program works, my guess is it probably just emulates the cache itself rather than attempt to get info from the cpu. the program itself will polute the cache
[18:41:43] <wjp> yeah, it's a cache-simulator
[18:42:10] <Colourless> and it says?
[18:42:24] <wjp> a _lot_ :-)
[18:42:33] * wjp is suffering from severe information overload, so to speak :-)
[18:42:51] <Colourless> we want SoftRenderSurface::PaintNoClip() if possible :-)
[18:43:04] * wjp nods
[18:43:14] <wjp> Ir I1mr I2mr Dr D1mr D2mr Dw D1mw D2mw
[18:43:21] <wjp> 267,736,171 176 176 99,822,440 415,913 257,716 29,583,192 1,944,945 1,675,024
[18:43:30] <wjp> does that line up in your irc client?
[18:43:36] <Colourless> yep
[18:43:44] <Colourless> no idea what it means :-)
[18:43:47] <wjp> legend:
[18:44:08] <wjp> Ir: instruction cache reads, I1mr: I1 cache read misses, I2mr: L2 cache instruction read misses
[18:44:28] <wjp> Dr: D cache reads (i.e., memory reads), D1mr: D1 cache read misses, D2mr: L2 cache data read misses
[18:44:58] <wjp> Dw: D cache writes (i.e., memory writes), D1mw: D1 cache write misses, D2mw: L2 cache data write misses
[18:45:21] <wjp> AddItem:
[18:45:21] <Colourless> well, that's not 'too' terribly bad
[18:45:30] <Colourless> nice to know that it caches the entire function :-)
[18:45:31] <wjp> 487,016,770 272 242 186,037,438 197,685 54,398 61,747,825 45,510 43,996
[18:46:08] <wjp> AddItem apparently uses twice the memory bandwidth as PaintNoClip :-)
[18:47:09] <Colourless> AddItem contains a number of inlined functions that probably aren't picked up
[18:48:12] * wjp nods
[18:50:21] <Colourless> SortItem::overlap and SortItem::occludes are both inlined
[18:50:38] <Colourless> SortItem::operator< though is not
[18:51:00] <wjp> 4,100,366 31 22 1,574,510 1,110 15 805,183 0 0
[18:51:33] <wjp> (that's SortItem::operator< btw :-) )
[18:51:34] <Colourless> heh, not called that much
[18:52:25] <Colourless> any other possibly slow functions you could think of?
[18:52:33] <Colourless> how about Fill32 :-)
[18:52:42] <Colourless> just curious about it
[18:53:34] <wjp> it's sorted by something btw
[18:53:48] <wjp> instruction count, it seems
[18:54:33] <Colourless> can't you search?
[18:54:45] <wjp> I'll upload the file
[18:55:29] <Colourless> how big?
[18:55:33] <wjp> functions with most memory bw are AddItem, PaintNoClip, Blit, Paint, Fill32
[18:55:38] <wjp> just a text file
[18:55:51] <Colourless> compress it first :-)
[18:55:55] <wjp> 19K: http://www.math.leidenuniv.nl/~wpalenst/cachegrind.pentagram
[18:55:58] <wjp> 19K? :-)
[18:56:04] <Colourless> ah that's not too big :-)
[18:56:23] <wjp> I found this useful program 'cg_annotate' which parses the original file into this readable format :-)
[18:57:10] <Colourless> Fill32 is pretty nasty with writes
[18:57:52] <Colourless> then again so is PaintNoClip
[18:58:45] <wjp> nothing much we can do about Fill32 I guess
[18:59:16] <wjp> can't get much better locality than that :-)
[18:59:17] <Colourless> 'how' does ShapeFlex::getShape() get 0 for instruction cache misses :-)
[19:00:19] <wjp> hm, no idea :-)
[19:01:12] <wjp> I'll run it a bit longer (this one was about 30 seconds I think)
[19:01:16] <Colourless> hmm, does the program let you choose a type of cpu cache to emulate?
[19:01:26] <Colourless> the l1 caches seem a bit large
[19:01:57] <Colourless> 64 k each. that.... is huge
[19:01:58] * wjp nods
[19:02:16] <wjp> I need "size", "assoc", "line_size"
[19:02:31] <Colourless> actually that seems to be what athlons hae
[19:02:34] <Colourless> have
[19:02:56] <Colourless> wcpuid says i have 64 k i and d, and 256 k l2
[19:03:33] <Colourless> it's emulating an athlons cache it seems
[19:04:33] <wjp> not unsurprising since I'm running it on one :-)
[19:05:46] --- Colourless is now known as Cless|Away
[19:52:46] --> Dominus has joined #pentagram
[19:56:07] <Dominus> Cless|Away: so the problem is that damn V5 that is not really an AGP card and doesn't have fast write?
[19:59:37] <wjp> switching to a swsurface should make it faster, probably
[19:59:56] <Dominus> how do I do that in the source?
[20:00:04] <wjp> comment out the line with SDL_HWSURFACE in it in RenderSurface.cpp
[20:00:20] <wjp> (should be something like flags |= SDL_HWSURFACE|SDL_DOUBLEBUF)
[20:00:30] <-- falso has left #pentagram ()
[20:02:15] <Dominus> k, compiling
[20:07:01] <Dominus> hmm, it is quite the same for me either way...
[20:07:30] <wjp> what's paint now?
[20:07:44] <wjp> or all numbers, actually
[20:07:51] <Cless|Away> make that line flags = SDL_SWSURFACE;
[20:07:58] <wjp> SDL_SWSURFACE = 0 :-)
[20:08:12] <Cless|Away> eh, remove the SDL_DOUBLEBUF line
[20:08:17] <Cless|Away> wont do much
[20:08:46] --- Cless|Away is now known as Colourless
[20:09:12] <Dominus> so instead of flags |= SDL_HWSURFACE|SDL_DOUBLEBUF;
[20:09:25] <Dominus> flags |= SDL_SWSURFACE; ?
[20:09:33] <Colourless> yeah
[20:09:53] <Dominus> k, compiling
[20:09:57] <Colourless> what speed memory do you have? PC100 or PC133?
[20:10:04] <Colourless> or... RDRAM :-)
[20:10:44] <Dominus> SDRAM PC133
[20:12:00] <Colourless> your paint speed should be able 8 or 9 ms
[20:12:23] <Dominus> yeah paint speed is that now
[20:12:26] <Colourless> s/able/about/
[20:12:49] <Colourless> what's your fps?
[20:13:10] <Dominus> 31 FPS with the gcc build
[20:13:30] <Dominus> fullscreen
[20:13:59] <Dominus> 41-45 windowed
[20:14:24] <Colourless> strange that fullscreen is 'slow'
[20:15:10] <Dominus> paint is 12 with the msvc builds from earlier today
[20:15:59] <Colourless> yeah would be about right for 2x AGP with no fast write i think
[20:16:28] <Dominus> V5 is just 2xAGP, right?
[20:16:52] <Colourless> yes
[21:06:43] --- Dominus is now known as Dominus|away
[21:08:53] --- Dominus|away is now known as Dominus
[21:09:29] <-- Dominus has left IRC ("enough for now")
[21:10:30] <-- Colourless has left IRC ("casts invisibility")
[22:04:20] <-- wjp has left IRC ("Zzzz...")
[22:47:41] --> sbx has joined #pentagram
[23:48:54] <-- Dark-Star has left IRC ()