Author Topic: Act 4 Preview: Durgas and Vajradharas  (Read 26977 times)

0 Members and 1 Guest are viewing this topic.

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Act 4 Preview: Durgas and Vajradharas
That's something we've been talking about, but it's an incredibly annoying system to implement right now. FRED can't change a ship's tabled stats in useful ways right now, so you have to actually change the ship class, and it gets obnoxious from there.

 

Offline Gee1337

  • 27
  • Sh!tlord/Human Garbage
Re: Act 4 Preview: Durgas and Vajradharas
I have a VERY limited knowledge on programming, but could the tables use logic gates to implement the system?

For example, something along the lines of:-

IF bombs = [number] THEN turn rate = [number] AND armour = [number] AND speed = [number]

I can appreciate how annoying it would be as there still remains a potential balance problem of:-

1) What should the full payload stats be?
2) What should the depeleted payload stats be?

Then the actual coding itself.
I do not feel... I think!

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Act 4 Preview: Durgas and Vajradharas
This is the kind of feature that requires code or script work.

It's also a pretty subtle feature — the kind of bonus you push for if you have production room, but not a tentpole.

 

Offline Ma-Dai

  • 23
Re: Act 4 Preview: Durgas and Vajradharas
That's something we've been talking about, but it's an incredibly annoying system to implement right now. FRED can't change a ship's tabled stats in useful ways right now, so you have to actually change the ship class, and it gets obnoxious from there.

It would be a really neat feature if turn rate, acceleration and top-speed somehow could be bound to the ships actual payload. As an strategic element in the weapon selection screen (Shall I take a few more rockets or do I have to be fast?) or in mission (Get the payload as quickly as possible en route to be fast again).

 

Offline Gee1337

  • 27
  • Sh!tlord/Human Garbage
Re: Act 4 Preview: Durgas and Vajradharas
This is the kind of feature that requires code or script work.

It's also a pretty subtle feature — the kind of bonus you push for if you have production room, but not a tentpole.

Sounds like a challenge for Axem or Spoon or both! :D

I do not feel... I think!

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Act 4 Preview: Durgas and Vajradharas
DahBlount is actually the one looking at it.

 

Offline The E

  • He's Ebeneezer Goode
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Act 4 Preview: Durgas and Vajradharas
The problem here is that the code assumes that ship classes are only created during the initial table parsing phase, and that they do not change once parsed.

Both of those assumptions have to be checked for and be corrected before we can talk about introducing sexp or scripting access to those values, which means a rethink of how we deal with ship classes in general.
Off the top of my head, I am not sure what the best solution would be. What I do know is that this is not an easy task.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline Gee1337

  • 27
  • Sh!tlord/Human Garbage
Re: Act 4 Preview: Durgas and Vajradharas
Believe it or not... that actually makes sense in my head!

The tables need to be active rather than passive. (bad analogy I know)

I'm just trying to think outside of the box here, but I would be guessing that you would be looking at something that has changeable integers. I'm presuming that "ingame re-parsing" selected tables would not be a workable solution as it could cause framerate drops, chop and generally just crashing.

I'm just thinking of a way round and it, but I'm sure as yous know already, I would presume that it would have to be a source code change.

As for a new ship class... what about calling it the "fighter bomber" class. Designation "UEFb"?

P.S. Ignore me if I am being stupid, I'm just throwing some ideas around. :nervous:
I do not feel... I think!

 

Offline The E

  • He's Ebeneezer Goode
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Act 4 Preview: Durgas and Vajradharas
You need to know how FSO organizes ship data. There are ships, and there are ship classes. Every ship has a reference to a ship class. Changing ship class values directly is an obviously non-working idea, since you would be changing the behaviour of every ship of a class in the mission at once.

This is the basic problem. Any reference to a changeable ship class value will have to be checked and code inserted to check the ship's status to evaluate what the class values should be.

Conceptually, this is relatively straightforward, but it does require a lot of work that then has to be double and triple checked.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline Gee1337

  • 27
  • Sh!tlord/Human Garbage
Re: Act 4 Preview: Durgas and Vajradharas
Yeah, that's why I was thinking an entirely new ship class, as it would only effect those in that class rather than one of the existing ones. Maybe it could be something that the SCP team could do as a new feature, rather than just the BP team, as it could allow the modellers to go nuts and perhaps inspire new things in new mods.

I can certainly appreciate the length of time it would take to implement but it would be a very cool addition to existing and future mods!
I do not feel... I think!

 

Offline The E

  • He's Ebeneezer Goode
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Act 4 Preview: Durgas and Vajradharas
Yeah, that's why I was thinking an entirely new ship class, as it would only effect those in that class rather than one of the existing ones. Maybe it could be something that the SCP team could do as a new feature, rather than just the BP team, as it could allow the modellers to go nuts and perhaps inspire new things in new mods.

Here's a fun fact for you. The code responsible to change a ship's class has had a higher density of bugs compared to linecount than almost any other piece of the engine. As a result, there are historical reasons why we're being careful around it.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline Gee1337

  • 27
  • Sh!tlord/Human Garbage
Re: Act 4 Preview: Durgas and Vajradharas
I thought as much because of the amount of variables involved. Glad to know it is being seriously considered though! :)
I do not feel... I think!

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Act 4 Preview: Durgas and Vajradharas
It would be easier to introduce a "bombs slow down a ship" feature to the codebase than a "scripts can change ships' tabled stats" feature.
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 
Re: Act 4 Preview: Durgas and Vajradharas
It would be easier to introduce a "bombs slow down a ship" feature to the codebase than a "scripts can change ships' tabled stats" feature.

In essence work backwards from the empty (and therefore fastest and most agile mode) to full (most speed/maneuverability penalties) as the number of bombs currently on board increases?

But then you'd have to somehow insert a trigger so that each time a torp was fired by the bomber, the game would recheck how many are left and recalculate the penalties it's applying to the craft, and we're assuming that it won't just do this for the players ship..

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Act 4 Preview: Durgas and Vajradharas
That's a pretty trivial computation compared to something like collision detection, I suspect.

 
Re: Act 4 Preview: Durgas and Vajradharas
Yeah, it's a tiny addition on top of all the other **** the game does whenever you fire a torpedo.
The good Christian should beware of mathematicians, and all those who make empty prophecies. The danger already exists that the mathematicians have made a covenant with the devil to darken the spirit and to confine man in the bonds of Hell.

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Act 4 Preview: Durgas and Vajradharas
Yeah, it's a tiny addition on top of all the other **** the game does whenever you fire a torpedo.
Pretty much this.
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 

Offline QuakeIV

  • 29
  • test
Re: Act 4 Preview: Durgas and Vajradharas
I'd be vaguely surprised if it needed to recalculate entirely anyways.

 
Re: Act 4 Preview: Durgas and Vajradharas
I'd be vaguely surprised if it needed to recalculate entirely anyways.

I imagine that it would be a fairly simple procedure.

If bomb released....

>> Recalculate speed.



 

Offline QuakeIV

  • 29
  • test
Re: Act 4 Preview: Durgas and Vajradharas
Yeah, I just meant it probably wouldn't need to tally up all of the torpedoes again every time.  That being said, you could probably get away with doing that every frame just fine as implied above.  Its not like we are trying to simulate thousands of bombers or something.