Author Topic: Smoke?  (Read 13944 times)

0 Members and 1 Guest are viewing this topic.

Offline karx11erx

  • 27
  • D2X-XL and DLE-XP coder
    • Descent 2 & D2X-XL
Do you know how long it took me to bring D2X-XL in the shape it has now? I took me five years. I reckon it would take me at least two years to understand the FS2 source code real well and transform it into something that could be worked with more easily. It would need to be reformed from the ground up. When I started to rewrite D2X-XL into classes, it took me around 6 months to finally get every loose end together and deliver an acceptably stable new version - and that is after having worked with the code for over four years already.

I don't want to offend anybody here - please don't take me wrong - just analyze the current state of the FS(2) source code. It looks very much like its creators didn't invent too much new stuff, but simply built on what they had achieved with Descent 1 and 2. Quite a few things look strikingly similar and like Volition more or less expanded on the Descent code (doesn't matter whether they wrote everything from the ground up). Many things seem to have been just hacked in (the particle system is a prime example). The entire code has no good structure, no clean encapsulation. In that regard it resembles the original Descent code: Its makers knew where they wanted to get, and they knew the ins and outs of 3D math, but they didn't know at all about good software design.

If I would start to work on this code, none of you would recognize it after a year. To really bring it up to scratch rendering wise, you would need to completely rewrite the rendering stuff. I bet you could speed up rendering in by least half an order of magnitude that way, and it would also get much easier to put new stuff in.

I on the other side hade hoped that all that had already happened, and that I could half easily plug new stuff into the engine. My particle manager e.g. is encapsulated in a C++ class, but there's no way you'd throw that in the FS2 code and add a few lines of code to make it work.

Adding stencil shadows in the current code is even less feasible. If I understand it right, the D3D interface is from Volition and hasn't been added by you guys here, right? One should have thought that the code would show that by throwing a bunch of faces at the rendering API, and not work face by face, gathering all relevant lights in the process.

I have a pretty harsh verdict for the code Parallax and as I can see, Volition Inc. as well, have produced, and that is that just because you can get such a game to work, doesn't mean you're a good software engineer. Descent 1 and 2 are awful hacks, and FS2 seems to be only marginally less of a hack.

I oculd as well start to mod something like the UT3 engine into Descent 4 - that would probably be less work, as a good modern engine is way better documented and coded.
« Last Edit: May 08, 2009, 01:49:25 am by karx11erx »

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Sorry for being so straight forward, but: What did you do with the FS2 source code in all the years you had it? I had expected significant optimizations using OpenGL having been done already. I have to say that my first impression from poking around in the code leaves me a bit surprised and rather disappointed.

Given that the SCP has never had a dedicated OGL coder before that's a little difficult. Taylor is probably the closest we ever had but he is a generalist who has had other major calls on his time regarding the engine. Bobboau is probably the only dedicated graphics guy we've had as long as I've been on the team but he's a D3D coder. At no point AFAIK have we had anyone working the majority of their coding time on OGL.

We've been looking to hire someone who actually knows OGL and is willing to work on it for years.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline karx11erx

  • 27
  • D2X-XL and DLE-XP coder
    • Descent 2 & D2X-XL
karajorma,

I have to say that it surprises me to read that. I had no clue of OpenGL when I started with D2X-XL (D2X-W32 at that time). I worked my way into all that stuff, and I still have a hell of a lot to learn. Actually rendering in FS should be simpler than in Descent as it has no static geometry, but only moveable objects. That means a lot less light sources, a lot less lighting calculations, and only a single renderer (plus a transparency renderer).

But if I started to change all this, I'd really have to rip the FS code apart and create many parts new. It's not just about the renderer. It would need to get a new light manager. It would need to get a new internal model manager separating models' render and game data. It would have OpenGL do the coordinate transformations. It would need a new texture manager (the FS texture handling seems to only allow for a limited number of textures, like the original Descent texture manager did - that stuff all looks so strikingly similar to what I had found in Descent). I put all these things in D2X-XL by and by, and had intimate knowledge of the functionality and code I was working on when I did that; a knowledge of the FS code I don't have at all.

I don't know why none of you took that up with FS, but maybe it is because we have a different background. First of all I am a professional software developer for about 25 years, and then I always tended to investigate and try new stuff and tackle challenging tasks. I am also a perfectionist and never quite satisfied with what I have achieved. The SCP coders have had time enough to get equally far with the FS code as I did with D2X-XL. I just wonder why they didn't. Where is your ambition to delve so deep into such stuff and to acquire enough knowledge to really improve the code base significantly and not just tinker with it somewhat more or less superficially?

Not trying to offend you here, but to challenge you. :)
« Last Edit: May 08, 2009, 02:11:18 am by karx11erx »

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
I think time is the biggest factor. On top of not having anyone who isn't already knowledgeable about OpenGL, the coders we do have also tend to be involved in other aspects of the game. Off the top of my head Taylor and WMCoolmon are the only people on the team who are primarily coders. Both Goober and I are FREDders, admins and team leaders. Chief is team lead of the Fate of the Galaxy project. Wanderer is a scripter on several projects. Kazan and Bobboau spends all their time on PCS II now. Most of the other coders tend to surface only occasionally with code. 

The core SCP is actually very small. I don't think we've had more than five active coders at any point in the last three years.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline karx11erx

  • 27
  • D2X-XL and DLE-XP coder
    • Descent 2 & D2X-XL
Yeah.

D2X-XL has only one coder, plus a Mac coder supporting the OS X code. I have been rebuilding D2X-XL, DLE-XP (the level editor), building missions, creating a web site, making movies and running a forum on top of it.

Yeah, I know I'm awesome. :D

Looks like I operate on a different level of energy than regular mortals. I almost ruined my health with sleep deprivation on a few occasions though.
« Last Edit: May 08, 2009, 02:42:47 am by karx11erx »

 

Offline Flipside

  • əp!sd!l£
  • 212
Heh, been there ;)

It seems to be a common trait in creative people, that they push themselves to dropping point, especially when they are on a 'roll' :)

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Yeah, I know I'm awesome. :D

Well then, fixing the renderer should be no problem. :p
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline karx11erx

  • 27
  • D2X-XL and DLE-XP coder
    • Descent 2 & D2X-XL
If the rest of the source code was in proper shape, no. But that's the problem: It isn't. ;)

 

Offline Alpha0

  • 24
Can you start with the rest of the source code then?

 

Offline karx11erx

  • 27
  • D2X-XL and DLE-XP coder
    • Descent 2 & D2X-XL
ROFL!

The "rest" amounts to 90% of the code.

You FS people would really love to see that stuff revised, wouldn't you? :)

The question is what would kill me faster if I started to do it: Sleep deprivation, or my wife because I am not available for the family anymore ... :rolleyes:

 

Offline Flipside

  • əp!sd!l£
  • 212
Problem is the very core of the codebase was a mixture of Programming, some of which was very very good, but was also, in places, extremely unfriendly in terms of update/expansion. This was mostly because, the source code wasn't really designed to be seen by anyone but Volition, and, like most companies, coding to a time limit always results in some degree of 'rushed' work.

From what I understand, there's very little encapsulation in the coding, and that means that changing one thing in one place can have unpredictable effects in a completely different section of code, which makes the whole job somewhat akin to unthreading a plate of spaghetti.

 

Offline karx11erx

  • 27
  • D2X-XL and DLE-XP coder
    • Descent 2 & D2X-XL
Flipside,

id Software's engine code is a really good counter example.

You are just confirming my impression that the FS source code (like the Descent source code) is an example of extremely bad, no: complete lack of software engineering. It's kind of hacked together to get something out the door.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
I don't doubt that to be honest.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Flipside

  • əp!sd!l£
  • 212
I think part of the problem is that this is code that has been built on and built on, but wasn't designed to be, the very heart of the Freespace code is based on the Descent engine, with stuff bolted on to it, but I think the original code was never designed with that kind of treatment in mind, and, as Scotty would put it, the more complicated you make the plumbing, the easier it is to plug up the pipes.

 

Offline aRaven

  • 28
The question is what would kill me faster if I started to do it: Sleep deprivation, or my wife because I am not available for the family anymore ... :rolleyes:

*waves hand* you don't need a wife and family...you need to clean the FS2 code...or at least finish cleaning it before dieing of sleep deprivation.


:D

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
You're superhuman. In fact, your genius and productivity outclass everyone here, and if we'd only had you from the start, we'd have a modern engine instead of a tacked-together beast. I grovel before you.

What d'you think you can do to help out?




 

Offline karx11erx

  • 27
  • D2X-XL and DLE-XP coder
    • Descent 2 & D2X-XL
Oooh-oh. There had to be forum members w/o a sense of humor ... :rolleyes:

Exaggeration is a preferred means of mine of poking fun on others and myself.

From genius to average human: If I would start to work in this project, I wouldn't "help out". First of all I would rewrite a lot from ground up, and then you could come and ask where you could "help out". Got that?

You could haven taken what I have said the other, proper way round too: If I can manage all that while having a regular job and a family, then imvho you guys should have easily been able to rebuild FS(2) from ground up and with top notch rendering in all the years this project is under your wings already.

I am good, and I know it (and I also know that there are others who are better - some way better). Some people consider that a problem, but I don't. It puts me in the enviable position of having the freedom to ignore people who are trying to trouble me. On top of that I really don't care about what other people think of me - at least those who don't like me. ;)

Do you know how I started with D2X-XL? I bet you don't. In the beginning, I fiddled around in D2X 0.2.6 to make it work on Windows XP, and submitted my changes to the Descent newsgroup. They started to tell me that I should provide diffs, and that I should do this and stop doing that. They also told me that once I proved to be trustworthy I might get write access to their repository. I had been fed up with that pretty soon, so I got the entire source code and developed my own branch. Today, D2X is dead, the "other" port is .... ummmm so-so, and D2X-XL is King Of The Hill.

Now I have not come here to take everything over and command people around. I have however definitely also not come here as humble apprentice who accepts orders and goes through whatever initiation rites are common here. I am a 47 year old man and family father, and I know who I am and what I can do, and I prefer to work with people on the base of mutual respect and confidence in the other's capabilities.

I have come to know the members of this forum as a truly and exceptionally friendly bunch of people it is easy to get along and probably also to work together with, and I dearly hope that no one here sets out to change that.
« Last Edit: May 08, 2009, 10:25:55 am by karx11erx »

 

Offline Flipside

  • əp!sd!l£
  • 212
Heh, don't worry about it, better to know you are good than to undersell yourself ;)

People will react differently, once/if you start working on the code, they'll find that actions speak louder :)

 

Offline karx11erx

  • 27
  • D2X-XL and DLE-XP coder
    • Descent 2 & D2X-XL
It will take a considerable amount of time to achieve what I have in mind. A year to have a good frame work, another year to have a stable release. I am still asking myself whether I want to invest that much time.

Problem is that watching TV bores me, playing computer games bores me too, and programming in my free time usually is fun. ;7

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Oh no, you misunderstand - I have no problem with you, and you seem like a perfectly decent guy. I just want to get the introductions over with so you can get to work, and if that means telling you you're a genius, fine by me. It sounds like you're exactly what the SCP coders could use. No initiation necessary, no need to prove yourself.

I apologize if I seemed like I was being facetious or sarcastic. I have a fine sense of humor, and I don't dislike you whatsoever.