### Converting between degrees and radians

Posted by & filed under Coding.

There are two ways to measure angles. You probably learned to measure angles in degrees early in school. A circle has 360 degrees, a perfect corner is a 90 degree angle, and 180 degrees forms a straight line. But then you took trigonometry or pre-calculus and were introduced to a radian. A radian does the… Read more »

### Pythagorean Theorem

Posted by & filed under Coding.

At first glance the Pythagorean Theorem doesn’t appear to relate to game development. But we’ll see in a bit that it does. First though, let’s cover a bit of math. The Pythagorean Theorem states that for any right triangle, the sum of the squares of the two legs is equal to the square of the… Read more »

### Create a Scrolling Background in Java

Posted by & filed under Coding.

Creating the next great side scroller? Well, you’ll need a scrolling background. And if you’re programming in Java, here’s an easy way to do it. Quick Demo Here’s a little demo of what we’re going to create. What’s happening is that there are two copies of the same image scrolling from the right to left…. Read more »

### Scrolling background with Python

Posted by & filed under Coding.

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.

### Scrolling Background with ActionScript

Posted by & filed under Coding.

Take a look at your favorite game. Odds are good that there is a scrolling background of some type. Think Super Mario Brothers. Mario is a bit different than what we’re after though. The background in Mario is a single graphic that scrolls as Mario moves through the world. What we want is a scrolling… Read more »

### How to get image dimensions in Python

Posted by & filed under Coding.

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

### Dragging symbols in a grid with ActionScript

Posted by & filed under Coding.

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 to position symbols in a grid. That’s what we’ll create here using ActionScript 3. Demo… Read more »

### Get image dimensions in Java

Posted by & filed under Coding.

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 the image and parsed through the binary code to get the dimensions. Yes, there’s an… Read more »

### How to create a random color in Java

Posted by & filed under Coding.

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 of the 3 pieces can be in the range from 0 to 255. Java also… Read more »

### Testing email with PHP

Posted by & filed under Coding.

Wish I had found this years ago… Up until about a week ago my normal process for testing PHP code that sends email was to run sendmail through WAMP and send to my email address. I’m thinking about the amount of time I could have saved had I found this plugin when I first started…. Read more »