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…
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…
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…
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…
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().
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…
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…
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…
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…
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…
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…