### Moving Enemies with Waypoints

Posted by & filed under Coding.

Getting enemies to move tends to be one of the more difficult things for me to get right. It just doesn’t always seem natural. And I’m not talking about moving with any type of AI. Just moving around the screen in a pattern. Sure, straight lines are pretty easy. But games get really boring if… Read more »

### Distance Formulas

Posted by & filed under Coding.

It’s a pretty common task to get the distance between 2 points. Maybe you’re wanting to see if two points are close enough to have collided. Maybe you’re making a golf game and the closer the ball is to the hole the higher the score. Either way, you need to know the distance. The Math… Read more »

### 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 »

### 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 »

### 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 »

### ActionScript Error: Expecting semicolon before minus

Posted by & filed under Programming, teaching.

One of my students came across an “expecting semicolon before minus” error while working on an ActionScript project last week. The error totally threw the student, but it made sense to me. At least I though it did. My guess was that somewhere in the code he had accidentally put a minus where one shouldn’t… Read more »

### How to create a very simple space game in Flash

Posted by & filed under Programming.

Admit it, you’ve played an online game while at work. And odds are very good it was written in Flash / ActionScript. We’re going to cook up a very simple Flash project that might serve as the start of a game. Keyword here is simple though. We’re not going to worry about anything except for… Read more »