Archive for November, 2005
Updates, Billy Joel and his artistry
No, I’m not dead. I’m merely finishing up projects and papers. I’ll be posting more once I give my last presentation tomorrow. That last presentation is on Gpremacy, and I’m showing a 2 minute video of multi-player gameplay which I had the great fun horrible time of making yesterday. Xvidcap can’t seem to capture more than 220 frames in one shot before slowing down to grabbing one frame every 5 seconds or so. This spelled doom for my 1000 frame demo — I had to re-simulate portions, start over several times and even fake one shot with the GIMP. A real pain. Then the added pain: encoding those demo screen captures to a video which Microsoft Windows Media Player can play naively. WMP SUCKS!
So, now, about Billy Joel… I ran across a column on MSN Slate this morning (via Findory) about the man which interested me, titled Billy Joel: Oh, the squandered genius!. It’s a little critique about Joel’s drive to be an “artiste” and how it has gotten in the way of his music. Anyway, I was interested and now feel a need to acquire more Elvis Costello music. ![]()
Side note: it appears Intel is dropping the ‘Pentium’ name. Instead, it appears we’ll eventually be able to install Fedora Core X on a Intel Core Y computer. Cute.
Gpremacy listed everywhere!
Aside: I’m home for Thanksgiving, expect slow updates (as has been the case for November already).
Afront: Interestingly, a search on Google for Gpremacy shows that it’s listed several places these days as a viable Linux game. First on Softpedia’s Linux section, next on The Linux Game Tome, briefly mentioned on BoardGameGeek.com and is linked from the Wikipedia entry on the Mono Development Platform. This gives me warm fuzzies.
2 commentsGpremacy Multiplay Release 2
From the website’s statement:
This is even better! The changelog is deceptively short since I forgot to record most of the bug fixes, but there is now a worthless AI opponent, flags to show who owns what, a working movement arrow AND nukes always work when fired! So grab this one and give it a shot. Can you do any less? It’s packaged in a .ZIP file for all of you Windows users out there, too.
Check out the cool screenshot. Ooh, I’m happy it’s turned in so I can go back to making the game better before worrying more about the AI. Comments? ![]()
Short Update
I haven’t really slept since Sunday, so forgive any disjointedness…
I’ve finished the version of Gpremacy and its final report which I am turning in tomorrow. Yes, tomorrow. My adviser, Dave, last week asked me to get everything which he was going to grade into him before Thanksgiving, and since I’m leaving town on Friday… that meant I had to get him everything on Wednesday (he’s not on campus on Thursdays). So I haven’t done much sleeping, instead choosing to code like a maniac and finish writing/editing/proofing the Gpremacy report.
I now have a burned CD with “Gpremacy Version For_Grading” and the report PDF. Tomorrow I’ll take the report to be printed in color (there are two pictures) and turn it all in. Then I take an exam and relax until Friday.
The major change in Gpremacy is that it has an AI which is essentially moronic. It can’t attack or make money, just defend and expand, defend and expand. Even writing that little took a lot of effort. Expect better things later. Right now the AI only works in single player mode, but it won’t take me long to get it working in multiplayer, too.
Now to the real reason I’m making this post, a short anecdote:
I came back from a meeting on campus tonight and entered my apartment like usual. I had a half-empty can of Full Throttle in one hand and my keys in the other. Very casually I went and placed my keys in the refrigerator and dropped the drink on my dresser. It took a few seconds before I figured out why my keys didn’t make a key-jingling sound.
Avian Flu, in Electron Micrographs, attacking cells
Pretty pictures for you all! Here’s a flash-based slideshow of Avian Flu attacking throat cells, taking control, replicating and finally being attacked by macrophages. It’s in Swedish, but the pictures speak for themselves.
1 commentGpremacy Multiplay Release 1
From the Gpremacy webpage news:
This is the first for-world-consumption release of Gpremacy! Multiplayer support is in and has been tested enough to warrant a release. There are a few defects, but the author can successfully host a complete three-player game across disparate operating system computers. Download at the link below and look at the README file for instructions as to how to run the game (though that is as simple as running mono bin/Debug/gpremacy-mono.exe from the extraction directory).
I’ve also updated the website at http://gpremacy.nongnu.org/, and added Gpremacy to Freshmeat! Hopefully people will start testing and enjoying! Works in Windows! I’ll even make an installer/launcher for it when I get home in December, so you’ll be able to just click an icon and make it work.
I’ll begin writing the AI shortly.
It turns out that since I’m leaving town so early for Thanksgiving, I need to give the “final product” and the “final report” to Dave next week. Luckily, I’ve already written most of the final report. Unluckily, I haven’t written the AI… argh.
On the plus side, I still have my ability to directly metabolize caffeine into glucose. I might be exercising this ability. Also on the plus side, I get to leave Gainesville on the 13th of December. That’s much nicer than, say, the 19th.
2 commentsGpremacy Breakthrough! Attack!
News Flash! Gpremacy works in multiplay!
I just quashed what appears to be the last of the game synchronization issues and I just finished playing a 40 minute long game with myself on two different computers. I won.
Remaining TODOs:
- Additions:
- Amphibious assault
- Blind bid
- Enable Counterattacks
- Bugs:
- Can build ships in occupied seas
- Can unload ships into occupied areas
- L-Sats count as ground units for dice calculations
- Attack screen does not show for defender
- Attacker gets to choose if defender is doing a full defense (!)
I’ll be quashing the bugs the rest of tonight (possibly spilling into tomorrow), then I’ll be cutting another release and updating the Gpremacy website. At that point I’ll be starting on the AI.
3 commentsThe Ultimate Star Trek Collection? Pssh
I saw today something remarkable, though its name is misleading: The Ultimate Star Trek Collection on DVD. This is a 212 DVD set of everything Star Trek except The Animated Series. A question: if it’s missing The Animated Series, is it really the Ultimate Trek set? Perhaps next year they’ll release the Über Star Trek Collection?
Anyway, this $3,908.99 MSRP DVD set contains:
- Star Trek The Original Series: The Complete Seasons 1-3
- Star Trek The Next Generation: The Complete Seasons 1-7
- Star Trek Deep Space Nine: The Complete Seasons 1-7
- Star Trek Voyager: The Complete Seasons 1-7
- Star Trek Enterprise: The Complete Seasons 1-4
- The 10 Star Trek feature films in two-disc special editions
- The newly restored, director’s edition of Star Trek: The Motion Picture
- Extended 116-minute director’s edition of Star Trek II: The Wrath of Khan
It seems like they should leave out ‘The Motionless Picture’ (as Peter David said at the Star Trek Authors’ Cavalcade at Dragon*Con this year) in order to have Ultimate Trek, but I digress…
It seems like a reasonably good deal, since they charge ~$110 a season for boxed sets.
Thoughts?
2 commentsCAP5416, Computer Vision: A Wonderful Midterm!
Good evening, friends, I have an interesting story for you tonight.
My Computer Vision class, about which I had such a good feeling, has taken a turn for the … strange. You see, I just failed the course. I find this to be a rather strange turn because when the information was conveyed to me this morning, I became so giddy I had to clench the desk’s arms to keep my smirk from becoming a belly-aching spasm of laughter. Here, let me show you. Sherman, set the Wayback Machine for this morning, 4 November 2005 at 9:50 AM. Now everybody, if you would follow Sherman through the machine we’ll see history in motion!
Welcome to this morning, everyone! That’s me sitting in the desk four seats back from the professor. Notice how the room is laid out, the Indians on the right side, we other three on the left. The professor is talking about how disappointed he is in every single person in the room, but in a moment he’ll be handing back the exams. Ooh, now he’s writing on the board the statistics:
Mean: 36.5 / 100
Minimum Score: 3.0 / 100
Maximum Score: 63.0 / 100
Notice how nearly everyone in the room tenses. Let’s listen in on my thoughts. Sherman, kindly point the PrivacyPlunderer at me. Shh!
Okay, we’re going to count this as a win if I get at least a score of 30.
Watch the expressions of those who pick up their tests. It’s rather unsettling, isn’t it?
Now about half of the people in the room have their results. Sssh, listen:
The trick to success is artful manipulation of expectations. Therefore, let’s try for a 20. This is a win if I get a 20.
The stack’s just getting shorter and shorter, and I’m still not called. Just as if this were a movie, my paper is on the bottom of the stack. Listen in as I realize this:
Okay, it’s a win if I get double digits. Come on, double digits!
James Jones?
See how I get the silly blue exam booklet and return to my desk before opening it. Now watch my expression. See the relief? See the mirth? You’d never have thought that the grade in that book was a 9 / 100, would you? But it was.
Look at the smile, my friends. Sherman, is that not a smirk of righteousness? Some have told me that the ability to look fear in the eye and laugh is the hallmark of a well-anchored personality. Others have told me it is simply a mark of madness. I cannot tell you which is true, friends, but I trust you have your own suspicions. Sherman, take us back if you please.
There! If you’ll follow me back to my lab bench here… oh, not used to time travel, are you? It’s alright, feel free to take a seat and catch your bearings. It can be somewhat disorienting, true.
Those of you who wish to, you may come and examine my examination book here on my lab table. Behold ye its beauty, its carefully thought-out graphite answers and the careless scratchings of the professor’s black pen. No friends, I did not score as poorly as some, but I believe that interpreting this as an omen of grades to come in this course is a wise move. It is this wisdom which guides my hand in my decision to withdraw from this course. Somehow I doubt my ability to recover this particular grade.
Oh, thank you Sherman for shutting down the Wayback Machine. You can go on to your studies now.
Ah, you noticed! Yes, my grade does appear to be somewhat inflated, doesn’t it? You see, friends, I received 5 points for my answer to question #4, but I received no points on any other question. Somehow, though, I have 9 points. I do not know from where those other four points immigrated, but I’m happy that they took up residence in my score.
After we all had our papers back, a few minutes after the point where we left the past, the professor suggested that all of us re-evaluate our time management skills. He said that perhaps we should take only two courses at a time rather than, say, three. I was amused since I am, or was!, indeed taking four classes, three graduate level and my grossly time-consuming Senior Project, Gpremacy. But lay ye blame not hastily, for as E. and James can testify, I have not been destroyed by the studies of the four courses. No, my poor performance in Computer Vision comes down unequivocally to my poor mathematics background. It was not up to the caliber required for a course which dips so heavily into theoretical calculus, the Calculus of Variations and n-dimensional, unregularized and under-determined minimization problems. I may be able to use the Wayback Machine (with Sherman’s valuable assistance, of course), but these fields of mathematics are fields which I feel a decisive need to avoid in the future.
So on Monday I will perform the necessary incantations to withdraw from the course, ensuring that I do not receive the grade which seems inevitable at this time. I will be left with three courses for the semester: CAP 5805 (Computer Simulation Concepts), CEN 5035 (Software Engineering) and CIS 4914 (Senior Project).
To all of you visitors who find this article because you’re considering taking CAP 5416, be forewarned, you must not have taken mathematics courses at this university, or you will not have been adequately prepared.
Otherwise, my day has been rather good. To relieve stress, we roommates played a game of Worms: Armageddon this afternoon and in short order will be making some spaghetti with Mom’s homemade meatballs. Mmm, meatballs. I’m afraid there’s not enough for everyone, so Sherman, you’ll have to eat with the dog again. There, there, be a good sport about it. You’ll be allowed a fork, Sherman, don’t you worry.
4 commentsOpenGL: Rotate object to lie along a heading vector and angle
Sometimes it’s useful to keep track of an object’s 3D heading vector rather than its rotation angles around the three axes. I had a horrid time trying to find a method to solve this problem, and now I have it with many thanks to Dr. Fay. I’m posting this because after hours of searching I found that no one had posted code to perform this operation on the ‘net in an accessible place. So here it is, OpenGL-coders!
The technique is described as follows:
A possible way forward is to generate the rotation matrix from the heading vector directly. You have a heading vector U = (ux, uy, uz). The components of U are the direction cosines of that vector, and are the first column of the rotation matrix. Then you have a right-pointing vector whose vertical component is zero and whose horizontal components are related to “ux” and “uy”. It has to be normalized, so that the vector is (-uy, ux, 0) / sqrt(ux*ux+uy*uy). This is the second column of the rotation matrix–for the initial heading rotation. If ux == uy == 0 then the situation is indeterminate and you should just use ( 0, 1, 0 ). The third column of the rotation matrix is simply the cross product of the first two columns.
Implemented in Java with joGL it looks like the below. This is rather generic, though, so don’t let its java-ness fool you.
public class Vec3D { public float[] v; /* all appropriate vector math functions*/ public Vec3D Perp() { /* Right-pointing vector with 0 in the z.*/ if (v[0] < 0) return new Vec3D(-v[1], v[0], 0); return new Vec3D(-v[1], -v[0], 0); } } public void RotateMatrixAlongHeading(Vec3D Heading, Vec3D Side) { final float epsilon = 0.0000001; float norm,ux,uy,uz,rx,ry,rz,cx,cy,cz; norm = Heading.Magnitude(); /* Heading vector */ ux = Heading.v[0]/norm; uy = Heading.v[1]/norm; uz = Heading.v[2]/norm; /* Right-pointing vector with 0 in the z.*/ rx = Side.v[0]; ry = Side.v[1]; rz = Side.v[2]; norm = Side.Magnitude(); rx /= norm; ry /= norm; if ((abs(ux) < epsilon) && (abs(uy) < epsilon)) { /* Solution is indeterminable, use elementary vector */ rx = 0; ry = 1; rz = 0; } /* c[xyz] is the cross product of the first two columns, e.g. perpendicular. */ cx = uy * rz - ry * uz; cy = uz * rx - rz * ux; cz = ux * ry - rx * uy; norm = sqrt(cx*cx+cy*cy+cz*cz); cx /= norm; cy /= norm; cz /= norm; /* Construct the matrix */ float qmat[] = new float[16]; qmat[0]=ux; qmat[1]=rx; qmat[2]=cx; qmat[3]=0; // row 1 qmat[4]=uy; qmat[5]=ry; qmat[6]=cy; qmat[7]=0; // row 2 qmat[8]=uz; qmat[9]=rz; qmat[10]=cz; qmat[11]=0; // row 3 qmat[12]=0; qmat[13]=0; qmat[14]=0; qmat[15]=1; gl.glMultMatrixf(qmat); }
I hope that saves you a lot of time!
No comments