artrag Posted March 13, 2020 Share Posted March 13, 2020 What about adding SW sprites now? Quote Link to comment https://forums.atariage.com/topic/210793-raycasting-demo/page/6/#findComment-4480717 Share on other sites More sharing options...
JohnPCAE Posted April 6, 2020 Author Share Posted April 6, 2020 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 1 Quote Link to comment https://forums.atariage.com/topic/210793-raycasting-demo/page/6/#findComment-4502060 Share on other sites More sharing options...
JohnPCAE Posted April 7, 2020 Author Share Posted April 7, 2020 raycast_20200407.zip Fixed a crash that arises if you lower the maximum view distance. Added support for different ceiling and floor colors, and added support for dithering the walls. 1 Quote Link to comment https://forums.atariage.com/topic/210793-raycasting-demo/page/6/#findComment-4503097 Share on other sites More sharing options...
JohnPCAE Posted April 13, 2020 Author Share Posted April 13, 2020 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. 4 Quote Link to comment https://forums.atariage.com/topic/210793-raycasting-demo/page/6/#findComment-4508386 Share on other sites More sharing options...
artrag Posted April 13, 2020 Share Posted April 13, 2020 With dithering everything looks more interesting, speed and smoothness are excellent too Greetings! Quote Link to comment https://forums.atariage.com/topic/210793-raycasting-demo/page/6/#findComment-4508977 Share on other sites More sharing options...
JohnPCAE Posted April 18, 2020 Author Share Posted April 18, 2020 raycast_20200418.zip Reworked a lot of code and made many speed improvements to the colored-squares version. 3 Quote Link to comment https://forums.atariage.com/topic/210793-raycasting-demo/page/6/#findComment-4513687 Share on other sites More sharing options...
JohnPCAE Posted April 19, 2020 Author Share Posted April 19, 2020 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 3 2 Quote Link to comment https://forums.atariage.com/topic/210793-raycasting-demo/page/6/#findComment-4514392 Share on other sites More sharing options...
artrag Posted April 19, 2020 Share Posted April 19, 2020 Incredible how fast it is Awesome! Quote Link to comment https://forums.atariage.com/topic/210793-raycasting-demo/page/6/#findComment-4514401 Share on other sites More sharing options...
artrag Posted April 24, 2020 Share Posted April 24, 2020 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 Quote Link to comment https://forums.atariage.com/topic/210793-raycasting-demo/page/6/#findComment-4519527 Share on other sites More sharing options...
artrag Posted April 26, 2020 Share Posted April 26, 2020 John, just an idea, why not developing an intybasic front end for your raycaster? Intybasic can embed ASM routines and share variables between the two environments It could allow other people to implement 3D games using your library 1 Quote Link to comment https://forums.atariage.com/topic/210793-raycasting-demo/page/6/#findComment-4521440 Share on other sites More sharing options...
JohnPCAE Posted April 30, 2020 Author Share Posted April 30, 2020 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. 1 Quote Link to comment https://forums.atariage.com/topic/210793-raycasting-demo/page/6/#findComment-4525430 Share on other sites More sharing options...
JohnPCAE Posted June 14, 2020 Author Share Posted June 14, 2020 raycast_20200614.zip Many, many speed improvements to the CS version. With some more changes, this could eventually support larger maps. For instance, Wolf3d maps are 64x64 in size. 4 1 Quote Link to comment https://forums.atariage.com/topic/210793-raycasting-demo/page/6/#findComment-4563366 Share on other sites More sharing options...
JohnPCAE Posted August 14, 2020 Author Share Posted August 14, 2020 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 6 1 Quote Link to comment https://forums.atariage.com/topic/210793-raycasting-demo/page/6/#findComment-4608542 Share on other sites More sharing options...
First Spear Posted June 13, 2021 Share Posted June 13, 2021 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? Quote Link to comment https://forums.atariage.com/topic/210793-raycasting-demo/page/6/#findComment-4842538 Share on other sites More sharing options...
JohnPCAE Posted December 27, 2023 Author Share Posted December 27, 2023 Tiny speed optimization to the colored-squares code (remember to use the side buttons to switch modes). Added a lot of comments to the colored-squares code. raycast_20231227.zip 5 1 Quote Link to comment https://forums.atariage.com/topic/210793-raycasting-demo/page/6/#findComment-5374958 Share on other sites More sharing options...
CrazyChris Posted December 29, 2023 Share Posted December 29, 2023 Great Job! Quote Link to comment https://forums.atariage.com/topic/210793-raycasting-demo/page/6/#findComment-5376054 Share on other sites More sharing options...
artrag Posted January 14 Share Posted January 14 Any progress on the sprites? Quote Link to comment https://forums.atariage.com/topic/210793-raycasting-demo/page/6/#findComment-5388816 Share on other sites More sharing options...
JohnPCAE Posted October 19 Author Share Posted October 19 (edited) 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 Edited October 19 by JohnPCAE 2 1 Quote Link to comment https://forums.atariage.com/topic/210793-raycasting-demo/page/6/#findComment-5551649 Share on other sites More sharing options...
+DZ-Jay Posted October 19 Share Posted October 19 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 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: 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. Quote Link to comment https://forums.atariage.com/topic/210793-raycasting-demo/page/6/#findComment-5551679 Share on other sites More sharing options...
JohnPCAE Posted October 19 Author Share Posted October 19 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. Quote Link to comment https://forums.atariage.com/topic/210793-raycasting-demo/page/6/#findComment-5551742 Share on other sites More sharing options...
JohnPCAE Posted October 20 Author Share Posted October 20 (edited) 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 October 20 by JohnPCAE 1 Quote Link to comment https://forums.atariage.com/topic/210793-raycasting-demo/page/6/#findComment-5551895 Share on other sites More sharing options...
JohnPCAE Posted October 20 Author Share Posted October 20 (edited) 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 October 20 by JohnPCAE 1 1 Quote Link to comment https://forums.atariage.com/topic/210793-raycasting-demo/page/6/#findComment-5552337 Share on other sites More sharing options...
JohnPCAE Posted October 23 Author Share Posted October 23 (edited) 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 Edited October 24 by JohnPCAE 4 1 Quote Link to comment https://forums.atariage.com/topic/210793-raycasting-demo/page/6/#findComment-5553936 Share on other sites More sharing options...
JohnPCAE Posted October 25 Author Share Posted October 25 Added door rendering. You can't interact with them yet and you can walk right through them, but it's a start. raycast.cfgraycast.binraycast.src 1 1 Quote Link to comment https://forums.atariage.com/topic/210793-raycasting-demo/page/6/#findComment-5554816 Share on other sites More sharing options...
JohnPCAE Posted October 27 Author Share Posted October 27 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 2 1 Quote Link to comment https://forums.atariage.com/topic/210793-raycasting-demo/page/6/#findComment-5555562 Share on other sites More sharing options...
Recommended Posts
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.