Fly your way through alien environments while battling pursuers in this 3D rail shooter.

Report article RSS Feed Devlog #1: Enemy Design

I discuss the design process behind the standard enemy in the game.

Posted by malec2b on Feb 19th, 2013
Article

Working in 3D for Renegade Sector Pilot has introduced a whole new set of challenges in terms of enemy design. Especially since this is a rail-shooter, meaning enemies can move fairly freely in 3d space and aren’t confined to a single plane.

I had a basic idea for a standard enemy type. It would come up from behind the player then fly around in front of him and shoot back at him, and occasionally fall back behind the player. I wanted to get that feel of jockeying for position as it flies past you and it needed to have smooth but interesting movement, meaning it couldn’t just fly in a straight line, and it it would have to gradually turn to change direction.

The easy part was making it approach from behind. I gave it a max speed slightly higher than the player’s speed, and a minimum speed slightly less than the player speed. It then had an acceleration value. If it was behind the player, it would speed up by its acceleration value, and if it were ahead of the player it would slow down. I eventually changed this point to a little ways ahead of the player, that way it would spend more time in front of the player and only occasionally fall behind the player.

I then made it change its flight angle in small circles. I had a constantly-increasing counter, then made it’s x and y angle be based on the cos and sin of the counter. So it started flying in a little spiral. The problem, of course, was that it could fly out of bounds of the stage, hitting the tree wall or the ground.

The solution I finally came up with to this was to modify the angle based on the location of the ship. The closer it is to the edge of the stage, the more it’s angle is pushed in to the middle. If the ship is in the center of the stage, it could have an angle anywhere from -10 to 10, whereas if it’s at the far right, it could have an angle of -20 to 0.

It ends up looking like this:
User Posted Image

Post comment Comments
EDDnorris
EDDnorris Feb 19 2013, 11:45pm says:

Have you heard of the tool Mega-Fiers? You might be able to use it's bend/warp/twist tools to have your ships animate organic changes.

Just an idea, game looks cool, keep it up!

West-racing.com

Youtube.com

+2 votes     reply to comment
Post a Comment
click to sign in

You are not logged in, your comment will be anonymous unless you join the community today (totally free - or sign in with your social account on the right) which we encourage all contributors to do.

2000 characters limit; HTML formatting and smileys are not supported - text only

Icon
Flight of the Data-Thief
Platforms
Windows, Mac, Linux
Developed By
malec2b
Engine
Unity
Contact
Send Message
Official Page
Renegadesector.com
Release Date
Released Jun 6, 2013
Game Watch
Track this game
Feature
Browse
Features
Report Abuse
Report article
Related Games
Flight of the Data-Thief
Flight of the Data-Thief Indie Single Player Third Person Shooter
Related Engines
Unity
Unity Commercial Released May 30, 2005