Home » Archimedes archive » Acorn User » AU 1997-08 B.adf » Features » 3D/!AU_Attack/!Run
3D/!AU_Attack/!Run
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Archimedes archive » Acorn User » AU 1997-08 B.adf » Features |
Filename: | 3D/!AU_Attack/!Run |
Read OK: | ✔ |
File size: | 0978 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
| ************************************************************* | | !Run File (new version +comments) for Acorn User 3-d Articles | | ************************************************************* | | Notes: | The latest edition of the source.engine (ray caster) has had | so many updates that it needs to be mentioned. Most importan | tly the engine can now be passed parameters and hence there | needs to be documentation as to what values should be passed. | This command will open the engine directory for easy access to | important files and the saved screenshot *Filer_OpenDir <AUARay$Dir> | Establish a wimpslot (memory) of 512k Wimpslot -min 640k -max 640k | All that is now required is to prepare and then call the engine | with appropriate values | | <syntax for engine> | | engine <view_x> <view_y> <view_ang> <scr_wid> <scr_hei> <angles> <vscale> <move> <rotate> <viewvar> <view2> <demoflag> |<demoflag2> | Notes: | <view_x> <view_y> are normally in the range 0-4096 (fine coordinates, not | grid squares). | |<scr_wid> and <scr_hei> are the sizes of window which the engine will render |<scr_wid> must be divisible by 32 and not exceed 320, <scr_hei> should be 0-|200, though try others by all means! | | | <view_ang> is limited by <angles>. <angles> is the number of elements in | the angular look-up method (e.g. 0-1920 normally. This needs to be careful | ly calculated with the following formula | | <angles>= <scr_wid> * 360 / desired Field of View (0-90 recommended) | | <vscale> is used to scale the slivers, normal ranging (5000-15000). It can| be calculated with the formula: | | <vscale> = <scr_hei> * 64� (though you can experiment with values) | | <move> controls how many units you move per keypress (2-30 rmmnd) | <rotate> controls the angle rotated per keypress (5-90 rmmnd) | <viewvar> and <view2> are numbers used to plot objects correctly (160 / tan(FOV/2) for <viewvar> and view2<viewvar) | <demoflag2> when 1 write demo 0 do nothing | <demoflag�> when 1 read demo 0 do nothing | e.g.s engine 400 400 200 128 128 768 8192 10 30 277 250 0 0 | engine 400 400 100 288 200 1728 12800 10 30 277 250 0 0 | engine 400 400 0 64 64 384 4096 (!!!) 10 30 277 250 0 0 | engine 400 400 100 288 160 1728 10800 10 30 277 250 0 0 | Finally, call the engine *Run <AUARay$Dir>.source.engine 400 400 100 320 256 1920 13312 20 30 277 250 0 0 | Return to normal style of font *Fx 20
00000000 7c 20 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a || **************| 00000010 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| * 00000030 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 20 |*************** | 00000040 7c 0a 7c 20 21 52 75 6e 20 46 69 6c 65 20 28 6e ||.| !Run File (n| 00000050 65 77 20 76 65 72 73 69 6f 6e 20 2b 63 6f 6d 6d |ew version +comm| 00000060 65 6e 74 73 29 20 66 6f 72 20 41 63 6f 72 6e 20 |ents) for Acorn | 00000070 55 73 65 72 20 33 2d 64 20 41 72 74 69 63 6c 65 |User 3-d Article| 00000080 73 20 7c 0a 7c 20 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |s |.| **********| 00000090 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| * 000000c0 2a 2a 2a 20 7c 0a 7c 20 4e 6f 74 65 73 3a 0a 7c |*** |.| Notes:.|| 000000d0 20 54 68 65 20 6c 61 74 65 73 74 20 65 64 69 74 | The latest edit| 000000e0 69 6f 6e 20 6f 66 20 74 68 65 20 73 6f 75 72 63 |ion of the sourc| 000000f0 65 2e 65 6e 67 69 6e 65 20 28 72 61 79 20 63 61 |e.engine (ray ca| 00000100 73 74 65 72 29 20 68 61 73 20 68 61 64 20 0a 7c |ster) has had .|| 00000110 20 73 6f 20 6d 61 6e 79 20 75 70 64 61 74 65 73 | so many updates| 00000120 20 74 68 61 74 20 69 74 20 6e 65 65 64 73 20 74 | that it needs t| 00000130 6f 20 62 65 20 6d 65 6e 74 69 6f 6e 65 64 2e 20 |o be mentioned. | 00000140 4d 6f 73 74 20 69 6d 70 6f 72 74 61 6e 0a 7c 20 |Most importan.| | 00000150 74 6c 79 20 74 68 65 20 65 6e 67 69 6e 65 20 63 |tly the engine c| 00000160 61 6e 20 6e 6f 77 20 62 65 20 70 61 73 73 65 64 |an now be passed| 00000170 20 70 61 72 61 6d 65 74 65 72 73 20 61 6e 64 20 | parameters and | 00000180 68 65 6e 63 65 20 74 68 65 72 65 0a 7c 20 6e 65 |hence there.| ne| 00000190 65 64 73 20 74 6f 20 62 65 20 64 6f 63 75 6d 65 |eds to be docume| 000001a0 6e 74 61 74 69 6f 6e 20 61 73 20 74 6f 20 77 68 |ntation as to wh| 000001b0 61 74 20 76 61 6c 75 65 73 20 73 68 6f 75 6c 64 |at values should| 000001c0 20 62 65 20 70 61 73 73 65 64 2e 0a 0a 7c 20 54 | be passed...| T| 000001d0 68 69 73 20 63 6f 6d 6d 61 6e 64 20 77 69 6c 6c |his command will| 000001e0 20 6f 70 65 6e 20 74 68 65 20 65 6e 67 69 6e 65 | open the engine| 000001f0 20 64 69 72 65 63 74 6f 72 79 20 66 6f 72 20 65 | directory for e| 00000200 61 73 79 20 61 63 63 65 73 73 20 74 6f 20 0a 7c |asy access to .|| 00000210 20 69 6d 70 6f 72 74 61 6e 74 20 66 69 6c 65 73 | important files| 00000220 20 61 6e 64 20 74 68 65 20 73 61 76 65 64 20 73 | and the saved s| 00000230 63 72 65 65 6e 73 68 6f 74 0a 0a 2a 46 69 6c 65 |creenshot..*File| 00000240 72 5f 4f 70 65 6e 44 69 72 20 3c 41 55 41 52 61 |r_OpenDir <AUARa| 00000250 79 24 44 69 72 3e 0a 0a 7c 20 45 73 74 61 62 6c |y$Dir>..| Establ| 00000260 69 73 68 20 61 20 77 69 6d 70 73 6c 6f 74 20 28 |ish a wimpslot (| 00000270 6d 65 6d 6f 72 79 29 20 6f 66 20 35 31 32 6b 0a |memory) of 512k.| 00000280 0a 57 69 6d 70 73 6c 6f 74 20 2d 6d 69 6e 20 36 |.Wimpslot -min 6| 00000290 34 30 6b 20 2d 6d 61 78 20 36 34 30 6b 0a 0a 7c |40k -max 640k..|| 000002a0 20 41 6c 6c 20 74 68 61 74 20 69 73 20 6e 6f 77 | All that is now| 000002b0 20 72 65 71 75 69 72 65 64 20 69 73 20 74 6f 20 | required is to | 000002c0 70 72 65 70 61 72 65 20 61 6e 64 20 74 68 65 6e |prepare and then| 000002d0 20 63 61 6c 6c 20 74 68 65 20 65 6e 67 69 6e 65 | call the engine| 000002e0 0a 7c 20 77 69 74 68 20 61 70 70 72 6f 70 72 69 |.| with appropri| 000002f0 61 74 65 20 76 61 6c 75 65 73 0a 7c 0a 7c 20 3c |ate values.|.| <| 00000300 73 79 6e 74 61 78 20 66 6f 72 20 65 6e 67 69 6e |syntax for engin| 00000310 65 3e 0a 7c 0a 7c 20 65 6e 67 69 6e 65 20 3c 76 |e>.|.| engine <v| 00000320 69 65 77 5f 78 3e 20 3c 76 69 65 77 5f 79 3e 20 |iew_x> <view_y> | 00000330 3c 76 69 65 77 5f 61 6e 67 3e 20 3c 73 63 72 5f |<view_ang> <scr_| 00000340 77 69 64 3e 20 3c 73 63 72 5f 68 65 69 3e 20 3c |wid> <scr_hei> <| 00000350 61 6e 67 6c 65 73 3e 20 3c 76 73 63 61 6c 65 3e |angles> <vscale>| 00000360 20 3c 6d 6f 76 65 3e 20 3c 72 6f 74 61 74 65 3e | <move> <rotate>| 00000370 20 3c 76 69 65 77 76 61 72 3e 20 3c 76 69 65 77 | <viewvar> <view| 00000380 32 3e 20 3c 64 65 6d 6f 66 6c 61 67 3e 0a 7c 3c |2> <demoflag>.|<| 00000390 64 65 6d 6f 66 6c 61 67 32 3e 0a 7c 20 4e 6f 74 |demoflag2>.| Not| 000003a0 65 73 3a 0a 7c 20 3c 76 69 65 77 5f 78 3e 20 3c |es:.| <view_x> <| 000003b0 76 69 65 77 5f 79 3e 20 61 72 65 20 6e 6f 72 6d |view_y> are norm| 000003c0 61 6c 6c 79 20 69 6e 20 74 68 65 20 72 61 6e 67 |ally in the rang| 000003d0 65 20 30 2d 34 30 39 36 20 28 66 69 6e 65 20 63 |e 0-4096 (fine c| 000003e0 6f 6f 72 64 69 6e 61 74 65 73 2c 20 6e 6f 74 20 |oordinates, not | 000003f0 0a 7c 20 67 72 69 64 20 73 71 75 61 72 65 73 29 |.| grid squares)| 00000400 2e 0a 7c 0a 7c 3c 73 63 72 5f 77 69 64 3e 20 61 |..|.|<scr_wid> a| 00000410 6e 64 20 3c 73 63 72 5f 68 65 69 3e 20 61 72 65 |nd <scr_hei> are| 00000420 20 74 68 65 20 73 69 7a 65 73 20 6f 66 20 77 69 | the sizes of wi| 00000430 6e 64 6f 77 20 77 68 69 63 68 20 74 68 65 20 65 |ndow which the e| 00000440 6e 67 69 6e 65 20 77 69 6c 6c 20 72 65 6e 64 65 |ngine will rende| 00000450 72 0a 7c 3c 73 63 72 5f 77 69 64 3e 20 6d 75 73 |r.|<scr_wid> mus| 00000460 74 20 62 65 20 64 69 76 69 73 69 62 6c 65 20 62 |t be divisible b| 00000470 79 20 33 32 20 61 6e 64 20 6e 6f 74 20 65 78 63 |y 32 and not exc| 00000480 65 65 64 20 33 32 30 2c 20 3c 73 63 72 5f 68 65 |eed 320, <scr_he| 00000490 69 3e 20 73 68 6f 75 6c 64 20 62 65 20 30 2d 7c |i> should be 0-|| 000004a0 32 30 30 2c 20 74 68 6f 75 67 68 20 74 72 79 20 |200, though try | 000004b0 6f 74 68 65 72 73 20 62 79 20 61 6c 6c 20 6d 65 |others by all me| 000004c0 61 6e 73 21 0a 7c 0a 7c 0a 7c 20 3c 76 69 65 77 |ans!.|.|.| <view| 000004d0 5f 61 6e 67 3e 20 69 73 20 6c 69 6d 69 74 65 64 |_ang> is limited| 000004e0 20 62 79 20 3c 61 6e 67 6c 65 73 3e 2e 20 3c 61 | by <angles>. <a| 000004f0 6e 67 6c 65 73 3e 20 69 73 20 74 68 65 20 6e 75 |ngles> is the nu| 00000500 6d 62 65 72 20 6f 66 20 65 6c 65 6d 65 6e 74 73 |mber of elements| 00000510 20 69 6e 20 0a 7c 20 74 68 65 20 61 6e 67 75 6c | in .| the angul| 00000520 61 72 20 6c 6f 6f 6b 2d 75 70 20 6d 65 74 68 6f |ar look-up metho| 00000530 64 20 28 65 2e 67 2e 20 30 2d 31 39 32 30 20 6e |d (e.g. 0-1920 n| 00000540 6f 72 6d 61 6c 6c 79 2e 20 54 68 69 73 20 6e 65 |ormally. This ne| 00000550 65 64 73 20 74 6f 20 62 65 20 63 61 72 65 66 75 |eds to be carefu| 00000560 6c 0a 7c 20 6c 79 20 63 61 6c 63 75 6c 61 74 65 |l.| ly calculate| 00000570 64 20 77 69 74 68 20 74 68 65 20 66 6f 6c 6c 6f |d with the follo| 00000580 77 69 6e 67 20 66 6f 72 6d 75 6c 61 0a 7c 0a 7c |wing formula.|.|| 00000590 20 3c 61 6e 67 6c 65 73 3e 3d 20 3c 73 63 72 5f | <angles>= <scr_| 000005a0 77 69 64 3e 20 2a 20 33 36 30 20 2f 20 64 65 73 |wid> * 360 / des| 000005b0 69 72 65 64 20 46 69 65 6c 64 20 6f 66 20 56 69 |ired Field of Vi| 000005c0 65 77 20 28 30 2d 39 30 20 72 65 63 6f 6d 6d 65 |ew (0-90 recomme| 000005d0 6e 64 65 64 29 0a 7c 0a 7c 20 3c 76 73 63 61 6c |nded).|.| <vscal| 000005e0 65 3e 20 69 73 20 75 73 65 64 20 74 6f 20 73 63 |e> is used to sc| 000005f0 61 6c 65 20 74 68 65 20 73 6c 69 76 65 72 73 2c |ale the slivers,| 00000600 20 6e 6f 72 6d 61 6c 20 72 61 6e 67 69 6e 67 20 | normal ranging | 00000610 28 35 30 30 30 2d 31 35 30 30 30 29 2e 20 49 74 |(5000-15000). It| 00000620 20 63 61 6e 7c 20 62 65 20 63 61 6c 63 75 6c 61 | can| be calcula| 00000630 74 65 64 20 77 69 74 68 20 74 68 65 20 66 6f 72 |ted with the for| 00000640 6d 75 6c 61 3a 0a 7c 0a 7c 20 3c 76 73 63 61 6c |mula:.|.| <vscal| 00000650 65 3e 20 3d 20 3c 73 63 72 5f 68 65 69 3e 20 2a |e> = <scr_hei> *| 00000660 20 36 34 8c 20 28 74 68 6f 75 67 68 20 79 6f 75 | 64. (though you| 00000670 20 63 61 6e 20 65 78 70 65 72 69 6d 65 6e 74 20 | can experiment | 00000680 77 69 74 68 20 76 61 6c 75 65 73 29 0a 7c 20 0a |with values).| .| 00000690 7c 20 3c 6d 6f 76 65 3e 20 63 6f 6e 74 72 6f 6c || <move> control| 000006a0 73 20 68 6f 77 20 6d 61 6e 79 20 75 6e 69 74 73 |s how many units| 000006b0 20 79 6f 75 20 6d 6f 76 65 20 70 65 72 20 6b 65 | you move per ke| 000006c0 79 70 72 65 73 73 20 28 32 2d 33 30 20 72 6d 6d |ypress (2-30 rmm| 000006d0 6e 64 29 0a 7c 20 3c 72 6f 74 61 74 65 3e 20 63 |nd).| <rotate> c| 000006e0 6f 6e 74 72 6f 6c 73 20 74 68 65 20 61 6e 67 6c |ontrols the angl| 000006f0 65 20 72 6f 74 61 74 65 64 20 70 65 72 20 6b 65 |e rotated per ke| 00000700 79 70 72 65 73 73 20 28 35 2d 39 30 20 72 6d 6d |ypress (5-90 rmm| 00000710 6e 64 29 0a 7c 20 3c 76 69 65 77 76 61 72 3e 20 |nd).| <viewvar> | 00000720 61 6e 64 20 3c 76 69 65 77 32 3e 20 61 72 65 20 |and <view2> are | 00000730 6e 75 6d 62 65 72 73 20 75 73 65 64 20 74 6f 20 |numbers used to | 00000740 70 6c 6f 74 20 6f 62 6a 65 63 74 73 20 63 6f 72 |plot objects cor| 00000750 72 65 63 74 6c 79 20 28 31 36 30 20 2f 20 74 61 |rectly (160 / ta| 00000760 6e 28 46 4f 56 2f 32 29 20 66 6f 72 20 3c 76 69 |n(FOV/2) for <vi| 00000770 65 77 76 61 72 3e 20 61 6e 64 20 76 69 65 77 32 |ewvar> and view2| 00000780 3c 76 69 65 77 76 61 72 29 0a 7c 20 3c 64 65 6d |<viewvar).| <dem| 00000790 6f 66 6c 61 67 32 3e 20 77 68 65 6e 20 31 20 77 |oflag2> when 1 w| 000007a0 72 69 74 65 20 64 65 6d 6f 20 30 20 64 6f 20 6e |rite demo 0 do n| 000007b0 6f 74 68 69 6e 67 0a 7c 20 3c 64 65 6d 6f 66 6c |othing.| <demofl| 000007c0 61 67 8c 3e 20 77 68 65 6e 20 31 20 72 65 61 64 |ag.> when 1 read| 000007d0 20 64 65 6d 6f 20 30 20 64 6f 20 6e 6f 74 68 69 | demo 0 do nothi| 000007e0 6e 67 0a 7c 20 65 2e 67 2e 73 20 65 6e 67 69 6e |ng.| e.g.s engin| 000007f0 65 20 34 30 30 20 34 30 30 20 32 30 30 20 31 32 |e 400 400 200 12| 00000800 38 20 31 32 38 20 37 36 38 20 38 31 39 32 20 31 |8 128 768 8192 1| 00000810 30 20 33 30 20 32 37 37 20 32 35 30 20 30 20 30 |0 30 277 250 0 0| 00000820 0a 7c 20 20 20 20 20 20 20 65 6e 67 69 6e 65 20 |.| engine | 00000830 34 30 30 20 34 30 30 20 31 30 30 20 32 38 38 20 |400 400 100 288 | 00000840 32 30 30 20 31 37 32 38 20 31 32 38 30 30 20 31 |200 1728 12800 1| 00000850 30 20 33 30 20 32 37 37 20 32 35 30 20 30 20 30 |0 30 277 250 0 0| 00000860 0a 7c 20 20 20 20 20 20 20 65 6e 67 69 6e 65 20 |.| engine | 00000870 34 30 30 20 34 30 30 20 30 20 36 34 20 36 34 20 |400 400 0 64 64 | 00000880 33 38 34 20 34 30 39 36 20 28 21 21 21 29 20 31 |384 4096 (!!!) 1| 00000890 30 20 33 30 20 32 37 37 20 32 35 30 20 30 20 30 |0 30 277 250 0 0| 000008a0 0a 7c 20 20 20 20 20 20 20 65 6e 67 69 6e 65 20 |.| engine | 000008b0 34 30 30 20 34 30 30 20 31 30 30 20 32 38 38 20 |400 400 100 288 | 000008c0 31 36 30 20 31 37 32 38 20 31 30 38 30 30 20 31 |160 1728 10800 1| 000008d0 30 20 33 30 20 32 37 37 20 32 35 30 20 30 20 30 |0 30 277 250 0 0| 000008e0 0a 7c 20 46 69 6e 61 6c 6c 79 2c 20 63 61 6c 6c |.| Finally, call| 000008f0 20 74 68 65 20 65 6e 67 69 6e 65 20 0a 0a 2a 52 | the engine ..*R| 00000900 75 6e 20 3c 41 55 41 52 61 79 24 44 69 72 3e 2e |un <AUARay$Dir>.| 00000910 73 6f 75 72 63 65 2e 65 6e 67 69 6e 65 20 34 30 |source.engine 40| 00000920 30 20 34 30 30 20 31 30 30 20 33 32 30 20 32 35 |0 400 100 320 25| 00000930 36 20 31 39 32 30 20 31 33 33 31 32 20 32 30 20 |6 1920 13312 20 | 00000940 33 30 20 32 37 37 20 32 35 30 20 30 20 30 0a 0a |30 277 250 0 0..| 00000950 7c 20 52 65 74 75 72 6e 20 74 6f 20 6e 6f 72 6d || Return to norm| 00000960 61 6c 20 73 74 79 6c 65 20 6f 66 20 66 6f 6e 74 |al style of font| 00000970 0a 0a 2a 46 78 20 32 30 |..*Fx 20| 00000978