Doom?

new games to be launched and discussed here
mr-macrisc
Posts: 282
Joined: Wed Feb 07, 2018 3:35 pm
Contact:

Doom?

Post by mr-macrisc » Fri Feb 15, 2019 6:50 pm

Being speccy and c64 have versions. Speccy one looks much more playable.

How good a version could we get utilising a Rasp Pi 2nd processor? Either very fast 6502 or Arm core.

Yeah I know it's old and been done on everything but would still be cool to see how well it could be done on hardware from early 80's (OK the 2nd processor isn't that old but it is still utilising hardware as it was originally envisaged when tube was designed).

John

RobC
Posts: 2666
Joined: Sat Sep 01, 2007 9:41 pm
Contact:

Re: Doom?

Post by RobC » Fri Feb 15, 2019 8:23 pm

Porting C code to run on the Pi co-pro is pretty simple. It's then mainly a case of sorting out the video, sound and input routines.

With the main game running on the Pi, you could double buffer a reasonably sized play area in mode 2 even on a standard Beeb.

For my Pi-based Spectrum and CPC emulators, I send the screen differences across the TUBE. I've got host-based ROM routines that plot whole rows or plot blocks of differences so the video wouldn't be too difficult. This is a bit more complicated when you're double buffering as you have to manage two frames worth of differences.

However, you'd probably get an acceptable frame rate just by updating the whole of the play area if it were reduced to something like 10K (say 128 x 160 pixels in mode 2) with a status area underneath. A 12K play area (128 x 192) would be even better but would obviously take longer to update.

I haven't looked at it but something like SDL Doom might be the easiest starting point as the screen, keyboard and sound APIs are all well defined so it's easy to spot what you have to convert.

User avatar
trixster
Posts: 891
Joined: Wed May 06, 2015 11:45 am
Location: York
Contact:

Re: Doom?

Post by trixster » Sat Feb 16, 2019 10:11 am

There’s an Arm version of Doom available that maybe the adventurous could try to port to the Pi Arm core? Would that be easier? It says it needs an Arm3 or better but there’s a video of it running on an Arm250.
A3020 | A3000 | A420/1 | BBC B | Master Turbo | ZX48K | NeoGeo
Atom | Amiga A4000 | A3000 | A1200 | A500 | PC Engine | Enterprise
Falcon | Saturn | PS1 | SNES | CPC6128 | C64 | 3DO | MD | Jaguar | X68000 | CD32

jregel
Posts: 134
Joined: Fri Dec 20, 2013 6:39 pm
Location: Gloucestershire
Contact:

Re: Doom?

Post by jregel » Sat Feb 16, 2019 1:10 pm

Interestingly, the Atari Jaguar port of Doom rendered at a resolution of 160x180 (although that was in 16bit colour, so 65536 colours!).

If anyone wants more information, the book Game Engine Black Book: Doom is an interesting read.
BBC Master Turbo
Retroclinic External Datacentre
VideoNuLA
PiTubeDirect with Pi Zero

mr-macrisc
Posts: 282
Joined: Wed Feb 07, 2018 3:35 pm
Contact:

Re: Doom?

Post by mr-macrisc » Sat Feb 16, 2019 1:26 pm

May need to read that. :)

User avatar
AndyF
Posts: 1274
Joined: Sat Feb 23, 2008 10:16 pm
Location: Derby
Contact:

Re: Doom?

Post by AndyF » Sat Feb 16, 2019 3:48 pm

Random thought: If planning on using the Speccy version to port over, why not build it to use the Z80 Tube instead perhaps ?

As then you're doing Z80 > Z80 instead of Z80 > 6502
Last edited by AndyF on Sat Feb 16, 2019 3:49 pm, edited 1 time in total.
Andy

* NEW * The Jetset Willy and Manic Miner community :)

Adventure games ported across to the BBC (in progress) as soon as I can find some time!

mr-macrisc
Posts: 282
Joined: Wed Feb 07, 2018 3:35 pm
Contact:

Re: Doom?

Post by mr-macrisc » Sat Feb 16, 2019 4:42 pm

No planned ports, little ambitious for me but thought would be interesting to see what could be done with modern tube processors. Either very fast 6502 or ARM. Wonder if just updated pixels coming back may even be able to use a 16 colour mode. Of course porting a speccy version I'd expect defeats purpose of the exercise in seeing how far beeb could be pushed with current avail tube cpu's

RobC
Posts: 2666
Joined: Sat Sep 01, 2007 9:41 pm
Contact:

Re: Doom?

Post by RobC » Mon Feb 18, 2019 9:23 am

Had a very quick look at SDL Doom last night and I really do think that this would be a quick route to getting Doom up and running on the Pi co-pro...

The only source files that didn't compile immediately were the three files for the low-level video, sound and networking. It looks like the networking and sound could just be disabled initially by coding up some stubs.

I think the video code has configurable screen sizes as it all seems to run off a couple of #defines. The keyboard and mouse handling is also in the video source file. You'd have to do pretty major work to this file but that's always going to be the case.

User avatar
AndyF
Posts: 1274
Joined: Sat Feb 23, 2008 10:16 pm
Location: Derby
Contact:

Re: Doom?

Post by AndyF » Mon Feb 18, 2019 5:10 pm

mr-macrisc wrote:
Sat Feb 16, 2019 4:42 pm
Of course porting a speccy version I'd expect defeats purpose of the exercise in seeing how far beeb could be pushed with current avail tube cpu's
Yes and no (imo) :mrgreen:

Reasons being with a Z80 to Z80 port some of the work is already done for you, I realise not that much 'in reality' as it would most likely have to be re-written, but the 'base' would be there rather than a blank window, if that makes sense. :)

Z80 is an available Co-Pro :) I'm not quite sure what you mean by 'currently available' ones ? I may of completely misunderstood so forgive me if that's the case. :oops:
Andy

* NEW * The Jetset Willy and Manic Miner community :)

Adventure games ported across to the BBC (in progress) as soon as I can find some time!

RobC
Posts: 2666
Joined: Sat Sep 01, 2007 9:41 pm
Contact:

Re: Doom?

Post by RobC » Mon Feb 18, 2019 5:55 pm

AndyF wrote:
Mon Feb 18, 2019 5:10 pm
Reasons being with a Z80 to Z80 port some of the work is already done for you, I realise not that much 'in reality' as it would most likely have to be re-written, but the 'base' would be there rather than a blank window, if that makes sense.
Completely agree that starting from something that's already been done makes a lot of sense. As I've said though, I'd be more tempted to go with the existing C code at first - it might turn out to be too slow/ambitious but it'll be a lot easier to pull apart for a port. Also, you'd gain something by running native ARM rather than a Z80 emulation on the Pi.

Looking at SDL Doom, the screen is 320 x 200 with a 32 pixel high status area. Converting this to mode 2 at 160 x 200, you'd have enough memory to double buffer the main display (160 x 168) even on a model B. At just over 13KB and roughly 9 cycles per byte to transfer the screen data, you'd be looking at a maximum rate of around 16 frames per second. A lot of this will depend on how long the Pi takes to render the display though...

User avatar
trixster
Posts: 891
Joined: Wed May 06, 2015 11:45 am
Location: York
Contact:

Re: Doom?

Post by trixster » Mon Feb 18, 2019 6:47 pm

16fps would be plenty.

The BadMood Atari Falcon port runs at about 8fps using the 16mhz 030, the fpu and the dsp... and that’s more than playable. A 25mhz 040 in an Amiga turns in about 10fps and it takes a 50mhz+ 060 to get more than 20fps.
Last edited by trixster on Tue Feb 19, 2019 6:13 am, edited 1 time in total.
A3020 | A3000 | A420/1 | BBC B | Master Turbo | ZX48K | NeoGeo
Atom | Amiga A4000 | A3000 | A1200 | A500 | PC Engine | Enterprise
Falcon | Saturn | PS1 | SNES | CPC6128 | C64 | 3DO | MD | Jaguar | X68000 | CD32

User avatar
kieranhj
Posts: 808
Joined: Sat Sep 19, 2015 10:11 pm
Location: Farnham, Surrey, UK
Contact:

Re: Doom?

Post by kieranhj » Mon Feb 18, 2019 10:28 pm

As amazing as the Spectrum version is from a technical point of view on Z80, I would posit it’s not actually Doom but a 2D raycasting engine with Doom-like sprites.

If RobC can work his native ARM copro magic with SDLDoom that would be seriously impressive. Otherwise I’d suggest something more modestly achievable such as Wolfenstein 3D on a genuine 6502 copro at reduced MODE 2 resolution or perhaps MODE 8 or even a linear addressing mode.
Bitshifters Collective | Retro Code & Demos for BBC Micro & Acorn computers | https://bitshifters.github.io/

soviet
Posts: 85
Joined: Tue Dec 04, 2018 10:05 pm
Location: Montevideo, Uruguay
Contact:

Re: Doom?

Post by soviet » Tue Feb 19, 2019 4:09 pm

The spectrum port of doom is impressive, but Citadel another doom clone for the spectrum is even better in my opinion: https://www.youtube.com/watch?v=2rWooGqqQ5w

mr-macrisc
Posts: 282
Joined: Wed Feb 07, 2018 3:35 pm
Contact:

Re: Doom?

Post by mr-macrisc » Tue Feb 19, 2019 4:24 pm

AndyF wrote:
Mon Feb 18, 2019 5:10 pm
mr-macrisc wrote:
Sat Feb 16, 2019 4:42 pm
Of course porting a speccy version I'd expect defeats purpose of the exercise in seeing how far beeb could be pushed with current avail tube cpu's
Yes and no (imo) :mrgreen:

Reasons being with a Z80 to Z80 port some of the work is already done for you, I realise not that much 'in reality' as it would most likely have to be re-written, but the 'base' would be there rather than a blank window, if that makes sense. :)

Z80 is an available Co-Pro :) I'm not quite sure what you mean by 'currently available' ones ? I may of completely misunderstood so forgive me if that's the case. :oops:
I meant currently available as in Pi as opposed to what was available when beeb was new-ish.

And meant can't see reason for porting speccy version as it wouldn't show off anything it would not be a "wow look what has been achieved on a 37yr old computer". Yes you could argue 2nd processor is modern but think loads of old hardware (speccy, amiga and sure others) have had all sorts of later upgrades and accelerator boards made over the years too.

VectorEyes
Posts: 245
Joined: Fri Apr 13, 2018 1:48 pm
Contact:

Re: Doom?

Post by VectorEyes » Tue Feb 19, 2019 4:36 pm

The Doom clones for 8-bit systems are very impressive and push the hardware to its limits, but to my mind they don't really play to the strengths of the platform. Realtime 3D textured games inevitably suffer in comparison to the PC 'originals', whereas something like Elite or Exile (or equivalent platform-defining games on the Speccy, C64 etc) continue to stand up well because they were designed within the limitations of the platform at the time and continue to offer a decent gameplay experience. (Or perhaps that's just nostalgia speaking!)

I can see some kind of Dungeon Master or similar grid-based RPG/action game working well. But free-movement 3D texture-mapping games just don't do it for me on 8-bit. You'll always be aware of the framerate and enemy-count limitations and it detracts from the experience. They're technologically amazing, but are they actually fun to play?
Last edited by VectorEyes on Tue Feb 19, 2019 4:37 pm, edited 1 time in total.

User avatar
Dethmunk
Posts: 215
Joined: Fri Jul 01, 2016 12:29 pm
Location: Guildford
Contact:

Re: Doom?

Post by Dethmunk » Sat Feb 23, 2019 2:09 pm

Wouldn't it be easier and may be even a bit nicer from an FPS viewpoint to do a hidden Wireframe poly environment and then spend the graphic budget on the Sprites? For me the speed of gameplay is more important than trying to replicate a textured environment. Just and idea. :wink:
Last edited by Dethmunk on Sat Feb 23, 2019 2:10 pm, edited 1 time in total.
Image

RobC
Posts: 2666
Joined: Sat Sep 01, 2007 9:41 pm
Contact:

Re: Doom?

Post by RobC » Sat Feb 23, 2019 2:42 pm

Dethmunk wrote:
Sat Feb 23, 2019 2:09 pm
Wouldn't it be easier and may be even a bit nicer from an FPS viewpoint to do a hidden Wireframe poly environment and then spend the graphic budget on the Sprites? For me the speed of gameplay is more important than trying to replicate a textured environment. Just and idea. :wink:
Think it depends on how much work you want to do. By simply porting the existing code you don't actually have to modify (or understand!) that much of it - just translate the key handling and video and nobble the sound and networking :)

User avatar
Dethmunk
Posts: 215
Joined: Fri Jul 01, 2016 12:29 pm
Location: Guildford
Contact:

Re: Doom?

Post by Dethmunk » Sat Feb 23, 2019 3:36 pm

Come on this must be doable?! Surely hee hee. A little mockup screen....... :wink: :D

Image
Image

RobC
Posts: 2666
Joined: Sat Sep 01, 2007 9:41 pm
Contact:

Re: Doom?

Post by RobC » Sat Feb 23, 2019 8:20 pm

Dethmunk wrote:
Sat Feb 23, 2019 3:36 pm
Come on this must be doable?! Surely hee hee. A little mockup screen....... :wink: :D
That looks amazing John - your talent is incredible!

I'm sure it is doable, it's just that I think a straight port of the SDL Doom code is less work. There's also an argument that you might as well do the full texture thing if you're more or less going to end up sending the full frame over the TUBE.

I've almost got the source compiling - keyboard handling is done, just got one bit left to do in the video rendering. Will then need to test the host code for the TUBE transfers and screen buffer flipping.

I've probably spent less than 2 hours on it so far - might have got it built today if I hadn't been watching the rugby :D
Last edited by RobC on Sat Feb 23, 2019 8:28 pm, edited 3 times in total.

User avatar
trixster
Posts: 891
Joined: Wed May 06, 2015 11:45 am
Location: York
Contact:

Re: Doom?

Post by trixster » Sat Feb 23, 2019 8:29 pm

That little smiley speaks volumes [-X :evil: :lol: :D
A3020 | A3000 | A420/1 | BBC B | Master Turbo | ZX48K | NeoGeo
Atom | Amiga A4000 | A3000 | A1200 | A500 | PC Engine | Enterprise
Falcon | Saturn | PS1 | SNES | CPC6128 | C64 | 3DO | MD | Jaguar | X68000 | CD32

mr-macrisc
Posts: 282
Joined: Wed Feb 07, 2018 3:35 pm
Contact:

Re: Doom?

Post by mr-macrisc » Sat Feb 23, 2019 9:33 pm

:mrgreen: =D>

User avatar
marcusjambler
Posts: 646
Joined: Mon May 22, 2017 11:20 am
Location: Bradford
Contact:

Re: Doom?

Post by marcusjambler » Sun Feb 24, 2019 1:48 am

Epic Rob :D =D> =D> =D> :lol: [-o<

Beeb SDL Doom.... splendid :D

Marcus

soviet
Posts: 85
Joined: Tue Dec 04, 2018 10:05 pm
Location: Montevideo, Uruguay
Contact:

Re: Doom?

Post by soviet » Mon Feb 25, 2019 2:25 pm

Cool :D

User avatar
Rich Talbot-Watkins
Posts: 1529
Joined: Thu Jan 13, 2005 5:20 pm
Location: Palma, Mallorca
Contact:

Re: Doom?

Post by Rich Talbot-Watkins » Mon Feb 25, 2019 3:04 pm

Dethmunk wrote:
Sat Feb 23, 2019 3:36 pm
Come on this must be doable?! Surely hee hee. A little mockup screen....... :wink: :D

Image
I have to say, that is very inspiring. And your eye for the technical as well as the aesthetic is superb (I noticed the exactly 128 pixel wide playing area!).

When considering Doom type games on the Beeb, I've too often fixated on the rendering tech side of things (texture mapping etc) at the expense of the elements which actually make it a good game. I think you're absolutely spot on with this - the graphical style is lovely, and what's more the wireframe style of the world works far better on a Beeb with its limited palette and resolution; this way, it's possible for the player to focus on the action and exploration, without getting a headache from non-mipmapped, low resolution walls running at 5fps :lol:

I'm instantly reminded of Atic Atac by that mockup (which is not a bad thing I don't think!), but a kind of super 3D Atic Atac!

I definitely think it's feasible on the Beeb - probably using a portal type system rather than the BSP used by Doom (both for simplicity and to reduce the data size). The scaled sprites would be the killer, but E-Type does it throughout so there'll be a way.

User avatar
Dethmunk
Posts: 215
Joined: Fri Jul 01, 2016 12:29 pm
Location: Guildford
Contact:

Re: Doom?

Post by Dethmunk » Tue Feb 26, 2019 11:25 pm

Thanks Rich. The wireframe must be quicker to render and looks far cleaner than busy graphics. Looking at things like this on the Spectrum for instance its hard to tell whats going on. After all you want a proper FPS experience not a 2 frames per second confusion that you get on Spectrum. The maps are rarely copies of the actual game in those demo's either. So some sort of Grid based map would be easier to generate than a complex dungeon I reckon too. :wink:
Sprites would be the difficult thing. Especially at speed. Compounded by multiple enemies and or scenery objects like: Barrels, Candles, Chains etc. :D
Image

User avatar
Lardo Boffin
Posts: 1623
Joined: Thu Aug 06, 2015 6:47 am
Contact:

Re: Doom?

Post by Lardo Boffin » Wed Feb 27, 2019 7:51 am

Awesome stuff and I look forward to playing it! :lol:

I watched an interesting video on Doom design rules recently - they are a big part of what made the game what it is. While they are obviously not all applicable here some are and I think some consideration to similar will help it to be fun as well as a technical achievement.

https://youtu.be/ptHurafdCoQ
Atom, issue 5
BBC model B 32k issue 4, 16k sideways RAM, Watford 12 ROM board, Acorn 6502 coproc
BBC model B 32k issue 7, turboMMC, Opus Challenger 3 512k, Pi 3 coproc
USA Model B
BBC Master, Datacentre + HDD, pi co-proc, econet, NULA

User avatar
paulv
Posts: 3854
Joined: Tue Jan 25, 2011 6:37 pm
Location: Leicestershire
Contact:

Re: Doom?

Post by paulv » Wed Feb 27, 2019 8:06 am

Dethmunk wrote:
Sat Feb 23, 2019 3:36 pm
Come on this must be doable?! Surely hee hee. A little mockup screen....... :wink: :D

Image
That's clearly recognisable as a Doom clone =D> =D> =D> . As the Doom/Quake franchises are some of my favourite modern gaming experiences, I have to say a Beeb version of Doom which looked like this would be the biggest game since Elite on the Beeb for me!

Paul

mr-macrisc
Posts: 282
Joined: Wed Feb 07, 2018 3:35 pm
Contact:

Re: Doom?

Post by mr-macrisc » Wed Feb 27, 2019 8:41 am

paulv wrote:
Wed Feb 27, 2019 8:06 am
Dethmunk wrote:
Sat Feb 23, 2019 3:36 pm
Come on this must be doable?! Surely hee hee. A little mockup screen....... :wink: :D

Image
That's clearly recognisable as a Doom clone =D> =D> =D> . As the Doom/Quake franchises are some of my favourite modern gaming experiences, I have to say a Beeb version of Doom which looked like this would be the biggest game since Elite on the Beeb for me!

Paul
Totally agree, for an 8-bit system to actually have a playable, fun, good looking clone of something 3d like this would be epic. And would defo hit some of the computer/tech news sites.

Be even cooler if we could design/use out own maps for it to create a game that isn't just a few levels.

Was kinda why I made my post as I reckoned the 2nd processor could make it one 8bit system that could just about do it and be playable rather than just a awkward proof concept excersize.

John

User avatar
Rich Talbot-Watkins
Posts: 1529
Joined: Thu Jan 13, 2005 5:20 pm
Location: Palma, Mallorca
Contact:

Re: Doom?

Post by Rich Talbot-Watkins » Wed Feb 27, 2019 9:18 am

I'm taking tentative steps into putting together a very simple demo along these lines - first step is a tool which can extract maps from Doom wads and convert them to a simpler portal format. (For the technically minded amongst you, this involves having to decompose an arbitrary polygon with holes into a set of convex polygons - a surprisingly difficult task, but luckily actually related to my day job!). Then I'll try and get the wireframe map rendering with static scaled sprites, and we'll be able to see what it's looking like frame rate-wise!

I don't imagine necessarily trying to port Doom, but a simplified but faithful clone would be the next best thing. What I really want to preserve is the variable floor and ceiling height and the angled walls, rather than the very rigid, flat grid-like nature of Wolf3d.

mr-macrisc
Posts: 282
Joined: Wed Feb 07, 2018 3:35 pm
Contact:

Re: Doom?

Post by mr-macrisc » Wed Feb 27, 2019 9:23 am

Wow sounds great, hopefully the concept proves its potentially going to be fast enough frame rate and potentially playable

Post Reply