30/09/2004-01/10/2004 @01:40:51 ^04:00:59

in this post you've just found a picture of yourself on a website

It's chavscum.co.uk!! Oh no!!

CONS1_*: A RETROSPECTIVE

In all versions of Doom there are three flats named CONS1_1, CONS1_5 and CONS1_7. They are each a 64x64 image of a computer console, rotated to different angles. They are not very common; there are only four maps in Doom and two maps in Doom 2 in which they appear.

Problems arise due to the missing rotation; namely that if you want a room of consoles you can only have them on three sides. In such a position while making Elixir I found myself needing to decide just which way round CONS1_7 actually is. CONS1_1 and CONS1_5 are vertically mirror images of each other, so the problem does not arise.

Each flat has a grey side and a silver side. The grey side contains two rows of rectangles surrounded by blue lights that could be status monitors or they could be a keyboard. The silver side is for nearly a third of the extent of the flat just blank silver. However the screen in the centre of the flat looks more correct - the text is left-aligned that way, for instance - if you are standing at the silver side and the grey side is to the wall.

So that's the problem - there's no obvious way to tell which way round you're supposed to use these damn things! While you could just guess, I think that is an abhorrent thing to do when the alternative is to ascertain the correct answer then utilise it or indeed nix it with good reason. So, first thing to do was look at how the IWADs use them, but this was something of a dead end.

However Doom 2 was made long after the graphics were done, so I decided it couldn't be taken as canon. Indeed the things had been pretty much made for E2M7, one of the Doom maps on which the flats were present:

So Doom 2 says it's grey side out and Doom for the most part says it's silver side out. Which is correct?

We can show that Doom is definitive, not only for the obvious reason that it came first, but because, as I have been hinting, the console textures were made specifically for an early version of E2M7. Behold, the Doom alpha versions. In particular, the 22/5 alpha. Three quarters of the way down that page:

"I noticed that there is a large control console in one of the rooms. A similar console is in one of the very early screen shots, I couldn't find it in alpha 4, but then it shows up in this alpha, and disappears again in the final version."

The "very early screenshot" is obviously SCRN2_03.GIF at the bottom of Doom alpha screen shots, set 1. The room in question from which the console was obviously removed was the large room with the double door, just inside the yellow locked door in E2M7. It always struck me as very empty as the imps that start in it happily wake up and wander out, leaving only a barrel. Now we know why.

I downloaded the particular alpha version and managed to get the flats themselves out of it. Not entirely surprisingly, there were all 8 CONS1_* flats, including the missing side CONS1_3 and the diagonal corner pieces CONS1_2,4,6,8. Interestingly CONS1_3 isn't just a simple reflection of CONS1_7 but instead has a bright yellow splodge where all the others have dark green. In fact you can just about see it in the middle of dbcontrol.gif. In summary I think it's fair to say that silver side out is correct.

However, having determined by research the correct direction for the console flats I proceeded to totally ignore my findings. The pragmatic fact is the console flats look fine either way round you use them provided

  1. You don't blatantly use them in contradictory ways in the same WAD (never mind the same room, yes whomever it was who made E2M6 I'm looking at you)
  2. You make a good choice of lower texture below the console flat so it blends in. For example if you want to do grey side out, use COMPSPAN. If you want to do silver side out, use SHAWN2. Actually COMPSPAN works fine if you do silver side out as well, especially if your console is surrounded by it all the way round (cf dbcontrol.gif again)

In Elixir I have constructed a large computer console that had to have console flats with their grey side out. However, I managed to mask the fact that it's blatantly backwards* with lots of big screens, flashing lights, fiddly bits of architecture and other retarded Star Trek: Original Series meets Button Moon crap. In particular by splitting the sector I could lower the grey bit to emphasise that it's the keyboard.

NEXT TIME ON "RjY GOES WAY TOO DEEP INTO DOOM": CEILING SPEED AND WHAT YOU CAN DO WITH IT!

*The worst part is, it wouldn't look "blatantly backwards" if I had never found myself forced to consider the question and do the research

28/09/2004-29/09/2004 @04:28:31 ^04:31:32

// program to rotate a bunch of preset coordinates
// I wrote this for making elixir since yadex's rotation functions are shite
// RjY 26:1/3/2004

#include <stdio.h>
#include <math.h>

// origin of shape
#define XOFF (-736.0)
#define YOFF (1184.0)

// values in rotation matrix
// (COS, -SIN)
// (SIN,  COS)
// (tan theta is -1/4, so you can work cos theta and sin theta out)
#define COS (4.0/sqrt(17.0))
#define SIN (-1.0/sqrt(17.0))

// convenience
typedef struct point_s {
	double x;
	double y;
} point;

// shape in the map editor that needs rotating because yadex is too stupid
// to be able to do it itself without making it all wonky
static const point shape[] = {
	// corners of crate
	{32, 32},	// top right corner
	{32, -32},	// bottom right
	{-32, -32},	// bottom left
	{-32, 32},	// top left

	// outer corners of claw
	{-8, 40},	// top left
	{8,40},		// top right
	{40,8},		// right top
	{40,-8},	// right bottom
	{8,-40},	// bottom right
	{-8,-40},	// bottom left
	{-40,-8},	// left bottom
	{-40,8},	// left top

	// where the claw meets the edges of the crate
	{-8, 32},	// top left
	{8,32},		// top right
	{32,8},		// right top
	{32,-8},	// right bottom
	{8,-32},	// bottom right
	{-8,-32},	// bottom left
	{-32,-8},	// left bottom
	{-32,8},	// left top

	// inner corners of claw
	{8,8},		// top right
	{8,-8},		// bottom right
	{-8,-8},	// bottom left
	{-8,8},		// top left

	// claw arm diamond shape thing
	{0,8},		// top
	{8,0},		// right
	{0,-8},		// bottom
	{-8,0},		// left

	// terminator
	{0,0}
};

int main(void) {
	int i = -1;
	double x, y;

	do {
		i++;
		x = XOFF + COS * shape[i].x - SIN * shape[i].y;
		y = YOFF + SIN * shape[i].x + COS * shape[i].y;

		printf("(%10f, %10f)->(%10f, %10f)\n",
				shape[i].x, shape[i].y, x, y);

	} while (shape[i].x != 0.0 || shape[i].y != 0.0);

	return 0;
}

19/09/2004 @17:46:37 ^20:50:28

the roof! the roof! the roof is on fire!

You know the start of the last update keeps confusing me because it looks like it was written at 8:30am when I actually went to sleep before I wrote it and didn't start it until half six! For a moment I was all "OH NO MY SCRIPTS HAVE WEIRD BUGS IN" sheesh it's such a relief that they're okay.

DOOM MAP 2-MONTHS-OFF EXTRAVAGANZA

Man I hate doing this because I know I'll end up waffling on for ages because I have so many wads I haven't mentioned yet. I will try to keep the descriptions fairly short. I mean what I'm trying to do with these things is what Doomworld does with its newstuff chronicles, but instead of "everything uploaded in the past week" I post about the maps that I've done. And all the ones I mention are usually good enough for me to download; the ones that weren't I usually deleted so quickly that I forgot their names, so they don't get a look-in. Having complained all that I must say a good part of the time it takes to make one of these updates is for finding all the idgames links, damn things. That shit could have a better interface you know. But I didn't pay for it or anything so who am I to complain?

Castle Nevermore This was made by the author of Rebirth. You can tell because of the style of the extra graphics, gargoyles on the walls, that sort of thing. It is a very believable build of a castle, fairly nonlinear, and a good number of secrets to find. It plays pretty hard, but hindsight and in particular knowledge of which doors block monsters helps.

Shadow Pit Start at the edge. Make an octagon at light level zero and floor height zero. Then go in a bit, and make about a hundred more, each about one map unit wide, and one map unit higher and brighter than the last, until you reach a plateau. Then do the same thing but reversed, so you descend back to floor/light zero at a point at the centre. This is the jist of Shadow Pit which is supposed to be a deathmatch map but contains 4 revenants and a bunch of shotguns so you can play it single player. There's no exit though and the number of tiny disconnected sectors managed to slow the game down a little. I think it's a novelty. Like the newstuff guy said, if you want slopes use zdoom...

Phobos Power Station I think this is another in the same vein as Phobos Outpost which was the first of the maps I mentioned here. It's the same sort of thing, an E1/techbase style map with lots of darkness and pools of light and windows and all the good stuff. And it's pretty easy being an E1 map. I think however that since doing Elixir I've noticed something about Doom sector lighting that really bugs me, that is the way people make their lights work more like parabolic searchlights than normal indoor lighting. You have a lit area that is as bright on the opposite wall as it is by the light, and way too narrow, so you can be standing in shadow but still stood in full view of whatever the light source is meant to be. The trouble is people think "where is the light going" when they should be thinking "the light goes everywhere, what is casting shadows?" This general remark doesn't take anything away from Phobos Power Base which you should play because it's great.

Rocky Road This is a typical new mapper's map. There's no theme, it's just a bunch of areas connected together. All are very simple. There was one bug, a door with the wrong sector referenced on one side. This map wouldn't have been out of place in 1995 or 1996 but it was made with Doom Builder so it's recent. That being said it's pretty easy, there's rarely more than half a dozen monsters active at any one time. You can do it in about seven minutes and I don't regret doing so.

WAYBAC2 This on the other hand is a re-upload from about 1996. It's amazingly linear, just like the last one. You have to run through a bunch of areas with varying themes, first getting one key then the next. There's one of those rooms with lots of perpetual slow lifts in, a fountain of slime, a maze for which the map doesn't give you much help and some stepping stones that need shooting to be raised. It ends with the easiest cyberdemon battle ever.

The Attraction to All Things Uncertain This is number 12 in the kaiser_* series, something like the fourth or fifth one I've tried and I keep saying I really should look at the others. The first thing you notice about it is how complicated it is. The architecture is detailed to all hell and seems to go on forever. Starting off outdoors, it's very open, but progresses inside into all sorts of halls, chambers, you name it. The blood isn't poisonous but the lava is. It's fairly linear but you don't notice because of the complex design - it took me over half an hour to finish playing even with the monsters taken out... sadly it was too hard for me to do with monsters, you're just losing health all the time and have no good weapons, never mind the five or six cyberdemons that appear later and don't talk to me about reducing the skill level as it appears not to help very much. Oh and the secrets are almost impossible to find, I had to use yadex. Maybe I'm just stupid though. Its theme is vaguely that of E4 (the sky texture is from E4 anyway) though there's quite a bit of good old bricks and metal. If it weren't so hard this map would be one of the best.

An Affinity For Pain This is a followup to Outpost Recon which I posted about in March. Unlike the former which was a techbase set in a rocky valley this is more of a lava-flooded ancient city. It's crammed full of detail and looks amazing, but suffers from the same gameplay problem of its predecessor, that of a lack of ammunition that can get quite annoying. Maybe it's meant to be like that and I'm just impatient, but I eventually gave up before the end having little to no ammunition, and at death's door from all the health hits taken from having to run through lava. I was also pretty lost... Better players than I should eat this one up, though.

Okay that's all the new stuff I've got through since I last did a maps update. I've replayed some old stuff as well but not to do a review of. Well I might do some of them one day, I mean I have old favourites that I've known forever and in many cases haven't played in years and never think to review. I don't just mean the big ones that everyone's heard of, like Requiem, Memento Mori etc I mean the less well known stuff like Insertion, Sector 666, UAC.wad, even the infamous Return01 which doesn't work properly on anything except really old original Doom executables and that I spent quite a lot of time fixing with a byte editor. But that's for another time, if ever.

16/09/2004 @18:32:54 ^20:55:40

HOW TIMES CHANGE

8:30am, 16th September 2003: Having not slept at all the previous night, tired and scared out of my wits, I prepared to start a new job that would eventually degenerate into just about the most boring time of my life.

8:30am, 16th September 2004: Having similarly not slept all night, this time I don't care. Some more of my Doom map is done and for once I don't feel like it is rubbish. Now I can go to sleep in comfort as the morning sunshine filters through the pores in the curtains.

Problem solving, teamwork, and building on the achievements of others

I am forever getting caught up in the solving of problems or the answering of questions for which the outcome and/or success of solving doesn't matter to me. For example yesterday I spent about 2 hours reading linux networking manual pages and the source code of libpcap/tcpdump, knowing full well I wouldn't care if I found out why things in the code I was looking at were going wrong...but I had to try to find out.

Similarly today I went to here and I was sure I could work out what the first 10 digit prime in the decimal expansion of e was, even though the place I'd come from, slashdot, had already posted that all it was all in aid of was an extremely convoluted job advert for Google Labs. In fact that made it easier not to care.

The reason it would be easy is that on most every unix system ever there is bc:

echo 'scale=N;e(1)' | bc -l

and you can replace N with anything and get as many digits as you like, except it'll take quite a long time if you make it too big of course. I used 1000 which took about a second to calculate on this 1.6GHz duron. Then it is a matter of splitting the resulting string of numbers into blocks of 10 and testing each for primality.

echo 'scale=1000;e(1)' | bc -l | tr -d '.\\ ' | xargs | tr -d ' ' | \
perl -ne 'for ($i=0;$i+10<length($_);$i++) { print substr($_,$i,10),"\n"; }' | \
xargs factor | awk 'NF==2 {print $2}'

You remove all the extraneous characters such as decimal points, escaped linebreaks and so forth, then concantenate all the lines onto one using xargs. Remove the spaces, then there's a little perl script that prints out consecutive sets of 10 digits. That bit could probably be severely optimised but who cares?

Anyway then you use xargs again to run each 10 digit string into a program called factor (part of a package called shellutils in Debian). This produces output of the form

2718281828: 2 2 97 179 39139

i.e. the number, then a list of its prime factors. We want the numbers that only have one prime factor listed. Hence awk 'NF==2 {print $2}'; NF is the number of words (fields, separated by whitespace) on the line. Equivalently I could have said $1==$2 {print $2} for the awk script because if a number has only one prime factor that factor must be the number itself (although thinking about it the colon on the end of $1 could complicate matters)

Anyway, so all you do is read off the first one that comes out and put into your web browser 7427466391.com and feel pleased with yourself.

Until you read the second puzzle! Here's where I came unstuck. The natural thing to assume is that you're looking for some kind of sequence, since it's phrased f(1) = ..., f(2) = ... and so forth, each ellipsis being a string of 10 digits from the decimal expansion of e.

So I started off looking at the line numbers of the output from my expansion split into blocks of 10. f(1) was line 2, f(2) 6, f(3) 24 and f(4) - the first 10 digit prime - was line 100. There's a weird coincidence for you, if you take the decimal expansion of e remove the decimal point and start counting from 1 the first 10 digit prime starts at position 100. Of course 2, 6, 24 immediately made me think of factorials but 100 doesn't fit. I toyed around with quadratics, cubics, exponentials, didn't get any further.

So I gave up. I thought I bet someone's already solved this and splurged the answer all over the internet in an attempt to whore for attention (IRONY ALERT) I turned the problem against its creator by googling for 7427466391. First hit was 7427466391.com itself but the second was some guy's weblog about google (yeah seems it's fashionable to blog about google, which is why I'm doing it, I'm such a whore) which leads on to this discussion the third post on which gives the game away. I'd never have thought to try adding up the digits in each 10 digit set pattern. So I adapted my command:

echo 'scale=1000;e(1)' | bc -l | tr -d '.\\ ' | xargs | tr -d ' ' | \
perl -ne 'for ($i=0;$i+10<length($_);$i++) { print substr($_,$i,10),"\n"; }' | \
perl -lne '$a=0; for (split//) { $a+=$_;}; print "$a $_";' | grep ^49

which I realise could be really optimised, but I still don't care. Anyway it does another little bit of perl to print the sum of the digits in each 10 digit set before set, then we just grep out the one whose digits add up to 49. The first four give f(1),...,f(4) on 7427466391.com so the next one must be f(5).

So following the trail leads to Google Labjobs which we knew already. This is a fairly condescendingly written job advert, which talks about separating the wheat from the chaff and all sorts of nonsense (except they phrase it for stupid geeks by saying things like "signal to noise ratio") Thus I encourage you to send as many stupid joke CVs ("resumés") to the address on the page. Let's write a covering letter!

Dear Google Labjobs,

I found your site after trawling the series of puzzles you set up for me. I managed to solve the first one by brute forcing it but the second one had me stumped until I used your excellent search facility to find the solution which I was sure The Internet had already ascertained.

I think this shows not only my capacity for problem solving but my propensity for teamwork and building on the achievements of others, which are as much a part of success in the modern world as pure cognitive ability.

I hope you will consider this application.

Yours sincerely,
Rob Young,
Currently Unemployed Lazy Shite And Not Caring About It,
England.

Wankers.

13/09/2004-14/09/2004 @04:09:07 ^05:29:20

POSITIVE REVIEW

<fri> god <fri> i clicked strobe.php and almost died

"it was a spiritual experience and i am so glad i could share it with you"

Here are some commands, which the iptables stuff especially is more for my own reference than anyone else's

Yes my monthly flash of motivation occurred the other day when I managed to force myself to work out how to play doom over the internet. This was the first time I've played the best game ever in multiplayer and in spite of the problems it was amazing!

Problems: well firstly the network code sucks for anything with a ping time of longer than a few milliseconds. Both server and client constantly spew udp packets in blocks of 6, 3 in each direction, to keep the two, or more up to four, game engines in synchronisation. The client appears not to update the screen and game world until each 6 packet exchange has been completed. When playing with somebody else who's only on dialup this means a frame rate of an estimated 1-2 seconds per frame; rather like trying to sprint along the bottom of a swimming pool. PrBoom's network code, which uses that from SDL, seems more suited to LAN play... Incidentally it was quite startling if the remote client exited, as the server no longer had to keep it updated and the game would suddenly speed back up to a normal frame rate.

The other problems were the relatively frequent crashes which seemed to occur for a variety of reasons. For example, twice the whole thing just froze up when I radioed an overly long line. This smacks of a buffer overflow or "gratuitous security hole" if you prefer.

Another thing was that my client would quit back to X a few moments after a respawn. The error message that came out was one I am very familiar with already; in the code that draws patches (sprites, essentially) directly to the screen buffer, there is a check that the patch won't spill out of the buffer. It's fine for 320x200 but I think at other resolutions the calculation introduces rounding errors that, for example, cause the game to quit instantly if you as much as finish Doom E3M3 and try to carry on into E3M4. This check was commented out in PrBoom 2.2.3 and only seems to affect PrBoom 2.2.4. It is also tripped by something unknown a few moments after you respawn after a death in multiplayer, which makes deathmatches almost useless.

You have to run the server before your partner on the remote connection runs the client, simply because if not the remote client gets its connection refused. The windows client at least doesn't seem to be able to cope with this, and it hangs. Also I found if I didn't wait a few seconds before running my local client after the remote one had connected, I would find myself staring at a black screen until I went to a console and killed all prboom and server processes manually (which doing took the whole of X with it as well, stupid thing) There's possibly some weird race conditions going on, if so probably related to the code's inability to cope well with long ping times to one of the connected clients, and that you wouldn't see this behaviour on a LAN game. But I'm just guessing here.

Nevertheless, first few times we tried to do this, it was still amazing enough to keep at it. The furthest we got was nearly to the end of map04, but sadly what I had felt to be amazing teamwork up to that point broke down when I shot the girl in the face with a rocket launcher. She respawned and her client crashed immediately afterwards. Probably for synchronisation reasons, you can't reconnect to an in-progress game, so I was quite upset. We tried again the next day, but somehow it wasn't the same. The slowdown was too much to be bothered with; I tried several times to do the jump to be able to shoot the spot on the wall that opens the BFG secret in spark's MAP01 modification. It's easy normally, but in treacle mode there wasn't the control you need to stop yourself overstepping the platform. It just wasn't the same, and I think we've got fed up now.

01/09/2004-02/09/2004 @00:54:45 ^01:25:59

BIG ENTRANCE

Okay so where have I been well I got really bored and miserable and depressed and whatever and I ran away from home and I met this girl on Monday and I took her for a drink on Tuesday and WE WERE MAKING LOVE BY WEDNESDAY THURSDAY FRIDAY SATURDAY and nobody got this joke on Sunday

Okay okay I made that up what really happened was that I went on holiday. TO THE OTHER SIDE OF THE ROOM!! HAHAHA yes well that's not really true either but it's not really false as well and most importantly it's the nearest thing to the truth you are getting

UPS madness

Nothing could be further from the truth, actually, it hasn't gone mad, it still works fine! The other week it woke me up though, yeah, at noon, let me tell you I wasn't impressed. Anyway it was my dad who'd turned off the entire house's power so he could take the bulb off the ceiling in the boiler room* and thus replace the ceiling tiles.

The power was off for about five minutes and nothing was harmed, not even my internet connection. Shame when the power came on though my stereo's presets had all been wiped, I don't know why that was, it's supposed to remember stuff for 24 hours and it usually does. Maybe there's a big spike when you turn the power back on? Well I'm not putting it on UPS power, it's a waste.

* Boiler room okay I don't know what else to call it but our bathroom is in two little bits, the toilet bath and shower are in the main bit but there's a little antechamber with a washbasin and the boiler before it.

Stupidest Email Ever

So I get this mail which starts "I am a speed garage DJ, Record Shop Owner and soon to be Label Manager" When I've stopped laughing I read on "I would like to discuss one of your productions - 'Bex Record' with you"

I'm seriously falling off my chair here folks. Who still calls it Speed Garage? HELLO AND WELCOME TO 1997 Also you could at least get the track name right even if you have to take an interest in a record that I can't stand and almost wish I'd never made.

Needless to say my immediate avoidant instincts were not to reply or do anything, and as usual I went with them. I'm sure if anyone reads this they'll be going on about missing opportunities but really. I've done way better stuff than that thing and the only reason people show an interest in it is because it's got fucking Bex who everybody fucking knows doing fucking vocals on it.

PS Yeah I have an enormous backlog of Doom map reviews to write but I'll do them another time