Blog Archives

Book: CSS Pocket Reference

For whatever reason, working with CSS tends to send me looking for reference. Sure, Netbeans helps with its autocomplete. But there are so many CSS selectors to use that I forget ‘em all the time. Especially the lesser used. A

Posted in Reviews

Creating a random color in Java

Want to create a random color in Java? With a bit of math, plus Math.random(), it’s pretty easy. A bit about colors Colors on the computer are made up of a red, green, blue triplet; typically called RGB. And each

Tagged with: , ,
Posted in Coding

Book: JavaScript Pocket Reference

I’m a big fan of the O’Reilly pocket reference books. It’s rare that there’s not one on my desk. The JavaScript pocket reference got a lot of use when I was first learning JavaScript, but has been shelved a bit

Posted in Reviews

How to get image dimensions in Python

Thanks to Pygame, there’s a quick and easy method to get the dimensions of an image. You just have to load it into a Surface and use the Surface methods get_height() and get_width().

Tagged with: , ,
Posted in Coding

How to get image dimensions in Java

Earlier this week I Googled for how to find the dimensions of an image using Java, and most of the solutions were way more complicated than they needed to be. Most of what I came across was code that opened

Tagged with: ,
Posted in Coding

Book: Python Phrasebook

Got this little book shortly after I started learning Python. The first book I bought was specific to game programming, and skimmed over the basics of the language a little too much. Rather than try to be a “bible” type

Tagged with: , , ,
Posted in Reviews

Dragging symbols in a grid with ActionScript

Some games, I’m thinking tower defense, need to give the player the ability to drag symbols around. But you don’t always want to give the player free reign to drag it anywhere. Maybe you want them to only be able

Tagged with: ,
Posted in Coding

Scrolling Background in Java

This is the third in a series of posts on how to put a scrolling background. We started with ActionScript and went to Python. Now it’s time for Java. Quick Demo Here’s the same demo as the previous two in

Tagged with: , ,
Posted in Coding

Book: Beginning Game Development with Python and Pygame

This is the first book I bought when I needed to learn Python.  I’ve always found it easier to learn a language against the backdrop of a game. Since this was the first experience with Python, I spent quite a

Tagged with: , , ,
Posted in Reviews

Scrolling Background in Python

This is a follow up to an earlier post where we created a scrolling background in Flash using ActionScript. This time we’re going to do the same thing, but using Python and Pygame. The Logic This animation is what we’re

Tagged with: , , ,
Posted in Coding