Page 1 of 5

Doom?

Posted: Fri Feb 15, 2019 6:50 pm
by mr-macrisc
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

Re: Doom?

Posted: Fri Feb 15, 2019 8:23 pm
by RobC
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.

Re: Doom?

Posted: Sat Feb 16, 2019 10:11 am
by trixster
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.

Re: Doom?

Posted: Sat Feb 16, 2019 1:10 pm
by jregel
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.

Re: Doom?

Posted: Sat Feb 16, 2019 1:26 pm
by mr-macrisc
May need to read that. :)

Re: Doom?

Posted: Sat Feb 16, 2019 3:48 pm
by AndyF
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

Re: Doom?

Posted: Sat Feb 16, 2019 4:42 pm
by mr-macrisc
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

Re: Doom?

Posted: Mon Feb 18, 2019 9:23 am
by RobC
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.

Re: Doom?

Posted: Mon Feb 18, 2019 5:10 pm
by AndyF
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:

Re: Doom?

Posted: Mon Feb 18, 2019 5:55 pm
by RobC
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...

Re: Doom?

Posted: Mon Feb 18, 2019 6:47 pm
by trixster
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.

Re: Doom?

Posted: Mon Feb 18, 2019 10:28 pm
by kieranhj
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.

Re: Doom?

Posted: Tue Feb 19, 2019 4:09 pm
by soviet
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

Re: Doom?

Posted: Tue Feb 19, 2019 4:24 pm
by mr-macrisc
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.

Re: Doom?

Posted: Tue Feb 19, 2019 4:36 pm
by VectorEyes
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?

Re: Doom?

Posted: Sat Feb 23, 2019 2:09 pm
by Dethmunk
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:

Re: Doom?

Posted: Sat Feb 23, 2019 2:42 pm
by RobC
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 :)

Re: Doom?

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

Image

Re: Doom?

Posted: Sat Feb 23, 2019 8:20 pm
by RobC
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

Re: Doom?

Posted: Sat Feb 23, 2019 8:29 pm
by trixster
That little smiley speaks volumes [-X :evil: :lol: :D

Re: Doom?

Posted: Sat Feb 23, 2019 9:33 pm
by mr-macrisc
:mrgreen: =D>

Re: Doom?

Posted: Sun Feb 24, 2019 1:48 am
by marcusjambler
Epic Rob :D =D> =D> =D> :lol: [-o<

Beeb SDL Doom.... splendid :D

Marcus

Re: Doom?

Posted: Mon Feb 25, 2019 2:25 pm
by soviet
Cool :D

Re: Doom?

Posted: Mon Feb 25, 2019 3:04 pm
by Rich Talbot-Watkins
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.

Re: Doom?

Posted: Tue Feb 26, 2019 11:25 pm
by Dethmunk
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

Re: Doom?

Posted: Wed Feb 27, 2019 7:51 am
by Lardo Boffin
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

Re: Doom?

Posted: Wed Feb 27, 2019 8:06 am
by paulv
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

Re: Doom?

Posted: Wed Feb 27, 2019 8:41 am
by mr-macrisc
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

Re: Doom?

Posted: Wed Feb 27, 2019 9:18 am
by Rich Talbot-Watkins
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.

Re: Doom?

Posted: Wed Feb 27, 2019 9:23 am
by mr-macrisc
Wow sounds great, hopefully the concept proves its potentially going to be fast enough frame rate and potentially playable