FYI: A Doom-like engine

FYI: A Doom-like engine

Post by Bill Poitr » Thu, 05 May 1994 00:28:16



I have come across a Doom-like engine currently called wt.  It has
currently been ported to most non-Intel Unixes as well as Linux.  The
Linux version support the Linux XVGALib (probably similar to the one for
OS/2).  I currently don't have time to port it, so I figure I would throw
it out.  I know many people would like to see a doom-like game engine for
OS/2.  It looks like the port would be a snap.  Here is the README from
wt version 0.03:

wt - a 3D game engine

Copyright (C) 1994 by Chris Laurel

Please see the LICENSE file for further details.  You may not distribute
this project without this file (README) and the LICENSE file included.

---------------------------------------------------------------------------

This is still a preliminary version of my 3D game engine, wt.

* In the proud tradition of cp, mv, rm, as, and cc, now there is 'wt'
  wt (never capitalized) stands for "what's that?"

* This is not by any means a complete game.  It is just a demo of my
  graphics engine.  I'd never name a game wt.

* wt is portable software.  See the section on porting at the end of this
  README for information on what to change in order to port to another
  platform.

* Features:

        * Easy to edit world file.  Just haul out your favorite text editor
          and modify 'castle.world'  Or create your own .world file from
          scratch.  Whee.  Just don't get carried away because the world
          file format will be changing before the next release.

        * No BSP trees were killed to make this program.  Sorry . . . it's
          late.  BSP trees are elegant and fast *if* your environment is
          static.  I eventually want walls in wt that move and change shape.
          However, if I can't kill a bug having to do with walls perpendicular
          to the view plane, I may have to resort to a BSP tree for determining
          wall visibility (or if my current algorithm is too slow for worlds
          with a large number of walls.)

        * Variable texture map size.  Texture maps for walls can be any
          width you like, but the height must be either 64 or 128.  Floor
          textures must be either 64x64 or 128x128.  The main reason why
          arbitrary powers of two aren't supported has to do with the fact that
          Intels x86 chips don't have enough registers for my innermost loops.

        * Texture scaling for walls.  The walls have an x scale factor and
          a y scale factor.  It might be more properly called 'frequency,'
          since the smaller the parameter, the bigger the texture map will
          appear.  Supporting the scaling factors requires a couple of extra
          multiplies in the wall drawing function.

* Running the wt and xwt demos

        * For xwt, just type 'xwt castle.world'  The keys are:
            forward - up arrow
            backward - down arrow
            turn left - left arrow
            turn right - right arrow
            strafe - slash
            run - shift
            jump - space
            quit - q

            Alt or Meta should also be useable as strafe keys, but my
            version of X distributions as the Alt key mapped to something
            else.  

        * To run wt, you need to be root (or make it setuid root first.)
            As root, type 'wt castle.world'  The keys are the same as for the
            X version, except that the slash does not work for strafing.

* Resources

        * A wt mailing list has been started recently.  Topics will include
            improving the engine design and adding features, porting the
            engine to different architectures, and game design using the wt
            graphics engine.  The addresses are:

                to subscribe:  wtm-requ...@magoo.uwsuper.edu
                to post a message: w...@magoo.uwsuper.edu

        * The wt ftp site is magoo.uwsuper.edu.  wt related files will be
            located in the /pub/games directort.

* Responses

        * While wt does look similar in many respects to DOOM, it is not
          based on any DOOM source code, and I have no connection with Id
          software other than being a customer.

        * I will add mouse support for the X11 and svgalib versions.  I also
          want to support the Linux keyboard better by setting it to
          RAW mode.

        * Your X server needs to support the MIT shared memory extension
          in order for wt to run.  Also, it only currently supports an
          8-bit pseudo color visual.  I just haven't had a chance to perfect
          the X code.

        * I will eventually design a world editor.  It will run under X and
          be based on Tcl/Tk.

        * Pitch and roll will not be supported.  It's a fundamental constraint
          of the engine design.

        * Weird things will happen when you jump above the tops of buildings
          or though the ceiling.  You cannot see the tops of buildings--this
          is another design limitation.

        * Resizing the view window . . . this does need to be supported.  The
          reason why it is not currently supported again has to do with the
          limited register set of the x86 chips.  I wanted to keep all my
          variables in registers in the innermost loop, but they would not
          all fit.  So, I made the view width an immediate constant . . . if
          I can coax gcc to let me use the ebp register, I'll use that to
          hold the width.  Or I could just deal with the (probably minor)
          speed degradation I'd get by reading it from memory.

* Room for improvement

        * Optimizations.  There are some obvious ones that I have not gotten
          around to implementing yet.  I think that the floors code
          can be sped up significantly.  If you know of any improvements to the
          assembly loops in slice.c, *tell me*.  I'm not an Intel assembly
          language guru or anything.

        * Code cleanup.  The core of wt is still in development, so some of
          the code surrounding the renderer is hacky test-the-engine stuff.
          Once wt starts developing into a real game, much of the code
          will be reorganized.  wt.c will change completely.

* 'Port away!'

        * wt now supports both big and little endian machines.  There should
          not be anything remaining in wt which is endianness dependent.

        * There are three types of #define's used to block off non-portable
          sections of the code.  ARCH_i86 surrounds the couple assembly
          routines in the wt source.  I also surround these with an
          #ifdef __GNUC__ because the inline assembly code syntax in
          gcc is different than for other x86 compilers I've seen.  (Anyone
          considering doing an DOS or Windows port take note:  the GNU
          assembler uses AT&T syntax, which has the reverse operand order
          of Intel syntax.)  Finally, there is a #define to identify
          the graphics system.

        * Substitute C routines exist for assembly language functions.
          On a RISC system with a good compiler, I figure you shouldn't need
          to recode them in assembly language.  The C functions *should* work.
          I have not tested them in a while, but they were used extensively
          before I rewrote them in assembly.

        * Before attempting to compile on a non-UNIX system, #define PROFILE
          to be zero in render.c.

        * If you've got a non-Intel system with X11 (or an Intel system
          with X11 which does not have gcc), then you should be able to
          compile wt successfully by just not defining ARCH_i86 in the
          Makefile.

        * If you're not running X11, then you'll need to write your own
          graphics and input routines and add a #define for your graphics
          system.  Check out linuxvga.c and x11graphics.c for sample
          graphics implementations.  All you need is an initialization
          function, a cleanup function, and something to blast a framebuffer
          the screen--memcpy, CopyBits or whatever . . .

        * The input system hooks are declared in input.h.  To create your
          own input module, create a file with these functions in it.
          For sample input routines, look in linux-console.c and x11input.c.
          Mac and Windows people:
          x11input.c should give you a good idea about how to tie an
          event handler into wt.

        * Send me your ports and I'll include them in the next wt distribution!
          This goes for other improvements to wt, too.

        * I'm especially interested in reports about how fast wt will run
          on different platforms (wtStones?)  If you do a port, talk to me
          about speed, especially if you have a PowerMac or Alpha system.
          If you port it to a 286, I'm interested but I might laugh.

* Future directions:

        * I'd like to see wt become a multi-platform client for an
          Internet wide MUD type game.  Or a perhaps a net-wide arcade
          game like Xpilot.  I've got a lot of other more innovative ideas
          but I'd better get the engine done before I start spouting about
          them.

* Credits

        Dan Egnor (eg...@ugcs.caltech.edu) - submitted the first set of
             endian fixes.
        Dave Thomas (d...@thomases.demon.co.uk) - wrote up an Imakefile
        Pietik{inen (p...@lyseo.otol.fi) - RAW mode keyboard patches for
             the svgalib version.
        Harm Hanemaayer (hhane...@cs.ruu.nl) - Patches to linuxvga.c to
             make better use of svgalib.
        Russ Nelson (nel...@crynwr.com) - Created the as yet unincorporated
             Tcl worldfile changes and provided lots of good advice.
        Patrick L. McGillan (pmcgi...@magoo.uwsuper.edu) - Set up the wt
             mailing list and ftp site.

* Me:

        send any comments, ideas, bug reports, etc. to:

        Chris Laurel
        home: clau...@mr.net
        work: chr...@county.lmt.mn.org
        snailmail: 5700 W Lake St, #208
                   St. Louis Park, MN  55416

--
+-------------------+----------------------------+------------------------+
| Bill Poitras      | Molecular Simulations Inc. | Tel (617)229-9800      |
| b...@msi.com      | Burlington, MA 01803-5297  | FAX (617)229-9899      |
+-------------------+----------------------------+------------------------+
|FTP Mail           |mail ftpm...@decwrl.dec.com | Offers:ftp via email   |
|                   |Subject:<CR>help<CR>quit    |                        |
+-------------------------------------------------------------------------+

 
 
 

FYI: A Doom-like engine

Post by Nigel Broo » Fri, 06 May 1994 05:18:10




>OS/2).  I currently don't have time to port it, so I figure I would throw
>it out.  I know many people would like to see a doom-like game engine for
>OS/2.  It looks like the port would be a snap.  Here is the README from
>wt version 0.03:

  The port was a snap. The executable of my OS/2 fullscreen port is on
magoo.uwsuper.edu in the /incoming (and eventually /pub/games/bins)
directory. Other than not setting the palette, it runs just fine.

--
Nigel Brooke      | Coming soon from id and Broderbund :


 
 
 

FYI: A Doom-like engine

Post by Alex Zoghl » Fri, 06 May 1994 15:04:31


hmm... just a quick note:

your wt conversion didn't include all of the necessary
files. Since I have been playing with it on a UNIX box,
I just brought them over. I'm not sure other people
have that option. (need's the texture files)

Alex Z

 
 
 

FYI: A Doom-like engine

Post by Bill Poitr » Sat, 07 May 1994 06:54:13


: your wt conversion didn't include all of the necessary
: files. Since I have been playing with it on a UNIX box,
: I just brought them over. I'm not sure other people
: have that option. (need's the texture files)

And the pallette file too

--
+-------------------+----------------------------+------------------------+
| Bill Poitras      | Molecular Simulations Inc. | Tel (617)229-9800      |

+-------------------+----------------------------+------------------------+

|                   |Subject:<CR>help<CR>quit    |                        |
+-------------------------------------------------------------------------+

 
 
 

FYI: A Doom-like engine

Post by Hamish Mars » Sat, 07 May 1994 13:42:54





> >OS/2).  I currently don't have time to port it, so I figure I would throw
> >it out.  I know many people would like to see a doom-like game engine for
> >OS/2.  It looks like the port would be a snap.  Here is the README from
> >wt version 0.03:
>   The port was a snap. The executable of my OS/2 fullscreen port is on
> magoo.uwsuper.edu in the /incoming (and eventually /pub/games/bins)
> directory. Other than not setting the palette, it runs just fine.

I get connection refused when I try to ftp to magoo... Whats wrong?

--
======================================================================
|  Hamish Marson                                                     |
|  Systems Programmer              |                                 |

|  University of Waikato           | PHONE    +64 7 8562889 xt 8181  |
|  New Zealand                     | FAX      +64 7 8384066          |
===========Disclaimer :- Remember. You heard it here first.===========

 
 
 

FYI: A Doom-like engine

Post by Nigel Broo » Sat, 07 May 1994 15:19:12




>I get connection refused when I try to ftp to magoo... Whats wrong?

  It's probably just overloaded from all the wt releated traffic.

  As long as I'm posting, I might as well point out that my OS/2 port
of wt needs the textures out of the wt-0.03.tar.gz archive to run, so
anyone planning on using it should get that to (plus then you can look
at all the cool source code)

--
Nigel Brooke      | Coming soon from id and Broderbund :

 
 
 

FYI: A Doom-like engine

Post by Cave Ne » Sun, 08 May 1994 02:48:38



>  As long as I'm posting, I might as well point out that my OS/2 port
>of wt needs the textures out of the wt-0.03.tar.gz archive to run, so
>anyone planning on using it should get that to (plus then you can look
>at all the cool source code)

And I'll point out a couple more things:  (1) one of the readmes
indicated that 0.04 is due out tonight (or last night?), and (2)
this thing doesn't run on my ATI GUP.  I'm 99% certain this is the
same bug others have reported with ATI's stupid driver setup, but
I don't recall the work-around (if any)--if it's a simple matter
of installing one of the IBM VGA files on top of the ATI ones, e-mail
me and I'll summarize.  Thanks.

Btw, I'm using the ATI 1.2 drivers with a 2MB GUP under OS/2 2.1 GA
and haven't run SETVGA or anything like that in either DOS or OS/2
sessions...  I did follow the ATI setup instructions fairly carefully,
too.

Greg Roelofs

 
 
 

FYI: A Doom-like engine

Post by Nigel Broo » Sun, 08 May 1994 09:32:59





>And I'll point out a couple more things:  (1) one of the readmes
>indicated that 0.04 is due out tonight (or last night?), and (2)
>this thing doesn't run on my ATI GUP.  I'm 99% certain this is the
>same bug others have reported with ATI's stupid driver setup, but
>I don't recall the work-around (if any)--if it's a simple matter
>of installing one of the IBM VGA files on top of the ATI ones, e-mail
>me and I'll summarize.  Thanks.

  I just finished porting v0.04, it's on magoo.uwsuper.edu in /incoming
(and eventually /pub/games/wt/bins). This release include ALL the files
neccesary to run, unlike the previous one, which needed the textures from
the source archive.

Quote:>Btw, I'm using the ATI 1.2 drivers with a 2MB GUP under OS/2 2.1 GA
>and haven't run SETVGA or anything like that in either DOS or OS/2
>sessions...  I did follow the ATI setup instructions fairly carefully,
>too.

  Drivers shouldn't matter since it runs in full screen standard VGA mode.
The only thing I can think of is if it's not switching to full screen mode
properly. Try running it from the command prompt in a full screen OS/2
session.

A Plea For Help :

  I can't get the palette switching working. If anyone knows how to set up
IOPL under BCOS/2 1.0  *PLEASE*  send me an e-mail and let me in on the
secret.

--
Nigel Brooke      | Coming soon from id and Broderbund :

 
 
 

FYI: A Doom-like engine

Post by Lynn D Gabb » Mon, 09 May 1994 03:58:46


:   As long as I'm posting, I might as well point out that my OS/2 port
: of wt needs the textures out of the wt-0.03.tar.gz archive to run, so
: anyone planning on using it should get that to (plus then you can look
: at all the cool source code)

The OS/2 port never works on my system for some reason.  I run it, the screen
changes to vga video mode, i can tell it's drawing a room, but the palette
is screwed up.  I can press various keys, and nothing happens.  if i try to
alt-esc out, the whole system locks up, and i have to ctrl-alt-del.  Any
ideas why?  I'm using a trident 8900c on a 486-66 with 8mb and os2 2.11.

-L
***************************************************************************

 "Yeah, MIT is diverse... some people like Star Trek: The Next Generation
  while others prefer the original series."
 "What about DS9?" - an MIT student in defens

 
 
 

FYI: A Doom-like engine

Post by Alexander » Mon, 09 May 1994 02:53:59


I'd like to add that it refuses to work in windowed mode, and freezes my
machine in full-screen mode (486DX33 VL-BUS Tseng ET4000/w32).
--

                                "Not if you don't mind me clawing at the dash
Habs ... argh! Flames ... ugh!          and shrieking like a cheerleader!"
Leafs ... *pleeease*?           - Sam & Max Hit the Road
 
 
 

FYI: A Doom-like engine

Post by Patrick Premo » Mon, 09 May 1994 09:07:27





: >And I'll point out a couple more things:  (1) one of the readmes
: >indicated that 0.04 is due out tonight (or last night?), and (2)
: >this thing doesn't run on my ATI GUP.  I'm 99% certain this is the
: >same bug others have reported with ATI's stupid driver setup, but
: >I don't recall the work-around (if any)--if it's a simple matter
: >of installing one of the IBM VGA files on top of the ATI ones, e-mail
: >me and I'll summarize.  Thanks.
: >

:   I just finished porting v0.04, it's on magoo.uwsuper.edu in /incoming
: (and eventually /pub/games/wt/bins). This release include ALL the files
: neccesary to run, unlike the previous one, which needed the textures from
: the source archive.

: >Btw, I'm using the ATI 1.2 drivers with a 2MB GUP under OS/2 2.1 GA
: >and haven't run SETVGA or anything like that in either DOS or OS/2
: >sessions...  I did follow the ATI setup instructions fairly carefully,
: >too.

:   Drivers shouldn't matter since it runs in full screen standard VGA mode.

Yeah, but this is an ATI driver, not just any driver :(

Somehow, when using the ATI drivers, OS/2 programs which switch to
full screen mode don't do it correctly. They seem to setup in X mode
when they're not supopsed to or just the opposite, I don't know. The
effect is that you see 4 little copies of the screen instead of
a big one. But it works correctly in a DOS session.

: The only thing I can think of is if it's not switching to full screen mode
: properly. Try running it from the command prompt in a full screen OS/2
: session.

Unfortunately, that doesn't solve the problem.

Patrick Premont

 
 
 

1. fix (sort of) for ATI full-screen bug (was Re: FYI: A Doom-like ...)

I wrote (about wt-os2 0.03):

[There is one benefit to this, however:  I get over 10fps with the
 little windows, but only 1fps with the big one. :-) ]


for the problem.  Basically you switch out of the OS/2 full-screen
session but make sure it's highlighted (i.e., top of the stack), then
start a DOS full-screen graphics session (e.g., DOOM or wt for DOS)
and use alt-esc to switch away from the DOS session.  Because the OS/2
full-screen session was first on the list before starting the DOS one,
that's where you go next, without hitting the WPS and its high-res
graphics mode on the way.  Of course, if you switch away again, you'll
have to go back to the DOS session before returning to wt, or else
you get the same 4-baby-window effect.

Btw, the palette stuff in 0.04a is much nicer.  Kudos to Nigel for a
good-looking port.  Now if he can just be persuaded to work on the
keyboard handling a bit... ;-)

Greg Roelofs

P.S.  Please redirect follow-ups appropriately...

P.P.S.  And if anyone has a REAL FIX for this bug, please let me know!
        I found a posting from a month or so ago where someone else was
        inquiring about this, but I never saw any responses.  I'm using
        the 1.2 drivers at 1280x1024 on a 2MB GUP under OS/2 2.1GA.

2. Text in form email xmit

3. GXE64Pro problems with DOOM, DOOM II, DESCENT, etc

4. AdSpeed Q

5. Doom/2?? Running Doom and Doom ][ under OS/2??

6. Indigo2 shutdown error

7. Mobile Office Mag likes Warp

8. IPv6 and Gateway Problems

9. Randall C. Kennedy likes Warp

10. RS Rodgers likes OS/2

11. Software ETC likes OS/2 in chicago...

12. Gee, no one likes my Solution Pak idea?

13. Joan Rivers likes OS/2,05/27