Private Airport (kai) going RC

After much abuse and perhaps a weeks kicking, or two thirds of a week in man hours, the first map in my RvS map pack is almost complete. The first one, as one might infer from the title above, is a custom version of the Private Airport. In having to find something reasonable to prefix or suffix the maps with, I chose the simple suffix of ‘(kai)’ for each map, why? Just blame it on an Endless Waltz.

The map has been optimized for Co-Op Mission and Team Adversarial play, but should function as expected in most game types; there is also a tweak for Bomb mode. You would still recognize it as the Private Airport, and I have tried not to destroy the maps excellent flow, merely augment it and revivify the game play. Several areas are in my humble opinion, more realistic, while still reflecting the intended feel of the map. Since there is virtually no one left alive, who is playing Raven Shield off a 32MB or 64MB AGP card, I have also taken the liberty of “Fixing” the portaling a bit, trading the frame rate on your toaster oven, in the hopes of reducing some of the floating guns a wee bit (in so far, as that is actually doable in this fucked up game). I also seem to have fixed one of the most annoying rooms in all of RvS, in that process ;). See, I do know what I have been cussin’ at for all these years :-P. My changes shouldn’t impact anyone who has a computer that could play RvS without extreme abuse in the first place (Yes, it is time to give up on your 4MB 3dfx card and buy a new computer), and shouldn’t effect performance for 96-98% of players.

In architecting the changes for mission mode, the thought that kept running through my mind is “This map is gonna be pure evil”, and if you enjoy doing things Ninja style as much as I do, on top of forceful dynamic fare, one will no doubt enjoy playing the coop mission on ROE: RED and saving the day like a sneaky son of a gun, hehehe. Things have been engineered to offer a more tactical experience to both coop and advers. mode, and I think my Private Airport (kai) will be much better suited for Force on Force Training, not to mention bounding drills.

The changes are numerous, tallying over 25 completed tasks on my RTM, and countless dozens of on-the-fly changes that occurred to my twisted mind during editing phase. Being a methodical type about getting my plans carried out, of course corrections and issue tracking was pushed into my RTM list as needed, instant triage.

I will likely make the map available to a select few for closed door testing, once I’ve finished a bit more private testing on the airport. After that, I would say the map is essentially good to go out the door. There is still an unfinished portion of the map, that is non essential, but to complete it properly, would entail triple the work and completing a subsequently desired feature set. There is also a few other features I would like to add, such as maximizing the sniping opportunities even further, but that can wait until later. The next iteration of the map, will likely contain such changes.

For now, I’m content to move onto the last leg of testing the map, and to get started on my ‘next’ one, mauhauhauahauhauha!!!!!

Building better memory management for high performance wired/wireless networks: Part 1

Building better memory management for high performance wired/wireless networks: Part 1: “The authors describe a variable pool memory management scheme that has been implemented for LTE and WiMAX protocol stacks and has exhibited excellent performance, especially when compared to traditional fixed-pool implementations.

Email this Article
Add to digg
Add to del.icio.us


Maybe I’m a freako, but I find these this article set to be intensely interesting.
In my travels, I’ve read plenty of miles of code, including more then a few programs that go as far as memory pools, and even writing a real memory allocator for all practical intents and purposes. This ranges from programs simpler then most (non UNIX) users would think trivial, all the way to more “Complex” systems. In fact, I’ve even spent time spelunking kernel virtual memory and file system code, which can be a truly interesting set of experiences in their own right.
In working on Stargella, I’ve wondered whether or not using such techniques would be a viable method of improving the games performance, but for this point in time, everything relies on the C library to work wonders where dynamic memory is needed. While I can see potential savings from adapting a more elaborate memory management schema, it’s rare that I’m kicking something around, that really warrants the extra time for creating and debugging code for it, over just rolling with the local libc brew. Of course being the code monkey I am, I always keep an open mind for what the future may bring in the way of change.
Although I will use malloc() quite freely in coding, I also look at it like a reload in a CQB situation: if you’re reloading, you’re not able to engage more threats, and that (at least for me in SAS) is often the slowest element to an aggressive and dynamic advance. On the other hand though, I generally expect the operating system to provide a decent memory allocator for most tasks, rather then a brain damaged one o/. Ways to minimize the cost of allocating memory however, is something that I always consider a plus.
Hmmm 🙂

Redefining pot luck

Tonight Food Network displayed one cracker jack of a mission, in which Robert Irvine of Dinner: Impossible was sent off to the UNC. The objective? Turn whatever he could scavenge out of the dorm rooms into a quality meal for a ~hundred students, in less then six hours!

So here Irvine is with his sous-chef, and they’re trying to figure out what the hell can you do with a barrel of cheese balls, dozens of cans of different soups, a megaton of ramen noodles, and so many other odds and ends lined up on tables. Not to mention a deep fryer that went out so many times, he had to threaten the to throw the rent-a-fryer guy in it, lol. In the end they had to raid the sonority houses just to gather enough proteins to make a decent meal. Impressively they shipped about 19 dishes, and no one died of a heart attack in the process. Battle planning went out in like the first 15-min, and they had to result to an on the fly menu plan. It was shocking that they actually came up with something edible, let along that much food lol. In response to someone saying they would make his last minute concoction for the fair, billed as “Robert’s Corn Dogs”, he quibbled something about how he would never cook like that in a sane situation.  Despite what’s probably the most ludicrous episode I’ve ever seen, somehow they pulled it off with a hair trigger.

What makes Dinner: Impossible such an enjoyable show, is watching the host stew through it… and thanking GOD that you don’t have his job, hahaha. If Guy Fieri has the best job on Food Network, Robert Irvine has the most stressful. Me, I would just like to tag along on Triple-D, and gain back my lost 40 lbs in the process xD.

It’s just one of those nights….

… where I’m to restless about getting things done, yet to freaking tired to actually get anything of value done. I’ve already spent most of the day like a humming bird, even while on an RvS break; so it’s starting to get ridiculous lol.

For the past few days, I’ve been pondering ideas and looking at where I would like to be in the next ten years. Of course, getting through this year is a prerequisite 8=). I tend to analyze things systematically, so it’s a problem I engage no differently then any other, it is merely a bigger issue to study. At present Operation Redeemer is proceeding at a terribly slow pace, one that’s being forced upon me o/, and likewise data also suggests this will increase the odds of later being shafted before things conclude. Experience has shown me that families either represents the finest support system ever created, or the exact opposite: matter and anti-matter. Sadly with about the same impact on moving forward, only useful with a warp core and containment field. The principal agenda guiding my short term plans (Redeemer), is focused on brushing away the obstacles that make any larger aims, an utter impossibility. Ever being who I am inside, of course I’ve gotta lay foundation on later plans too. In the end though, only time can tell the future.

At the more immediate moment, I’m just whipped. There’s no shelter from exhaustion at this point, and probably never will be in my life: that’s one reason that I tend to take things one day at a time. I’m so fucking tired, yet hate to watch the hours go by without getting anything practical done. I also know, working on most of the stuff that needs doing, isn’t wise when I feel like passin’ out.

The crappy thing is, if I log off now, either I’ll be wide awake in a couple of hours (and back in the same boat), or by the time dawn rolls around, I’ll feel like slamming my sleep starved head into a wall, o/.

After getting my CP back in January, I’ve finally gotten to put it to good use: in our old churches back parking yard. My mother also has, for lack of being able to spell the Italian word coming to mind, I’ll just describe as having gained injured nerves >_>.

I’ve known the theorem and mechanics of driving since I was like eight or nine, so my focal point is on filling the experience gap. Ma has been driving the same ’93 F.O.R.D. for almost as many years as its been off the assembly line, and knows its handling inside and out; I don’t. Unlike my mother however, I can trivially calculate the distance between the car and what’s around it, stuff like that is a skill I’ve developed over the years, I can both feel it and fill the missing picture in, based on what my mind has already seen. Thus getting to close to the curbing means either I miscalculated the difference between the steering wheel, and the actual wheels current vectors, or it took to long for my foot to shift between pedals: not that I can’t see where I’m going 8=). Towards the beginning, I had to threaten my mother to shut up and stop grabbing at my arm, or I would retaliate either by (intentionally) taking the car over the curb, or make her stand outside and watch. I don’t give a fuck if there’s more racket going on then in a warzone, jabber all you like, but don’t interfere! Geeze I’m not an idiot, I know better to go over the curb; and that stopped as soon as she stopped jacking the wheel towards the curbing, whenever the car got too close. See, don’t bother me, and things get done properly -.-

My mother is insanely short, and to narrow minded to assume others have the same visual problems that induces. What can I say, when I first sat down in the drivers seat I nearly knocked my glasses off, and had my head angled funny, just to avoid cracking it on the ceiling… and I’m vertically challenged myself. Just getting the seat and steering wheel adjusted was a feat, involving suspending myself over the cleaning supplies in back, in order to clear to crap out of the way so the seat would have somewhere to slide back to, and then trying to extricate myself, without castration, broken legs, or a sliced open belly. It felt like hanging myself from the cars interior roof, and applying a spiders agility lol.

The area I had for practice, is just two sets of parking spaces several car lengths long, joined by very tight turns on either end. Small enough to require paying close attention, yet empty enough to only have to worry about one parked car, hehe. Did several dozen laps around the yard over an hours time, including a K-turn to go about the other way. Started out going at the engines idle speed, before studying how she handles under different patterns of acceleration and breaking; I doubt if a claustrophobic amount of practice space in is a good thing for a noob, but I never the less, take it scientifically. For me, it is very important to learn how the vehicle handles, because I’m not going to be responsible for taking it on the road, unless I know it well enough to keep the damn thing under control. I’m crazy, but I’m not suicidal :-P.

Three things that I noticed about the family Ford: the old accelerator has a hair thin trigger, it’s got a fat arse when it comes to rate of angle change in reverse, and exactly like in dreams that I’ve had about driving, the car will move forward even with foot off the accelerator. After 16-17 years of reading the dashboard sticker that says, “To shift from park, depress break pedal” in English and French, I of course remembered to do that without hesitation. I could probably understand the thing in spoken French by now o/.

Unlike my brother many moons ago, I opted to keep things under tight control while practising. Heh, I can still remember when Reese got his learners, and ended up zipping around a large Sports Authority parking lot like a bat out of hell. At least, I was seat belted into the rear drivers side seat, and spent most of his learning sessions being plastered against the rear passenger side window, lol.

Now the big question, is how many months will it take before I get more time to practice o/.

This weekends multi-part plan

  1. shave off the moustache and company; done
  2. get a hair cut; hopefully sorted before Monday
  3. a long shower; done as soon as the mops and laundry gtfomw
  4. finish pc-bsd v8 review
  5. report Stargellas sysio code to windows; stupid rsync screw overs…
With luck by Monday, I’ll both feel less like Chewbacca the Wookie and have a lot of work done, hehe.

Bug smashing on the stack, hehe

Ok, I’ve spent some time longer then expected working on my games net code, mostly because I both needed one nights sleep this week, and wanted proper IPv4/IPv6 support going on. Sunday I basically finished principal work on the net module, and completed a pair of test cases: a really simple client and server program. After that went smooth, I had planned to complete the finishing touches.

The problem: the server example segfaulted. Now those who know me, I consider it a plight upon my honour as a programmer, for any code that I’ve written to crash without due cause (i.e. not my fault). So I spent work on Monday taking a break: refining code quality and then porting it from unix to windows. During the nights final testing runs after that however, I had not solved the mysterious crash yet, and got the same results. I switched over to my laptop and recompiled with debugging symbols, only to find that my program worked as normal, only dying with a segmentation violation once main() had completed, and the programs shutdown now “Beyond” my control.

My first thought of course, was “Fuck, I’ve probably screwed my stack”[1], a quick Google suggested I was right. I also noted that turning on GCCs stack protection option prevented the crash, so did manually adding a pointer to about 5 bytes of extra character data to the stack. Everything to me, looked like the the return address from main was being clobbered, or imagine invoking a buggy function that tries to return to somewhere other then where you called it from. Before going to bed, I narrowed it down to the interface for accept(). Further testing showed that omitting the request for data and just claiming the new socket descriptor, caused the crash to end but still, some funky problems with an invalid socket. Inspection of the operation also showed that the changes were well within the buffers boundary, yet it as still causing the crash. So I finished the remaining stuff (i.e. free()ing memory) and went to bed.

Having failed to figure it out this afternoon, and starting to get quite drowsy, I played a trump card and installed Valgrind. It’s one of those uber sexy tools you dream of like driving a Ferrari, but don’t always find a way to get a hold of lol. For developers in general, I would say that Valgrind is the closet thing to a killer app for Linux developers, as you are ever going to get. In my problem case however, Valgrind wasn’t able to reveal the source of the problem, only that the problem was indeed, writing to memory it I shouldn’t be screwing with o/.

So putting down Valgrind and GDB, and turning to my favourite debugging tool: the human mind. It was like someone threw on the lights, once I saw the problem. Man, it’s wonderful what a good nights sleep can do!

Many data structures in Stargella are intentionally designed so that they can be allocated on the stack or heap as needed, in order to conserve on unnecessary dynamic memory allocation overhead, in so far as is possible. So the example server/client code, of course allocated its per socket data structures right inside main(). Because there is no real promise of source level compatibility between systems, the networking module is implemented as a header file, having function prototypes and a data structure representing a socket; which contains an opaque pointer to implementation specific details, itself defined in unix.c and windows.c, along with the actual implementations of the network functions. Because of that,the behaviour of accept() can’t be emulated. Net_Accept() takes two pointers as parameters, first to a socket that has been through Net_Listen(), and secondly to another socket that will be initialised with the new connection, and Net_Accept() then returns an appropriate boolean value.

All the stuff interesting to the operating systems sockets API, is accessed through that aforementioned  pointer, e.g s->sock->whatever. What was the big all flugging problem? The mock up of Net_Accept(), was originally written to just return the file descriptor from accept(), allowing me to make sure that Net_Listen() actually worked correctly. Then I adjusted it to handle setting up the data of the new socket, in order to test the IPv4/IPv6 indifference and rewrite the client/server examples using Net_Send() and Net_Recv(), and that’s when the crashes started.

I forgot to allocate memory for the sub structure before writing to the fields in it, resulting in some nasty results. When I say that I don’t mind manual memory management, I forget to mention, that programming while deprived of sleep, is never a good idea, with or without garbage collection ^_^.

Now that the net code is virtually complete, I can hook it into my Raven Shield server admin tool, which will make sure to iron out any missing kinks, before it gets committed to my game. Hehehe.

My games net module is almost complete under unix, and in theory should be able to handle both IPv4 and IPv6 communication fine; not that I have much to test the latter with. Windows support will need a bit more tweaking, and then it’ll be possible to plug it into my Raven Shield admin quiet easily.

Pardoning interruptions, I’ve spent about 6 hours of my day working in straight C, followed by about 15-20 minutes for a little rest. For some sickening reason, my weekends almost always fall into the category of working all day, eating dinner, then working until dawn lol.

Doing things in C, I find more time consuming then more dynamic languages, chiefly because of how much testing I (try to) do, coupled with how much lower-level stuff one has to keep in mind. Having to deal with memory management issues, is not a problem for me, although I do admit that garbage collected languages can be very enjoyable. To be honest, I find the portability problems of doing anything interesting, to be a greater drawback then managing memory; e.g. by design Python is not very portable in comparison to C, but it more then portable enough for anything you’re likely to bump into on a PC, and can do ‘more’ with less bother, for an acceptable level of portability. They are very different languages at heart, and their designs reflect it strongly. A lot of people (including myself) call Cs portability a myth, and it is in the sense of what most people want (especially me), I doubt is possible without a more modern rendition of the language (NOT Java or C++). Where C truly excels at portability, well I reckon you’ll just have to study more assembly language to understand the value of it.

Now if only I had something better to do, then spend all my time behind a computer screen, monkeying around with GCC on one side, and MSVC on the other 8=).

A REAL HOME

A REAL HOME is a playground. Beware of the house where no
rough-housing is allowed and no cries of glee are heard.

A REAL HOME is a workshop. Pity the child who is unfamiliar with
wrenches and hammers, knitting needles, thread, screwdrivers and saws.

A REAL HOME is a forum. Honest, open discussion of life’s great
problems belongs originally and primarily in the family circle.

A REAL HOME is a secret society. Loyalty to one’s family should mean
keeping silent on things that are the family’s business and no one else’s.

A REAL HOME is cooperative. Households flourish in peace when the
interest of each is the interest of all.

A REAL HOME is a school. Many of life’s most important and lasting
lessons are learned here, both early in life and later on.

A REAL HOME is a temple, where people are loved and respected
and where life is appreciated, in the recognition that life in all its parts is
a gift of God, with our family being our personal and most precious gift.

Is your home, A REAL HOME?

Author Unknown

I wish I could answer that question without hurting anyone, myself included.

Almost a Quaketorious Victory :'(

It was a nice double that quickly turned into a massive battle, going up from last to match leader in the first couple minutes… couldn’t be racking up frags any faster if I had a nuke: I actually had greater then 2:1 K2D ratio. It’s like no matter what the other players did, BAM I was right on’em, often being involved in  3 to 8 way melees.

Ended up neck in neck with another match leader at the end, and cinched it at like the last blink of an eye by scoring like 6 frags in near perfect succession, winning the game!

Loaded up the next map and was having like the best freaking roll of my life, bodies dropping left and right. There’s something uniquely satisfying about using my SAS skills to counter the other match leaders “Mad skillz”, with great effect no less. Again neck in neck for the lead and looking like the end of this match is gonna flop in the bag in a sec…. when I got called off to clean up someone elses disgusting mess. Worse then that, because of QLs scoring system, not only does that mean I was forced to forfeit everything earned during that pwntacular frag fest, it negatively impacts my reputation for the quit.

And so, family induced as only it could ever be, ends one of the best game nights of my miserable little life. There must be some bastard in the universe, who can take a perverse pleasure in that. Odds are we’re related.