Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Coding Co-op

DOOM and DOOM Editors in BASIC

Recommended Posts

Hi everyone!

I've been a DOOMer since the shareware release (I still have the original 5.25" diskettes). I've been a BASIC programmer since the 1970s.

One thing that has bothered me since the beginning is the lack of editors in BASIC. If the DOOM source code and some key editors were translated to BASIC, imagine what would happen...a whole new generation of engines and editors made by people like me that have long wanted to, but didn't understand C or C++ enought to do the job. Think about it: Everyone who wants to make an ENDOOM resource pretty much has to use Endoomer, a very old DOS based editor. Everyone to this day, relies on WinTex which is old and relies on a DeuTex library to do everything. I am now working on a VB.NET version of an incomplete level editor called HIDE and a VB.NET ENDOOM editor call EndEdit.NET.

If this at all interests you, please email me.

Share this post


Link to post
Coding Co-op said:

Think about it: Everyone who wants to make an ENDOOM resource pretty much has to use Endoomer, a very old DOS based editor. Everyone to this day, relies on WinTex which is old and relies on a DeuTex library to do everything.

Wait, we do?

Share this post


Link to post

I'm not sure if it does ENDOOM yet, but XWE still works for it, at least.

Sprite alignment, yup. SLADE, as well as slightly older utilities SLumpEd and XWE, can do that.

Merging wad files can be done, though I don't think there's a single function to automagically do it for you. With all the different lumps and formats and such that can be in use in a wad nowadays, it's safer and saner to let users merge stuff together themselves using copy and paste of lumps and texture entries.

Editing level geometry in SLADE 3.0 is still in progress, but Doom Builder 2 is a fully functional and highly capable map editor, and earlier versions of SLADE supported level editing as well.

Share this post


Link to post

My whole point is, if there were BASIC versions of editors and the game source out there, many, many, more projects would be done. There are so many things for which there are either no programs for, or what programs are there are so old, that thier functionality is in danger of becoming extinct. Name the last editor that could edit saved games?

Share this post


Link to post
Coding Co-op said:

My whole point is, if there were BASIC versions of editors and the game source out there, many, many, more projects would be done. There are so many things for which there are either no programs for, or what programs are there are so old, that thier functionality is in danger of becoming extinct. Name the last editor that could edit saved games?

Saved games for which source port? There are so many in use nowadays, far more prominently than the original DOS exe, and it's not unheard of for a port's savegames to be incompatible from one major version to the next.

But overall I'm just not sure what huge set of features you're not seeing. SLADE handles lump editing with great ease, power, and stability. Doom Builder is the most advanced and capable map editor we've ever had for Doom. There's even tools like WhackEd to make Dehacked patches editable in Windows.

Share this post


Link to post

Do you honestly think there is a flood of BASIC developers clamoring to mess with Doom? The language is a relatively minor obstacle compared to the arcane file formats Doom uses anyway; you're going to have to do a lot of low-level bit twiddling no matter the language. If it was only a question of the language we would be flooded with C#/Java/python/ruby/etc tools.

Share this post


Link to post

Well, it's not like you can't manipulate bits in Perl (and I'm guessing also Python, Java, and maybe even Lua). Heck, the xwadtools package includes this:

$ man -k tkwad
tkwadcad (6) - a Doom/Heretic/Hexen/Strife WAD map editor

Yep, good old Tcl/Tk. :)

So I'm guessing VB can probably handle many things, but I'm not personally interested in it (or other Win32 tools). Something like FreePascal might be better, since it's highly portable and lots of people (hobbyists) use it to make games these days. Also, quite a bit of the old DOS Doom tools were written in Turbo Pascal, and some of them even include source code in the ZIP file.

Share this post


Link to post

I'm not saying there's a bunch of BASIC developers, but, there are poeple who would understand how to do things much better if they could see how BASIC handles things like reading and displaying textures, putting textures on walls, hacking the executable, etc. I have many sets of source codes for all kinds of things, but I can't make heads or tails of it. BASIC (with lots of comments) would just make everything so much easier to understand.

Share this post


Link to post
Coding Co-op said:

BASIC (with lots of comments) would just make everything so much easier to understand.

Yes. For you. To someone such as myself who has only worked with C/C++/Java, it would make things harder to understand. Only slightly, most likely, but switching to BASIC not a universal readability improvement.

I'm just not understanding what you're wanting here. Being a BASIC programmer, editor sources would be easier to understand for you if they were written in BASIC -- I get that. But the reason there aren't many BASIC Doom editors floating around is because nobody has written them. You're asking a chicken & egg question here -- they're not there because they're not there, plain and simple. Why not change the scene by pressing forward and writing an editor in BASIC? If you don't, who else will?

For the sake of providing something constructive, though, IIRC the 1.x versions of Doom Builder were written in VB.NET. Maybe there's something from there that you can use as a reference?

[EDIT] VB6, actually, if Hobbs is to be trusted. :P

Share this post


Link to post

I have to ask, what dialect of BASIC are you talking about? Not that there's a correct answer but I want to play along and see where this shit leads.

Xaser said:

For the sake of providing something constructive, though, IIRC the 1.x versions of Doom Builder were written in VB.NET. Maybe there's something from there that you can use as a reference?

Doom Builder 1.x was written in Visual Basic 6, which is why it has massive problems on any OS newer than Windows XP.

Share this post


Link to post

Well, in a perfect world, GWBASIC would be ideal because it is not only the simplest, but it forces you to follow the program flow because of its linear nature. VB1 through VB6 would get most of the jobs done. VB.NET can do everything, but is so cryptic that it almost defeats the purpose. Maybe I can beg someone to give me the VB6 code from Doom Builder 1.x? Although it likely uses a substantial amount of dlls, I'm sure it would help somehow. Anyway, I am working on stuff. I was hoping I could generate some interest. I do have a VB6 level editor in progress. It displays Hexen maps perfectly, but can't edit anything. I appreciate your feedback and comments, though. I am taking a look at FreePascal, but again, its not as simple as I would like.

Share this post


Link to post

Although I've never had the need to use it myself yet, Exl has a VB6 class module for manipulating wad files. You might find it useful though.

Also, the original Doom Builder source is here. Also probably useful if you're going to messing around with VB.

Share this post


Link to post

GWBASIC? You must be confusing it with QuickBASIC, because GWBASIC would be insanely difficult to create something really good, whose source code is actually legible. Although I do agree maybe QuickBASIC or VB/VB.NET programs might be a good idea, GWBASIC is most definitely not suited for this job

Share this post


Link to post
Coding Co-op said:

I am taking a look at FreePascal, but again, its not as simple as I would like.

One aspect of BASIC that's long bugged me is it's lack of portability, have you looked at BlitzMax?

Share this post


Link to post
Coding Co-op said:

My whole point is, if there were BASIC versions of editors and the game source out there, many, many, more projects would be done.

Nope. Programming doesn't get any easier just because you change the syntax.

Coding Co-op said:

I'm not saying there's a bunch of BASIC developers

Exactly. There aren't.

but, there are poeple who would understand how to do things much better if they could see how BASIC handles things like reading and displaying textures, putting textures on walls, hacking the executable, etc.

Nope. These are skills that require developing a way of thinking - a mindset that lets you understand how something is structured - and use it to solve problems. That is the essence of programming.

If you have that mindset then the language used is irrelevant. If you don't have that mindset, you'll be extremely limited in what you can achieve, regardless of the language.

I have many sets of source codes for all kinds of things, but I can't make heads or tails of it. BASIC (with lots of comments) would just make everything so much easier to understand.

So is it comments or BASIC you want? Converting the source code to that language won't magically add a bunch of comments that explain how it works.

Instead of complaining that things are written in a different language to the one that you know and trying to make the world adapt to you, have you tried just learning different languages and adapting yourself? Have you considered that there may be very good reasons that all those programs you're complaining about weren't written in BASIC?

Edsger W. Dijkstra said:
It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.

Share this post


Link to post

Db1 was indeed written mostly with VB6, apart for some "high performance" routines which are in a C dll. DB2 is written in C# which (I believe) can be converted to VB.NET if you look for the right tools on the internet. I'm not sure if VB.NET can deal with the "unsafe" pointer stuff tough.

I personally think it is best for your own development if you learn other languages instead of trying to get everything in VB. But suit yourself.

Share this post


Link to post

Isn't BASIC basically deader than shit along with Fortran, Cobol, Pascal and other unfriendly languages?

I thought the only medium-level language that gets any support is C and all C-derivatives.

CodeImp said:

That said, I personally think it is best for your own development if you learn other languages instead of trying to get everything in VB. But suit yourself.

I don't think he meant VB which is basically a Windows-only language. Translating C# to VB wouldn't really help all those non-Windows programmers. I think he meant the good old, basic BASIC.

Share this post


Link to post
Edsger W. Dijkstra said:

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.

There's no truth in that statement.

All it shows is Dijkstra's intellectual bigotry.

Share this post


Link to post
andrewj said:

There's no truth in that statement.

Heh. It's perhaps overstated, but there is certainly some truth to it. That quote is from 1975; you have to look at it in the context of what the BASIC language was like at that time he said it: no support for function calls, few high level programming constructs and rampant use of the GOTO statement. Dijkstra spent his career arguing in favour of structured programming, something that today we take for granted nowadays because it is now the foundation of all modern/popular programming languages. The BASIC of the time was effectively the antithesis of everything he was arguing for, teaching people all the wrong habits for how to program well.

Of course, you'll surely now point out that modern versions of BASIC like VB.NET include all those structured programming concepts. And I'll agree: VB.NET is certainly nothing like the BASIC of the '70s and '80s - VB.NET is actually almost identical to C#, just with a different syntax. But the quote is relevant, because the OP is specifically asking for GWBASIC, an implementation of BASIC from that era, and exactly the kind of thing that Dijkstra was arguing against.

Share this post


Link to post

I remember chatting with someone, a long while ago, who said he regretted ever learning BASIC because he couldn't wrap his mind around code written with function calls rather than GOTOs. All the concepts of call stack, scope, and the like frightened him. And it was the beginning of the OOP hype, so it only seemed to get increasingly weirder with a lot of scary concepts and the apparent need to do UML diagrams before you even start writing code. The horror!

Don't know if he had read Dijkstra or not, but he did blame BASIC for his inability to do serious programming. Personally I found it more like intellectual laziness, but I didn't tell him that.

Share this post


Link to post

Doesn't GWBASIC have GOSUB at least? Even the old BASIC dialects bundled with Amstrad and Amiga machines could effectively do function calls that way (along with CALL for the machine language equivalent, after you POKE'd it up).

Anyway, there are more modern dialects such as FreeBASIC, and in fact that's what drives the game engine for the Doom RPG that TheSpazztikOne is making (he posted about it here).

Share this post


Link to post
ellmo said:

Isn't BASIC basically deader than shit along with Fortran, Cobol, Pascal and other unfriendly languages?

Well... Fortran is still used because there are tons of large mathematical libraries that have had decades of optimizations and bug fixes. COBOL, Delphi (the 'enterprise' version of Pascal, more or less), and, yes, Visual Basic are still used in crusty old internal apps for large corporations. Certainly for any new development none of these languages would be a sane choice (other than Fortran for very specialized numeric/scientific computing).

Share this post


Link to post

C was easy to learn, never got how Basic works... too confusing, not my way of thinking.
DB1 using VB for the frontend was a clever move. I remember being too silly to figure that out at first and was wondering... "how the heck does this fella do the menus???".
Also had to search for the VS6 Enterprise edition.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×