It is currently Sat Apr 27, 2024 8:59 am



Post new topic Reply to topic  [ 79 posts ]  Go to page 1, 2, 3, 4, 5, 6  Next
Author Message
Site Admin / Dev Team
User avatar
 

Team: Admins
Main: Jeff_L
Level: 1028
Class: Sniper

Joined: Wed Mar 23, 2005 2:21 am
Location: Santa Clara, CA
Post Smooth Energy and Smooth Shields
Just a quick Development Note (tm) to let you know what I've been working on the last couple of days. You probably notice that while you play SS, your energy bar and shield bar kind of jump around a lot. There are two reasons for this. First, things like energies and shields are programmed so they give you a chunk every 1.2 seconds or whatever, depending on the item, so in code, it's actually increasing your energy by that amount every 1.2 seconds. That's why it jumps up in chunks. Things that use energy consume a chunk every 1.2 seconds or however often depending on the item, so that causes it to jump down. Finally, there's a bit of code that keeps track of the last time an update message was sent and what the value was, and if it wasn't at least a couple seconds ago or the values are similar, it doesn't send a new update message in order to cut down on the network traffic.

What I've been working on is instead of items giving or taking energy (or shields) in chunks periodically, each object keeps track of it's current energy per second (or shield charge per second) and this value is computed based on what items you have equipped. So if you have an energy that gives you 30 eps and a radar that consumes 2 eps and a shield that consumes 4 eps, your net eps will be 24. Under the new system, it just sends that value to the client so that the server and the client can smoothly increase or decrease your energy and shields based on what you have equipped, and only need to send an update when you do something active that affects your balances, like firing a weapon or using an item that takes energy.

Not only does this look way better, but I think it will result in fewer network messages and players will have a better idea of how much energy or shields they actually have.

So far I have this working with the energy, though there are some bugs like it's not currently updating when you're in the station. It should also work for a user base when you're docked in it, but I haven't tested that yet. Adding it in for the shield should be pretty easy once I get the bugs worked out for the energy.

(The reason I'm doing it is it's for SS2, but I realized it would be fairly trivial to do this for SS1 at the same time, since almost all the code this touches is shared between them.)

There is one design decision related to this, and that's what to do when you've equipped items that take more energy than you currently generate and you're out of energy? In other words, what happens when your eps is negative and your total energy is zero? I'm probably just going to make it so your energy stays at zero and things like shields, radars, shield chargers, etc, that have constant energy drains just stop working completely until you unequip something or increase your energy charge somehow.

_________________
For support, please create a support ticket here and I will get back to you as soon as possible.


Fri Dec 11, 2009 2:10 am
Profile WWW
Site Admin / PR Admin
User avatar

Joined: Thu Jan 31, 2008 4:19 am
Post Re: Smooth Energy and Smooth Shields
Well from a design point of view you should probably disable items 1 at a time till you have enough energy, the order being something like (Disable items in that order):

Tractors
Auras
Shield chargers
Shield regen
Radars
Shield Maintenance

There might be some I have forgotten.

_________________
For support please create a support ticket at http://www.starsonata.com/support
P.S. Client 2 is the real answer to the meaning of life, the universe and everything. 42 is just a myth!


Fri Dec 11, 2009 3:02 am
Profile
User avatar
 

Team: None
Main: Sybir
Level: 1788
Class: Shield Monkey

Joined: Wed Dec 24, 2008 8:16 am
Post Re: Smooth Energy and Smooth Shields
wont it be haxable if it counts eps on client side?


Fri Dec 11, 2009 8:48 am
Profile E-mail
User avatar
 

Team: Aidelon
Main: Diabolus
Level: 1941
Class: Berserker

Joined: Wed Feb 13, 2008 9:25 am
Location: Netherlands, Europe, Earth, Sol, Milky way, Universe, Admins computer
Post Re: Smooth Energy and Smooth Shields
Yes, but only by use of a 3rd party program, which is most likely trackable.

_________________
I recently got Warp 4, told the people in Sol about it. Admin response:
Image
got a new ship for my alt:
Image
Image


Fri Dec 11, 2009 8:54 am
Profile
Dev Team
User avatar
 

Team: HAL
Main: HAL 9000
Level: 1002
Class: Berserker

Joined: Mon Dec 13, 2004 11:00 pm
Post Re: Smooth Energy and Smooth Shields
The EPS on the client side will be for display purposes only, hacking it might make it look like you have more energy than you actually have, but won't provide you with any useful benefits since everything that uses energy uses it on the server side.

Summary: If you wanted you could hack the current client to always show you at full shields and energy, but it still wouldn't provide you with any benefit with or without the new system.


Fri Dec 11, 2009 9:41 am
Profile
Member

Joined: Sat May 27, 2006 2:52 am
Post Re: Smooth Energy and Smooth Shields
I'm not sure this sounds like a good idea...

For maintenance items, and 90% of play time, it sounds great. Less network traffic when just flying around or playing with colonies. But for non maintenance items, won't it generate as much, or more traffic? Radar+Shield+Charger+OL works, but what happens when I pop a shield tweak, fire my Jiji 12 times in 1.2 seconds, drop a drone, change radars, etc? You'll need to compute the maintenance charge, send that packet, and send packets for all the instance energy charges. And what do you do when you calculate that the maintenance eps is positive, but all the instance charges in that second make it negative AND take you below zero? Which fails to happen, maintenance, or the instances items like firing and tweaking?

What happens for instance, when my engineer is under fire, and thus regenning shields and his charger is active, cloak is on, energy hunger radar is on but I still have positive EPS so I'm regnerating some energy... And then I kick on an elec transfer beam, shoot an armada wand, drop a big energy drone, hit an RDDS, have both normal and dark panels equipped, I try to scoop debris, and I get hit with parasites so my high energy pest control kicks in. Oh, and accidentally unequip my radioactive Cap, so my regen just went down.

I guess the problem I'm seeing is you'll have two different accounting methods for the same stat, and the two are going to clash. Also that energy gain, and energy expenditure is not smooth or predictable at all times (especially combat).


Fri Dec 11, 2009 10:34 am
Profile
User avatar
 

Team: None
Main: Demiser of D
Level: 20
Class: None

Joined: Tue Jun 07, 2005 6:46 pm
Location: Listening to Fire On High, best song ever.
Post Re: Smooth Energy and Smooth Shields
Will this change the way shields work? For example, right now the gamma field+ has an uber short regen time, which makes tweaks more effective. Other shields have longer regen times, but have more regen to compensate. How will that be changed with this?

_________________
JeffL wrote:
That's it. I quit!


Battlecruiser23 wrote:
Fuck you, Cygnus.


Fri Dec 11, 2009 12:09 pm
Profile
Member
User avatar
 

Team: Heaven
Main: Kangaroo_blob
Level: 3102
Class: Berserker

Joined: Wed Oct 18, 2006 9:37 pm
Location: Married to: CSE
Post Re: Smooth Energy and Smooth Shields
Demiser of D wrote:
Will this change the way shields work? For example, right now the gamma field+ has an uber short regen time, which makes tweaks more effective. Other shields have longer regen times, but have more regen to compensate. How will that be changed with this?


Yeah I was thinking this.

If everything is continuous regen wont that screw up tweaks...

Kanga

_________________
Image
Image

Illegitimi Non Carborundum


Fri Dec 11, 2009 12:49 pm
Profile
Site Admin / Dev Team
User avatar
 

Team: Eminence Front
Main: PhoenixSun2
Level: 1392
Class: Shield Monkey

Joined: Mon Jan 03, 2005 12:07 am
Post Re: Smooth Energy and Smooth Shields
I believe the difference is mostly going to be client side, it will look smoother there but not really affect server side stuff (and therefore gameplay) all that much.


Fri Dec 11, 2009 2:36 pm
Profile
Site Admin / Dev Team
User avatar
 

Team: Admins
Main: Jeff_L
Level: 1028
Class: Sniper

Joined: Wed Mar 23, 2005 2:21 am
Location: Santa Clara, CA
Post Re: Smooth Energy and Smooth Shields
For amounts of network traffic, even if you're in a big fight doing tons of stuff, I don't think it will be more traffic than under the current system. The current system was written before I implemented packet combining. When you're in a big fight, you're getting a packet every server frame anyway, so under the new system it won't make much different. Each time you fire your weapon, it's added 12 - 16 or so bytes to the combined packet that goes out that frame, so it shouldn't be a big deal. And for when you're not fighting, it's way, way less data.

I think tweaks will still affect different shields differently, even though things will be smooth on both the client and the server side. The shields will still have a certain charge per certain time, and unless we decide we want to normalize them all (which is a distinct possibility), then the shield will add in the tweak to it's recharge amount, divide by the recharge time, and contribute that value to the shield charge per second.

_________________
For support, please create a support ticket here and I will get back to you as soon as possible.


Fri Dec 11, 2009 5:21 pm
Profile WWW
User avatar

Joined: Mon Jun 05, 2006 4:03 am
Location: Right Behind You!!!!
Post Re: Smooth Energy and Smooth Shields
JeffL wrote:
and unless we decide we want to normalize them all (which is a distinct possibility), then the shield will add in the tweak to it's recharge amount, divide by the recharge time, and contribute that value to the shield charge per second.


I've always been curious why this wasn't done, nor why shield/energy regen weren't pro-rated.

_________________
"So instead of 11 million dollars on the loose, we'll have 22?!"
"Plus we are needing gas money."


Fri Dec 11, 2009 5:51 pm
Profile YIM
 

Team: None
Main: Cookie monsterrr
Level: 116
Class: Speed Demon

Joined: Mon Apr 27, 2009 2:34 am
Post Re: Smooth Energy and Smooth Shields
Must Not .... use Programming knowledge ... for evil ... stuff Must ...Stay ... Clean

Well back to Serious client siding the eps aint a problem if it gets tracked, Other then with things like money you can for example change your money then pass is over 10 acounts


Fri Dec 11, 2009 5:52 pm
Profile E-mail
User avatar
 

Team: Evil Empire
Main: Outcast
Level: 2206
Class: Berserker

Joined: Thu Feb 22, 2007 11:25 am
Location: England, Leeds.
Post Re: Smooth Energy and Smooth Shields
Hate to be the douche but isn't this a waste of time? I don't think anyone cares about their energy/shield jumping.

_________________
Progressive House


Fri Dec 11, 2009 7:24 pm
Profile
Site Admin / Dev Team
User avatar
 

Team: Eminence Front
Main: PhoenixSun2
Level: 1392
Class: Shield Monkey

Joined: Mon Jan 03, 2005 12:07 am
Post Re: Smooth Energy and Smooth Shields
Outcast wrote:
Hate to be the douche but isn't this a waste of time? I don't think anyone cares about their energy/shield jumping.


It's not cause its part of a bigger change that will come later with C2, so this is like a stepping stone to that.


Fri Dec 11, 2009 7:49 pm
Profile
Member
User avatar
 

Team: Dark Traders
Main: Getsuga Tenshou
Level: 1799
Class: Berserker

Joined: Tue May 19, 2009 7:25 pm
Post Re: Smooth Energy and Smooth Shields
C2? I think I remember something about that... in my previous life.

Just messing with you :D sounds great thanks guys.

_________________
Qūzhújiàn de shìjiè, Shōugē jī ling hún


Sat Dec 12, 2009 2:20 am
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 79 posts ]  Go to page 1, 2, 3, 4, 5, 6  Next


Who is online

Users browsing this forum: No registered users and 35 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB © phpBB Group.