Author Topic: [done]Multi shots  (Read 1428 times)

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,226
    • View Profile
    • http://www.titusgames.de
[done]Multi shots
« on: 10 July 2014, 08:52:09 »
As it turned out the idea with the child particles wasn't that good we ( FreshDumbledor and me ) started to create real multi shots.
Our current state is that you can several shot aprticle systems. Those start at the same time and hit the same target, but can start from different positions ( and all what is possible with 2 different particle systems ).

Things we still think about:
Damage per projectile:
At the current state the damage is calculated for both shots, so two shots, double damage.

Splash damage:
At the current state only one splash particle is played back and only one splash damage is calculated.

Start time:
At the moment there is no way to let the two shots start in different moments ( Imagine a fighter  with two guns in his hand shooting with one after another in one animation.)
If we start in different moments, we would need one splash per shot !

Not directly related at the moment, but maybe worth thinking about is "multi attack":
One unit attacks more than one unit at a time.
« Last Edit: 28 July 2014, 00:29:57 by titi »
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

FreshDumbledore

  • Guard
  • ***
  • Posts: 61
    • View Profile
Re: Multi shots
« Reply #1 on: 11 July 2014, 15:21:49 »
Not directly related at the moment, but maybe worth thinking about is "multi attack":
One unit attacks more than one unit at a time.

similar to splash but not with a radius but a range to the left/right or whats the idea/difference to splash?

Coldfusionstorm

  • Golem
  • ******
  • Posts: 868
    • View Profile
Re: Multi shots
« Reply #2 on: 12 July 2014, 01:21:52 »
Super interesting Topic, Il look inhere, and perhaps sneak in a thought or two later. (it's late right now).
WiP Game developer.
I do danish translations.
"i break stuff"

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,226
    • View Profile
    • http://www.titusgames.de
Re: Multi shots
« Reply #3 on: 14 July 2014, 15:07:56 »
Current state of thinking is: We will allow multiple projectiles per attack each starting in different moments ( if you want ) and each has his own particle system, own splash system, own hitsound and own cameraShake.
Beside of this we are planning to allow multiple sounds at different moments on each skill.

Code: [Select]
            <sound enabled="true" start-time="0.5">
                <sound-file path="sounds/bug1.wav"/>
                <sound-file path="sounds/bug5.wav"/>
                <sound-file path="sounds/bug7.wav"/>
            </sound>
           <sound enabled="true" start-time="0.3">
                <sound-file path="sounds/bug2.wav"/>
            </sound>
           <sound enabled="true" start-time="0.1">
                <sound-file path="sounds/bug3.wav"/>
            </sound>
<projectiles value="true">
    <projectile  start-time="0.25">
        <particle value="true" path="particle_proj.xml"/>
        <sound enabled="true">
                <sound-file path="../yumi_ashigaru/sounds/arrow_hita.wav"/>
                <sound-file path="$COMMONDATAPATH/sounds/archmage_hit2.wav"/>
         </sound>
        <shake enabled="true" intensity="10" duration="40" visible="true" in-camera-view="true" camera-distance-affected="true"/>
        <splash value="true">
                <radius value="0"/>
                <damage-all value="true"/>
                <particle value="true" path="particle_splash.xml"/>
         </splash>
    </projectile>
    <projectile  start-time="0.25">
        <particle value="true" path="particle_proj.xml"/>
        <sound enabled="true">
                <sound-file path="../yumi_ashigaru/sounds/arrow_hita.wav"/>
                <sound-file path="$COMMONDATAPATH/sounds/archmage_hit2.wav"/>
         </sound>
        <splash value="true">
                <radius value="0"/>
                <damage-all value="true"/>
                <particle value="true" path="particle_splash.xml"/>
         </splash>
    </projectile>
</projectiles>

Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,226
    • View Profile
    • http://www.titusgames.de
Re: Multi shots
« Reply #4 on: 17 July 2014, 23:07:19 »
ok thats what we have so far, you can now define multiple independent projectiles:

changes are in  feature/multishot branch

Code: [Select]
<skill>
<type value="attack"/>
<name value="attack_skill"/>
<ep-cost value="0"/>
<speed value="100"/>
<anim-speed value="100"/>
<animation path="models/laserspider_attack.g3d"/>
<sound enabled="true" start-time="0.5">
<sound-file path="sounds/bug1.wav"/>
</sound>
<attack-strenght value="90"/>
<attack-var value="40"/>
<attack-range value="8"/>
<attack-type value="bite"/>
<attack-fields>
<field value="land"/>
</attack-fields>
<attack-start-time value="0.25"/>

<projectiles>
<projectile attack-start-time="0.25">
<particle value="true" path="particle_proj2.xml"/>
<sound enabled="false">
<sound-file path="$COMMONDATAPATH/sounds/archmage_hit1.wav"/>
<sound-file path="$COMMONDATAPATH/sounds/archmage_hit2.wav"/>
<sound-file path="$COMMONDATAPATH/sounds/archmage_hit3.wav"/>
<sound-file path="$COMMONDATAPATH/sounds/archmage_hit4.wav"/>
</sound>
</projectile>
<projectile attack-start-time="0.7">
<particle value="true" path="particle_proj.xml"/>
<sound enabled="false">
<sound-file path="$COMMONDATAPATH/sounds/archmage_hit1.wav"/>
<sound-file path="$COMMONDATAPATH/sounds/archmage_hit2.wav"/>
<sound-file path="$COMMONDATAPATH/sounds/archmage_hit3.wav"/>
<sound-file path="$COMMONDATAPATH/sounds/archmage_hit4.wav"/>
</sound>
</projectile>
</projectiles>
<splash value="true">
<radius value="3"/>
<damage-all value="false"/>
<particle value="true" path="particle_splash.xml"/>
</splash>
</skill>
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,226
    • View Profile
    • http://www.titusgames.de
Re: Multi shots
« Reply #5 on: 20 July 2014, 11:08:48 »
Nearly all is done now.

https://www.youtube.com/watch?v=ccYUlne6OPE

A little problem we have is the damage calculation. Current state gives full damage of the skill for every projectile beeing fired. I now have the idea to use percent which can(must?) be given to multi shots.
Example:
The skill has a damage of 200. It has 3 shots. 2 small projectiles and one big rocket. Now we can give the small projectiles a damage of 20% each and the big rocket a damage of 60%.

You might ask, why not define a damage for each projectile? The answer is that its not possible to show this kind of detail to a player while playing. Not having a attack skill only have one damage will also break some exsiting scripts t build up techtree html or other kind of tools some people wrote to see the balance of the factions.

So what do you think about the idea of simply using percentage for each projectile to calculate damage ?
« Last Edit: 20 July 2014, 11:23:50 by titi »
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Multi shots
« Reply #6 on: 20 July 2014, 15:41:03 »
Sounds good to me. And if the damage is not specified, we can assume a uniform distribution.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,226
    • View Profile
    • http://www.titusgames.de
Re: Multi shots[done]
« Reply #7 on: 23 July 2014, 17:58:21 »
This feature is done now and available in git release branch. For those who wants to test, here are the binaries/executables :
http://snapshots.megaglest.org/

here is an example of an attack skill using these features:
Code: [Select]
<skill>
<type value="attack"/>
<name value="attack_skill"/>
<ep-cost value="0"/>
<speed value="100"/>
<anim-speed value="100"/>
<animation path="models/laserspider_attack.g3d"/>
<sound enabled="true" start-time="0.25">
<sound-file path="sounds/shot.ogg"/>
</sound>
<sound enabled="true" start-time="0.7">
<sound-file path="sounds/shot.ogg"/>
</sound>
<attack-strenght value="90"/>
<attack-var value="40"/>
<attack-range value="20"/>
<attack-type value="bite"/>
<attack-fields>
<field value="land"/>
</attack-fields>
<attack-start-time value="0.25"/>

<projectiles>
<projectile attack-start-time="0.25" damage-percentage="10">
<particle path="particle_proj2.xml"/>
<hitsound enabled="true">
<sound-file path="sounds/bug1.wav"/>

</hitsound>
<hitshake enabled="true" intensity="1000" duration="40" visible="true" in-camera-view="false" camera-distance-affected="false"/>
</projectile>
<projectile attack-start-time="0.7" damage-percentage="90">
<particle value="true" path="particle_proj.xml"/>
<hitsound enabled="true">
<sound-file path="sounds/bug1.wav"/>
</hitsound>
</projectile>
</projectiles>
<splash value="true">
<radius value="3"/>
<damage-all value="false"/>
<particle value="true" path="particle_splash.xml"/>
</splash>
<hitsound enabled="true">
<sound-file path="sounds/daemon_die3.wav"/>
</hitsound>
</skill>
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

 

anything