TIGSource Forums

Developer => Design => Topic started by: RCIX on October 31, 2010, 10:58:40 AM



Title: Procedural generation of enemy ships?
Post by: RCIX on October 31, 2010, 10:58:40 AM
Hi all! My latest game will be featuring procedural generation of enemy ships to fight. The issue i'm having is figuring out a good way to come up with a lot of "interesting" (but fair) enemy ship profiles. My ships + their weapons have about 8-10 properties (speed, health, gun reload rate, gun damage, gun inaccuracy, bullet tracking ability, gun damage, maybe 1 or 2 more).

I thought of having a system where there is an abstract number of "power points" that the generator gets to make a ship profile, then it uses random number generation to allocate points to each property. Are there better methods i can use?


Title: Re: Procedural generation of enemy ships?
Post by: Ant on October 31, 2010, 11:19:32 AM
If you wanted more control you could first have it randomly choose an archetype of ship (light, heavy, fast, etc) which then randomly tweaks certain properties. It would allow you to better balance and theme the levels. For example, early on in a level you could just have a bunch of light/fast ships show up then gradually introduce heavy ships to increase the difficulty level.


Title: Re: Procedural generation of enemy ships?
Post by: baconman on November 02, 2010, 09:05:47 AM
I'd say start with your archtypes first. Develop a set of ship designs that fit each, and a variety of actions - perhaps some you should shoot, some you shouldn't, maybe some you actively protect even.

Compile the sprites for each class so the designs shuffle each game. Even the boss ones. Ships don't have to be big to have big firepower!


Title: Re: Procedural generation of enemy ships?
Post by: RCIX on November 02, 2010, 09:09:38 AM
I'd say start with your archtypes first. Develop a set of ship designs that fit each, and a variety of actions - perhaps some you should shoot, some you shouldn't, maybe some you actively protect even.
If i toss in slow mutation of ship profiles, that could really work! Thanks :)

Compile the sprites for each class so the designs shuffle each game. Even the boss ones. Ships don't have to be big to have big firepower!
Oh, i've got the sprites angle covered -- see http://forums.tigsource.com/index.php?topic=15536.0 . :)


Title: Re: Procedural generation of enemy ships?
Post by: _discovery on November 10, 2010, 01:46:30 PM
Cool idea. The one game that i really liked their procedural content was a DBP entry (top 20) called SpaceHack. The game built everything procedurally, including the enemies, bosses and even story.

Just for inspiration sake, have a look at how they went about generating geometry randomly as well as character stats :

(http://b.imagehost.org/0192/behemoth1.png)


Read the full post here : http://www.nag.co.za/forums/showthread.php?7018-SpaceHack-Chronicles-of-the-Final-Push&p=149295&viewfull=1#post149295 (http://www.nag.co.za/forums/showthread.php?7018-SpaceHack-Chronicles-of-the-Final-Push&p=149295&viewfull=1#post149295)

And for a video instead : http://www.nag.co.za/forums/showthread.php?7018-SpaceHack-Chronicles-of-the-Final-Push&p=149901&viewfull=1#post149901 (http://www.nag.co.za/forums/showthread.php?7018-SpaceHack-Chronicles-of-the-Final-Push&p=149901&viewfull=1#post149901)



Title: Re: Procedural generation of enemy ships?
Post by: snowyowl on November 13, 2010, 12:35:17 PM
And for a video instead : http://www.nag.co.za/forums/showthread.php?7018-SpaceHack-Chronicles-of-the-Final-Push&p=149901&viewfull=1#post149901 (http://www.nag.co.za/forums/showthread.php?7018-SpaceHack-Chronicles-of-the-Final-Push&p=149901&viewfull=1#post149901)
Can't see the video, sorry.


Title: Re: Procedural generation of enemy ships?
Post by: Paint by Numbers on November 21, 2010, 03:44:03 PM
This is a really interesting topic. The idea of building a ship using randomly allocated skill points sounds really awesome to me. Sure, it'd come up with some very weird and potentially useless ships, but boy, it'd be fun.


Title: Re: Procedural generation of enemy ships?
Post by: Xecutor on November 23, 2010, 07:32:50 AM
Take a look at this: http://en.wikipedia.org/wiki/Warning_Forever (http://en.wikipedia.org/wiki/Warning_Forever)


Title: Re: Procedural generation of enemy ships?
Post by: Fallsburg on November 23, 2010, 07:52:31 AM
This is a really interesting topic. The idea of building a ship using randomly allocated skill points sounds really awesome to me. Sure, it'd come up with some very weird and potentially useless ships, but boy, it'd be fun.

Well, that's why I'd imagine it wouldn't be purely random.  The only way to determine relative worth of the different aspects is to create ships and test them against each other, but once you do that you determine what level of threat you want a ship to be and then just allocate that many points.  There might also be a nonlinearity to it, so a speed of level 1 costs 1 point but a speed of level 5 costs 10 points. I'd recommend just creating a bunch of enemy ships and pitting them against each other, see what works, and then fit some curves to the data to see how point allotment should go.


Title: Re: Procedural generation of enemy ships?
Post by: Guillaume on November 23, 2010, 08:58:09 AM
This is for 2d pixel art but might be of interest to you. (http://gushh.net/blog/2010/06/10/spaceship-generator/)


Title: Re: Procedural generation of enemy ships?
Post by: King Slizzard on November 25, 2010, 11:58:42 PM
You could have a random range of points per 'attribute' and tether them so that they don't get too crazy out of control. Then maybe keep track of how many ships with speed above/below variable X and ships with durability above Y so that there isn't too much repetition. Just an idea.


Title: Re: Procedural generation of enemy ships?
Post by: LiquidAsh on November 29, 2010, 06:49:58 PM
to determine relative worth of the different aspects is to create ships and test them against each other

Another angle is to test the ships that you generate against the player.  Score each of the enemy ships, and record their scores along with their point distributions.  Then future ships can be generated by combining the point distributions of previously sucessful ships... along with some additional mutations.  This kind of genetic algorithm can be use to evolve enemies that uniquly challenge each player's play-style.