Sunday, December 28, 2008

TicTacToe Update

So the TicTacToe game is getting very close to being "done". As of now it runs under Linux and the AI is can only be beat with a fork. I just got word that a window port compiles and runs but there is an issue with OpenGL 1.5 and powers of two. Anyway soon there should be a working Windows and Linux version out. For now here are some screenshots.

The startup screen:


Ready to play:


Me winning with a fork:


A Tie:


Computer wins:


The Windows version (a work in progress):


It also has some great music thanks to Chad Nigh. For the most part Shayne has been doing all the work of programing this, but I have have fun on the some parts I have managed to do. As always if someone (anyone) out there reads this and thinks these guys need some serious help you are welcome to join us at pezad games.

And are next game will be ...

Monday, December 8, 2008

Creating your game portfolio

GameCareerGuide recently had a great article on How to Make a Game Programming Demo Portfolio. It is convenient that the way we're incrementally creating better and better games (well, eventually, anyway) will add to the portfolio. The only catch is that you need to have the games in a finished state, so no half done projects!

Saturday, November 29, 2008

Ubuntu 8.10 verus Fedora 10

I just read some reviews of Fedora 10 compared to Ubuntu 8.10. Because I am an Ubuntu fan boy I need to justify my reasoning of saying it is better. The reason I like Ubuntu more is not OS to OS but the people behind them. Canonical says Ubuntu will always be free not matter the version. Fedora is just the test bed for Redhat. Not to dis redhat. Redhat puts a lot of code back into a lot of good open source projects. It is just they still have to sell there server stuff. I like the Ubuntu idea of free for everyone and pay for just support. It does remain to be seen if Canonical can make money this way for the long term. So I guess that is about it. I think both OSs are good and very close to the same. I just like Ubuntu more (for the moment). I also like that fact they have something to complete for.

Ubuntu does have a large amount of online forum stuff.
Ubuntu uses .deb which are easy to look inside and I think work nice
Ubuntu is working on bazaar to have all there packages in

Saturday, November 22, 2008

Google fan boy?

So at work yesterday a coworker said I was a "Google fan boy". Having written a post about Google C++ software the night before I would have to agree that I am. This also made be think are we not all fan boys/girls of something? Every developer has to pick a baunch of tools to do anything. You need an OS, a language, an editor, a compiler, a version control system, and more. With all of these things comes a lot of chooses. It seems to me that I get one and in my mind decide it is better then the others. I would say Linux is the best OS and so on. To be happy with my chooic I find myself being like well Linux is best because of X, Y, and Z. It is not that I don't find some bad parts to all the things I use, but I have to tell myself at some level the one I am using is the best or else I would just send all my time looking for the best. When I do find one that is better I move to it and become its fan boy. If you not a fan boy of something you what are you?

Thursday, November 20, 2008

Google goodness

If you write much code in c++ you might find the standard library a bit lacking compared to other languages. I know for example python and java both have a lot more stuff in the standard library. The C language has a lot of good stuff in libraries like glibc that can be used in C++, but it has always felt to me C++ lacks tools. Because of this lot of different third party library are out there. The thing I don't like about this is they are not standard and you end up with five libraries doing the same thing have way. Anyway enought ranting if I don't like it I should start using python. What I am trying to get to is lately I have found a lot of handly simple libraries coming out of Google. So I will list some and what they do and why I think they are nice.

Memory allocation with tcmalloc (google-perftools)

I have post about this before a little and how in linux at least it is very easy to change the libc memory allocator with others like jemalloc or tcmalloc. So far I have not used tcmalloc much but it is a nice tool to have around because it is suspose to be fast and not frament the memory as bad. It also has a lot of stuff to debug memory leaks and so on. The coolest thing is it is very easy to test you don't every have to recompile your code to see it in action just preload the library.

Command line parsing with gflags

In libc there is get-opt which is not a bad way of parsing the command line but it is C and very bare bones. The gflags library is a nice step up. I make a help flag for you and you can add flags in different parts of the code. I find that nice if I just need to make a setting I put the flag code there and move on. I sure some people who say it is bad for some reason, but to me in a small project it is easy and fast.

Logging with glog

I have looked into logging library a lot over the last few year. Now of them have every looked great to me. Log4cxx I discovered is powerfully and the best I have seen but it depends on a lot of stuff and is almost to complex. That is why when I turned up glog I was very happy today. I thought google would have a logging library but could not find it. I looks like the open source release of glog was very recent. I have not dug very deep but it looks like a good project done google style. It can also use gflags if you already have that which is nice. As it goes to a 1.0 release I think it might just become my logging library of choose.

Serialization with protocol buffer

Now this one is not just for C++ and has Google support for Java and Python with many other langages getting supported by the open source comunity. It appears this is one of Google's core technologies and I am betting must people have used them if they used the internet in a round about way. Anyway for C++ this is nice because again there is not standard serialization stuff. With C++ running closer to the metal serialization is not a fun cross platform thing to handle. Protocol buffer's has some nice ideas and seem easy to use for simple stuff. You just make a message in Google made up way and then it ran a compiler type thing that truns that into C++ and you are ready to put stuff on the disk or send it to Mars. It has nice stuff to add thing latter which is important.

Testing with gtest

Now that you have all these nice libraries to write code with you need to test that code. That is where gtest comes in. Again it seems simple, clean, and easy to use. It can even create colored output. If you are into unit test it seems a good as choice as any. I still don't know how to write good test and in some types of code it seems hard to test. But if I do I would look here first.

Compiling with distcc

Now that you writing all that code want compile it in a fast way. Well if you have a few computers setting around try distcc to speed up that compile time. While not created by Google it is now being develop by Google.

Well I am sure I forgot something but that is my list of Google goodness. Here at pezad games I see the tcmalloc, protocol buffers, gflags, and perhaps glog being the usefully. But until I quit stalking Google and start writing more code we will never know :).

Saturday, November 15, 2008

Eclipse CDT: Clean out old lib references to remove invalid project path warnings.

I was removing some warnings before I committed some code, but there were two warnings that I could not remove. It happened to deal with "Invalid project path: Include path not found" not found, which is odd because the code compiled and ran just fine. As it turns out, there is a bug for it:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=206372

And in that post there is a fix for it as well under the second comment:

"To manually fix the file you need to move/delete the ${projectname}.sc file found under ${workspace}/.metadata/.plugins/org.eclipse.cdt.make.core"

Sunday, November 9, 2008

Weekly Pezad Game Update?

So I was think we should start some kind of weekly status report here at pezad games. This is just my idea so it might not keep happing, but this will be a trail run.

bzr:

First off I have been all about Distributed Version Control (dvc) as of late. The three big ones I know about are bzr, git and hg. I have not done a complete comparison but I have looked at them and read about this some. I know git is suppose to be the fastest but it takes very large projects to make this important. I know the least about hg and I don't really have a good reason for that. I have the most knowlegde of bzr. I have used bzr and beleive it copys svn for the most part more then the other two. Having started using version control with svn I like this. bzr is also used by Ubuntu my distro of choice as of late. So without a lot of carefully study I have choose bzr as my next version control system. I found the documentation was also good.

So I used it some as a locate repostory (a cool feature I think for small projects) and it was easy to just worked. Next I was saw with had and svn plugin so it could branch and svn repos and I tried that. Sadly a year or so ago when I first tried this I could not get it to work. As of ubuntu 8.10 the default bzr and bzr-svn plugin seem to work much better. I have branch svn repos and it seems nice. Now I have not tried making a commit back and need to do that. I have high hopes this will work some way or enough.

The other important thing I wanted is eclipse plugin support. Once again I could not get this to work until Ubuntu 8.10 and using eclipse 3.4. I did not try very hard before, but now it seems to just work. I have a lot more testing but things are looking up. All the project bzr, bzr-svn and the eclipse plugin look like they are under active development so they should only be getting better as time goes by, but it looks like they have reach a point that feel I can start using them. That is if I don't hit some unknown road block.

So the point of all that is I would like to see the pezad team move to using bzr over svn in the future. For now svn has all the power we need but I just think bzr has everything svn has plus move and I think it is easy to use in genreal. I will need to do some more testing but that is the plan as I see it.

OpenGL:

I have been reading more of the OpenGL red book and trying to get my know and skills up on that so I can at least read code with OpenGL and start to understand what is going on. Hopefully I was start writing more OpenGL code soon. I feel if I do any thing reading that book is a good place for to keep working.

TicTacToe:

So the two pezad developer (are there just two?) have decide to start on some simple games and work from there. After that I read a good peice on this very same idea. We dicided to start with TicTacToe. It turns out that was one of the first computer games every so a good place for us to start I think. So far I have done little be Redsaz has done a lot. The hope has been to have it working soon, but that keeps not happing. As soon as there is a work code we will blog about it I am betting.

Ending up:

Hopefully I start writing more code and stop looking into every new and cool tool (but tools are cool) and perhaps we will keep a weekly update on the status of things. If anyone does happen to read this and want to join are learning trip of gaming making just let us know and we will be happy to have you.

-penguin

Wednesday, September 24, 2008

Back from Temporary Insanity

(Note to people who don't know me, or potential future employers that probably search names before hiring people: I didn't actually go insane, nor do I have any mental health conditions. Also: What are your retirement benefits?)

So I spent the last couple of months not programming Entrippy or Platzad. I was looking into creating a filesystem optimized for multi-user multi-system backup and synchronization for home networks. Why? Because I needed one. I also had what I thought were useful and intriguing features unique to it as well. As I was coming up with my features list, I continued reading about other filesystems, and then I found out what I was contemplating was implemented in various filesystems and software revision control systems in one way or another. In the end, not one thing was truly unique to my FS, save that all those things together were not found in any one system I looked at. Besides, rdiff-backup will work for now, once I care enough to try it out.

In the end, I came to this thought:

Man, I need to get back into some C++ development! Forget me writing the next great shared filesystem, I needs to get back to my one true love: games.

So there. Platzad here I come.

Friday, September 19, 2008

Memory Allocation

If you read you tech news a lot you might of hear how firefox 3 uses its own memory allocator that they took from FreeBSD called jemalloc. Now when I first read this I did not total understand what that means. I later found out.

So every time memory is allocated on the heap in C/C++ the allocator is called. In C malloc is a function that the allocator provides. In C++ new uses malloc unless you use a placement new (more on that later). This allocator has to get memory from the OS and in Linux it uses mmap or sbrk. The allocator normally wants to get more memory then is being asked so it can create a pool of memory and not have to ask for more all the time because that is slow. This also means the allocator can get memory fragmentation. Jemalloc is suspose the be very good at keeping fragmentation down and that is why firefox uses it. The other thing about memory allocator because they like a pool that don't let go of memory. the free fuction or delete just puts the memory back in the pool.

Jemalloc does a much better job of giving back memory to the OS then the standard allocator in glibc. So if you have an app that uses a lot of memory and then frees it all and you want to get the memory back try jemalloc. I hack the code out of firefox and it work great. Just two file there somewhere and you have to compile with some macros defined. Or you could just get it from the guy who made it. When I did it he had yet to release that. Once you install that all you have to do is link you execuable to it when you compile. Because glibc uses weak symbols for the alloctor funcation the malloc and free and other from the jemalloc implentation will over ride the built in. This is cool I think.

There are lots of other alloctors out there you google and find a lot them google itself made one. Some have a lot of stuff built in to track memory usage like the google one. It also never returns memory unless you call some nonstanderd function in a new version of the library. I forget the name of it I found it some comment I wish I had the link to. Just look at a .h file.

Anyway if the glibc malloc every lets you down it is easy to change and lots of chooses based one what you need. Give it a spin.

Saturday, September 6, 2008

Java 6 u10 RC

Look at the new features of Java6u10. Then look at the date the article was published. This baby should've been out by now, I think. In any case, it looks like Sun is doing a little bit more to make Java look a little bit easier to the consumer.

Thursday, September 4, 2008

VirtualBox 2.0.0 (released 2008-09-04)

Check here for what is new.

Monday, July 28, 2008

HP network printers in Ubuntu Linux

So this weekend I discovered home printers are coming out right and left including internet connections. I had look a few years back for this and did not find it. I guess the home network/laptop explosion got the market on the move. I wanted one because with a four computer in the house I don't want the printer hooked to one. I also wanted one that work nicely with Linux (Ubuntu). After looking at some ads I saw an all in one hp photosmart C7280 that looked good. The printer and scanner where the parts I wanted and the networking. I did a google search on a c7280 and Ubuntu and turn up good new. I did not believe the scanner would work in ubuntu, but the blog sound good otherwise. After a quick to office max I had a print. I then setup the printer to connect to my wireless with WPA2 using the LCD on the printer. I scan and found the wireless and asked for the password and connected right up. I then browsed to the ip it got and found this


It turns out you can scan with no options from the web interface. I thought that was cool. Even if I don't have drivers I can scan in linux. I then install the package the blog talked about to see what would work in Ubuntu(sudo apt-get install hplip-gui). I went to System -> Preferences -> HPLIP Toolbox and opened it.


To my suprise I found the above. It was just a couple of clicks an the software found my print on the network. I could then print from any linux program that I tested. The software also provide a gui scanning program. It worked while and I was soon scaning a picture at 1000dip. The 300Mb file took some time over the wireless (5-10min), but it worked! Below is a screen shot of the scanner at work.


I also used a power meter and found the printer runs about 6 Watts when on and 5 Watts just plugin. Keep if unpluged to save power.

In the end I am happy. As long as the printer part works well it will be great. I have a cheap network printer/scanner with great Ubunt Linux support. I guess hp has great Linux support in general. It is good to know. I will support them for sure if they keep up the good work.

Saturday, July 19, 2008

The Game that Became Portal

Narbacular Drop was developed as a student project at DigiPen by a team of developers called Nuclear Monkey Software. This game was noticed by Valve which eventually hired those students, and later went on to fully develop this game's core concepts as a commercial product now known the world over as Portal (teaser trailer).

You can download Narbacular Drop for free at the website. This game is much shorter than Portal, and can probably be finished in less than an hour. Noticable differences are that the character cannot jump, there is a turtle that you must steer over the liquid, and the player can also shoot portals through portals (this is important because some levels require this action in order to continue). There isn't as much hand-holding here either, the difficultly isn't as simple at the beginning as Portal's was. However, this game is JUST as fun as Portal, so check it out. Don't be a game snob just because it is Windows only or just because you've already played Portal.

Be sure to check out a few of the documents on the website too, including the Postmortem (c'mon, Spiffy McGee! Pull it together man!), the technical document, and whatever else you like. Since DigiPen is the college for training the world's next great game developers, these contain valuable insight as to how to bring a game together. They outline milestones, achievements, and specifications that must be met. None of this have I done for any of the games I've worked on in Pezad. No wait, I did some of this for Entrippy, I just forget to use it.

What other goodies did I find in the docs? Some of Narbacular Drop's "Product Competition" include The Adventures of Lolo, Stretch Panic, Ico, and The Legend of Zelda: Windwaker (woo!) (Game design document, page 4). Personally, based on the videos, I don't see it.

Thursday, July 10, 2008

The programmer character pronunciation guide

There are so many names for so many characters and character combinations. Some of my favorites are asterslash (*/), slashterisk (/*), and bananas (for the parentheses).

All this and more at the ascii-table.com pronunciation guide. Useful!

Tuesday, July 8, 2008

Urbi

Why do the good things come to late? Or perhaps they did not.

Tuesday, June 17, 2008

It's here, I have it, and I haven't gotten to use it :(

So after fighting the Mozilla server for about 15 minutes, I downloaded the so sought after Firefox 3! SWEET! Now to install it. So simple...so quick, but wait, there is a slight problem. Over 80% of my add-ons and themes are incompatible. Needless to say I trudged forward. The big ones like IETab of course had updates, thank goodness, as I'd hate to have to open that browser. Anyways, we've heard all the hype about the improvements and how they are mostly behind the scenes things and not visual. I would agree...it is visually nothing different. And sadly enough that is all I've been able to test on it so far as I've been rather more busy at work that I usually would like to be. That being said this post is completely irrelevant as I have in no way shape or form actually reviewed the software enough to give a crikit. Yes I said crikit, not critic. Crikit's are nature's rhinocerous when it comes to their ability to fly instead of run things and stab them with a horn. Oh by the way, Shayne, FireSomething is broken :( no more WaterSquid for you!

Saturday, June 14, 2008

Firefox 3 is coming ...

I hear it comes out the April 17th. Firefox has a cool site so you can pledge to download it. They want to set a record on most downloads on the first day. I just like looking at the map to see the number of pledges.

Wednesday, June 11, 2008

Skechup Linux


Well I read that a as of late Sketchup was working ok in wine on linux so I gave it a try. I follow a blog a little. Basically, I install wine-1.0rc4 and then ran winecfg which make a .wine folder in your home folder. I then ran wine on the install .exe I downloaded. It worked fine. Sketchup started and I did not install the html thing the first time like the blog said. Then I crashed as I tried to export a png. It would then not start because of some OpenGL error. Again the comments on the blog talked about this. It was not clear so I will clear it up. I then .wine folder I opened user.reg and found this stuff.

[Software\\Google\\SketchUp6\\GLConfig\\Display] 1213199046
"FIRST_TIME"=dword:00000000
"HW_OK"=dword:00000001

The last line was set to zero and I changed it to 00000001 and then it worked.

For the most part it runs ok. The export 2d stuff always crashs it if you try to output a png first. I tried the other then then back to png and it worked. The editor thing also comes up black and if you click the mouse it is ok. Also if I click the to do something it sometime does not response right away.

Skechup can be used in ubuntu 8.04 linux with wine, but I hope google makes a real linux version. If they just make it work better in wine I guess it would be ok, but I like a lot of poeple would like a linux version.

Tuesday, June 10, 2008

Two days of SketchUp

I started last night. I had to boot into windows :(. Checked it out and tons of people have gone off about wanting a Linux version, but still not here. Anyway, watched some videos and then starting messing with SketchUp. It does seem easy and fast to learn how to do some cool stuff. The first thing I made was the bookcase I built a couple of years ago. Below is the x-ray and wood version of what I came up with.

After doing that I was like I want to build a castle. I have always wanted to build a castle for some reason and SketchUp seemed to be working well so I was like let's do it.




So I spent most of my time on this window. It was a tricky one. Then in like 1/3 the time I put the rest together to feel like I was doing something. Note you can see inside the tower. The rest of the castle is not like this yet.

It does prove to me that SketchUp is easy to use and you can make stuff fast without knowing much. I have a lot of learning before I get good, but it is a start.

Things I don't like in no Linux version yet. Also, I still am looking into the file format. The goggling I did today did not turn much up on the default .skp which seems to be a binary format. There some stuff about an xml format that uses COLLADA which you can make with a plugin. The thing I want is some way of getting stuff out of SketchUp so I could do what I wanted with it like use it as a map in video game or something...

Monday, June 9, 2008

Pezad and Bloated

I am checkin' out the code
that somebody gave me on
my project's svn head
I am reviewin' all the code
that somebody typed out
'cause the code is bloated

I am profilin' all the code
that somebody hacked out
and then committed
I am revertin' all the code
that somebody checked in
'cause it's cut and pasted

Ohh yeah, and it's not compilable
It lacks a manpage
It takes weeks to start to run
Ohh yeah, and lint says it's flaggable
I feel I need a sage
Memory peeks before it's done

You can't follow what it's computin'
You can't follow what it's computin'

It is a coupled-over whole of
a mess of issues
Guess he doc'ed nothing

[And so forth]


Well, that's what you get when I have nothing code-arrific to say. A song parody. A BAD parody at that. It wasn't supposed to be like this though. I've been programming up some good stuff! Or at least I would be if I wasn't writing bad alternate lyrics. Eventually my studies and research will appear on the blog in some form. It's a promise.

The YouTube for STP's original Dead and Bloated song can be found in studio and live versions to compare and contrast the two lyrics. (Hint: The syllables rarely mesh up.) Or just listen to it because the original is awesome anyway.

If I were to give a meaning to the post (Hmm, I think I will) I would say that it is important to utilize a decent version control system, even for personal projects that you won't share to anyone but yourself. Subversion is okay I suppose, but now that I've used Bazaar, I probably won't go back (Thanks again Paul). But either way you can't go wrong.

Friday, June 6, 2008

Linux and C run on the lastest Mar robot

I was reading this arctile "NASA 'Extreme programming' controls Mars Lander robot" and it says that they use Linux and C on their latests robot on Mars. I think that is something Linux people should job on. I mean having your OS running on a different planet. Yet if I Google "NASA Linux robots" I don't get to much for stories about it if. If you find something good let me know.

Again I will go off on Linux and say how cool is it and it can run on a run a super computer and a robot on Mars. And by Linux I guess I should say GNU/Linux :). The open sourceness of it is what makes this possible (It is a good product to). Being open source makes it easy for anyone to get the code and compile for their needs.

Go Linux!

Thursday, May 29, 2008

fun( void )

When I first started learning C++ the guy who wrote the book I was read went on and on how he liked to put void in a function that took no arguments. He talked about how the editor told him that was the C way and he should drop it. So my question was why is that the C way. Well I got my answer today. I had learn some time ago the old C way of writing a function was like this

fun(arg1, arg2)
int arg1, float arg2;
{
...
return 1;
}

and the prototype would of been

int fun();

Now this was bad because the compile could not use the prototype to check the arguments. So it was changed to the way we all know and love

int fun(int arg1, float arg2)
{
...
return 1;
}

and prototype

int fun(int arg1, float arg2);

Now where does void come in. Well according "The C Programming Language" if you did a prototype for a function that takes not arguments like

int fun();

The compile will think this is the old style and stop checking the arguments so that is why they add the void.

int fun(void);

Now the compiler will keep checking the arguments. So I don't know if todays C compilers still do this or not. I know that gcc will still compile the old style of C so I am guessing it must. For C++ which will not like the old style of functions this will not matter. So it seem to keep the void in C++ is a bad idea because the problem that caused it to be used in C (being backwards compatible) is no longer a problem. So that is C/C++ story of the day.

Monday, May 12, 2008

Alternatives to XML.

In the recent article by Jeff Atwood, XML: The Angle Bracket Tax, he raises some interesting points on XML and the hiding of data inside brackets. The best resource he pointed out was a list of XML alternatives.

Brian Goetz even mentions a problem of overusing the serializing of Java Objects using XML (it is mentioned in the middle of the document).

So, in conclusion, there are alternatives out there for my configuration file needs. Could what I need be found here?

Sunday, May 11, 2008

In the application, you must calculate to survive...

...He copies null-terminated strings.
And the hackers wanted in.
"I don't know who this function is, but I want him and his thread dead!"

He had one loop iteration. And his loop iteration was to copy data from one memory location to another.
Brian Kernighan...
"Listen to me! These are my null-terminated strings and I'm not going to let them overflow my buffers!"
"You have to get out of here! They're trying to kill -9 you!"

Filled with breakpoints:
"Everybody get down!"
..And more breakpoints:
"Everybody get down again!"

They didn't know where the allocated memory was...
"¡10011101 10110111!"
"Listen to me! They're trying to overflow my buffers, you have to get out of here!"

...
One man page, one post-condition. Brian Kernighan this summer is--
"NNNUUUUULLLLLLL!"
--... Little strcpy() Boy.


Pablo Francisco is one funny dude. I'll just say that much. And I will also say this: buffer overflows are no laughing matter when it comes to security issues. So yeah, these are the kinds of posts you will get from me when I have absolutely nothing beneficial to say whatsoever.

But wait, I do have something to say! I added a couple of links to pezad.com now, so we can actually use the site for linking to everything that pezad is involved in. EXIT_SUCCESS, baby!

Tuesday, May 6, 2008

Stess test that network

So I have been working on a robot project the last year a little. The project is to create a group of robots that play soccer with a golf ball. The hardware is almost done. The software is almost started. The part I have been working on lately is the networking.

Sense we are using Ubuntu Linux as our OS I decided to use BSD sockets to do the network programming. After I found a good guide to the sockets I was off and running. Then thanks to a networking class I am in this semester I got a good feel for what is going on behind the scenes. With that great knowledge I decided to use UDP and then to test it out and see if it worked like I hoped it would. UDP packets are best effort. I also known that a wireless network link does more then UDP and acts more like TCP. So I figured if the network link is checking to make sure the packet gets there perhaps I did not have to.

To test it I make a simple program to send a bunch of UDP packets and see how many made it. I created the program so I could set the size of the packets and set the delay between sending them and the number of packets sent. The program is still somewhat hacky, but I got it working. The result are good for the most part. If the delay between packets is more then a millisecond I get 100 to 99.9 percent of the packets making it. I the size of the packet does not matter much. As the delay between sending packets goes to zero the loss increases. So far I the highest loss was like 30%. I was able to push the link up to to 4 Mib/s by making large (1300 bytes) packet. At that limit it lost a lot, but at 2 Mib/s it was fine. I also noted that no matter how hard I push it the CPU never works hard, which is good because the robots lack CPU power.

I have to more things I want to do with the program, but the biggest is to test it over the internet. So far I have just had one hop. I want to see how the loss goes up when I don't have the full link to use and have to share.

Friday, May 2, 2008

Randomality at its finest.

So once again as far as relevance goes, I refuse to have anything to do with it. Relevance is for the irrelevant! Anywho, while perusing the ridiculously small scoped internet, I ran across some interesting things and some upsetting things. That is the nature of the beast though I suppose.
First on the list today is the topic of patents! While the fundamental idea of patents is sound, I feel the implementation should be listed on the top 10 worst ideas ever. Software patents are the worst, but not too far behind that is hardware setup that ties into software patents. While I'm not a big Microsoft fan, I've got to take their side on this thing, FullView vs Microsoft. That's right, you read correctly. Some company patented the setup of a group of cameras in a circle... Upsetting? Yes, very. Patents are the devil...end of story.
That was the super upsetting. Now time for some fun! Tomorrow is a birthday, albeit a very not so likable one. May 3 marks the 30th birthday of Spam emails! Happy birthday Spam, and you jerks who started this suck!
Speaking of spam there is a useless, but interesting site, called Worldometers. It tracks a slew of statistics related to world things. At the very top of the page you can see the number of spam emails sent for the current day! There are some more interesting things on there too.
And finally, for all you open source fiends out there, good news in the browser market. Apparently Firefox has reached almost 50% market share in some European countries with an overall market share of roughly 29% for all of Europe. That's almost a 6% increase since February! Go open source!

WHOO WHOO WHOO!!!!

Sunday, April 27, 2008

Ubuntu 8.04

It is here. I just could not wait to install it, having to redo everything on my two computers. Just to get that one new desktop with a bird on it. I did it. It was great. Then I saw that not much had changed that you could see, but some has changed that you could not see. It boots fast, I think. It might run better. It does have some new type of wireless support that I don't need. I hear it hooks up to small devices better, like mp3 players. I need to check out the KVM stuff to see what the is word on that. After a first look I don't see that much has changed. I am hoping that as I go along I will find most things that are nice. The many thing it does for me is let me get the latest version of all the software I like. In the end Ubuntu is a great OS and it just getting better over time. One of my thought is they did not change to must this time because is LTS. I have read that 8.10 will have some major changes. I am not going to complain because it is free and it so far it has freed me from supporting MS.

Tuesday, April 22, 2008

Rollin' to the end of April, 2^n style!

So obviously I haven't contributed anything worth knowing thus far to this awesomely stud packed blog, BUT I say to you, the people of the world, fear not, I will eventually come up with something worth reading. Sadly today is not that day. I just wanted to congratulate the folks who do spit out relevant information on clearing the 2^4 blog post!!! WHOOO!!! Now lets party like its 2^11. Way to go dudes!

Tuesday, April 15, 2008

Cmake: it just keeps getting better

I have talked about how great cmake is before. Yesterday I read a little more and found it better then I thought. Included with cmake is ctest and cpack.

Ctest can be used to run test cases and every can have the output of these test sent to a web thing called Dart. Once cmake is up and running it is easy to add ctest. It took me two like to have a simple test working.

After learning about ctest it sent me down a path that showed me I need to look into testing more. I think ctest will work best to build components and then build small test drives for these components. It seems to me you need to know how to build good interfaces before you use test good. The last thing I want to do is write a bunch of test and then refactor the interface. This means changing the test and the code in the project that uses that component. Assume I figure this out I think ctest will make test easy and "fun".

Then there is cpack. Once we have some code we think other should have it would be nice to provide them an easy method to install it. That is were cpack comes in. Because the cmake tools are cross platform so is cpack. It can (or will be able soon in cmake 2.6) to create deb, rpm, and window installers. Plus a couple of other simple script and tar installers for *nix. So assuming you know what you are doing it will be easy to get the software out there.

I think the worst part of the cmake tool is the documention. It seems like there are very few examples of all these great features. They sell a book, but I don't want to buy it just to have them release a new version and make the book out of date. So I guess I will keep playing with cmake until I figure it out. Overall if you need to build your system I would say you need to look at cmake. It is nice.

Friday, April 11, 2008

Johnny Lee and Wii Remote at TED

Remember that link earlier in the year of Johnny Lee developing unique uses of the Wii remote? Well, he's at it again: he gave a talk on this technology at TED. Enjoy!

Thursday, April 10, 2008

HPC OS's

High performance computing is a fun time. How many places can you say your code used 2 terabytes of RAM and run for 10 days on 1000 computers? It is also a place that takes and hardware and pushes as fast as it can. With all this power there needs to a way of keeping it up and running not to waste money. That is why having a great OS it important.

As can be on the top 500 super computer website Linux is king here. Now Redhat an SUSE have been around a long time and have the most support for the super computer hardware and software. Redhat has a very nice cluster OS built on top of it called Rocks. I found this when I had to get a cluster up and running and I was impressed about how simple it was. I took about the same time and installing windows and updating all the drives as it did to install a 17 node cluster and be ready to go. Other cluster OSs are out there like OSCAR, Gluster, or Warewulf. Now I have only used Rocks but as I surf the website I find everyone seems to support Rocks, so I think it is becoming very popular. The reason is, it is so easy to use. To install more it puts packages in "Rolls". So anyone can make these rolls and it easy to install that software. So if you want to build a HPC cluster you should check out Rocks.

Installing software on clusters seems to be the hardest part. There can be a lot of nodes so
that is the main reason a cluster OS is important. Now one way around the OS is just a powerfully installer. In the Debain/Ubuntu world there is a project called fully automated install. I think this approach could be better. I have been using Ubuntu for some time and think it has a lot of good things going for it. Just so far I have not seen much in the way of cluster OS for it. It seems it started slow in the server realm, but is picking up speed. If that is the case then it needs to find a way of getting on HPCs in my view.

One of the reasons I like Ubuntu is the power of the .deb it took from Dedian. I think if Ubuntu/Dedain just start build the tools needed for cluster and made an cluster package manager like Synaptics. If it could all be done in an easy and to use yet powerfully way they could take on Redhat in the HPC world. If I was smarter and know what I was doing I think this would be fun project to take on. Perhaps someday...

Tuesday, April 8, 2008

Finally...I have come to post on a blog!

So while perusing the latest news in the Microsoft/Yahoo! corporate war, I stumbled upon a commenter who feels that Microsoft is completely in the right by attempting to buy Yahoo!. While I strongly disagree with that idea, I can't agree with the response to it either. This response had to do with Microsoft wanting to buy other companies while Google just wants to be Google. Obviously this is not the case, as Google has acquired many companies over the last few years which brings me to the point of this post, who does Google own? Thankfully someone further down the list was kind enough to supply a list of all of the companies that Google has acquired. I include this list for your reading pleasure. Enjoy!


Deja
Outride
Pyra Labs
Neotonic Software
Applied Semantics
Kaltix
Primedia
Genius Labs
Ignite Logic
Baidu
Picasa
ZipDash
Where2
Keyhole, Inc
Urchin Software Corporation
Dodgeball
Reqwireless
Current Communications Group
Android
Skia
Akwan Information Technologies
Phatbits
allPAY GmbH
bruNET GmbH
dMarc Broadcasting
Measure Map
Upstartle
@Last Software
Orion
2Web Technologies
Neven Vision
YouTube
JotSpot
Endoxon
Adscape
Trendalyzer
Tonic Systems
Marratech
DoubleClick
GreenBorder
Panoramio
FeedBurner
PeakStream
Zenter
GrandCentral
Image America
Postini
Zingku
Jaiku

Monday, April 7, 2008

Dive into Python

I always seems to buy books and then never read them all. I read some, but not as many as I wish I did. Well I have been wanting to learn python for some time and have wanted to buy a book. Today I found a better solution a free book online. It is called Dive into Python. So now I don't have to spent money on a book I might not read I can just use this.

Network Programing with BSD Sockets in C

Let say you have been trying to create a program that uses the network to send data around. Now you have looked and looked and because your program only needs to run on Ubuntu Linux you finally decide, I will use BSD sockets and use to C. After you find an example on wikipedia you copy and make it work. The only problem is you get lost in all the struct running all over the place. It is like structs inside structs. Then there is something about bit order and all you want to do is get take a hostname and send something to it. Well it turns out you need to read http://beej.us/guide/bgnet/output/html/multipage/index.html because it will save you. Good luck and have fun.

Sunday, March 30, 2008

Scene graph! Of course!

I've been so blind. The idea of using a scene graph for two-dimensional graphics never got into my skull until earlier this month. It's been around for quite some time, but I never made the connection myself. Scene graphs are used all the time in three-dimensional gaming, but for 2D apps, it looks like it is used, but not as much as it can be.

This Scene graph article on GameDev does a pretty good job at explaining why they are so cool.

I was originally going to put a long paragraph here on all the examples of how it could benefit us, but I've forgotten what they were. Just remember that at one time I thought they were really useful.

The End.

Thursday, March 27, 2008

Ubuntu 8.04 and Eclipse something

So as summer comes I don't know what I will be doing but I do know some nice releases are on the way. Ubuntu 8.04 is almost out and the eclipse platform comes in June. Both these projects are on a regular release schedule. I like that. I don't know how they pull it off because it seems like my projects don't ever get done on time. Anyway if the openGL 3.0 standard came out this summer to life would be great. I don't know if I will ever use it but I would like to think I will.

Wednesday, March 19, 2008

A Postmortem of Game Programming with Digital Mars’ D Programming Language

http://www.gamedev.net/reference/programming/features/dmarsd/default.asp has many useful links relating to the Digital Mars D Programming Language. It outlines his experience with it, some features he liked, and some problems he ran into. One thing I didn't know about, for example, was that the documentation generator was built right into the compiler itself. Good to know!

Sunday, March 16, 2008

My New Time Management Plan

For the past two months I've been involved with the two prime games at Pezad: Entrippy and unnamed platformer. Here is how I will devote my time between both now:
  • I will alternate each month.
It might be too convoluted for me to attempt comprehension of this plan though, but as long as I remember that unnamed platformer will take my "hobby programming time" every January, March, May, July, September, and November, and Entrippy will take February, April, June, August, October, December, I'll be fine. I decided upon months as the time frame because months are coarse enough that I can create a deadline for at least one or two components at a time, but not so coarse, I hope, that it wouldn't feel like I was abandoning one project over another, and not so fine that I wouldn't be able to get anything useful done.

There are bound to be a few "thought overruns" where I need to finish up a few loose ends in one project but the month is over. To mitigate this, a secondary part of the plan is this:
  • I will not schedule any programming tasks to initially take more than two weeks.
  • Each programming task must be broken down into sub-tasks which take no longer than two days each.
The scheduling problem will still occur, no doubt, but as long as it can prevent some train wreck of a schedule overrun that spans two months or more, I'll consider it a success.

But why two weeks, you ask? Well, I think I read it in Rapid Development somewhere. It is also brought up in Game Coding Complete, probably (I read the first edition though) . The same goes for the two days thing. The idea being, if I wasn't able to break the task into such small parts, then I probably didn't have it well-defined to begin with.

However, one of the benefits of the two-day maximum rule doesn't apply in the hobby off-hours work I'm doing at Pezad. With a two-day maximum specified for each task, the programmer can easily see if he was falling behind schedule, and could work some overtime to bring it back in line. If this wouldn't be enough time, the programmer would re-adjust the schedule (probably no more than a few days) and notify the manager. The estimate would be brought back in line, communication takes place, and all interested parties stay informed.

...The beauty part of the "one-or-two day sub-tasks" plan is that if the programmer finished early for the day, he goes home early. Why start on a sub-task when he wouldn't be able to finish it in the couple of hours he had? It all balances out: a little overtime here, a little relaxation time there. At least in theory.

I can't do that here though. If I drift into overtime working on these games, I drift into interfering with my sleeping goodness, and I need sleep so I can operate at work the next day. So, that's why the "initially take two weeks" is phrased the way it is, and it can extend into later the month if need be.

Sunday, February 24, 2008

Vector Graphics: Me Wantee

So after looking at what's been done with vector graphics inside Adobe Flash 2D games, I've decided I'm all for it, and I believe that we can achieve the same effects with either of the games currently in development here at Pezad Industries.

The problem faced with our side-scrolling platformer game is that I want to give the user the ability to render the game at various resolutions, but not have the camera appear to "zoom-out" at higher resolutions. It's like the effect everybody sees when they increase the resolution on their Windows XP desktop: All the icons and text have the same pixel size, but because there are more pixels that can be displayed on screen, more icons can go on the desktop.

I don't like it for two reasons: 1. The user now has to squint to see their character. 2. It destroys the difficulty of the level: Part of the fun of a game is in not knowing what you may run into next.

The problem might also be solved if the image is scaled properly. For this to work, I imagine that we'd have to start with a fairly large "base image" and then scale it down to fit properly with the displayed resolution. However, this just isn't as fun as going for the gold and having an engine that can efficiently perform vector graphics. And it is possible even today!

Just take a look at the Anti-Grain Geometry project, a GPL'ed project ready to be used in today's C++ projects. Combine that with something that can decode the SVG format or just make one of our own formats, and we're good to go! Never mind that doing this would set our project back to a crippling schedule, it sounds really neat. Anyone else on board?

What about the Java Entrippy project? Perhaps the Apache project batik and it's rasterizer source, properly modified of course, would provide just what we would need to go that extra step to get vector graphics going as well.

And it isn't like we have to do what Adobe Flash does and render the vector images in real time. We could just draw each character frame once in a back buffer, save it to memory, and then call upon it to draw the frame later. No fuss!

The idea sounds good to me, but that sure does look like much more work too. What are your thoughts?

Saturday, February 16, 2008

Controls, McSchmols

The best way to play a side-scrolling platform game is with a gamepad. Although the side scrolling game will have to support a keyboard, it is in the (unnamed) game's best interest if we get good peripheral support from the beginning. So, I went about looking for some documentation on getting the Playstation 3 SixAxis controller working in Linux.

It turns out there is a website with a couple of interesting videos using the bluetooth capabilities at http://www.pabr.org/sixlinux/sixlinux.en.html. Only by connecting the Sixaxis through bluetooth will the motion sensing capabilities of the gamepad be detected.

I don't really care too much about the bluetooth stuff or motion sensing for the game at the moment, though, even if it is fairly slick. I just want a nice standard gamepad to test the game out with, and is not too hard for the user to get working. For Linux at least, as long as the user is using 2.6.21 or higher (which includes Ubuntu Gutsy Gibbon 7.10), it is really simple:

  1. Plug in the Sixaxis to the computer via USB.

  2. Wait for the LEDs to start blinking. Hit the PS button to "wake up" the controller.

  3. Start using it with various games.

  4. (optional) install the joystick package and run jstest to see the raw data coming out of the controller. In Ubuntu 7.10, all I had to do was:

    sudo apt-get install joystick

    And then run jstest with the Sixaxis as so (with no other controllers connected):
    jstest --normal /dev/input/js0


Seriously, it is that simple. DON'T forget step 2. If you don't hit the PS button, the gamepad will not register anything, and you will spend at least an hour looking through forums just to discover you needed to hit a button like a chump like I did.

And there you have it. One controller, ready for use in Linux, good for the high-quality platformer we're sure to put out sometime within a decade I should hope.


But what about the Windows folks? It took a little research, but I finally found the drivers that actually work for my Windows XP system when connected via USB.
  1. Download sixaxisdriver.exe. You might need to search around to find it, but I was able to download mine here. Install it.
  2. Connect the Sixaxis to the PC via USB.
  3. Launch DriverLoader.exe and load driver.
  4. (optional) You should have a working ps3 gamepad in Windows now. Go to http://onakasuita.org/ps3/ and download the PS3 testing. It doesn't do anything other than show the raw data coming out of the controller, including the motion axes! I must say it was more fun to play around with that than I would have originally thought. It is really sensitive too.
A screen shot of the fun:
You can see clearly where I was shaking the remote like a madman and where I had set it down.

Setting up the gamepad was more of a hassle in Windows, so it might not be the "official" input device on that platform for the game. But still, the PS3 gamepad is one of the best around, so if the user had the option, I would tell them to go for it.

Tuesday, February 12, 2008

C/C++ fun

So I have been playing with C and C++ and here is what I have done. I wrote the following code

#include "stdio.h"

double golbal = 3.14; // global data

static double local = 2.718; // local data

double fun() // global function
{
return 1.0;
}

static double lfun() // local function
{
return 2.0;
}

int main()
{
printf("Hello World!\n");

return 0;
}

Then I compile it with gcc and g++ into object files. Using the nm command I look look into the object and here is what I got.

With gcc

0000000000000000 T fun
0000000000000000 D golbal
0000000000000019 t lfun
0000000000000008 d local
0000000000000032 T main
U puts

With g++

0000000000000000 T _Z3funv
U __gxx_personality_v0
0000000000000000 D golbal
000000000000001a T main
U puts

As you can see g++ mangles names. Also the printf call becomes puts and is an undefined symbols. Now the local data and function our shown in the gcc object while not in the g++ object. The other thing is the g++ object has a symbol of the name __gxx_personality_v0. Now I don't claim to explain all this or understand it, but there it is. If you man nm you can get more information on what all time means. There are other command like objdump that tell more and many more options to nm.

Someday I hope to understand all this.

Monday, February 11, 2008

Windows eclipse

Some time ago it came up that using eclipse cdt in windows is not as nice as in Linux because of the lack a good compiler and libraries. Now there is MinGW, but it has not seen much development as of late. This problem has also been seen by the lead developer of eclipse cdt (doug). I read his blog even now and again (http://cdtdoug.blogspot.com/) and the last post is something anyone how cares about compiler in windows for eclipse should check out.

Disclaimer: I don't now much about MinGW in windows so I might not be telling it right but read doug's blog if you care.

Sunday, February 10, 2008

Johnny Chung Lee > Projects > Wii

I know the three of us have already seen this site, but the items featured on it were so interesting that it was bloggable. So there.

http://www.cs.cmu.edu/~johnny/projects/wii/

Johnny Chung Lee shows three videos of interesting projects featuring the Wii remote: the Minority Report style interface, the cheap interactive whiteboard, and the virtual reality TV (my favorite).

Friday, February 8, 2008

Eclipse ganymede-M4-linux C++

So I installed the latest eclipse (M4) for the ganymede release. The first thing I saw that had changed was the startup screen as seen below. This is meaningless, but I thought it looked cool.
















The second thing I noticed was it was somewhat buggy. It would not start unless I pointed to a workspace that was already there. As a development version this is not surprising. The next thing I did was open up some C++ code because this was the C++ version. I only played with it for a couple of minutes, but I did notice it can now find errors in the code before you compile. This was the thing I missed most using the C++ version compared to the Java version. I hope this means there C++ parse has other fixes in it to. Below is and example of eclipse finding a missing semicolon. I did not see other new features, but I did not look long either. I can not wait until June for the real thing. The eclipse project it great and it just keeps getting better.


Pezad::init();

Team Pezad's current projects:
http://code.google.com/p/pezad-games/
http://sourceforge.net/projects/entrippy/

Programmers with a desire to make fun games comprise Pezad.
Pezad main site: http://www.pezad.com/