Raycaster Experiment
Re: Raycaster Experiment
Yep this is jhhoward stuff right here. I'm amazed at this not much else I can say besides the doom shotgun is awesome. Going stippled/monochrome-unfilled makes all of this just work. The only time the frame rate drops is when you are so close to the enemy, that collision wouldn't have even let you there so I'd say this is a complete proof of concept.
I notice this is not strictly orthogonal geometry on the back wall, is this a special case for 45 degree walls or is this actually running some kind of sector based system?
I notice this is not strictly orthogonal geometry on the back wall, is this a special case for 45 degree walls or is this actually running some kind of sector based system?
Re: Raycaster Experiment
Man, this is impressive! Never thought I would see something like this on the Uzebox. It's really smooth so far and if you fix the big sprite issue that will be a killer game. You really have solid ucc2016 stuff here.
-
- Posts: 1445
- Joined: Mon Feb 11, 2013 8:08 am
- Location: Brisbane, Australia
Re: Raycaster Experiment
yes - definitely impressive. May have to rethink my UCC2016 plan.
Re: Raycaster Experiment
Every year someone comes up with something awesome. Then I have to go into the code and dissect the code and try and figure it out. I don't always follow 100% but it is nice to see thinking on this level.
Re: Raycaster Experiment
I could not resist trying it out with the Doom music! I ported the song to the MOD engine and it sound pretty damn good I think.
Re: Raycaster Experiment
Damn you Alec, how can I beat that!?uze6666 wrote:And I didn't expect the music! Damn you Lee, now we totally need Doom on the Uzebox!
I'm guessing this is not yet in rom format, but is that sample rate 15khz? I'm also beginning to suspect you have a tutorial in your head and/or some Uzebox VST you are not sharing with the rest of the class! Surely this must end up using channel 5 for percussion for this to sound like also? The drums are out of control
Interesting thing, some people say E1M1 has elements from Metallica "No Remorse" or "Master of Puppets". Maybe, but listen to Slayer "Behind The Crooked Cross" for about 30 seconds it's hard to deny the main riff is nearly a direct copy. Doom music has huge amounts of Slayer, Metallica, Pantera, and Alice In Chains riffs with altered tempos or what not.
Re: Raycaster Experiment
It indeed uses channel 5 but only for the for the snare and bell ride cymbals. It could probably be cut out, but that snare adds alot the the groove. I reused a lots of instruments from the T2K module, so it was a quick conversion. So plain mod tracking and use just 1 effet, vibrato. And that's why it's not in ROM format yet because it is not yet supported in the engine. But shall be soon if the game progress -- and wants to use that song of course. And about a VST instrument...that would be the cream of the crop indeed. Maybe Nebososo has some time for this now his done with the path tool.
Re: Raycaster Experiment
Ah yes, forgot to mention that the walls aren't restricted to a grid like in Wolfenstein. In the demo, the ends of the walls can be at any arbitrary points. I was thinking about creating a sector based system where each sector is restricted to a convex shape, with sectors joined by portals. There are some assumptions and potential optimisations that can be made about sectors being convex when it comes to rendering and collision detection.D3thAdd3r wrote: I notice this is not strictly orthogonal geometry on the back wall, is this a special case for 45 degree walls or is this actually running some kind of sector based system?
Thanks! I haven't entered UCC2016 yet as I don't know if I would have time to make this into a full gameCunningFellow wrote:yes - definitely impressive. May have to rethink my UCC2016 plan.
Haha quite fitting with the musicuze6666 wrote:I could not resist trying it out with the Doom music! I ported the song to the MOD engine and it sound pretty damn good I think.
I noticed in your video that the shotgun sometimes flickers on/off which is strange as the double buffering should prevent this. I might have to take another look.
I was having a think again about a texture mapped video mode, and I think it would be possible to do in 12 cycles / pixel whilst still retaining the 1bpp overlay buffer for sprites. The horizontal resolution would be reduced from 144 to 120 though, which might be a bit too low. The mode would work a bit like this:
Code: Select all
; Texture mapped video mode:
; 120 x 128 resolution
; Memory layout:
; * A 256 byte texture bank space in RAM aligned to 256 byte boundary
; * A (64?) byte look up table aligned to 256 byte boundary
; * A column buffer of texture base address and wall size for each column (240 bytes x 2 buffers)
; * An overlay buffer at 1bpp for 120x64, double buffered = 1920 bytes
; Setup:
; X is pointer to the column buffer
; ZH is the upper byte of the texture scaler look up table
; (LUT is updated for each scanline during the HBLANK)
; YH is the upper byte for the texture bank
; Pixel routine (12 cycles):
ld ZL, X+ ; Load the wall size, which is an offset into the LUT
ld YL, X+ ; load the texture base offset
ld r16, Z ; look up texture offset from LUT
add YL, r16 ; add the offset
ld r16, Y ; load the texture colour
sbrs OVERLAY_REG, OVERLAY_BIT ; check overlay mask
mov r16, OVERLAY_COLOUR ; set overlay colour if bit is set
out r16 ; output pixel
There is some wastage, as floor and ceiling colours have to be encoded into each texture strip. However, it should be possible to compress textures that have repeating patterns by only storing unique vertical strips. It should be possible to have several simple 8x8 texture patterns.
Now I will just have to find some time to see if this actually works. The main problem I foresee is having enough cycles to update the LUT in the HBLANK. for 64 bytes, it would take at least 320 cycles which might be too much (5 cycles per byte for lpm/st in an unrolled loop). One option is to update the LUT over two scanlines which effectively halves the vertical resolution, but it would match up with the overlay buffer this way.
Re: Raycaster Experiment
I thought it was a feature as it only happened when I hit the fire button!I noticed in your video that the shotgun sometimes flickers on/off which is strange as the double buffering should prevent this. I might have to take another look
So for the later code you showed, the wall would be texture mapped? That would be impressive and I would mind the decreased resolution if the frame rate is high enough.
Re: Raycaster Experiment
Did jhhoward ever upload any source to his 3D demo?
I'm very impressed with the Megadrive Wolf3D port and jhhoward's Catacombs of the damned. It would be cool to see that ported to UB!
I'm very impressed with the Megadrive Wolf3D port and jhhoward's Catacombs of the damned. It would be cool to see that ported to UB!