Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411196 Posts in 69314 Topics- by 58380 Members - Latest Member: feakk

March 18, 2024, 11:19:53 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsKings of the Desert - Action-Adventure with Procedurally Generated Guns.
Pages: [1] 2
Print
Author Topic: Kings of the Desert - Action-Adventure with Procedurally Generated Guns.  (Read 8057 times)
Alec S.
Level 10
*****


Formerly Malec2b


View Profile WWW
« on: August 14, 2012, 02:53:20 PM »

UPDATE:  This game is now going to be one of the backer rewards for the Indie Statik Kickstarter:  http://www.kickstarter.com/projects/877458309/indie-statik

Kings of the Desert is a Top-Down Action-Adventure game where you play a lone gunman in a post-apocalyptic desert.  You possess one of 5 last guns still in existence.  Humanity in the desert has split into 4 kingdoms each ruled by a mad king.  The kings have the other 4 guns.  You must wander the wasteland and defeat the four Kings of the Desert.

This is an idea that I've had rolling around in my head for a couple years now.  Every time I find myself wondering what my next project will be, I think about finally making this game, but there were always a few details about the concept that I hadn't pinned down yet, and I ended up working on something else.  Well, it's time I finally do it.  I've got the idea more fleshed out in my mind now and I've started prototyping the game.

First things first are the procedurally generated guns.  I wanted to take the idea of Procedurally Generated weapons and make them more scarce, like the weapons in a Zelda or Megaman game.  Each of the kings has one procedurally generated gun, and you can get it by defeating them.  Anyway, I'll post more about that later.  For now, have a screenshot:

« Last Edit: September 13, 2013, 09:31:28 PM by Alec S. » Logged

impulse9
Guest
« Reply #1 on: August 14, 2012, 04:06:44 PM »

I love that story. Smiley Can the gun break down? Why are there only 5 left?
Logged
Alec S.
Level 10
*****


Formerly Malec2b


View Profile WWW
« Reply #2 on: August 14, 2012, 07:10:07 PM »

Basically most modern technology has been lost since the apocalypse.  The 5 guns that have been recovered are rare ancient artifacts.
Logged

Alec S.
Level 10
*****


Formerly Malec2b


View Profile WWW
« Reply #3 on: August 21, 2012, 11:08:39 AM »

Procedurally Generated Guns - Attempt 1

I tend to shy away from procedural generation, and this is my first real attempt to have a procedurally generated element in my game, so I want to be damn sure to get it right.

I have a few requirements that I will need to satisfy for it to be considered successful

 - There must be significant emergent variety in the guns. 
 - The variation in the guns must be interesting and meaningful to gameplay.
 - 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.
 - The guns must be more or less balanced within each level.  While it's okay for one potential level 2 gun to be slightly more or less powerful than another level 2 gun, the player must not feel ripped off by a highly underpowered gun, or frustrated by having to fight a king with a massively overpowered gun.

My first attempt at generating guns used the following system:

 - Create an array of ability scores (like a pregenerated array when creating a character in an RPG).
 - Apply those scores to the following properties:  Speed, Spread, Projectile Type, Fire Rate.

How well did this fit the requirements:

 - There must be significant emergent variety in the guns:  While there was a certain level of variety, the projectile type and spread overwhelmed everything else, making it so that I was essentially just designing the guns myself by coming up with different projectile types.
 - The variation in the guns must be interesting and meaningful to gameplay:   To a certain extent this is true, but, as I said above, a lot of this came from the designed element of projectile types, rather than the procedural generation as a whole.
 - 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:  This worked.  The level of the gun would determine the starting stat array, so a level one gun will be less powerful than a level 4 gun.
 - The guns must be more or less balanced within each level. Not really the case.  If the high stats happened to go into projectile type and/or spread, you would have a much stronger gun than if it went into fire rate or bullet speed.

Closing thoughts:

So, basically, it's still pretty far from what I'm trying to get.  I'm working on a new system that includes more categories that can be combined (bullet movement patterns, ways bullets can create secondary bullets, ect...).
Logged

melos han-tani
Level 10
*****


View Profile WWW
« Reply #4 on: August 28, 2012, 09:15:56 PM »

bump (buyp?) 'cause this sounds neat. and looks pretty from that screenshot.
Logged

Working on Anodyne 2! https://forums.tigsource.com/index.php?topic=65359.0 Made Anodyne, Even the Ocean, All Our Asias
Alec S.
Level 10
*****


Formerly Malec2b


View Profile WWW
« Reply #5 on: August 28, 2012, 10:46:24 PM »

Thanks.

I've been taking a break from the GunGen to work on some enemy designs.  I've got wolves which run around and chase after the player and birds that fly out of the pits.

Logged

Doktor_Q
Level 2
**



View Profile
« Reply #6 on: August 29, 2012, 10:09:32 AM »

This looks pretty cool. It's interesting to see more art styles like this, with low color and silhouettes.

Also, random guns are completely awesome.
Logged
Alec S.
Level 10
*****


Formerly Malec2b


View Profile WWW
« Reply #7 on: August 29, 2012, 02:41:42 PM »

Thanks!

Started working on the new GunGen system.  For this one, I decided to have three prominent elements:  Shooting Type, Curve and Secondary.  A lot of the projectile types from the previous method have been split up into these elements.

Shooting Type determines how the bullets come out of the gun.  For example it could be rapid fire or a spread burst.

Curve determines how the bullet behaves after it's come out of the gun.  For example a wave or a homing projectile.

Secondary determines how (and if) the bullet creates more bullets after it's created.  For example, one bullet could split into two after it's been fired, or could leave a trail behind it.

All of these could also be set to standard, which would essentially mean the bullet has no special benefit from that category.

Within each special property, there are also stats that the GunGen can spend points on.  For example, how many bullets in a spread, or how quickly a homing attack curves.

The system will take a point total (Based on level) and split it apart to "buy" abilities and allocate points to those abilities' stats.
Logged

Belimoth
Level 10
*****


high-heeled cyberbully


View Profile
« Reply #8 on: August 29, 2012, 02:55:58 PM »

Neat idea, I am curious to see how it works out.
Logged

Doktor_Q
Level 2
**



View Profile
« Reply #9 on: August 29, 2012, 06:45:01 PM »

Is your starting gun going to be randomized too?
Logged
Alec S.
Level 10
*****


Formerly Malec2b


View Profile WWW
« Reply #10 on: August 29, 2012, 08:04:49 PM »

My current plan is to have the starting gun just be a standard pistol-type gun, with only the 4 Kings' guns being Procedurally Generated, meaning you don't get one until you defeat a king, but I might change my mind during development.
Logged

Quarry
Level 10
*****


View Profile
« Reply #11 on: August 30, 2012, 01:12:30 AM »

KoD... SEEMS FAMILIAR
Logged
Alec S.
Level 10
*****


Formerly Malec2b


View Profile WWW
« Reply #12 on: September 04, 2012, 02:57:24 PM »

The new GunGen system has been coming along pretty well.  It already has a lot more interesting variation than the first system.  It still needs a lot of tweaking, though, as some combinations of properties and stats create some very stupid guns.

But here's one of the cool guns it made:

Logged

nihilocrat
Level 10
*****


Full of stars.


View Profile WWW
« Reply #13 on: September 05, 2012, 12:18:40 PM »

I really like the idea of procedural weapons, I appreciate that you're experimenting and finding some common pitfalls and pointing them out for everyone.

Gunstar Heroes may be a source of inspiration, while there were no procedural weapons, the player was able to create different weapons by combining two elements, out of a total of 4 elements (lightning, fire, tracer, bullet). You could use elements alone, or combine two of the same type, and the way they combined was really intuitive so it was relatively easy to figure out what would happen with each combination.

Here are some interesting bullet behaviors I saw in the game:
- Bullets seek the closest enemy
- Bullets you fire will seek your cursor and follow it around as you move it
- Bullets scatter in all directions when you let go of the button
- Bullets spawn and move very quickly but at a very short range, so you effectively have a "lightsaber" or "flamethrower" weapon

Here are some more ideas which may or may not work:
- Bullets will spawn X more bullet(s) when they hit an enemy
- Bullets pass through X enemies
- Bullets have acceleration applied to them, either forwards (like a rocket launcher) or backwards (like a boomerang-gun)
- Bullets bounce off of terrain X number of times before they die
- Complex combinations of above behaviors: bullets fire with an applied force, then explode when near enemies to release a swarm of bullets which can bounce off of terrain. Bullets pass through enemies and bounce (making for a kind of "laser beam" gun). Bullets explode into more bullets after X seconds, and these sub-bullets will be accelerated towards the player if they release the fire button.

I don't think all combinations of these would work well when combined, it's just some ideas. I think you can get the most power from any kind of behavior that requires some variable, that way you can author one kind of behavior and randomly generate a variable to feed into it, such that it behaves slightly different in every generated gun without extra work on your part.
Logged

Alec S.
Level 10
*****


Formerly Malec2b


View Profile WWW
« Reply #14 on: September 05, 2012, 12:53:42 PM »

Yeah, Gunstar Heroes is something I've been keeping in mind when working on the GunGen system, especially when the system spits out a gun with, say, homing and rapid fire.

I've already got a few of those things you listed in the system, but you've got some really good ideas I hadn't thought of in there.  Once I've got the current abilities working in the game and balanced, I'll start adding in new abilities.  So far putting the aspects into three categories and choosing up to one from each has been working pretty well, and keeping the system from combining conflicting abilities.  A fair amount of the things you suggested can fit into one of those categories, so I'll probably be able to incorporate at least some of them.
Logged

Alec S.
Level 10
*****


Formerly Malec2b


View Profile WWW
« Reply #15 on: September 11, 2012, 02:37:42 PM »

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 follows

Shooting Type (How the bullets come out of the gun):

 - Standard

 - Rapid Fire Burst

 - Spread Burst

Curve Type (How the bullets move):

 - Standard (None)

 - Wave

 - Bounce

 - Homing

Secondary Type (How the bullets generate more bullets)

 - Standard (None)

 - Trail

 - Split

 - burst


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 post

How 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:

Logged

Pixelulsar
Level 3
***



View Profile WWW
« Reply #16 on: September 11, 2012, 02:51:59 PM »

I love the guns that it created, they have really cool effects.  I like the two in the first GIF, they are my favourite ones.  In the really stupid one, does it have a lot of recoil, or are you just moving backwords?  I think it would be cool if you didn't go flying back.

Looks very cool so far.
Logged

Alec S.
Level 10
*****


Formerly Malec2b


View Profile WWW
« Reply #17 on: September 11, 2012, 03:07:11 PM »

Thanks!  Yeah, part of that is the recoil which I still need to work on.  The other part was that the bullets were curving so much that they were moving slowly backwards.  I've fixed the problem, but I posted the gif anyway as I thought it was entertaining.
Logged

Kit
Level 0
***



View Profile
« Reply #18 on: September 28, 2012, 02:51:50 PM »

Looks to be off to a great start. Loving the graphics and the gameplay idea/story! Screenshots look amazing, and the gun examples promising.

Though I will say this, the "stupid gun" example isn't being given a fair shake :3 I can already see a use for it, as an example. The bullets travel in the same direction the player is propelled, a bit of spread. It could easily be used to rocket past an enemy or boss as a dodge move, and the spread of the bullets would still get some hits in.

With procedural generation, you could potentially spend all your time optimizing it, and never weed out all the "stupid" combinations (This is not to tell you to discontinue trying to do so though! :D). I think that it's up to us as the playerbase to learn how to use them to our advantage. I guess my point is, in the least and most non-offensive, hopefully constructive way possible, to say to try not to let any personal bias or preference have an effect on what types of guns the system creates. Sometimes the silly guns are the most fun, and one reason I like them is to get a good laugh out of them or still become skilled with them even if they are ridiculous. But! I can't speak for everyone, so that is just advice. Take or leave it at your pleasure :D

Although, as a thought; You could add a fallback to reduce the possibility of getting one of these types of weapons by adding in some sort of character npc with the role of gunsmith, maybe someone who knows about the artifacts and wants to assist the player in the overthrow of the kings. Kindof cliche, but hell. You could let the player have a set number of "resets" per gun, nothing gamebreaking that allows them to find "The perfect gun" but something that makes it up if they get something truly broken.

Just some thoughts, can't wait for a demo of some kind <3
Logged

Alec S.
Level 10
*****


Formerly Malec2b


View Profile WWW
« Reply #19 on: October 07, 2012, 02:36:11 AM »

Yeah, I'm all for allowing rather silly guns into the mix, that's one of the joys of procedural generation.  The only two considerations are that the guns also double as boss battles (to get each gun, you have to defeat the king that uses the gun) plus the element of scarcity, I don't want the player to feel ripped off by one of the guns being massively under-powered.  The main problem with the "stupid gun" wasn't so much the knockback (although that was probably the most comical part of it), but the fact that the bullets moved slowly backwards.  The knockback had some issues of it's own, aside from sometimes being very high, as at the time the spread of the bullets added more to knockback than anything else.

But, anyway, the point is I want to balance having a system that creates many surprising weapons, but also craft in limitations in certain areas to make sure none are extra terrible or break the game in some way (some of the early guns would essentially create a swarm of bullets that flew around the screen and never left or moved far from their origin.  Spawn enough of those and the game seriously lags)
Logged

Pages: [1] 2
Print
Jump to:  

Theme orange-lt created by panic