Jump to content

Recommended Posts

  • 4 weeks later...

I've started thinking about how to do it, but in the meantime here's the slidey-slidey update. Now if you run into a wall you'll slide along it instead of just stopping. This would have been a necessary feature regardless.

raycast_20200406.zip

  • Like 1

raycast_20200413.zip

 

I found that simply changing some constants allows me to dither the wall or ceiling, so that allows some more variation. I've also increased the unit height of walls from 8 to 36 (the height when the wall is exactly one unit away from the viewer). This makes walls appear square, which makes them look a lot better when dithered. It would also be necessary if/when I add texture mapping. Also managed to eke out a little more speed from the engine to try to make up for the overhead from dithering. Getting more speed is important since texture mapping would add even more overhead.

  • Like 4

I was thinking about artag's DDA algorithm posts and something finally clicked. I decided to take another whack at it, and the result is fantastic. No more missing areas at corners, the code is tiny, simple, and maybe twice as fast!

 

raycast_20200419.zip

  • Like 3
  • Thanks 2

John, about sprites, how do you plan to implement scaling and clipping ?

The most effective way (from the visual point of view) would be to use MOB for far distance and software sprites for close distance.

But this would be also the most clumsy and expansive way to implement sprites.

Essentially you should develop two engine to manage sprites...  

 

Probably the simplest thing to do is to start with the SW sprite engine

For each sprite frame, I would store pre-computed data in rom for all scales and the four pixel alignments (in color square mode).  

In this way one could build four fast column renderers able to mix data from the walls and from the selected scale of the sprite frame   

 

I've started looking at the Wolfenstein 3D source to try to understand how software sprites are done. It seems to be computationally expensive so keeping it fast will be tricky. I also looked at a ton of Wolf3D gameplay videos to understand what features are desirable. First I think I need to try to squeeze as much speed out of this new implementation as I can.

  • Like 1
  • 1 month later...
  • 2 months later...
  • 9 months later...
On 8/14/2020 at 2:25 PM, JohnPCAE said:

Been sitting on this for a while. The movement logic had some bugs that would let you walk through walls under certain circumstances. This fixes those bugs.

 

raycast_20200709.zip 87.8 kB · 35 downloads

Hi. Have you had a chance to look at this further, maybe incorporating @artrag's ideas?

 

  • 2 years later...
  • 3 weeks later...
  • 9 months later...

Not yet, but I've made a lot of improvements in maze support. It now supports 64x64 mazes and I'm experimenting with texture mapping. You know what? Texture mapping on the Inty is hard.

 

I dropped cards mode and now everything uses colored-squares. The side buttons turn on and off texture mapping. The texture conversion isn't the best, just something quick and dirty that dithers to the Inty's first 8 colors (the only ones I can use in colored-squares mode). It should look familiar, though.

 

I had to switch to BIN+CFG as this relies on ECS pageflipping to accommodate the vastly larger code side as well as the maps and textures.

 

raycast_20241017.zip

Wolf3DWalls_32x32_dithered-image_stucki_8colors.png

Edited by JohnPCAE
  • Like 2
  • Thanks 1
1 hour ago, JohnPCAE said:

Not yet, but I've made a lot of improvements in maze support. It now supports 64x64 mazes and I'm experimenting with texture mapping. You know what? Texture mapping on the Inty is hard.

 

I dropped cards mode and now everything uses colored-squares. The side buttons turn on and off texture mapping. The texture conversion isn't the best, just something quick and dirty that dithers to the Inty's first 8 colors (the only ones I can use in colored-squares mode). It should look familiar, though.

 

I had to switch to BIN+CFG as this relies on ECS pageflipping to accommodate the vastly larger code side as well as the maps and textures.

 

raycast_20241017.zip 436.25 kB · 1 download

Wolf3DWalls_32x32_dithered-image_stucki_8colors.png

 

Hmm ... Although it is rather impressive what you have accomplished, I do not think that texture-mapping in Colored Squares mode is very useful.  It is hard to tell what anything is.  Here are a few screenshots from my maze traversal:

shot0001.gif.20946e76101257b2d75ae45a73b61869.gifshot0002.gif.6e6d86c44627a12ad986d2b3c972d9aa.gifshot0003.gif.0db7933aa2663d7e092ff8a89932df33.gifshot0004.gif.308f6ff704ca850005cc68d35870800e.gif

 

I think the Colored-Squares version can be effective with the right application.  Perhaps the textures could be simpler patterns.  After all, what it needs is not necessarily realism (that's out the door on the Intellivision to begin with), but some indication of the boundaries between walls and passages.

 

     -dZ.

Agreed. The blue-and-black walls work the best because they're only two colors, for starters. I think the first rule needs to be no more than two colors per texture, and as you said, simpler patterns (and probably they need to be large so they can be more recognizable at a distance). When texture mapping is off the dithering works pretty well for keeping things recognizable and the framerate is much faster. I wonder if I can work out some sort of better algorithmic dither patterns with textures off to provide more variability.

I hand-drew four of the textures to make them show up better and I improved how textures are rendered at the boundaries (hint: for a 32x32 texture, the begging and ending coordinates should be 0.5 and 31.5, respectively -- thank goodness for MS Excel!). I also spent a few hours working on a speedup algorithm but I don't have it working yet so this has the same rendering code as before.

 

To see the changed textures, turn left after reaching the main hallway and proceed north (the initial direction faces east) and proceed until you reach the large room with white stone walls.

 

What this REALLY needs is mip-mapping. That's something to be tackled later, but that would go a long way toward making textures recognizable at longer distances.

raycast.cfg raycast.bin

Edited by JohnPCAE
  • Like 1

I got my framerate improvement working (the farther that textured walls are, the faster they draw) and I hand-drew some more textures. I actually made an Excel spreadsheet that lets me "paint" them in cells and generates the data declarations to put in the code, so hand-drawing is a much smoother process.

 

 

NewW3DTextures.xlsx raycast.src raycast.bin raycast.cfg

Edited by JohnPCAE
  • Like 1
  • Thanks 1

I made some small speed improvements and hand-drew a couple more textures. The vast majority aren't hand-drawn, but most of the ones on this level are. Using hand-drawn textures definitely makes a difference.

 

(and the level is, in fact, the first level of Wolfenstein 3D)

 

 

raycast.src raycast.bin raycast.cfg

Wolf3DInty1.png

Wolf3DInty2.png

Edited by JohnPCAE
  • Like 4
  • Thanks 1

Doors are now fully active. You have to open them with the bottom left side button (right Alt on JzIntv by default) and you can also close them. And the lower right side button (right Ctrl on JzIntv by default) toggles texture mapping.

 

raycast.cfgraycast.binraycast.src

  • Like 2
  • Thanks 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...