Brandon's Blog

1/16/2005

(No Title)

I should be resting up for the drive tomorrow, but oh well…


Computers are (now) for productivity, digital media, communication, and light entertainment.  Game consoles are for gaming.  Let’s take a look here: $150 buys you a cute, miniature PS2 that produces video on par with that produced by a processor of that price (not to mention the added mobo, video card, memory, peripherals useless to gaming like CD writers, etc., etc.).

Why are we demanding DirectX/Avalon/whatever technology out of our productivity boxes when an X Box is the perfect gamers’ compromise between a PC and a console?  (For the record, I hate the X Box for its poor selection of games and huge form factor, but the idea is sound.)  It’s time to subdivide and specialize; hardware is too cheap to buy multi-purpose boxes and make them specialized at everything.


In MUD news, connection management (login/logoff socket polling, user counting, and a cool doubly-linked list for connected clients) is finished, and I’m dumbly recv()-ing input off the socket descriptors and bouncing it to the console.  No send()-ing yet, and the next step is getting the client input buffers going and smacking in a basic command interpreter.  That shouldn’t be hard, but I’m currently in OOP hell.  Dig:

Server
—- Client List (::Players, type List)
———Client (Player)
————- Client Input Buffers (one per client) (::char[MAX_BUF_SIZE])
—- World Data (Rooms List)
—- Command Interpreter
—- Socket Polling (::Monitor)

The server “owns” the clients.  Since the server owns the listen socket (port 4000, or whatever specified by the command line [already working by the way, yay!]), I don’t see many ways around this.  Another no-way street is the input buffer situation.  Each client has to own his buffer.

However, the command interpreter (CI) needs to be at the level of the Server, or it will be cumbersome (read: craploads of pointers/references) to access the world, clients, etc.  But, since the CI needs to pop commands off the client buffers, there needs to be some graceful way to write the interaction, and I’m afraid I’m going to make a bad decision that will really be a pain in the butt later on.

Current plan:

The main program loop already calls Server::Monitor() each cycle, which adds players to the list and updates stuff.  It also checks for read-ready buffers (buffers that have data waiting for a recv() call).  It’s nice to keep this task within the main Server class (since Server owns the listen socket), and it’s dang near impossible to have this happen on a per-client basis (Google on “blocking sockets” for the gory details).

When ::Monitor() runs into a read-ready socket, it needs to enqueue that data on the client buffer for the particular user.  This is no sweat (although you do need an O(n) linear search through the clients linked list every time data is readable to match the socket descriptor with the proper Player object).

Aside:  I thought about using a dictionary class to facilitate a binary search by socket descriptor (which is actually just an integer anyway).  However, this seems to suck, and I shy away from it.  Is it really worth it to get O(ln(n)) or whatever?  I can’t remember what a binary search is in O-notation, but I don’t think it’s valuable enough to make the data structure complex.  There is enough C++ abstraction going on to make this work later without changing function calls, anyway.

The current plan (finally I got there) is to use the now-hypothetical Player::BufferEnqueue(char*) function to monitor when a newline is sent to the socket.  For each instance of a newline character, the enqueue function builds a Command object containing the terminated line of text and adds it to a templated linked list List.  When the recv()-ed input processing is completed, the BufferEnqueue() function returns this List object to Server, which in turn bumps it over to the CI for processing (or at least further queueing).

Sound good?

1/9/2005

(No Title)

It’s not like I don’t have enough to play with already: two computers, two massive PS2 games (GTA VC and Kingdom Hearts, not to mention Dynasty Warriors IV and DDR Extreme), one of those cool little Sega plug-straight-to-your-TV gadgets, and three website designs (church redo, Christian fraternity from scratch, and Mom’s new business).

However, I had a vision today for a different kind of MUD platform.  Here are the features I see as part of it:

Linux API and C++
XML world description files
Extensions (mob behavior, message boards, etc.) modularly loaded in extended Python
The open d20 System Gaming Standard

Interesting, eh?

1/5/2005

(No Title)

I read this in an article today, and I eventually figured it out.  The following statement in C copies a string:

<br />while (*s++ = *t++);<br />

1/4/2005

(No Title)

BOA Webserver Screenshot



As much as screenshots are a necessary and common inclusion in OSS (Open-Source Software) websites, this is just too much.

Nice to see these folks have a sense of humor.

12/31/2004

(No Title)

Closer was excellent.  The kind of movie that makes you want to take up cigar smoking, so you could leave the theater and stand outside smoking a cigar.  Definitely not for the faint of heart emotionally.

As promised, explicit scenes were definitely cut from the movie, yielding an extremely tasteful movie (at least in terms of visual exposure of Natalie Portman), considering it centered around her as a stripper.  She has a full career ahead of her, and I’m glad they saved it by cutting any gratuitous scenes.

If you can’t handle infidelity and personal tragedy, don’t see this film.  If you are looking for Portman nudity, don’t see this film.  If you’re looking for a good movie, go see this.  Don’t rent it unless you have to.  It needs the big screen.

12/14/2004

(No Title)

How many people have ever taken an engineering final with “Drop It Like It’s Hot” stuck in their head?  I think I might be the first.

At least it was easy.  That stupid song must have slowed me down 20%.

12/12/2004

(No Title)

Why Men Love Bitches

Read the reviews on this one!  Like the potential readership of this book needs a guide.

Good gosh.

12/5/2004

(No Title)

It kind of gets me that I can buy a bottle of nice wine for the cost of 1 1/2 glasses of lesser wine at a restaurant.

File this away in the How Much Will People Pay For The Right Thing At The Right Time department.

12/5/2004

(No Title)

Gentlemen, this is the enemy.  This is who we are fighting.


my frogs

so this is a continuations of my boys so here they are finally

ryan: he is a new one, i got to know him up here at state, and anyway, well he’s a character, thats what i think, anyway, he’s really a good kid, he eats lunch with me everyday, and i alwasy get a good workout becasue i laugh at him almost as much as when i’m with cheese, and i have played guitar with him, he is getting much better. he’s not as bad as he thinks he is, and he sometimes goes to cru with me. so yes that is ryan

chris: none of you know him so i’m not really going to talk about him, but he’s cool, the same goes for ben, charlie, and josh, they are all really nice guys that go to cru, and they are friends of my cousin, (ben is her boyfriend) i left a note above their kitchen sink telling them to hang up their dish cloths because they stunk, hehehe

joel: none of you know him either, but he goes to my church and he’s a really nice guy, he one of those who should become a priest, i wish the best for him

luke,mike, eddie, dan, dan, bob: these guys work with me in the math help center. they are a lot of fun, some are more outgoing than others, but they are all really cool. some are really smart, some are into cars, some are just funny, i’m glad i dont have to work with geeky weirdos

hugh: he’s an awsome kid, i went to see hidalgo with him, he’s funny, and he likes to play jokes on people, he is also really good at basketball and wrestling, the only way i can win or at least get him to stop wrestling is to give him a wedgie and say hahaha i see london, i see france, i see hughies underpants, hahaha, but he gets really embarassed when i do it

josh: he is the cutest little red head ever. i must say, and my favorite memeory of him is the day emily died, he gave me a big hug and said dont worry i’ll be your buddy, so to this day i call him my little buddy,

lance: i dont know him very well, but he has a really cool car, and a southern accent

ethan: hehe, he can swim like no other, and he is learning tykwondo, and he tries to use some moves on me, but he still cant beat me, hahaha, plus he is one of those really cute blonds with blue eyes

caden: he’s a cutie just like his brother ethan, only he is lighter blond, with even brighter blue eyes, and he is definately not a ladies man, but he likes to talk to me everyonce in a while, so i feel that i am in some way triumphant, we talk about cars, plus one time he came to sit by me and fell asleep on my lap, i totally win

boston: i didnt get ot know him very well before he passed on, but i know he is one of the little angels up there looking out for me

zach: he is a total cutie too, at one point i was the only girl he liked, he likes to go shoot guns, and work in my dads shop, but every once in a while, he’ll come inside and bake cookies with me or watch a movie

wade: well lets see, i can always count on him to make me laugh, i know that if i was ever in any bad situation he’d try in some way to help me, although i dont know how successful he’d be, and he was totally willing to beat up this guy for me, so it all evens out

calvin: well lets see, calvin has totally changed, he went from threatening to kill me with a baseball bat, to helping me set things up on my computer, and doing the dishes with me, kind of creepy, but i think the kid will turn out just fine, probably even better than the rest of us

stephen: well he is one of those sincerely nice guys, i’ve had some profound little chats with him, and anyway, he is quite the religious little dude, he may become a priest some day too, but if he doesnt he will be the world greatest dad ever, and whichever girl snaggs him will be one of the luckiest in the world. he is one of the true gentlemen left in todays society. plus he plays guitar a little

andrew: lets see, he is really into politics, awesome, and when ever i’m talking ot him, we alwasy joke around, its’ kind of fun, and lets see oh i’m so jealous because he is so so so so so so tall. i cant stand it, i want ot be taller, plus every once in a while, he’ll come ot me for advice, he’s a really cool guy, plus he knows a lot about computers

paul: hey he is one of those rebelious, skateboarder, i want to work with my hands types, he is an amazing kid. his craftsmanship is really improving, he does the whole fishing, hunting, thing, and he is in the marching band, and he is just itching to get a new car, he is one of those guys who just scream cool, without really doing much, it’s just in his aura

chase: well i was supposed to be his godmother but that fell through, he’s really shy, but thats okay, he is starting to warm up to me, he is only three or four, biggest plus ever…..HE”S A TWIN!! yay

dalton: suprise, he’s a twin too, well really they are twins together, and they are similar in a lot of ways, but i can already see that they will be two very different people, and i hope that they will always be treated as individuals

luke: i love this kid. from day one we were buddies. he always has a smile, and he jokes around, AND he is the only other cousin i know who also inherited grandpa’s competativeness, and will to win. this kid rocks!!! plus he is really really smart, i’m talking genious here, and he is good at sports, you name it and he can play it, i mean even hockey. and he looks like my dad did when he was little. plus he has the best manners of any kid i have ever met. the is the coolest

justin: at least that is the name i know him as, i dont know him very well, in fact i dont know him personally at all, i have just heard a lot about him and i hope that one day i will get the chance to meet him

i am totally not finished yet, but i have to do math homework, so i will continue at a later date.
ps. apparently i am supposed to date some guy named jessie i think, any way this is according to steph and katie, so i’m not really sure if i should trust them, and although i wont date him, he sounds like a nice guy, he may make the list one day. or he may be a total looser, who knows, ta ta

11/27/2004

(No Title)

I so just posted an XHTML 1.0 Strict version of my wishlist online with its own subdomain (toys4.brandon.mccalip.net for you voyeurs out there).

Sigh

> Newer Posts

< Older Posts