GunGen attempt 2: Results
My second method of Procedurally Generating guns is proving much more effective than the first.How it works:
As I said in the last GunGen post, how it works is it spends points on attributes in 3 categories (Shooting type, Curve type and Secondary type). It then spends remaining points on modifying variables of those attributes.The Current Attributes are as followsShooting Type
(How the bullets come out of the gun):
- Rapid Fire Burst
- Spread BurstCurve Type
(How the bullets move):
- Standard (None)
- HomingSecondary Type
(How the bullets generate more bullets)
- Standard (None)
Each aspect has a cost. The system will split up the total amount of points into a value for each category. It will then determine which aspects it can buy with those points, and pick one randomly. It will then split the remaining points among that aspect's variables.
The one exception I had to add to this system is if it has a lot of points to spend in a category, but still randomly picks Standard. At first I tried to make it spend the points on general variables like bullet speed and fire rate, but this could easily break the system if too man points ended up being spent in Standard. What I ended up doing was making it so that if it tried to put more than 3 points into Standard, it would automatically upgrade it to the next aspect. So if the system tries to spend 5 points in a Standard curve, it'll end up with a Wave curve. Not the most elegant solution, but it will have to do for now.
Anyway, how about those ol' criteria I posted back in the first GunGen postHow well did this fit the requirements:
- There must be significant emergent variety in the guns: There is. There are plenty of combinations of aspects, which is further expanded upon by the variables which can have a big impact on the gun.
- The variation in the guns must be interesting and meaningful to gameplay: Looks to be the case. Plenty of interesting patterns come out of the different combinations, and guns will handle significantly differently.
- The system must scale based on level. The last king you fight needs to have a more powerful gun than the first king you fight: Different amounts of points can go into the system to make stronger or weaker guns.
- The guns must be more or less balanced within each level. This still needs some work. Some combinations can make seriously under-powered and downright silly guns, even (or especially) at higher levels. But this can be fixed within the system through balancing and tweaking.
Finally, here are some examples of cool guns that came out of the system:
On the other hand, here's an example of an incredibly stupid gun created by the system: