Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/particle speed up #24

Merged
merged 2 commits into from Aug 6, 2014
Merged

Conversation

Copy link
Contributor

@titison titison commented Jul 29, 2014

With this feature you can speed up particles.
For example with negative speed + spherical shape you can make very nice effects.

Syntax

 <speedUp constant="-0.03" relative="0.03"/>

Both are optional ( so you could do <speedUp constant="-0.03"/> aswell ), but can be combined aswell.

Constant means that each cycle a percentage of the start speed is added
Relative means that each cycle a percentage of the current speed is added

Here are some Examples which you can see here:

Here are the Xmls of the Examples:
The "lines"

<unit-particle-system>
        <texture value="true" path="images/particle.bmp" luminance="true"/>
    <mode value="normal"/>
    <primitive value="quad"/>
    <offset x="-1" y="1" z="0.5"/>
    <direction x="0.03" y="0" z="0"/>
    <color red="1" green="1" blue="1" alpha="1" />
    <color-no-energy red="0" green="0" blue="1" alpha="1" />
        <radius value="0" />
        <size value="0.1" />
        <size-no-energy value="0.4" />
        <speed value="2.0" />
    <speedUp constant="0" relative="0.01"/> / <speedUp constant="0.01" relative="0"/>
    <gravity value="0"/>
        <emission-rate value="0.5" />
        <energy-max value="170" />
        <energy-var value="0" />
    <relative value="true" />
        <fixed value="true" />
        <teamcolorNoEnergy value="false" />
        <teamcolorEnergy value="false" />
</unit-particle-system>

The "ball":

<unit-particle-system>
        <texture value="true" path="images/particle.bmp" luminance="true"/>
    <mode value="normal"/>
    <shape value="spherical">
        <angle value="90"/>
    </shape>
    <primitive value="quad"/>
    <offset x="0" y="0" z="1"/>
    <direction x="1.0" y="0" z="0"/>
    <color red="1" green="1" blue="1" alpha="1" />
    <color-no-energy red="0" green="0" blue="1" alpha="1" />
        <radius value="0.1" />
        <size value="0.1" />
        <size-no-energy value="0.4" />
        <speed value="2.0" />
    <speedUp constant="-0.03" relative="-0.007"/>
    <gravity value="0"/>
        <emission-rate value="0.5" />
        <energy-max value="70" />
        <energy-var value="0" />
    <relative value="true" />
        <fixed value="true" />
        <teamcolorNoEnergy value="false" />
        <teamcolorEnergy value="false" />
    <alternations value="1" />
</unit-particle-system>

The "Ring"

<unit-particle-system>
        <texture value="true" path="images/particle.bmp" luminance="true"/>
    <mode value="normal"/>
    <shape value="conical">
       <angle value="90" />
        </shape>
    <primitive value="quad"/>
    <offset x="0" y="-0.9" z="0"/>
    <direction x="0.0" y="1" z="0"/>
    <color red="1" green="1" blue="1" alpha="1" />
    <color-no-energy red="0" green="0" blue="1" alpha="1" />
        <radius value="0" />
        <size value="0.1" />
        <size-no-energy value="0.4" />
        <speed value="2.0" />
    <speedUp constant="0" relative="-0.05"/>
    <gravity value="0"/>
        <emission-rate value="0.5" />
        <energy-max value="170" />
        <energy-var value="0" />
    <relative value="true" />
        <fixed value="true" />
        <teamcolorNoEnergy value="false" />
        <teamcolorEnergy value="false" />
</unit-particle-system>

The Crown

<unit-particle-system>
        <texture value="true" path="images/particle.bmp" luminance="true"/>
    <mode value="normal"/>
    <shape value="conical">
       <angle value="90" />
        </shape>
    <primitive value="quad"/>
    <offset x="0" y="0.9" z="0"/>
    <direction x="0.0" y="0.1" z="0"/>
    <color red="1" green="1" blue="1" alpha="1" />
    <color-no-energy red="0" green="0" blue="1" alpha="1" />
        <radius value="0" />
        <size value="0.2" />
        <size-no-energy value="1" />
        <speed value="2.0" />
    <speedUp constant="0" relative="-0.05"/>
    <gravity value="-0.05"/>
        <emission-rate value="0.5" />
        <energy-max value="230" />
        <energy-var value="0" />
    <relative value="true" />
        <fixed value="true" />
        <teamcolorNoEnergy value="false" />
        <teamcolorEnergy value="false" />
</unit-particle-system>

@titiger
Copy link
Member

@titiger titiger commented Aug 2, 2014

Please discribe/discuss this in forum. Maybe others have more ideas on this.

titiger added a commit that referenced this issue Aug 6, 2014
@titiger titiger merged commit bf5125f into MegaGlest:develop Aug 6, 2014
1 check passed
@titison titison deleted the feature/particle-speedUp branch Oct 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants