Raycasting 3D walkthrough demo

13 posts / 0 new
Last post
resman's picture
Offline
Last seen: 2 years 7 months ago
Joined: Feb 9 2006 - 12:41
Posts: 216
Raycasting 3D walkthrough demo

Here for your enjoyment is a technology preview/demonstration of a raycasting and rendering algorithm I have developed as part of my Apple II 30th birthday-retro-game-just-because-I-can thing. Reminiscent of Wolfenstein 3D, it runs on a standard 1 MHz 48K Apple II+ (or II w/ Applesoft in RAM/ROM) or greater. Only a joystick is required. It is possible to run it on an emulator, but I highly recommend using real hardware with a color monitor. Accelerators make it run too fast, so disable them if you want the controls to be sane. I present it as a 140K DOS 3.3 disk image compressed with gzip. Download with this URL:

http://schmenk.is-a-geek.com/tarfiles/raydemo.dsk.gz

I hope it doesn't end up being a bad idea placing a direct link, but its only 11K in size.

Just a little background - I have a pile of algorithms I've been creating in my notebook for some time. Some people like Soduku for their diversion, I like 6502 assembly language. The 30th anniversary of the Apple II seemed like a good time to put some of them together. Its always fun to make old (obsolete) hardware do things people don't expect. In this case, a full screen 3D walkthrough. However, don't think I've made an Apple II perform like NVIDIA's latest GPU. In order to get interactive framerates and decent colors, the lo-res graphics mode is employed. I am not double buffering the rendering - you see it as it renders. Textures are only 16x16, and there are only 15 of them. It would have seemed pretty cool back in 1977 though.

Download it, give it a try, let me know what you think. I hope to have an actual game to play with a geekly humorous story-line in a few months based on this technology.

Dave...

Tom Owad's picture
Offline
Last seen: 6 days 16 hours ago
Joined: Dec 16 2003 - 15:14
Posts: 3285
screenshots?

I don't have time to try it out, but if you could post screenshots, I bet a lot of people would love to see it.

resman's picture
Offline
Last seen: 2 years 7 months ago
Joined: Feb 9 2006 - 12:41
Posts: 216
screenshots.

OK

Not sure how to embed images, so...

http://www.applefritter.com/node/20104
http://www.applefritter.com/node/20104
http://www.applefritter.com/node/20105
http://www.applefritter.com/node/20106

Dave...

mmphosis's picture
Offline
Last seen: 2 days 4 hours ago
Joined: Aug 18 2005 - 16:26
Posts: 388
Very cool!

I am very impressed. I appreciate you posting this. I ran it! I found the joystick input unusable, but I didn't care because the 3D raycasting is cool.

Great work. Smile
mmphosis

madmax_2069's picture
Offline
Last seen: 12 years 1 week ago
Joined: Sep 24 2005 - 07:28
Posts: 664
wow thats sweet, i can only l

wow thats sweet, i can only look at the screen shots cause i dont have one of those systems.

but i wish i had one to run it. my oldest mac is a Performa 475. and im not shure it would run it properly or to fast or not at all.

Offline
Last seen: 3 months 2 weeks ago
Joined: Dec 20 2003 - 10:38
Posts: 249
I really like the graphics an

I really like the graphics and the flow of the movement. I hope you can develop this into a full game. Also, since this is for a Apple IIplus I would make the motion keys something like E,S,D,F because the apple II doesn't have a numeric keypad and that was the keys to move with. 10X better than Wizardry moving and color room instead of blank walls, nice!

Vince

resman's picture
Offline
Last seen: 2 years 7 months ago
Joined: Feb 9 2006 - 12:41
Posts: 216
joystick usability

One of the reasons I posted the demo was to get some feedback on the joystick input. Can you describe what the problem was and on what kind of machine? I read both paddle inputs concurrently, so this might cause some problems with certain machines. I've tried it on a II, II+, IIe, IIc, IIc+ and a IIgs. The IIgs had some issues because I wasn't able to disable the accelerator. I could only turn left, but reallly, really fast.

Thanks,
Dave...

resman's picture
Offline
Last seen: 2 years 7 months ago
Joined: Feb 9 2006 - 12:41
Posts: 216
Re: I really like the graphics an

I really like the graphics and the flow of the movement. I hope you can develop this into a full game. Also, since this is for a Apple IIplus I would make the motion keys something like E,S,D,F because the apple II doesn't have a numeric keypad and that was the keys to move with. 10X better than Wizardry moving and color room instead of blank walls, nice!

Vince

Since the II and II+ keyboards don't report the any-key-down like the IIc and IIe, it doesn't reallly make sense for this kind of action. I suppose you could have one finger on the REPT key all the time, but the IIc and IIe only have auto-repeat which has a certain delay. I guess I'm torn. I like the joystick input, but I could add movement keys to see what happens.

Dave...

Eudimorphodon's picture
Offline
Last seen: 1 month 2 weeks ago
Joined: Dec 21 2003 - 14:14
Posts: 1207
Groovy

For inspiration you might want to take a look at Gloom-3D, a similar technology demo done in 6809 assembly for the Tandy Color Computer 3:

http://www.axess.com/twilight/sock/gloom/gloom.html

(Which spawned a full-fledged game, which oddly enough also has a geeky story line.)

The Color Computer 3 hardware's quite a lot more capable then your baseline platform (thanks to the 6809 it's *almost* in the IIgs ballpark), but the concept is the same. Good luck with the project!

--Peace

Offline
Last seen: 3 months 2 weeks ago
Joined: Dec 20 2003 - 10:38
Posts: 249
Duh, didn't realize I had my

Duh, didn't realize I had my emulator setup with the keypad as the joystick, lol. Now I have to make a disk image of this on my IIplus. I have a TG products joystick I'll try it out with.

When do you expect to have a more complete version of the game going?

Vince

mmphosis's picture
Offline
Last seen: 2 days 4 hours ago
Joined: Aug 18 2005 - 16:26
Posts: 388
Re: joystick usability

One of the reasons I posted the demo was to get some feedback on the joystick input. Can you describe what the problem was and on what kind of machine? I read both paddle inputs concurrently, so this might cause some problems with certain machines. I've tried it on a II, II+, IIe, IIc, IIc+ and a IIgs. The IIgs had some issues because I wasn't able to disable the accelerator. I could only turn left, but reallly, really fast.

Unfortunately, I am running an emulator: KEGSMAC v0.85. I press F6 to slow the emulator down to about 1 Mhz. The motion of the raydemo in the emulator is very good, not too slow, not too fast. Just like the joystick on the IIgs you mention, I could only turn left, and couldn't move back and forth moving the mouse pointer within KEGS. The mouse input within KEGS is usually pretty good, but I think I understand the (timing) problem doing custom paddle input from assembler. Would it be very difficult to optionally turn off joystick input and read the keyboard for input?

resman's picture
Offline
Last seen: 2 years 7 months ago
Joined: Feb 9 2006 - 12:41
Posts: 216
Re: Duh, didn't realize I had my

Duh, didn't realize I had my emulator setup with the keypad as the joystick, lol. Now I have to make a disk image of this on my IIplus. I have a TG products joystick I'll try it out with.

When do you expect to have a more complete version of the game going?

Vince

I use the TG joystick on my II+ as well. Unfortunately time has not been kind to it. It suffers from sticktion and that puny little stick gets annoying. I like the CH joysticks with the button on the top of the stick. I just scored one on eBay with the 16 pin socket adapter. The TG is certainly more retro appropriate, but sometime you have to go a little modern. Kinda like using a keyboard microcontroller thats 50 times more powerful than the main CPU Wink

As for getting a more complete vesion going, time will tell. Originaly I was going to ensure I could self host on an Apple II using the Merlin assembler. However, I just don't have the time to deal with 25 year old tools (and 48K memory limitations) so I am switching to the cc65 toolchain and will build on OS X. I test with Virtual ][ which has the incredibly cool ability to mount a directory as a ProDOS volume. I just build under OS X, fire up Virtual ][, and run. Copy the binary to a DOS 3.3 DSK image and burn it to a floppy through ADT or on my IIgs for real testing.

The demo was still self hosted so maybe I will put the source code along with the tools out there on a disk image.

Dave...

resman's picture
Offline
Last seen: 2 years 7 months ago
Joined: Feb 9 2006 - 12:41
Posts: 216
Source disk

For more retro geeking pleasure:

http://schmenk.is-a-geek.com/tarfiles/RAYSRC.DSK.gz

This contains the current work-in-progress as well as the last version's source, self-hosted on Merlin. Using the cc65 toolchain results in assembling and linking the demo files in about 1/2 second (maybe less) on a 1GHz 12" Powerbook G4. Compare and contrast with whatever emulator you want Smile Also included is the level editor - only run on accelerated HW or fast emulator.

Dave...

Log in or register to post comments