Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Sticks on August 26, 2003, 12:54:37 am

Title: Greetings, and "popping" stars fix
Post by: Sticks on August 26, 2003, 12:54:37 am
Hello there folks. Some of you may remember me from way back in the day when FS2 was at its prime. I actually was a staffer at FS Watch a long time ago before it was part of Volition Watch. (IceFire may remeber me)

In any case, I've decided to help out with the source code business, and I'm just starting to figure out the inner workings that are FS. I've been mucking about trying to devise a better starfield system, but so far I've not really had any success with any ideas.

I have, however, managed to calm the stars, as it were. Stars should no longer jitter so much when the view is moved in very small increments.

in starfield.cpp, function stars_draw():
Code: [Select]

/* if the two points are the same, fudge it, since some D3D cards (G200 and G400) are lame.
if( (fl2i(p1.sx) == fl2i(p2.sx)) && (fl2i(p1.sy) == fl2i(p2.sy)) ){
p1.sx += 1.0f;
}
*/

if( !(abs(fl2i(p1.sx) - fl2i(p2.sx)) > 3) && !(abs(fl2i(p1.sy) - fl2i(p2.sy)) > 3) ) {
p1.sx = p2.sx;
p1.sy = p2.sy;

p1.sx += 1.0f;
}


Basically it checks the distance between the two vertices p1 and p2, which are the position where that star was, and where that star is now, respectively. If the two positions are not a certain distance apart (currently 3), it sets position one equal to position two, thus making the motion blur line consist of only a singular pixel. If someone could independently back this up and/or commit it, that'd be great, as I don't have CVS commit access.
Title: Greetings, and "popping" stars fix
Post by: bottomfan on August 26, 2003, 04:30:34 am
Hello Sticks,

Always nice when new people join the FSSCP team! :)
Title: Greetings, and "popping" stars fix
Post by: deep_eyes on August 26, 2003, 08:24:08 am
someone fire the welcome beam... :p
Title: Greetings, and "popping" stars fix
Post by: Gloriano on August 26, 2003, 08:28:22 am
(http://swooh.com/peon/DragonClaw/public/welcomebeam.jpg)


image is made Dragonclaw or some one else
Title: Greetings, and "popping" stars fix
Post by: Taristin on August 26, 2003, 08:33:53 am
Which would explain why the green beam is there on this side, but the turrets are all pointing the other way. :doubt:
Title: Greetings, and "popping" stars fix
Post by: Inquisitor on August 26, 2003, 10:06:08 am
Hmmmmmmmm :)
Title: Greetings, and "popping" stars fix
Post by: Flipside on August 26, 2003, 01:16:29 pm
Shouldn't it be The HLPBB?

Oh well, I nitpick ;)

Welcome aboard, and I'm pretty sure one of the SCP team will try it out soon enough, you might try Bobboau, though he's up to his ears in DX8 code (and probably STILL looking for the spring for his joystick). He's mucking around a bit with the backgrounds at the moment (animated backdrop files), he may well try your code out while he's at it?).

Flipside :D
Title: Greetings, and "popping" stars fix
Post by: Inquisitor on August 26, 2003, 03:19:44 pm
You plan on contributing regular like?

We could probably hook you up with access ;)
Title: Greetings, and "popping" stars fix
Post by: vyper on August 26, 2003, 03:24:24 pm
Well this looks nice, and another good coder is a blessing I say. Except the bit about G400's being lame. :nervous:
Title: Greetings, and "popping" stars fix
Post by: Sticks on August 26, 2003, 06:39:49 pm
Actually, the first bit I didn't write. I think Volition did, and as you can see, it is actually commented out. :-)

Also, yes, I do plan on starting regular contributions.
Title: Greetings, and "popping" stars fix
Post by: Inquisitor on August 26, 2003, 06:41:42 pm
Email me then, mon amis, lets get you hooked in.
Title: Greetings, and "popping" stars fix
Post by: IceFire on August 26, 2003, 07:46:54 pm
Sticks...hey!  I do remember you...PlanetFS days I think...way way way back then :)

Welcome back to the community...some names and faces have changed but its still essentially the same as it used to be.
Title: Greetings, and "popping" stars fix
Post by: vyper on August 27, 2003, 08:05:31 am
Quote
Originally posted by Sticks
Actually, the first bit I didn't write. I think Volition did, and as you can see, it is actually commented out. :-)

Also, yes, I do plan on starting regular contributions.


*note to self: read code before commenting on it *
Title: Greetings, and "popping" stars fix
Post by: Kazan on August 30, 2003, 07:40:39 pm
wow.. you've been lurking for a long time
Title: Greetings, and "popping" stars fix
Post by: WMCoolmon on August 30, 2003, 08:58:45 pm
Quote
Originally posted by Flipside
Shouldn't it be The HLPBB?


Lemme check...
(http://members.cox.net/~wmcoolmon/images/welcome.gif)
Yep ;)
Title: Greetings, and "popping" stars fix
Post by: DragonClaw on August 30, 2003, 09:06:38 pm
OK nitpick this ya nitpicking nitpicks!

(http://swooh.com/peon/DragonClaw/public/welcomefire.jpg)
Title: Greetings, and "popping" stars fix
Post by: Taristin on August 30, 2003, 09:12:12 pm
They're not all beam turrets.

I don't recall a blue beam like that.

It's just plain stupid...

Shall I continue?
Title: Greetings, and "popping" stars fix
Post by: IceFire on August 30, 2003, 10:42:39 pm
DragonClaw...not enough beams yet...there's got to be another turret not firing in that scene yesno? :)
Title: Greetings, and "popping" stars fix
Post by: J.F.K. on August 30, 2003, 11:03:16 pm
Quote
Originally posted by Raa Tor'h
They're not all beam turrets.

I don't recall a blue beam like that.

It's just plane stupid...

Shall I continue?


Since when were planes a measure of stupidity? :p

Welcome to HLP, Sticks. Good to have you around mate! :)
Title: Greetings, and "popping" stars fix
Post by: DragonClaw on August 30, 2003, 11:32:10 pm
Quote
Originally posted by IceFire
DragonClaw...not enough beams yet...there's got to be another turret not firing in that scene yesno? :)


Unfortunately there isn't... hmm... whats got a better weapons/space ratio :p
Title: Greetings, and "popping" stars fix
Post by: Taristin on August 31, 2003, 09:03:07 am
Each of those double barreled turrets could fire tuhw00 beams...