Thursday, May 27, 2010

multi-player games with my son

My son and I have been educating ourselves on making multi-player games using GameMaker 8. It's a wonderful platform for novices to get their feet wet in the field of video game creation. It's also been a great way to introduce my son to computer programming. I mean, what young boy doesn't get a thrill at the idea of creating their own video games?!

A free version of GameMaker is available from the folks at YoYo.com. Advanced features become available once you register for a small fee. There are tons of people in the wiki, forums, and game submissions, which means tons of support.

If you wish to play some of the submitted games, YoYo has made it very easy using a web browser plugin. For those of us Firefox 3.6.3 users, however, the process of installing that plugin is somewhat more involved, but not difficult at all. This is a great way to get some ideas for your own games.

Getting started with creating multi-player games does require a registered copy of GameMaker. Next, it really helps to have a decent tutorial, especially if you are new to the GameMaker language (GML). A library is used to supply the needed functionality for programming multi-player games, specifically the socket handling. There are still tutorials floating around that use an other library called (I think) mplay. This one is old and tends to be flaky, especially where firewalls are concerned. The preferred library of choice is called '39dll'.

A great tutorial for using 39dll has been put out by Luke Escude. Many thanks, Luke! The code is clean, documented and he does a great job explaining the various parameters and providing diagrams to give a big picture view on the matter.

I was able to have success, modifying the example code to have the client send a message to the server and then from the server to the client. Then I modified the sample chat client and server applications so that one could input the ip address of the server and the port number. I ran these on my LAN between my Windows laptop and my iMac with VMFusion (Windows) with great success.

My next step is to have my son connect up with me from outside our LAN. I configured my router to do this, opening up a port for the purpose and forwarding requests on it to my iMac. To make sure that this was done correctly, I tested the newly opened port through CanYouSeeMe.org. Again, success. Once we have tested successfully across the Internet, then it will be time to actually put a real game together. My son has already created several games; we'll see how difficult it would be to retrofit one of those games in a multi-player environment.

Wednesday, May 12, 2010

why did I wait so long...

It is said that the path to hell is laid with good intentions. Three months ago I decided it was time to change the oil in my car. My car has taken quite a bit of abuse and is running very well all things considered. It has survived over 160, 000 miles and 120 miles of daily commuting. However, the car is showing signs of neglect. It now buzzes at me when I make turns, suggesting to me that the steering fluid must be getting low. I am imagining there might only be a couple tablespoons of oil left in the engine block. So I decided it was time to take it to the shop.

Another thing that recently broke was the cigarette lighter. I use my iPod daily to listen to music and audio books, thanks to that power supply. It really bothers me that it's not functioning right now. The mechanic said that it might be a fuse that is out. Sometimes the metal sheeting actually comes out of the power socket when I remove my appliances. He said that perhaps I shorted the circuit when that happened. We'll see.

I also admitted that I've been living off of a prayer in regards to the timing belt, which, to my knowledge, has never been replaced. Now we're talking more money. So it's time to consult Quicken and see if I can afford the expense this month.

I really did think that I could take care of my car on my own. It's not so much a question of ability as is time. So I should not be embarrassed or think it's wasteful to take my car to the shop. With only 24 hours in a day, one must ask himself, "where will my efforts be best placed?"