Rewrite the code!
Moderators: Grendel, Aus-RED-5
Rewrite the code!
D2X-XL needs a massive code cleanup. The best way to do this?
SCRAP THE CODE AND START FROM SCRATCH!
Results:
Overall less code
Easier to understand code
Eliminate over 80% of bugs
Drastically speed up game
Easier to add new features
New features will cause less bugs
This would be PERFECT for D2X-XL 2.0.0!!
Of course this might take months to do, but I don't thing anyone will mind.
Lets make a petition!
SCRAP THE CODE AND START FROM SCRATCH!
Results:
Overall less code
Easier to understand code
Eliminate over 80% of bugs
Drastically speed up game
Easier to add new features
New features will cause less bugs
This would be PERFECT for D2X-XL 2.0.0!!
Of course this might take months to do, but I don't thing anyone will mind.
Lets make a petition!
- Testiculese
- DBB Material Defender
- Posts: 4689
- Joined: Sun Nov 11, 2001 3:01 am
- Krom
- DBB Database Master
- Posts: 16137
- Joined: Sun Nov 29, 1998 3:01 am
- Location: Camping the energy center. BTW, did you know you can have up to 100 characters in this location box?
- Contact:
Re:
XD word!Diedel wrote:Not for D2X-XL.
Tim, you really have no clue what you are talking of.
Ok Tim, here's the deal: You give me 5 million Euros and 3 years, and I'll create a brand new Descent like game in the style of Descent 1/2.
- Kilarin
- DBB Fleet Admiral
- Posts: 2403
- Joined: Wed Aug 07, 2002 2:01 am
- Location: South of Ft. Worth Texas
This is a GREAT idea! But you don't need a petition Tim, just go for it! Projects like this work better solo anyway. If it would take a team a few months to recode from scratch, surely you could do it in a year?Tim wrote:Of course this might take months to do, but I don't thing anyone will mind. Lets make a petition!
I look forward to seeing your new game around July of 2008!
Oh, and keep us updated on your progress! I'm certain you can work in running a web site and a nice little forum in there!
- Aus-RED-5
- DBB Friend
- Posts: 1604
- Joined: Fri Apr 23, 2004 7:27 am
- Location: Adelaide, South Australia
- Contact:
Re:
x2!Kilarin wrote:This is a GREAT idea! But you don't need a petition Tim, just go for it! Projects like this work better solo anyway. If it would take a team a few months to recode from scratch, surely you could do it in a year?Tim wrote:Of course this might take months to do, but I don't thing anyone will mind. Lets make a petition!
I look forward to seeing your new game around July of 2008!
Oh, and keep us updated on your progress! I'm certain you can work in running a web site and a nice little forum in there!
ROFLMAO! LOL! ROFL! LMAO!
....
Now, it's time to be serious....
Tim, your idea might be good in the world of the dreams or if Diedel was not a single person, but a gaming developer company named 'Diedelsoft 3D industries'
And of course, that company would need employes, and money to pay them, and blah, blah, blah...
So, at this time, enjoy D2X-XL as is or wait for Core Decision!
Anyway, your intentions are good enough, but sadly, not possible in the real world... sorry
I would soooo do it if I knew C++ and the D2X-XL code as well as diedel does. I was planning on doing it to Spacewar GM until I found out that I was the only one playing it.
I am not saying to rewrite D2X-XL from memory, simply rewrite it how YOU would have written it with all the knowledge you have now.
Lest say someone gave you a circut board that does something cool. Then you add a wire to make it do something even cooler. Then you make another small circut and connect it using some wires. You keep updading it until there are so many wires that you can't see the board. If you keep this up, the D2X-XL code will become soo confusing, you will have tons of bugs and no way to find them. Make a new board containing everything you have done so far.
I am not saying to rewrite D2X-XL from memory, simply rewrite it how YOU would have written it with all the knowledge you have now.
Lest say someone gave you a circut board that does something cool. Then you add a wire to make it do something even cooler. Then you make another small circut and connect it using some wires. You keep updading it until there are so many wires that you can't see the board. If you keep this up, the D2X-XL code will become soo confusing, you will have tons of bugs and no way to find them. Make a new board containing everything you have done so far.
(__/)Save Pokemon, Destroy Yu-Gi-Oh<br>(O.o )<br>(> < ) This is Bunny. Copy Bunny into your signature to help him on his way to world domination!
- Testiculese
- DBB Material Defender
- Posts: 4689
- Joined: Sun Nov 11, 2001 3:01 am
- Krom
- DBB Database Master
- Posts: 16137
- Joined: Sun Nov 29, 1998 3:01 am
- Location: Camping the energy center. BTW, did you know you can have up to 100 characters in this location box?
- Contact:
Re:
No, you don't get it. The D1/D2 source probably started out at the equivilent of 100,000 wires, and Diedel put a lot of effort into adding/improving/fixing things in that huge jumble already. Don't automatically assume that finished game programming is going to be all flawless logic computer science perfection. The D1/D2 source was quite a fugly bug ridden hack job right from the start.Tim wrote:40,000 wires? Whoever put that many in without staring over was a real idiot and is now screwed.
- Kilarin
- DBB Fleet Admiral
- Posts: 2403
- Joined: Wed Aug 07, 2002 2:01 am
- Location: South of Ft. Worth Texas
You really need to learn some programming, and get a concept of the scale programming projects can reach before you can grasp what you are actually talking about.Tim wrote:40,000 wires? Whoever put that many in without staring over was a real idiot and is now screwed.
I fix programming bugs for a living. And I'm telling you that the size and complexity of something as mindless as a billing system is simply unbelievable. A 3D game can be much worse. And that's assuming it's written on top of an already complex 3D rendering engine.
If you don't have any (or much) programming experience, trying to tell experienced programmers that they don't understand whether something is simple or complex is like someone who can only beat out chopsticks on the piano telling Mahler that his symphonies should have only taken a single afternoon to write.
I'm not trying to insult you here, just trying to explain that if you don't know anything about a field, you are probably better off not trying to estimate the difficulty of project. And certainly better off not contradicting experienced people on the topic.
First of all, I was not attempting to insult any real person in that last post, I just highly doubt that diedel made 40,000 modifications to code. By Krom's post, I was insulting parallax.
I aced a class on python and am now learning C++.
My method of programming is to whip up a program that basically does what I want, then use all the knowlage that I gained to start over and create a less buggy and more adaptable program.
No one even downloaded Spacewar GM, big surprise...
I aced a class on python and am now learning C++.
My method of programming is to whip up a program that basically does what I want, then use all the knowlage that I gained to start over and create a less buggy and more adaptable program.
No one even downloaded Spacewar GM, big surprise...
- Lothar
- DBB Ghost Admin
- Posts: 12133
- Joined: Thu Nov 05, 1998 12:01 pm
- Location: I'm so glad to be home
- Contact:
Re:
This is called "code refactoring". It's pretty much the expected method for good programmers... not necessarily refactoring the whole program, but at least individual sections of it.Tim wrote:My method of programming is to whip up a program that basically does what I want, then use all the knowledge that I gained to start over and create a less buggy and more adaptable program.
Doesn't mean it always happens, though. Especially not with a deadline, which is what D1 and D2 both had.
What Diedel is doing right now consists of refactoring and enhancing the code. He hasn't rewritten the whole thing from scratch, but he's rewritten a lot of it.
- Testiculese
- DBB Material Defender
- Posts: 4689
- Joined: Sun Nov 11, 2001 3:01 am
That method won't last once you get into the workforce. I work on a project that has 239,469 lines of code...in one executable(I just looked). This project also has 693 DLL's at 3-5,000 lines of code each. Then there are the stored procedures. We have 2,869 stored procedures of various sizes, and 996 database tables. Then there is the entire web-based portion of the application that (thankfully) uses some of the same DLL's, but not really. I don't know how many lines of code there are in any of the web projects except the ones I've written, and they hit about 10,000 combined.
We tighten things up as we can, but with deadlines coming at you like a freight train, you have to make it work. Function over form, unlike everything else in America.
We tighten things up as we can, but with deadlines coming at you like a freight train, you have to make it work. Function over form, unlike everything else in America.
-
- Defender of the Night
- Posts: 13477
- Joined: Thu Nov 05, 1998 12:01 pm
- Location: Olathe, KS
- Contact:
Re:
You do realize what a mess the source code is don't you? The fact that Diedel can make heads or tails of it is nothing short of amazing. What your asking is for someone to redesign the game from scratch. I don't think you seriously understand how long that would take. It'd be like trying to rebuild the space shuttle from scratch. (Ok, maybe not THAT bad, but you get the idea.)Tim wrote:40,000 wires? Whoever put that many in without staring over was a real idiot and is now screwed.
Tim,
as I said: You have no clue of what you're talking about.
Lothar is right, I did a lot of refactoring the code. I have cleaned it up, optimized it, and removed a lot of bugs. The program has not become more messy through my changes, but less messy.
To recreate D2X-XL, you'd need to code a completely different engine, making use of modern gfx technology as offered by OpenGL 3.
If you would do that, you'd also want to have new textures, new music and new sound, and then you don't have any levels, so you'd also need to create tools for that - and that's where the work really is. John Carmack wrote the DOOM3 engine in a few months, but the entire game took years to make.
It would probably even make more sense to mod an existing game, like the guys from Into Cerberon are doing (who didn't want me on their team - too bad,or it would probably be already finished, at least as far as the coding is concerned).
Actually there is a project where one guy started to write a Descent 2 clone from scratch using Direct X, and has come pretty far. It is called Deep World. But I suppose this project will never be finished, as the author has finished studying and has a job now. He also doesn't seem to be willing to disclose his source code, or make it GPL or OpenSource, so that other people may finish his work. What a waste of a good effort and a lot of time.
as I said: You have no clue of what you're talking about.
Lothar is right, I did a lot of refactoring the code. I have cleaned it up, optimized it, and removed a lot of bugs. The program has not become more messy through my changes, but less messy.
To recreate D2X-XL, you'd need to code a completely different engine, making use of modern gfx technology as offered by OpenGL 3.
If you would do that, you'd also want to have new textures, new music and new sound, and then you don't have any levels, so you'd also need to create tools for that - and that's where the work really is. John Carmack wrote the DOOM3 engine in a few months, but the entire game took years to make.
It would probably even make more sense to mod an existing game, like the guys from Into Cerberon are doing (who didn't want me on their team - too bad,or it would probably be already finished, at least as far as the coding is concerned).
Actually there is a project where one guy started to write a Descent 2 clone from scratch using Direct X, and has come pretty far. It is called Deep World. But I suppose this project will never be finished, as the author has finished studying and has a job now. He also doesn't seem to be willing to disclose his source code, or make it GPL or OpenSource, so that other people may finish his work. What a waste of a good effort and a lot of time.
- Testiculese
- DBB Material Defender
- Posts: 4689
- Joined: Sun Nov 11, 2001 3:01 am
It's an employee benefits enrollment application. It presents a visual guide to enrolling in employer benefits like life insurance, dental, vision, loss of work...It handles dozens of policies for ING, AIG, Kanawha, Protective and others. It replaces the paper insurance application you would fill out when you get hired by a company. Instead, an enroller brings a laptop and sits with each employee and outlines the coverages, the amounts and all the extras that are tied to policies using real-time adjustable quotes (so they can see what they can buy with $x a week for instance) and visuals like slideshows, video and audio. It tracks tons of data, and synchronizes each laptop to central servers every day.Tim wrote:Testiculese, what does that program do?
Re:
wait.. did MD just compliment Diedel!!?! o_0MD-2389 wrote:You do realize what a mess the source code is don't you? The fact that Diedel can make heads or tails of it is nothing short of amazing. What your asking is for someone to redesign the game from scratch. I don't think you seriously understand how long that would take. It'd be like trying to rebuild the space shuttle from scratch. (Ok, maybe not THAT bad, but you get the idea.)Tim wrote:40,000 wires? Whoever put that many in without staring over was a real idiot and is now screwed.
It took me quite a while to comprehend certain parts of the code (partially due to the lack of understanding of the underlying technicalities, like 3D math), but I think that I have a pretty thorough understanding of most of the program code by now.
Btw, some may not know that on top of doing D2X-XL I also rewrote DMB2, making DLE-XP out of it, which took several months by itself. I had rewritten the entire interface from scratch and recoded parts of the engine.
Then there were two big missions (Lunar Outpost Reloaded - took me weeks to build) and Boiling Point (took even more time), and my Descent site (I am really fond of the level spotlight ).
Last big item was the redesign of all robot poly models to make them \"shadow proof\". That was blood, sweat, toil and tears ...
Just looking back a little at all I have done in the Descent 2 realm ... I have pretty much come to rest now, dreaming of having some money to start my own rewrite of Descent 2 or seeing whether I could fund Core Decision ... oh yeah ...
Gotta wake up. WAKE UP!
Btw, some may not know that on top of doing D2X-XL I also rewrote DMB2, making DLE-XP out of it, which took several months by itself. I had rewritten the entire interface from scratch and recoded parts of the engine.
Then there were two big missions (Lunar Outpost Reloaded - took me weeks to build) and Boiling Point (took even more time), and my Descent site (I am really fond of the level spotlight ).
Last big item was the redesign of all robot poly models to make them \"shadow proof\". That was blood, sweat, toil and tears ...
Just looking back a little at all I have done in the Descent 2 realm ... I have pretty much come to rest now, dreaming of having some money to start my own rewrite of Descent 2 or seeing whether I could fund Core Decision ... oh yeah ...
Gotta wake up. WAKE UP!
To anyone still considering rewriting Descent 2, I recommend XNA - it will save you a lot of the work, even if it does tie you down to Microsoft. But you have to make sacrifices - Windows only (and at that recent Windows), or Linux/Mac support and much extra work?
Even that will take you a while... the game code is undoubtedly pretty huge by itself.
I looked at the Descent 1 code a while back, and tinkered with some stuff there (most of it consisting of \"hax\"); I can also understand how going on a programming course and doing fairly well can make you think \"hey this stuff is easy!\".
It isn't. That sort of programming course introduces you to the basic discipline of programming, but it doesn't prepare you for how to deal with mind-blowingly large systems on the scale of Descent. A 200-line (or even 1000-line) program is pretty easy to sort out, but if you go into several thousand lines you start to encounter new problems with managing the complexity of the system you have. Once you hit the scale of mid-90s games (tens of thousands up to maybe a hundred thousand lines of code), those problems become serious, and redesigning parts is a major undertaking. Diedel already mentioned how much time rewriting the DMB2 UI took, and that's only part of the picture.
Of course, today you have some games with tens of millions of lines of code. That's just stunning, and at that point it really is no surprise they take years to finish.
By the way, Diedel could quite possibly have made 40,000 modifications to the D2 code. He's issued hundreds of releases, and each of those would certainly have had quite a number of code changes; implementing new features and fixing bugs isn't generally a two-line affair in games.
P.S. I am not in principle against a total rewrite of the game - it could be much faster than it is - but there is the small matter of who exactly is going to do it. It's not a one-man job, at least not in a reasonable time frame.
Even that will take you a while... the game code is undoubtedly pretty huge by itself.
I looked at the Descent 1 code a while back, and tinkered with some stuff there (most of it consisting of \"hax\"); I can also understand how going on a programming course and doing fairly well can make you think \"hey this stuff is easy!\".
It isn't. That sort of programming course introduces you to the basic discipline of programming, but it doesn't prepare you for how to deal with mind-blowingly large systems on the scale of Descent. A 200-line (or even 1000-line) program is pretty easy to sort out, but if you go into several thousand lines you start to encounter new problems with managing the complexity of the system you have. Once you hit the scale of mid-90s games (tens of thousands up to maybe a hundred thousand lines of code), those problems become serious, and redesigning parts is a major undertaking. Diedel already mentioned how much time rewriting the DMB2 UI took, and that's only part of the picture.
Of course, today you have some games with tens of millions of lines of code. That's just stunning, and at that point it really is no surprise they take years to finish.
By the way, Diedel could quite possibly have made 40,000 modifications to the D2 code. He's issued hundreds of releases, and each of those would certainly have had quite a number of code changes; implementing new features and fixing bugs isn't generally a two-line affair in games.
P.S. I am not in principle against a total rewrite of the game - it could be much faster than it is - but there is the small matter of who exactly is going to do it. It's not a one-man job, at least not in a reasonable time frame.
If I had a say in a rewrite of Descent 1/2, I'd definitely recommend using OpenGL 3. It contains all the fancy new stuff you can do with DX10, and it is free and not platform bound. Together with OpenAL, you can keep your game completely portable and quite platform and OS independent. For me, DirectX is an absolute and total no-go for the two simple reasons that it is platform and OS-bound and that it's simply M$ means for total domination in the world of computer games, and that is utterly unacceptable.
These guys sabotage every attempt at creating industry wide open standards for the sole benefit of their own revenue. I don't dislike (all) Microsoft products, but I sure as hell dislike their business attitude.
These guys sabotage every attempt at creating industry wide open standards for the sole benefit of their own revenue. I don't dislike (all) Microsoft products, but I sure as hell dislike their business attitude.
Re:
And it works great!Diedel wrote:Btw, some may not know that on top of doing D2X-XL I also rewrote DMB2, making DLE-XP out of it, which took several months by itself. I had rewritten the entire interface from scratch and recoded parts of the engine.