December 21, 2024, 17:50:08

Author Topic: Freespace  (Read 85590 times)

Offline Mularac

  • Lieutenant
  • ***
  • Posts: 531
  • Karma: 11
    • View Profile
(No subject)
« Reply #25 on: January 22, 2010, 03:12:02 »
Hey Arpaso, would it be possible for you to let me take a look into the code effect behind those slow moving beams? I think they could be used in our mod

Offline Arparso

  • Administrator
  • Lieutenant
  • *****
  • Posts: 558
  • Karma: 14
  • I can see you...
    • View Profile
    • http://arparso.de/nexus
(No subject)
« Reply #26 on: January 22, 2010, 07:40:40 »
Well, you already have the efx code, but I just sent you an email including everything else regarding that beam weapon. ;)

Offline Mularac

  • Lieutenant
  • ***
  • Posts: 531
  • Karma: 11
    • View Profile
(No subject)
« Reply #27 on: January 22, 2010, 17:24:51 »
yes, thanks I got it. But I didn't mean those beams, just the smaller, slow-moving energy weapons. The ones used as anti-fighter weaponry in freespace. But I was thinking to use the freespace effect as a magna beam in the mod... :P

Offline Arparso

  • Administrator
  • Lieutenant
  • *****
  • Posts: 558
  • Karma: 14
  • I can see you...
    • View Profile
    • http://arparso.de/nexus
(No subject)
« Reply #28 on: January 22, 2010, 19:13:42 »
I'm not sure, which weapon you actually mean, I fear. Currently I have only 2 different beam weapons: the big green ones at the front of the Aeolus and the smaller blue beam, which is used as anti-fighter beam in Freespace 2 - both use more or less the same effect right now, the blue beam is just thinner.

Then there's the green "blob" turret you see in the video and the flak guns.

So.. which one do you want to look at?


Btw, now on moddb: Freespace: Evolution ;)

Offline Mularac

  • Lieutenant
  • ***
  • Posts: 531
  • Karma: 11
    • View Profile
(No subject)
« Reply #29 on: January 22, 2010, 21:16:15 »
the blob one

Offline Arparso

  • Administrator
  • Lieutenant
  • *****
  • Posts: 558
  • Karma: 14
  • I can see you...
    • View Profile
    • http://arparso.de/nexus
(No subject)
« Reply #30 on: January 22, 2010, 21:21:19 »
Ah ok, here are the start, travel and end efx:

Code: [Select]
EFX 60 // Terran Huge Turret
   
    NoModColor
    FLARE
        Type 11
        Size 300
        Color 1 1 1
ColorB 0.1 0.9 0.1
        Decay .5
        ShakeFactor .5
    FLARE
   
    STRIP
        Texture 12
        Length 10
        Radius 8
        Color 1 1 1
ColorB 0.1 0.9 0.1
        Additive
        Decay .5
    STRIP
   
    SOUND
Index 200 0
Level .92
SOUND
   
EFX

EFX 61
   
    NoModColor
    FLARE
        Type 10
        Size 160
        Color 1 1 1
ColorB 0.1 0.9 0.1
    FLARE
   
    SNAKE
        Texture 13
        TexScale 20
        SRadius 8
        Color 1 1 1
ColorB 0.1 0.9 0.1
        NodeDec .2
    SNAKE
   
EFX

EFX 62

    NoModColor
   
    Particle "Ship Impact" 1
   
    SOUND
        Index 4 7
        Level 1
    SOUND
   

EFX

Nothing special, really. The weapon seen in the video used that with a travel speed of 175.

Offline Mularac

  • Lieutenant
  • ***
  • Posts: 531
  • Karma: 11
    • View Profile
(No subject)
« Reply #31 on: January 22, 2010, 22:20:42 »
yes, these will come along nicely for the traveler ship main gun... a question, though: how did you reduce the length of the Snake trail? I always use Strip so I'm not too familiar with it's coding.

oh, and please add the GVC Sobek as soon as you can... I found it to be the best Freespace 2 ship EVER

Offline Arparso

  • Administrator
  • Lieutenant
  • *****
  • Posts: 558
  • Karma: 14
  • I can see you...
    • View Profile
    • http://arparso.de/nexus
(No subject)
« Reply #32 on: January 23, 2010, 11:34:41 »
NodeDec .2 is responsible for the snake's length in this case: the higher the value, the longer it takes for the snake trail to disappear and so the longer it gets.

Btw, is there a way to implement non-homing weapons in Nexus? It's especially obvious with those slow-moving blobs, that they actually don't fly in a straight line, but instead follow the target, if it's moving. That's a pretty strange behaviour for a plasma blob to act like a heat-seeking missile...

And yeah, the Sobek will be done soon enough, don't worry ;)

Offline Keldane

  • Specialist
  • *
  • Posts: 73
  • Karma: 0
    • View Profile
    • http://
(No subject)
« Reply #33 on: January 23, 2010, 12:09:29 »
The Snake effect seems to require something like a Flare to attach itself to. So far, I haven't been able to determine any difference between attaching a Strip and attaching a Snake to a Flare. It's a little off topic, and could I trouble you for a little clarification there? >_>

Offline Arparso

  • Administrator
  • Lieutenant
  • *****
  • Posts: 558
  • Karma: 14
  • I can see you...
    • View Profile
    • http://arparso.de/nexus
(No subject)
« Reply #34 on: January 23, 2010, 12:43:16 »
SNAKE and STRIP behave differently in a few aspects:

A STRIP always is of fixed length and goes in a straight line starting from the actual projectile's position in the opposite direction of the projectile's movement... or in other words: it shoots out of the back of the projectile in a straight, fixed-length line. A STRIP will always be straight out the back, even though your projectile might fly a sharp turn (because of a fast-moving target perhaps).

A SNAKE is of variable length and gets longer the faster the projectile flies. It'll not always go straight - if the projectile does a sharp turn, the SNAKE effect will bend and form a curve. It basically mimicks exhaust gases slowly fading away with the NodeDec property saying how fast it fades.

Look at engines and their (SNAKE) trail ... if those would be STRIPs, the trail wouldn't bend itself and always go straight out of the engines in case of the ship changing course.

Another difference is that STRIPs are there immediately after firing the projectile. SNAKES only appear after a short distance - after all, the exhaust gases first need to be emitted for the trail to become visible.

Btw, you don't need a FLARE to attach to... it'll just look strange, if there's no visible projectile the SNAKE or STRIP is attached to.

Offline Keldane

  • Specialist
  • *
  • Posts: 73
  • Karma: 0
    • View Profile
    • http://
(No subject)
« Reply #35 on: January 24, 2010, 02:23:29 »
Actually, all my experimenting has shown that if you don't have a Flare or similar effect to attach to, the Snake effect trails from the weapon's firing point. If the ship was moving, then it sort of shows behind the firing point, and if the ship was stock still, it slowly built up into a horizontal line that stretched across the entire screen (perpendicular to the path from the weapon to the target). I couldn't get it to fire forward in any way.

That said, thanks to you sharing your use of it I now know how to make use of it myself, and how to make the Flare vanish quickly so that all you see is the Snake as it travels. I haven't put it to use against fast moving targets yet, and against slower ones, it looks like a brilliant 'short laser' effect.

Offline Arparso

  • Administrator
  • Lieutenant
  • *****
  • Posts: 558
  • Karma: 14
  • I can see you...
    • View Profile
    • http://arparso.de/nexus
(No subject)
« Reply #36 on: January 24, 2010, 02:59:46 »
Thanks for the info about the FLARE... I only assumed you wouldn't need it, but didn't actually test it. Oh well, guess we can call that a bug then ;) (since it doesn't seem to make any sense)

About your effect - got any pics of it in action?

Offline Keldane

  • Specialist
  • *
  • Posts: 73
  • Karma: 0
    • View Profile
    • http://
(No subject)
« Reply #37 on: January 24, 2010, 04:21:20 »
There's still a bit of a tapered appearance, and that's a result of the blast actually fading as it reaches the tail.

The Flare that leads the effect has a both a Sustain and Decay of 0.1, so it vanishes pretty much immediately. The Snake is essentially the same as the one you used for your effect, Arparso, with a couple changes - I added an ERadius of 8, thinking that might get rid of the tapering, and changed the colour.

Offline Arparso

  • Administrator
  • Lieutenant
  • *****
  • Posts: 558
  • Karma: 14
  • I can see you...
    • View Profile
    • http://arparso.de/nexus
(No subject)
« Reply #38 on: January 25, 2010, 16:13:34 »
New images, yay! :)

Aeolus and fighters heading into battle:


Two Aeolus cruisers approaching each other firing blobs, flak and aaa beams:


Lovely beam cannons...


The new fighter warp-in effect:

Offline Keldane

  • Specialist
  • *
  • Posts: 73
  • Karma: 0
    • View Profile
    • http://
(No subject)
« Reply #39 on: January 25, 2010, 22:56:01 »
That fighter warp in solution is both visually awesome and brilliantly inventive, I think. Bravo, and I look forward to being able to maybe one day play this mod.

Out of curiosity, how do you capture video, Arparso?

Offline Arparso

  • Administrator
  • Lieutenant
  • *****
  • Posts: 558
  • Karma: 14
  • I can see you...
    • View Profile
    • http://arparso.de/nexus
(No subject)
« Reply #40 on: January 25, 2010, 23:42:14 »
I'm using Fraps for that task. Quite handy, displays the framerate, allows making screenshots and captures high-quality video and sound.

Offline Keldane

  • Specialist
  • *
  • Posts: 73
  • Karma: 0
    • View Profile
    • http://
(No subject)
« Reply #41 on: January 26, 2010, 01:15:03 »
I was afraid that's what you'd say. Fraps and I aren't on the best of terms, and I'll pick it up again nevertheless. Thanks for the info and the link!

Offline Arparso

  • Administrator
  • Lieutenant
  • *****
  • Posts: 558
  • Karma: 14
  • I can see you...
    • View Profile
    • http://arparso.de/nexus
(No subject)
« Reply #42 on: January 26, 2010, 02:24:24 »
I've heard good things about Xfire's video recording features as well, if you don't want to use Fraps for that. ;)

Offline Arparso

  • Administrator
  • Lieutenant
  • *****
  • Posts: 558
  • Karma: 14
  • I can see you...
    • View Profile
    • http://arparso.de/nexus
(No subject)
« Reply #43 on: January 26, 2010, 16:20:02 »
Finally some
gameplay
... hope you like it ;)

Offline Keldane

  • Specialist
  • *
  • Posts: 73
  • Karma: 0
    • View Profile
    • http://
(No subject)
« Reply #44 on: January 27, 2010, 05:29:48 »
That's more than a little badass. I can't wait to get my greedy little mitts on it.  :P

Offline Mularac

  • Lieutenant
  • ***
  • Posts: 531
  • Karma: 11
    • View Profile
(No subject)
« Reply #45 on: February 23, 2010, 17:58:25 »
Remember my former idea, Arparso? about the charging effect for beam weapons?
I found a way to enhance my original coding to make room for effictibly having as many beam weapons as the engine limitations would let you, using the same principle that the previous code.

In this 2.0 version, I saw no need of deleting the weapon, so I disable it instead. That way, it would be like having the weapon at all time, so assigning a place for it shouoldn't be a problem. Lets assume that the ship x has 4 beam weapons, beam_1, 2, 3 and 4. in slots labeled as 32, heavy weapons. then, the ship should have an other 4 "special" (34) slots for this weapons, whereas the 1° 34 slot is in the same place that the first 32 and so on. So when one of the weapons fires, I check which number is it and act accordingly. If the weapon ends with _3 then I install first the 1°, then the 2° and finally the 3°, but those weapons are different, they would be "travel_1", 2 and 3. So if the 4° weapon fires I just add the 4° travel one. Then every "start" weapon has it's own "travel" one already installed and ready to be used.

So the only real issue left is the fact that each beam weapons counts for 2 in placing the hardpoints for the ship...

Anyhow, here's the code, perhaps you can put good use to it, or use your coding magic with it. The code can support multiple of different beams, for example, I made the code with a terrant and vasudan beam in mind, but it can easily be expanded into more than that.

Code: [Select]
Machine "beam"
State Fire
Rule event in
:action
SelectEx(s.device&InSet(s.this, 32),   //I'm wonna work here under the assumption that all the "start" laser weapons have been labeled as "heavy" and that the "travel" terran_beam weapons as "special", in the set category
RequestFiredEvent(s.this,1);
);
:end
END

Rule event Fired
condition IsValid(E.location)&InSet(e.location,32)
:action
Debug("Fired1. The ship is:", e.location:owner, "and the weapon:", e.location);
e.ownr:=e.location:owner;
e.targ:=e.location:target;
ChooseFirst(
e.location:devtype = #terran_beam_start_1,
Timer(Open_Fire_1, 1.9, e.target:=p.targ;e.ownr:=p.ownr;e.Numterran_beams:=p.Numterran_beams;e.race:=1); //1 is for terrans, 2 for vasudans
, e.location:devtype = #vasudan_beam_start_1,
Timer(Open_Fire_1, 1.9, e.target:=p.targ;e.ownr:=p.ownr;e.Numterran_beams:=p.Numterran_beams;e.race:=2);
, e.location:devtype = #terran_beam_start_2,
Timer(Open_Fire_2, 1.9, e.target:=p.targ;e.ownr:=p.ownr;e.Numterran_beams:=p.Numterran_beams;e.race:=1);
, e.location:devtype = #vasudan_beam_start_2,
Timer(Open_Fire_2, 1.9, e.target:=p.targ;e.ownr:=p.ownr;e.Numterran_beams:=p.Numterran_beams;e.race:=2);
, e.location:devtype = #terran_beam_start_3,
Timer(Open_Fire_3, 1.9, e.target:=p.targ;e.ownr:=p.ownr;e.Numterran_beams:=p.Numterran_beams;e.race:=1);
, e.location:devtype = #vasudan_beam_start_3,
Timer(Open_Fire_3, 1.9, e.target:=p.targ;e.ownr:=p.ownr;e.Numterran_beams:=p.Numterran_beams;e.race:=2);
, e.location:devtype = #terran_beam_start_4,
Timer(Open_Fire_4, 1.9, e.target:=p.targ;e.ownr:=p.ownr;e.Numterran_beams:=p.Numterran_beams;e.race:=1);
, e.location:devtype = #vasudan_beam_start_4,
Timer(Open_Fire_4, 1.9, e.target:=p.targ;e.ownr:=p.ownr;e.Numterran_beams:=p.Numterran_beams;e.race:=2);
);  //we check with "start" weapon was fired, the 1°, 2°,3° or 4°
:end
END

Rule event Open_Fire_1
condition IsValid(e.target)&IsValid(e.ownr)
:action
Debug("the ship is:", e.ownr, "and the target:", e.target);
If(AllNumOf(1) = 0,
if(e.race = 1,
InstallDevice(e.ownr, #terran_beam_travel_1);  //if the ship doesn't have a "travel" weapon, we install one.
SelectDevices(1, e.ownr, s.this:devtype=#terran_beam_travel_1);
,
InstallDevice(e.ownr, #vasudan_beam_travel_1);
SelectDevices(1, e.ownr, s.this:devtype=#vasudan_beam_travel_1);
);
);
ExecList(1,
EnableDevice(s.this,1);
RequestFiredEvent(s.this,1);
TargetWeapon(s.this, e.target);
);
:end
END

Rule event Open_Fire_2
condition IsValid(e.target)&IsValid(e.ownr)
:action
SelectDevices(1, e.ownr, InSet(s.this, 34));
if(e.race = 1,
ChooseFirst(
AllNumOf(1) = 0,           //if there weren't any other weapon in the previous slots, I fill the places nontheless, so that when I finall install the corresponding weapon, it'll be on the right spot.
InstallDevice(e.ownr, #terran_beam_travel_1);
InstallDevice(e.ownr, #terran_beam_travel_2);
, AllNumOf(1) = 1,
InstallDevice(e.ownr, #terran_beam_travel_2);
);
SelectDevices(1, e.ownr, s.this:DevType=#terran_beam_travel_2);
,
ChooseFirst(
AllNumOf(1) = 0,          
InstallDevice(e.ownr, #vasudan_beam_travel_1);
InstallDevice(e.ownr, #vasudan_beam_travel_2);
, AllNumOf(1) = 1,
InstallDevice(e.ownr, #vasudan_beam_travel_2);
);
SelectDevices(1, e.ownr, s.this:DevType=#vasudan_beam_travel_2);
);
ExecList(1,
EnableDevice(s.this,1); //we enable it, in case it was disabled
RequestFiredEvent(s.this,1);
TargetWeapon(s.this, e.target);
);
:end
END

Rule event Open_Fire_3
condition IsValid(e.target)&IsValid(e.ownr)
:action
SelectDevices(1, e.ownr, InSet(s.this, 34));
if(e.race = 1,
ChooseFirst(
AllNumOf(1) = 0,           //if there weren't any other weapon in the previous slots, I fill the places nontheless, so that when I finall install the corresponding weapon, it'll be on the right spot.
InstallDevice(e.ownr, #terran_beam_travel_1);
InstallDevice(e.ownr, #terran_beam_travel_2);
InstallDevice(e.ownr, #terran_beam_travel_3);
, AllNumOf(1) = 1,
InstallDevice(e.ownr, #terran_beam_travel_2);
InstallDevice(e.ownr, #terran_beam_travel_3);
, AllNumOf(1) = 2,
InstallDevice(e.ownr, #terran_beam_travel_3);
);
SelectDevices(1, e.ownr, s.this:DevType=#terran_beam_travel_3);
,
ChooseFirst(
AllNumOf(1) = 0,          
InstallDevice(e.ownr, #vasudan_beam_travel_1);
InstallDevice(e.ownr, #vasudan_beam_travel_2);
InstallDevice(e.ownr, #vasudan_beam_travel_3);
, AllNumOf(1) = 1,
InstallDevice(e.ownr, #vasudan_beam_travel_2);
InstallDevice(e.ownr, #vasudan_beam_travel_3);
, AllNumOf(1) = 2,
InstallDevice(e.ownr, #vasudan_beam_travel_3);
);
SelectDevices(1, e.ownr, s.this:DevType=#vasudan_beam_travel_3);
);
ExecList(1,
EnableDevice(s.this,1); //we enable it, in case it was disabled
RequestFiredEvent(s.this,1);
TargetWeapon(s.this, e.target);
);
:end
END

Rule event Open_Fire_4
condition IsValid(e.target)&IsValid(e.ownr)
:action
SelectDevices(1, e.ownr, InSet(s.this, 34));
if(e.race = 1,
ChooseFirst(
AllNumOf(1) = 0,           //if there weren't any other weapon in the previous slots, I fill the places nontheless, so that when I finall install the corresponding weapon, it'll be on the right spot.
InstallDevice(e.ownr, #terran_beam_travel_1);
InstallDevice(e.ownr, #terran_beam_travel_2);
InstallDevice(e.ownr, #terran_beam_travel_3);
InstallDevice(e.ownr, #terran_beam_travel_4);
, AllNumOf(1) = 1,
InstallDevice(e.ownr, #terran_beam_travel_2);
InstallDevice(e.ownr, #terran_beam_travel_3);
InstallDevice(e.ownr, #terran_beam_travel_4);
, AllNumOf(1) = 2,
InstallDevice(e.ownr, #terran_beam_travel_3);
InstallDevice(e.ownr, #terran_beam_travel_4);
, AllNumOf(1) = 3,
InstallDevice(e.ownr, #terran_beam_travel_4);
);
SelectDevices(1, e.ownr, s.this:DevType=#terran_beam_travel_4);
,
ChooseFirst(
AllNumOf(1) = 0,          
InstallDevice(e.ownr, #vasudan_beam_travel_1);
InstallDevice(e.ownr, #vasudan_beam_travel_2);
InstallDevice(e.ownr, #vasudan_beam_travel_3);
InstallDevice(e.ownr, #vasudan_beam_travel_4);
, AllNumOf(1) = 1,
InstallDevice(e.ownr, #vasudan_beam_travel_2);
InstallDevice(e.ownr, #vasudan_beam_travel_3);
InstallDevice(e.ownr, #vasudan_beam_travel_4);
, AllNumOf(1) = 2,
InstallDevice(e.ownr, #vasudan_beam_travel_3);
InstallDevice(e.ownr, #vasudan_beam_travel_4);
, AllNumOf(1) = 3,
InstallDevice(e.ownr, #vasudan_beam_travel_4);
);
SelectDevices(1, e.ownr, s.this:DevType=#vasudan_beam_travel_4);
);
ExecList(1,
EnableDevice(s.this,1); //we enable it, in case it was disabled
RequestFiredEvent(s.this,1);
TargetWeapon(s.this, e.target);
);
:end
END

Rule event Fired
Condition IsValid(E.location)&InSet(e.location,34)
:action
Debug("The ship that fires is:", e.location:owner, "and the weapon is:", e.location);
EnableDevice(e.location,0);
e.weap:=e.location;
Debug("Fired2. The ship is:", e.location:owner, "and the target:", e.location:target);
Timer(DisableDevice, 3, e.weap:=p.weap);
:end
END

Rule event DisableDevice
:action
EnableDevice(e.weap,0);
:end
END
END
END

Offline Arparso

  • Administrator
  • Lieutenant
  • *****
  • Posts: 558
  • Karma: 14
  • I can see you...
    • View Profile
    • http://arparso.de/nexus
(No subject)
« Reply #46 on: February 23, 2010, 20:48:16 »
I'm a tad short on time lately, but I'll have a look at it. ;)

Quote
So the only real issue left is the fact that each beam weapons counts for 2 in placing the hardpoints for the ship...
Still sounds somewhat like a dealbreaker... I'm already running into some severe problems regarding the limited weapon hardpoints on the bigger ships, so I really don't have any to spare. :(

Offline Arparso

  • Administrator
  • Lieutenant
  • *****
  • Posts: 558
  • Karma: 14
  • I can see you...
    • View Profile
    • http://arparso.de/nexus
(No subject)
« Reply #47 on: February 28, 2010, 22:01:59 »
What I'm currently working on:
(the ships, not the icons - those are obviously done already ;) )



Offline Mularac

  • Lieutenant
  • ***
  • Posts: 531
  • Karma: 11
    • View Profile
(No subject)
« Reply #48 on: February 28, 2010, 22:03:46 »
uhm... I don't remember the last two capital ships... did they appear on fs2?

Offline Arparso

  • Administrator
  • Lieutenant
  • *****
  • Posts: 558
  • Karma: 14
  • I can see you...
    • View Profile
    • http://arparso.de/nexus
(No subject)
« Reply #49 on: February 28, 2010, 22:49:35 »
The fourth is a Typhon-class destroyer, which already appeared in the first game, and the last icon is a Hatshepsut-class destroyer making its first appearance in the first mission of FS2, right after the tutorial missions.