Author Topic: fighter beams  (Read 45446 times)

0 Members and 1 Guest are viewing this topic.

Offline Inquisitor

K, post the code, fighter beams is something people are hot for.

I'll edit it in myself if I have to ;)

37097749 is my ICQ. I just had a power outage, so I got knocked offline for a while (need to find a way to back up the power to the cable in my 'hood ;)).
« Last Edit: July 15, 2002, 06:47:57 am by 122 »
No signature.

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
I think I see two errors in that

struct HullLightPoint
{
vector point; //bank->pnt[j]
vector norm; //pant->norm[j]
float radius; //bank->radius[j] <<<< float not vector
};

struct HullLights // pm->glows[q]
{
int disp_time; //bank->disp_time
int on_time //bank->on_time
int off_time; //bank->off_time
int obj_parent; //bank->submodel_parent
int LOD; // bank->LOD
int num_Lights; // bank->num_slots
HullLightPoint* lights;
int glow_bitmap;//bank->glow_bitmap  <<<< don't forget this it goes to the texture index of the texture used by this bank
};

struct GLOW
{
int num_glows_arrays; // pm->n_glows
HullLights *lights; //pm->glows
};


I guess I should have mentioned this diference to the internal thruster structure, were the thruster code has the subsystem string for the engine it belongs to, my loading code expects to find the name of a texture file, in this format
$glow_texture=xxx
xxx is the name of the texture file, with no extension
it then loads it and puts the texture index number into bank->glow_bitmap


unknown chunks look like they have an mprintf error mesage wich I think gets knocked out in relese builds, then it looks at the next chunk

so basicly it ignors them


oddly enough :), pof loading is covered in the read_model_file function in ModelRead.ccp

edit: I need to type faster :rolleyes:

another edit: and I don't remember if that is the only change I made for the new fighter beam code or not, but I think it is
« Last Edit: July 14, 2002, 09:23:14 pm by 57 »
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
I just cleaned house and reinserted that code and the crashing bug died, unfortunately I forgot to post the glow point blink code so I have to remember how I did it
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
I'm uploading a new copy of the FS3.exe, the blink code still isn't working again, but the fighter beam code is and it doesn't crash with capships,
note I made one small change that I havn't tested yet if the game crashes after a ship gets killed by a fighter beam, this is what is causeing it, but if fighter beam kills are now being recorded it means I found the bug in that :)

only thing I think I have to fix yet is the sound code, make it a real looping beam sound
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline LtNarol

  • Biased Banshee
  • 211
    • http://www.3dap.com/hlp/hosted/the158th
Quote
Originally posted by Bobboau
I'm uploading a new copy of the FS3.exe, the blink code still isn't working again, but the fighter beam code is and it doesn't crash with capships,
note I made one small change that I havn't tested yet if the game crashes after a ship gets killed by a fighter beam, this is what is causeing it, but if fighter beam kills are now being recorded it means I found the bug in that :)

only thing I think I have to fix yet is the sound code, make it a real looping beam sound
w00t! good work man, keep it up!

 

Offline Inquisitor

So, are you gonna post your source as well?

Or is it all here in this thread?
« Last Edit: July 15, 2002, 08:14:58 am by 122 »
No signature.

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
i need to know the ASCII 4-byte for the GLOW's ID

[if you paste the #DEFINE ID_GLOW .....] that would work
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

  

Offline penguin

  • Eudyptes codus
  • 28
  • Still alive.
Quote
Originally posted by Kazan
i need to know the ASCII 4-byte for the GLOW's ID

[if you paste the #DEFINE ID_GLOW .....] that would work
This is the "little-endian" (Intel) version, which I assume you want:
Code: [Select]

#define ID_GLOW 0x574f4c47        // WOLG (GLOW): glow points -Bobboau
your source code slave

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
ty, i also just got it on ICQ

btw. im adding it to as output priority 16, and moving PINF to output priority 17 therefor the chunk output priority is now

Quote
POF Constructor Suite:POFDataStructs.h
/*  Chunk output priority
1  TXTR
2  HDR2
3  OBJ2
4  SPCL
5  GPNT
6  MPNT
7  TGUN
8  TMIS
9  DOCK
10 FUEL
11 SHLD
12 EYE
13 ACEN
14 INSG
15 PATH
16 GLOW // fs2_open chunk, technically not part of version 2117
17 PINF */
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
Quote
Originally posted by Bobboau
I guess I should have mentioned this diference to the internal thruster structure, were the thruster code has the subsystem string for the engine it belongs to, my loading code expects to find the name of a texture file, in this format
$glow_texture=xxx
xxx is the name of the texture file, with no extension
it then loads it and puts the texture index number into bank->glow_bitmap


tell me that's in the ships.tbl, because the TXTR chunk is EXPLICITLY for the textures indexed in the BSP data in the OBJ2 and to use it for the GLOW data would make it so i have to allow people to change the number of textures, which is needless to say EXTREMELY HAZARDOUS

how about we change
"int glow_bitmap"
to
"POFString glow_bitmap"

[POFString is defined as 4-byte int length + length chars with no null-terimnator]
« Last Edit: July 15, 2002, 05:47:14 pm by 30 »
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
int glow_bitmap is internal to FS in the POF file it is the same as whatever the string in the thruster section is is what this should be
no I'm not useing the model texture list, though it might be a good idea to do that way, as I have the loading code now the texture name is in the GLOW chunk,
if you have the three test models I was useing and you rename the GLOW chunk to FUEL (and remove the FUEL chunk already in the model) you can open it as thruster data, and see everything

the data structure should be basicly the same as the thruster code but wth a few added ints
« Last Edit: July 15, 2002, 09:22:28 pm by 57 »
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
doh. it's already that way, ie in my structures where i have int glow_bitmap i need to have string properties! gotcha! bingo!

that just leaves one thing - what's the default glow texture
« Last Edit: July 15, 2002, 09:53:24 pm by 30 »
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
I didn't set a defalt, if the code can't find the texture it just sets the index as -1, and gives an error mesage, if you want a default to put into the dialog just do the $glow_texture= and leave it without a file name
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
im going to make the default thrusterglow01
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
ya, that'd be a good one
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
now that i think of it this would be one hell of an easy thing to add into the COB hierarchy, once i get the POF Class GLOW functions finished AUTOGLOW HERE WE COME :P
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline IceFire

  • GTVI Section 3
  • 212
    • http://www.3dap.com/hlp/hosted/ce
So.....can we make them blink? :D
- IceFire
BlackWater Ops, Cold Element
"Burn the land, boil the sea, you can't take the sky from me..."

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
ask bobboau, from the data it looks like YES
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
I had it working untill yesterday, when I accidentally eraesed all the blinking code :headz:
I just have to remember wich timestamp function I used
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline ZylonBane

  • The Infamous
  • 29
A couple little suggestions, which may or may not be easy to implement...

1) When a ship's hull strength drops to the level where it starts arcing, flicker any lights randomly.

2) If the on or off delay is a negative value, interpret it as the maximum time for a random delay.
ZylonBane's opinions do not represent those of the management.