Friday April 04, 2008
How The Game Is Played
Viewing Neverwinter Nights creatures in Netbeans 6
The past week I've been back to fairly heavy work on the Project Darkstar based MMO engine that I will be talking about at JavaOne and featuring in my upcoming book on writing Massively Mutliplayer games using Project Darkstar.
One of the early decisions I made was to use the NeverwinterNights data set because its is good quality, well thought out ,freely available and has some wonderful tools. However I also need to develop new tools for this projects. A second decision I made was to do all of my new data tools in Netbeans.
There was a not insubstantial learning curve to writing Netbeans plugins, but now that I'm starting to see the other side of that this decision is starting to pay off. I have a plugin now that lets me freely browse through the NWN meta-file structure and view files. The first file viewer/editor I wrote was for 2DA files. These are simple spread-sheet like files that NWN uses for tabular data.
The next one, that I just finished, was harder but is very rewarding. Using JMonkeyEngine (www.jmonkeyengine.com) it displays actual NWN 3D models right inside of Netbeans!
Posted at 04:22PM Apr 04, 2008 by gameguy in Java |
Who says Java games have to be big?
I'd like to take a moment to spotlight a very interesting competition
going on right now: The JavaUnlimited 4K Game Competition
This is the second 4K competition JavaUnlimited has held and the
results of the first one were suprisingly creative and fun.
There is an entire thread on JGO just
examining what makes 4K games so much fun to write and to play.
To my mind it falls into the same area as why Classic
Games are experiencing such a resurgance.
The fact of the matter is that while games have grown
exponentially more complex, expensive, and hard to create over the
years, they haven't necessarily gotten much more fun.
Simple games provide an outlet at a very core level of our
mind, basic pattern matching and simple reaction timing. They
don't ask us to spend months to figure them out nor do they require
teams of artists to realize. In the end, they don't require
us to work
at playing the way modern games do.
If you haven't played any classic video games in awhile, you really
should. Grab one of the many emulators such as MAME or JEMU
and score some ROM images. (Please don't ask me where to get ROM images,
That is technically illegal and Sun would not appreciate my
distributing such information directly or indrectly through my blog.) Or
do a google on "Classic Games" and try some of the many clones out
there. Then ask yourself what percentage of your play-time
playing a modern game is spent really having fun, versus
the percentage of the time you just spent with a classic game that
was spent having fun.
We have reached an age of over-production in the game-space.
We can do almost anything we ever dreamed of doing in a
game... but does that necessarily mean we should? Maybe in
reaching for the stars we've lost our footing. I think its
worth revisiting these old-style games and at least asking that question.
My final comment. In Java we have also now reached the point
where we can do almost any kind of game, from fast First
Person Shooter to 3D Real Time Strategy.
But in the elation over our new found power, lets not forget
the joys of the simpler things in life!
Long live the 4K games!
Posted at 01:57PM Dec 17, 2005 by gameguy in Java |
The Lie Machine in motion....
Well, it didn't take long for our government to remember one of their favorite tools, the gag order. You don't need to see all the bodies floating in New Orleans. It would be bad for you as it just might make you wonder how they manage to keep talking about 100s of bodies with a straight face when the real numbers are easily in the high thousands. A friend of mine has a relative who works for FEMA and is in the middle of the clean-up in the midst of New Orleans. He tells me that she tells him (heresay, granted) that the workers have stopped even trying to count the number of floating bodies they are finding.
The sight of American bodies tends to get the American people asking the question "why", and thats something our government doesn't want. They don't want you asking why our men are dying in the middle east, Ergo they don't allow pictures of those bodies. They don't want you asking why people were drowned in New Orleans, so they don't want those bodies shown either.
The question the Bush adminstration has posed for us to ponder instead is "who is repsonsible for the imperfect reaction to the disaster" and wants to pin it on the Democratic governor, even though he has already had the director of FEMA fall on his sword to cover his own butt on this issue.
While that is certainly a good question, it isn't the most important one, Far from it. In point of fact, its a distraction and I would hazard a guess a purposeful one. The most important question is why did this disaster occur at all? The disaster wasn't the hurricane, we've had plenty of those in the past without nearly this much destruction or loss of life.
The disaster was the failure of the levees. This is what drowned the City of New Orleans and thousands of its poorest citizens. And it was a disaster the Bush administration was warned of, and yet courted by cutting funding for the repair of those levees over and over again.
And thats is something our president doesn't want to talk about. Are you surprised? You can make a difference though by reminding the media, as many times as necessary, that this is the real story and the one the people of the US need investigated.
Posted at 11:11PM Sep 11, 2005 by gameguy in Java | Comments[1]
Blog Ed ate this blog
Well, it did withy my hel pand a user error. Im going to try to see if I can find a copy on the net somehwere and repost
Posted at 11:32PM Sep 05, 2005 by gameguy in Java | Comments[3]
Homeland Insecurity
If you are watching the reports from CNN or others (any channel but Fox, who ofcourse are trying desperately to spin this PR disaster favorably for the current administration), then you can't help but be struck by the simialrity between the current reports and past reports from war-torn areas of the third world. Lawlessness is so bad that aid workers work in fear of their lives.
One has to ask, how did it get this way? Part of the answer is that the Bush administration took the opportunity after 9/11 to gut FEMA, the government agency that should have been managing this disaster. But is our president right when he says this is a disaster that "could not be anticpiated?" Compelling evidence indicates that our government was warned, and ignored the warnings. Not only did our government chose to ignore this situation, but the current administration exacerbated it by cutting funding to the army corps of engineers in New Orleans in order to fund his war in Iraq.
Finally, ex FEMA director James Witt, an expert in disaster management, has observed in a CNN interview that the natural barrier to hurricanes is wetlands. But Bush policies on ecological issues have resulted in those very wetlands being destroyed at a rate of a football-field a day.
Looking at the disaster in New Orleans, one has to ask the inevitable question. George Bush has justifed all of the above to the american people with the promise that he was making them safer and wealthier. Where was the wealth promised when thousands of New Orleans poorest citizens died because they couldn't afford to own the cars that would have evacuated them in time? Where is the security when disasters are compounded by an inability of the government to respond?
And if George Bush's FEMA had existed before 9/11, how much worse shape would New York City have been in on that fateful day?
Posted at 06:55PM Sep 04, 2005 by gameguy in Java | Comments[1]
For folks against the war -- rally tonight!
If you don't believe in the war. Or even just don't believe in how GWB is handling things and feel he aught to have the decency to actually talk to the mother who lost her son and has been camping for weeks on his doorstep rather then just talking about her to the press, you'll want to get to one of these rallys tonight...
My wife, the Episcopal priest-to-be, and I will be attending one in Santa Cruz!
Posted at 01:35PM Aug 17, 2005 by gameguy in Java | Comments[0]
Construction continued
I took 2 days vacation to make vactool happy last week and worked on my house some more.
The roof is now tar-papered, flashed and shingled and the walls are closed in with plywood sheething.
Here's a picture from the front 
Here are some pictures of the roof with tar-paper: 

And finally the roof with shingles:


Posted at 07:43PM Aug 16, 2005 by gameguy in Java | Comments[0]
Uneffing Believable
Has anyone else noticed that the adminstration propaganda machine is looking just a little bit desperate these days? If you needed any more proof, try this link...
http://www.defenselink.mil/home/photoessays/2005-05/p20050505a1.html
Wouldn't you have loved to be a fly on the wall when they came up with THIS one in the white house... I can see it in my mind's eye.
GWB: The people are starting to actually question what we're saying and how it compares to what we're actually doing. What can we do???
Rumsfeld: Well... those hippie festival things always get good press. Myabe we should throw one of them....
GWB: Hippie Festival?
Rumsfeld: You know. "Live Aid", "Band Aid", those things. We could call it "Troop Aid".
GWB: Do you really think people are dumb enough to confuse the pentagon and our millitary contractors with a non-profit aid organization?
Karl Rove: *shrugs* They voted for you, didn't they? Twice? At a bear minimum if we get loud enough musicians maybe they wont be able to hear the screaming in Guantanamo bay...
All I can say is that I am thankful there was one honest and thoughful Republican president with his head on his shoudlers, and I'm doubly thankful he was right...
"You can fool all of the people some of the time. And some of the people all of the time. But you can't fool all of the people all of the time." -- Abraham Lincoln.
Posted at 10:40PM Aug 10, 2005 by gameguy in Java | Comments[0]
Reprint: Cross Gender Roleplay
I originally wrote this blog for my short lived blog effort on Javagaming.org. I've had a number of requests for it recently so I thought I'd reprint it here.
So here it is, the Lazy blogger's way to new material-- reuse!
Cross Gender Role-play
Posted by jeffpk on May 03, 2004 at 05:48 PM | Comments (2)
Cross Gender Roleplay.
I've been playing pen and paper role play games fairly consistently for almost 30 years and online RPGs on and off since Ultima Online. As someone who plays both male and female characters today I often find myself called on to answer the question. "why would a guy want to play a girl?"
Well there are probably as many reasons as there are cross gender players. Although I have immense sympathy and respect for those with gender identity issues I don't feel qualified to talk about that particular subject so I am going to leave that reason alone. Instead I'm going to focus on those of us that sometimes play characters that differ from our own gender identities.
The reasons even there can vary substantially. A friend of mine who used to play females did so, according to him, "because you spend most of your time at the terminal staring at your own character and its more fun for me to look at a girl then a guy." Certainly a valid, if maybe a touch shallow, reason.
I've known other male players to admit that they play females for purely mercenary reasons. That the male characters fawn all over them and offer them all kinds of help, generally making the game easier to play. I'm not so sure this is a great reason, but to some degree the other players facilitate it by being so desperate to interact with the virtual females in their world. This doesn't say a lot for the emotional or social development of those other players but then again the net itself has long been a refuge for those that have trouble making social connections in the physical world.
Cross gender role-play isn't restricted to men. Woman sometimes play male characters on-line. I'm not as familiar with all the reasons there but a few young women have told me they do it to eliminate the creep-factor and so they aren't being hit on all the time by the guys. Playing females I've certainly seen some of what they are talking about but that is getting ahead of the story.
Then there are my reasons. In order to understand them I have to go back to my opening comments. I've been pen and paper role-playing fairly continuously for about 30 years. After college I went to Italy for a year. One of my characters in a very long standing Dungeons and Dragons game was important enough to the game that the Dungeon Master asked permission to use him as a character he controlled. (What we call an NPC or non-player character.) I said sure and went off to work in Europe.
Returning home a year later I went back to the weekly game, and was introduced to a number of new players. When the DM got to one particularly large and impressive looking fellow he said, "And this is Roger, he's playing Della, your girlfriend." (Roger is not his real name but since he doesn't know I'm writing this, thats what we'll call him.)
I think I made a response something like "Oh", but being a long standing role-player and having a very clear understanding that role-play is acting-- that it is about pretending to be other people, not being who we are, I sort of shrugged and went with it.
Roger and his wife eventually became good friends of mine and, in fact, I met my wife through them. To be honest Roger is such sweet and nice guy that I often think playing the caring and nurturing side of Della came easier to him then playing the Warrior she also was, but thats just my impression. Nonetheless, it opened my eyes a bit to the fact that a guy could ,with work, play a convincing girl. The frustrated actor in me was intrigued by the challenge.
Jump ahead about 5 years. I was searching for a new D&D character to play. Thumbing through the second edition AD&D bard's handbook I happened upon a sub-class (they're called "kits" in 2E AD&D) of bard called the "Gallant." While written in gender neutral terms the writer had obviously envisioned a male character with statements like "The Gallant cannot leave battle until after all members of the opposite sex have done so." Chuckling to myself I started imagining what would happen if the gallant were a woman and all the social issues that her trying to protect the guys would create and thought "what the hell."
In method acting, when you don't initially have the experiences to draw on, an accepted way to develop the character is to look for external role models and through a combination of mimicry and empathy try to draw into your own experience base the ways they deal with the world. Being married at that point, I had a great model in my wife, and thus was born Lady Cassandra (Sandra) Tesper of Waterdeep -- a Gallant-kit bard. She is still one of my favorite characters .
In playing Sandra I learned a lot of things, both internal and external. My wife, like many women, is naturally a more intuitive thinker then I am. Playing Sandra I like to think helped develop that intuitive side more. I also learned a *lot* about what a strong woman faces in our society, both good and bad. I have to say that, in my experiences playing females I really *have* seen the fact that in or society a guy almost cannot be too assertive while a woman really has to temper it lest she end up with the "bitch" label. Its not fair, its not right, it is however very real.
And that gets me to my conclusion. For myself, I play female characters as much or a bit more then males these days for a few reasons. First off, after so many years and so many male characters I think I've about covered every male personality type I am at all interested in exploring. (I've never played a complete jerk. In general I don't like insensitive self-centered bastards and I have no urge to experience their world. Maybe thats a failing. Similarly I haven't played deranged psycho-killers or other seriously mentally ill characters. Everything else I think I've played.) Women's personalities are interesting and new to me, providing new social experiences to explore.
More importantly though, I've learned a lot about the world women have to live in and, guys, its different then ours with different rules and different expectations. My wife says my female characters have made me a more sensitive and thoughtful man and husband. And thats something all us guys can use a dose of.
In general, entertainment can reach the level of art when it teaches us about the world and/or ourselves, I believe that role play games played with serious role-play can teach us to be more sensitive to others issues and needs by allowing us to experience perspectives and issues different from our own.
I'll end this with an apropos quote from the great Scottish poet. Robert Burns. In "To a louse", he concludes:
O wad some Power the giftie gie us
To see oursels as inthers see us!
Posted at 06:16PM Aug 08, 2005 by gameguy in Java | Comments[3]
Surprise movie of the season.
Shelley and I like to go to kid movies. Its silly, but sometimes its fun to relieve the very serious or silly but over-top-testosterone movies I usually go to see.
Tonight we went to see a movie with a tiny advertising budget. You could easily over-look it as its probably aimed primarily at pre-teens to teens. It's called Sky-High.
Here's a secret of Hollywood, as explained to me long ago by my mother who edited fan magazines in New York City during the tail end of the studio days. Ultimately the best advertising by far is word of mouth. After the first two weeks of a movie's run thats what will either pull people in or send them away and no amount of ad money will change it. A corollary of this is that if you see a movie that the studio is pouring tons of money into promotion of before it releases, one of two things is true. Rarely, it means they think they have a huge potential blockbuster they can turn into an "event." Far more often, they know it is a bomb and they are trying to maximize how many people go in the first two weeks before word of mouth kills it.
Conversely, sometimes a movie will come along that has potential but that the studio doesn't really know how to advertise. These "sleepers" they will often release with a minimal ad campaign hoping word of mouth will drive a decent success. The "sleeper" approach can often generate even better word of mouth as the folks who tell their friends about it really feel they have discovered something. Sky High IMHO is one of these.
Quite simple, we *loved* it. I would have to say its the second best super-hero movies I've seen this summer, right after Batman Begins. If you can imagine a classic teen-angst high-school sitcom crossed with a super-hero movie, then you have all the elements of Sky-High. What amazed and delighted us was how well the writers merged the two genres. The movie even managed a genuine surprise or two which, given the formulaic structrue of both genres, was down right amazing.
I'd talk about the great special effects but thats no big deal anymore. In this age of computer generated cinema just about anything that can be imagined cna be caught on film. (There is a rather cheesy computer generated robot and skyline in the openign of the movie but, somehow, that works stylistically for this film.) What really made this film work though was the quality of the script and the quality of the acting.
There are some big names in this movie (attracted I suspect by the script) who do a great job including Kurt Russel, Kelley Preston, and a perennial B movie favorite-- Bruce Campbell. For us old folks who will always carry in our hearts pubescent memories of Lynda Carter as WOnder WOman, she's also in this film as the school principle. The relative newcomers are also terrific, including the gorgeous Mary Elizabeth Winstead who bears more then a passing resemblance in this movie to Shannon Daugherty in Beverly Hills 90210.
If the formula at all apeals to you, then I'd say go. I'd take my pre-teen to this film as good perperation for highschool. Lots of typical teenage issues to discuss in this movie such as cliques, categories and social pressures. I think I'd like my teen to see it... but obviously not with Dad as that would be totally uncool
All in all its probably going to end up somewhere in the top 3 in my lsit of movies I saw this summer. Its not earth-shattering. Its not deep (except in a teen-problems sort of way), but its very well done and some good easy fun even for us adults.
.
Posted at 07:54AM Jul 31, 2005 by gameguy in Java | Comments[0]
My least favorite quote
You can tell a lot about how an organization goes about its business from the quotes it tends to throw about. Quotes are the most visible of memes after all. There is a quote that gets tossed around Sun often that drives me nuts.
Any software problem can be solved by adding another layer of indirection.
Steven M. Bellovin
With all due respect to Mr. Bellovin, I feel it's important to add a Kesselman Correction:
The two software problems that can never be solved by adding another layer of indirection are that of providing adequate performance or minimal resource usage.
Jeff Kesselman
This makes such solutions fairly useless in my domain space, the world of games, where performance is everything. In general it is my impression that here at Sun we rarely set performance as one of our design goals. I have in fact run into fairly stiff resistance the few times I have suggested we put absolute performance requirements into an API definition.
My observation has been that this generally leads to inadaquately performing systems that then have to have the heck tuned out of them in order to actually reach a usable state for any time or resource critical application.
I understand the reluctance. Designing for performance is hard. It drasticly complicates reaching other more function oriented goals and features. But if we are going to really make a name for ourselves in software we must, as another famous quote says, do the hard thing.
There's another phrase that I grew up with that can describe adding a third layer of indirection. And that is adding a bag on a hack on a kludge. A good, forward thinking, efficient design, uses as many layers of indirection as absolutely necessary and no more.
There's another word for that too. The word is elegance.
Posted at 07:47AM Jul 30, 2005 by gameguy in Java | Comments[5]
My new favorite website!
AH, the wonders that can be found by an accidental google.
This weekend I went looking for other reivews of the Fantastic Four to see if the reviewers felt the same way I did. (I give it a B. Not horrible writing, but not great either. Almost sucessfully updates the FF but messes up Dr. Doom fairly badly. Very pretty. Watchable once. )
Instead I stumbled on a treasure trove! My new favorite website is The Agony Booth.
This is a wonderful website that specializes in film synopses of really bad movies. (Well, some of them are more "sort of bad", but you get the idea.) The best thing about it is the writing. Its very well written, film and literature literate, creative, inciteful, and yes, nasty.
A real scream for anyone who loves film as much as I do.
I only wish more of my college film-school lectures had been this good.
Posted at 07:55PM Jul 21, 2005 by gameguy in Java |
Some Netbeans notes
Okay,
As some of you may have noticed, I'm not a big "its Sun's thing so its gotta be better" type person.
I personally think that kind of attitude cheapens the work of the teams who really have made stellar products. Two of those I can think of off hand are our Hotspot JVM team, who did what the world said was impossible and delivered a Java that runs at C++ speeds, and our Solaris folks who continue to turn out what I honestly think is the best Unix in the world.
Netbeans, I am sorry to say, has not fallen into that category in my rankings for awhile. In the beginning, it was somewhat hard to learm to use but generally matched up or exceeded other similar IDEs on a feature by feature basis. Unfortunately, for my tastes it started falling behind badly around the JBuilder8 time frame.
I'm back to using Netbeans again, though, and although it still has some issues, I'm pleased to say that at this point I think it has some real virtues to recommend it again.
First off, its speed on my hardware at least is excellent. They've really done wonders with start-up time. I run with a lot of modules plugged in-- almost all that are available-- and still don't notice an objectionable start-up. Similarly I rarely find msyelf feeling like I'm waiting on the interface to catch up with me.
Secondly, it has a dynamite free profiler. No serious Java programmer should code without a profiler handy and up til now you had two choices: buy an excellent but expensive profiler such as OptimizeIt (now part of Borland's tool suite), or use ugly, nasty and difficult free options.
Those days are over. The Netbeans profiler is awesome. I was a big OptimizeIt fan but the profiler does nearly everything OptimizeIt did for me (and they tell me the important missing features are coming soon) and many tricks OptimizeIt couldn't do. Its best trick is that it runs the code at reasonable speeds. Yes there is some hit, but nowhere near what I was used to under OptimizeIt.
Frankly, the profiler alone is enough to make me switch. Another feature that is dynamite, however, is the collaboration feature. I do a lot of remote work. Netbeans' collaboration stuff and the free share.java.net collaboration server allow me to work comfortably with remote teammates. It really is remarkable and if you haven't tried it I highly recommend it. My only gripe is that I have to keep a seperate AIM client running to talk to my AIM equipped colleuges. If they could get AIM support into this beast it would be nigh unto the perfect remote work tool.
Now this isn't to say Netbeans doesnt still have places it can improve. The UI is still fairly obtuse. You can do almost anything I can think of at this point but where you go to do it is not always real obvious. Thank god for the searchable online help, which seems pretty complete.
The biggest issue for me though is the "computer aided engineering" support. It's still a lot more primitve then JBuilder or Eclipse. Those two come close to each other though Eclispe pulls ahead as the master here. This is really a whole set of related features that can be categorized under the general title of "syntax oriented editing."
It wold take more time then I want to take here to lay it all out, but the short hand is that Eclispe has finally gotten computer-aided code creation right. The end result is much like having a full time extreme programming partner over your shoulder 24x7. It catches your errors or omissions as you write code, and suggests and inserts corrections on the fly (even inobvious ones like fixing the spelling of a mis-typed symbol.) If the Netbeans guys really want to have the ultimate tool, they need to swollow their pride and do some coding with Eclipse just to see what it does.
In the mean-time, they've seduced me away from Eclipse with their profiler. The CAE stuff makes me more productive, but a Profiler is a necessary tool. But if they can also immitate those CAE features of Eclipse, I'll be a 100% Netbeans supporter!
Posted at 01:04AM Jul 19, 2005 by gameguy in Java | Comments[1]
JNWN Update
Well, guys.
Its been awhile so I thought I might update you on the latest on my pet project JNWN.
JWNW, for those of you not following it, is Java3D based Open Source OLRPG client that reads and uses data from NWN and the fantastic NWN Aurora Toolset.
I love the Aurora Tools, even though they are Windows specific. What I dont love is their sever. The server is very limited and chokes on more then about 12 players in world. It also runs scripts written in their god-awful subset of C they call NWN C. NWN C is slow, nasty and the APIs are horribly incomplete. I'd much rather write code in Java.
So I decided that I wanted to re-write the server as a Sun Game Server project But to do that I needed to be able to talk to the client. As their client protocol was closed and encrypted, this meant writing a new client. The good news is that this effort is opening up the client to all kinds of extensions that wouldn't have been possible had I used theirs.
But enough of the background, the status report.
I just got paletted textures working and put back in the resource manager code base. This is how NWN does colorable obejcts such as characters, armor and clothing. I'm now working on integrating this into my game engine so that 3D objects' colors can be changed on the fly.
Speaking of the engine itself, Ive taken a first past at integrating some collision code and simple physics from Shawn Kendall. I'm having some trouble with it but hes nicely offerred to look at my bugs for me and help me figure them out.
I started looking at shadows but Im delaying a decision there. The ways I'd really like to try to do shadows, which are GPU tricks and use very little processor, aren't possible on Java3D today because they require multi-pass rendering. Thats something that the Java3D group have on their list to start working on soon but it may be awhile til I have even a Sun internal Java3D version I can play with that will do that.
They did add limited stencil buffer support for 1.5 and I took a long look at doing stencil shadows (also called "shadow volumes"). My biggest issue here is that I'm nervous about the CPU hit. Its not bad for fixed light sources and fixed objets, but every time an object moves or changes its shape you need to recalculate the shadow volumes for it. Worse, every time a light moves you need to recalculate ALL the shadow volumes for that light.
I want to do a lot of physics stuff the original NWN didnt do, so I'm trying to do as little rendering on the CPU as possible. As such I'd really rather not go the Shadow Volume route long term and its a pretty fair chunk of code to write just to experiment with. All in all it seemed prudent to put shadows on hold for the moment and work on other things.
Thats about all the news to date. I'm using the CVS as a check-point area as well as a release system so if you download, read the notes carefully as the most current version at any time may not be fully functional.
Posted at 12:36AM Jul 19, 2005 by gameguy in Java |
What I did on my vacation
Just some pictures of what I did over the July 4th Sun shutdown.
These first two show the deck and half the stud walls up.


Here it is with all the stud walls up and the first half of the roof decking in place.
Theres some spare wood lying againt the outside wall, i know thats a touch confusing but it isn't part of the structure.

Finally here is a close up of the deck that makes up the sub-floor and "foundation".
(There is no real foundation because this is an enclosed deck, not true building structure. The deck is on pressure treated posts you can't see that act as "legs".)

Posted at 04:15PM Jul 12, 2005 by gameguy in Java |