| Gun system | |
|
|
|
Author | Message |
---|
Neko Admin
Number of posts : 490 Registration date : 2009-02-22 Age : 28
| Subject: Gun system Wed Nov 11, 2009 10:19 am | |
| | |
|
| |
Hegemege Moderator
Number of posts : 919 Registration date : 2009-02-21 Age : 31 Location : Helsinki, Finland
| Subject: Re: Gun system Wed Nov 11, 2009 10:55 pm | |
| It's okay but I'm not sure if it will be usefull... Anyways, thanks | |
|
| |
Neko Admin
Number of posts : 490 Registration date : 2009-02-22 Age : 28
| Subject: Re: Gun system Wed Nov 11, 2009 11:36 pm | |
| - Hegemege wrote:
- It's okay but I'm not sure if it will be usefull... Anyways, thanks
Its better than making 5000 guns by hand... PS, press space to randomize the components. | |
|
| |
Commander~DEST Admin
Number of posts : 1499 Registration date : 2009-01-16 Age : 29 Location : Quispamsis, New Brunswick, Canada
| Subject: Re: Gun system Wed Nov 11, 2009 11:44 pm | |
| We might be able to use to make enemies have random weapons (with different parameters for different enemies, of course). It owuld add variety to the game and it would be very easy to incorporate this into the game. | |
|
| |
Neko Admin
Number of posts : 490 Registration date : 2009-02-22 Age : 28
| Subject: Re: Gun system Wed Nov 11, 2009 11:47 pm | |
| - Commander~DEST wrote:
- We might be able to use to make enemies have random weapons (with different parameters for different enemies, of course). It owuld add variety to the game and it would be very easy to incorporate this into the game.
Having the game run on mostly random generations allows us to add more into the game. Enemies can also drop there randomly generated items, Shops can also provide randomly generated weapons too. | |
|
| |
Hegemege Moderator
Number of posts : 919 Registration date : 2009-02-21 Age : 31 Location : Helsinki, Finland
| Subject: Re: Gun system Thu Nov 12, 2009 12:34 am | |
| Did you use choose(x) or floor(random(x))?
Anyways, we have to limit the enemies weapons in a way, the first enemies cant have bazookas and ultra snipers... But the idea is good! We can modify it to randomize enemies, but we have to somehow organize, what enemies come at a given time. However totally randomized enemies can be used in the other game modes. | |
|
| |
Neko Admin
Number of posts : 490 Registration date : 2009-02-22 Age : 28
| Subject: Re: Gun system Thu Nov 12, 2009 12:48 am | |
| Just an idea... The weapons that spawn are only good due to the components, which good components are really hard to find at lower levels, that means most enemies are going to have sucky weapons... And not just the components are rare, the chance that the enemy will even have a bazooka is small. The weapon creation is also going to involve component levels and all that so you don't have any overpowered level 1s and all. | |
|
| |
Hegemege Moderator
Number of posts : 919 Registration date : 2009-02-21 Age : 31 Location : Helsinki, Finland
| Subject: Re: Gun system Thu Nov 12, 2009 1:06 am | |
| Good, I can help you with the probabilities if you want. | |
|
| |
Neko Admin
Number of posts : 490 Registration date : 2009-02-22 Age : 28
| Subject: Re: Gun system Thu Nov 12, 2009 1:11 am | |
| I was thinking that, programmers here at DP have nothing good to do right now. So i was thinking to get the programmers to help with this random gun engine thing. | |
|
| |
Hegemege Moderator
Number of posts : 919 Registration date : 2009-02-21 Age : 31 Location : Helsinki, Finland
| Subject: Re: Gun system Thu Nov 12, 2009 1:31 am | |
| You can use a switch statement. to make a part of the gun more common, add more cases and remember to increase the number of barrels/bodies. To make the random function produce more powerful weapons, make a new function, just replace the common and sucky weapons. Example:
//random_pistol()
n1 = number_of_barrels //here: 3 gun_barrel = floor(random(n1))
switch(gun_barrel) { case 0: { gun_barrel_type="Basic Pistol Barrel"} break; case 1: { gun_barrel_type="Silenced Pistol Barrel"} break; case 2: { gun_barrel_type="Accurate Pistol Barrel"} break; default: { gun_barrel_type="Basic Pistol Barrel"} break; }
n2 = number_of_bodies //here: 3 gun_body = floor(random(n2))
switch(gun_body) { case 0: { gun_body_type="Basic Pistol Body"} break; case 1: { gun_body_type="Hardened Pistol Body"} break; case 2: { gun_body_type="Rusty Pistol Body"} break; default: { gun_body_type="Basic Pistol Body"} break; }
and the same thing for other components. You should copy a blank template when you include these functions into the game so you need to type less and there less errors too.
Last edited by Hegemege on Thu Nov 12, 2009 1:35 am; edited 1 time in total | |
|
| |
Neko Admin
Number of posts : 490 Registration date : 2009-02-22 Age : 28
| Subject: Re: Gun system Thu Nov 12, 2009 1:32 am | |
| :O... Im lost, im not that big on programming anymore. | |
|
| |
Hegemege Moderator
Number of posts : 919 Registration date : 2009-02-21 Age : 31 Location : Helsinki, Finland
| Subject: Re: Gun system Thu Nov 12, 2009 1:34 am | |
| I haven't used GM for a month or so... | |
|
| |
Neko Admin
Number of posts : 490 Registration date : 2009-02-22 Age : 28
| Subject: Re: Gun system Thu Nov 12, 2009 1:37 am | |
| Your aslo a freakin genious. | |
|
| |
Hegemege Moderator
Number of posts : 919 Registration date : 2009-02-21 Age : 31 Location : Helsinki, Finland
| Subject: Re: Gun system Thu Nov 12, 2009 1:49 am | |
| well thank you | |
|
| |
Commander~DEST Admin
Number of posts : 1499 Registration date : 2009-01-16 Age : 29 Location : Quispamsis, New Brunswick, Canada
| Subject: Re: Gun system Thu Nov 12, 2009 7:26 am | |
| Everything I've read here is great. We really do need to get what programmers we have on this job.
BTW: Hegemege, nice script. I never even knew about the switch statement. | |
|
| |
Neko Admin
Number of posts : 490 Registration date : 2009-02-22 Age : 28
| Subject: Re: Gun system Thu Nov 12, 2009 7:31 am | |
| Switch is like a crap load of compairing and all. | |
|
| |
Hegemege Moderator
Number of posts : 919 Registration date : 2009-02-21 Age : 31 Location : Helsinki, Finland
| Subject: Re: Gun system Thu Nov 12, 2009 5:53 pm | |
| Switch can replace many if-statements. And switch is also faster. | |
|
| |
Hacker
Number of posts : 98 Registration date : 2009-11-12 Location : Lost in the Binary... Help me...!
| Subject: Re: Gun system Thu Nov 12, 2009 11:33 pm | |
| Switch is very faster if your including probability, but if not, its something to be wary of. | |
|
| |
Nragemachine
Number of posts : 296 Registration date : 2009-02-25 Location : Illinois
| Subject: Re: Gun system Fri Nov 13, 2009 4:10 am | |
| So I'm somewhat confused as to what this actually is? So does it just randomly generate weapons for enemies with specific add-ons and stats like scopes and stuff or is it a way of taking random gun parts together and making them into one gun like frankenstein? | |
|
| |
Neko Admin
Number of posts : 490 Registration date : 2009-02-22 Age : 28
| Subject: Re: Gun system Fri Nov 13, 2009 5:41 am | |
| Its randomly putting together random components. The problem now is that it can randomly add a component to any gun... A level 1 enemy could have a super awesome level 30 gun because theres no limits right now. | |
|
| |
Hacker
Number of posts : 98 Registration date : 2009-11-12 Location : Lost in the Binary... Help me...!
| Subject: Re: Gun system Fri Nov 13, 2009 6:20 am | |
| Yep thats a problem, why not use unlinear equations, maybe something equal to a semicircle? | |
|
| |
Neko Admin
Number of posts : 490 Registration date : 2009-02-22 Age : 28
| Subject: Re: Gun system Fri Nov 13, 2009 6:25 am | |
| Im thinking off assigning each of the parts a few variable... Rarity,level, that stuff. So a gun can never be overpowered or underpowered. | |
|
| |
Hacker
Number of posts : 98 Registration date : 2009-11-12 Location : Lost in the Binary... Help me...!
| Subject: Re: Gun system Fri Nov 13, 2009 6:32 am | |
| Again, that would be a perfect example of using arrays. | |
|
| |
Hegemege Moderator
Number of posts : 919 Registration date : 2009-02-21 Age : 31 Location : Helsinki, Finland
| Subject: Re: Gun system Fri Nov 13, 2009 3:31 pm | |
| Indeed. Or just make many functions which output something like:
Level 1-3 Pistols Level 11-16 Machine Guns Level 7-10 Any Weapon | |
|
| |
Hacker
Number of posts : 98 Registration date : 2009-11-12 Location : Lost in the Binary... Help me...!
| Subject: Re: Gun system Fri Nov 13, 2009 10:29 pm | |
| Your going about it all wrong, you need to make a x and y relationship with ONE equation. I personally would need to graph this before I was sure about it. | |
|
| |
Sponsored content
| Subject: Re: Gun system | |
| |
|
| |
| Gun system | |
|