Thursday, July 17, 2008

3D Games

If you're looking to make 3D games on a Mac there is no better tool than Unity. It's easy to use, with a great GUI and all the scripting done in the familiar javascript. You can use it to build games for OS X and Windows. There are also plans to make Wii and iPhone builds possible. It costs $200 to buy the indie licence, but even if you can't afford that it is worth checking out the free 30-day trial. If you need a free alternative Dim3 is a popular open-source 3D engine. My own experience with it is fairly limited but, while it is certainly not as easy or powerful as Unity, it looks to have some potential and is certainly worth looking in to.

Saturday, June 7, 2008

PyGame

At some point you will run into the limits of web technologies and GameMaker and you will need to learn another language. Python is an excellent next step. Pygame is a module for python that will allow you to easily import and use sprites in your games. Check it out at http://www.pygame.org/. Once you've downloaded and installed Python and Pygame I recommend that you get started by looking at the Chimp Tutorial. You will also want a good code editor to work in. I'm on a Mac and I highly recommend Aquamacs Emacs. Please note that programming with something like Python is a little more complicated since there is no GUI, but if you're used to using something like PHP or GameMaker code, you should be able to figure it out without too much difficulty.

Tuesday, May 20, 2008

Making a DIV 100% of the Document Height

A friend told me that IE 8 is supposed to be fully compliant with CSS. I went to test a website on Browsershots the other day and discovered that it didn't work in IE 7 or 8. So much for compliance. The problem I have is that the height of my main div is set to 100% but it only goes part way down the page and then ends while its content continues. Its a bit difficult to explain so hopefully it will make more sense if you look at the image on the left.
The white background is supposed to go to the end of the page, since all of the other page elements are enclosed in it.

The Solution
I couldn't find a way to fix this problem using CSS/HTML alone. Instead I had to use a piece of javascript to resize the div to the actual height of the page.

<script type="text/javascript">
function resize()
{
document.getElementById('maindiv').style.height =
document.body.parentNode.scrollHeight + 'px';
}
</script>

Just let your body tag know that it should run the resize function onload and the result in IE 7 and 8 is as follows:

Saturday, April 26, 2008

Jumping in Head First - Making Your Own Computer Games

In my last post I suggested that web design is the ideal way to get your feet wet in the ocean of computer programming. Some of you have been there and done that. Others just want to dive right into the world of game making. One of my favourite game creation tools is Game Maker. I love it because it is fairly simple to use if you are new to this type of thing. It has a drag and drop interface that doesn't require you to type a single line of code. Once you master that you can begin to use the advanced features including coding with the well documented GML (Game Maker Language).

Thursday, April 24, 2008

First Steps - Creating Web Sites

Getting started with computer programming can be a challenge. Where is the best place to start? Designing websites is an easy way to see quick results for your efforts. The most basic way to get started with web design is to use a WYSIWYG (What You See Is What You Get) web editor. Dreamweaver is the champion of this type of software. For the amateur who is just beginning the open source NVU should do fine. However, I highly recommend that you learn to create your own websites using only a text editor and html, javascript, and php. The most difficult part of learning to design web pages will be finding the right sites to learn from.

Learn HTML - DaveSite.com
I highly recommend using DaveSite.com for an HTML tutorial because it assumes no prior knowledge and emphasizes practical application.

Learn CSS - DaveSite.com
CSS is an important part of defining the layout of your web page. To find out more about CSS and how to use it use Dave's tutorial. Visit the W3Schools website for more tutorial and a handy reference guide.

Learn Javascript - Thau's Javascript Tutorial
Thau's Javascript Tutorial on Webmonkey.com was by far the best Javascript tutorial I could find. Once you've completed it you can move on to the Advanced Javascript Tutorial.

Learn PHP - PHP From the Ground Up
By now we are getting into designing more advanced websites. Many websites will not require PHP or another server side language. If you feel limited by the capabilities of html and javascript then it's time to check out this tutorial.