Home » Archimedes archive » Acorn User » AU 1997-07 A.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-07 A.adf » Features |
Filename: | 3D/!AU_Attack/!Run |
Read OK: | ✔ |
File size: | 0767 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 512k -max 512k | 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> | | 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) | | e.g.s engine 400 400 200 128 128 768 8192 | engine 400 400 100 288 200 1728 12800 | engine 400 400 0 64 64 384 4096 (!!!) | engine 400 400 100 288 160 1728 10800 | Finally, call the engine *Run <AUARay$Dir>.source.engine 400 400 100 288 160 1728 10800
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 35 |.Wimpslot -min 5| 00000290 31 32 6b 20 2d 6d 61 78 20 35 31 32 6b 0a 0a 7c |12k -max 512k..|| 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 0a 7c 0a 7c 20 4e 6f 74 65 73 3a 0a 7c 20 3c 76 |.|.| Notes:.| <v| 00000370 69 65 77 5f 78 3e 20 3c 76 69 65 77 5f 79 3e 20 |iew_x> <view_y> | 00000380 61 72 65 20 6e 6f 72 6d 61 6c 6c 79 20 69 6e 20 |are normally in | 00000390 74 68 65 20 72 61 6e 67 65 20 30 2d 34 30 39 36 |the range 0-4096| 000003a0 20 28 66 69 6e 65 20 63 6f 6f 72 64 69 6e 61 74 | (fine coordinat| 000003b0 65 73 2c 20 6e 6f 74 20 0a 7c 20 67 72 69 64 20 |es, not .| grid | 000003c0 73 71 75 61 72 65 73 29 2e 0a 7c 0a 7c 3c 73 63 |squares)..|.|<sc| 000003d0 72 5f 77 69 64 3e 20 61 6e 64 20 3c 73 63 72 5f |r_wid> and <scr_| 000003e0 68 65 69 3e 20 61 72 65 20 74 68 65 20 73 69 7a |hei> are the siz| 000003f0 65 73 20 6f 66 20 77 69 6e 64 6f 77 20 77 68 69 |es of window whi| 00000400 63 68 20 74 68 65 20 65 6e 67 69 6e 65 20 77 69 |ch the engine wi| 00000410 6c 6c 20 72 65 6e 64 65 72 0a 7c 3c 73 63 72 5f |ll render.|<scr_| 00000420 77 69 64 3e 20 6d 75 73 74 20 62 65 20 64 69 76 |wid> must be div| 00000430 69 73 69 62 6c 65 20 62 79 20 33 32 20 61 6e 64 |isible by 32 and| 00000440 20 6e 6f 74 20 65 78 63 65 65 64 20 33 32 30 2c | not exceed 320,| 00000450 20 3c 73 63 72 5f 68 65 69 3e 20 73 68 6f 75 6c | <scr_hei> shoul| 00000460 64 20 62 65 20 30 2d 7c 32 30 30 2c 20 74 68 6f |d be 0-|200, tho| 00000470 75 67 68 20 74 72 79 20 6f 74 68 65 72 73 20 62 |ugh try others b| 00000480 79 20 61 6c 6c 20 6d 65 61 6e 73 21 0a 7c 0a 7c |y all means!.|.|| 00000490 0a 7c 20 3c 76 69 65 77 5f 61 6e 67 3e 20 69 73 |.| <view_ang> is| 000004a0 20 6c 69 6d 69 74 65 64 20 62 79 20 3c 61 6e 67 | limited by <ang| 000004b0 6c 65 73 3e 2e 20 3c 61 6e 67 6c 65 73 3e 20 69 |les>. <angles> i| 000004c0 73 20 74 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 |s the number of | 000004d0 65 6c 65 6d 65 6e 74 73 20 69 6e 20 0a 7c 20 74 |elements in .| t| 000004e0 68 65 20 61 6e 67 75 6c 61 72 20 6c 6f 6f 6b 2d |he angular look-| 000004f0 75 70 20 6d 65 74 68 6f 64 20 28 65 2e 67 2e 20 |up method (e.g. | 00000500 30 2d 31 39 32 30 20 6e 6f 72 6d 61 6c 6c 79 2e |0-1920 normally.| 00000510 20 54 68 69 73 20 6e 65 65 64 73 20 74 6f 20 62 | This needs to b| 00000520 65 20 63 61 72 65 66 75 6c 0a 7c 20 6c 79 20 63 |e careful.| ly c| 00000530 61 6c 63 75 6c 61 74 65 64 20 77 69 74 68 20 74 |alculated with t| 00000540 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 66 6f 72 |he following for| 00000550 6d 75 6c 61 0a 7c 0a 7c 20 3c 61 6e 67 6c 65 73 |mula.|.| <angles| 00000560 3e 3d 20 3c 73 63 72 5f 77 69 64 3e 20 2a 20 33 |>= <scr_wid> * 3| 00000570 36 30 20 2f 20 64 65 73 69 72 65 64 20 46 69 65 |60 / desired Fie| 00000580 6c 64 20 6f 66 20 56 69 65 77 20 28 30 2d 39 30 |ld of View (0-90| 00000590 20 72 65 63 6f 6d 6d 65 6e 64 65 64 29 0a 7c 0a | recommended).|.| 000005a0 7c 20 3c 76 73 63 61 6c 65 3e 20 69 73 20 75 73 || <vscale> is us| 000005b0 65 64 20 74 6f 20 73 63 61 6c 65 20 74 68 65 20 |ed to scale the | 000005c0 73 6c 69 76 65 72 73 2c 20 6e 6f 72 6d 61 6c 20 |slivers, normal | 000005d0 72 61 6e 67 69 6e 67 20 28 35 30 30 30 2d 31 35 |ranging (5000-15| 000005e0 30 30 30 29 2e 20 49 74 20 63 61 6e 7c 20 62 65 |000). It can| be| 000005f0 20 63 61 6c 63 75 6c 61 74 65 64 20 77 69 74 68 | calculated with| 00000600 20 74 68 65 20 66 6f 72 6d 75 6c 61 3a 0a 7c 0a | the formula:.|.| 00000610 7c 20 3c 76 73 63 61 6c 65 3e 20 3d 20 3c 73 63 || <vscale> = <sc| 00000620 72 5f 68 65 69 3e 20 2a 20 36 34 8c 20 28 74 68 |r_hei> * 64. (th| 00000630 6f 75 67 68 20 79 6f 75 20 63 61 6e 20 65 78 70 |ough you can exp| 00000640 65 72 69 6d 65 6e 74 20 77 69 74 68 20 76 61 6c |eriment with val| 00000650 75 65 73 29 0a 7c 0a 7c 20 65 2e 67 2e 73 20 65 |ues).|.| e.g.s e| 00000660 6e 67 69 6e 65 20 34 30 30 20 34 30 30 20 32 30 |ngine 400 400 20| 00000670 30 20 31 32 38 20 31 32 38 20 37 36 38 20 38 31 |0 128 128 768 81| 00000680 39 32 0a 7c 20 20 20 20 20 20 20 65 6e 67 69 6e |92.| engin| 00000690 65 20 34 30 30 20 34 30 30 20 31 30 30 20 32 38 |e 400 400 100 28| 000006a0 38 20 32 30 30 20 31 37 32 38 20 31 32 38 30 30 |8 200 1728 12800| 000006b0 0a 7c 20 20 20 20 20 20 20 65 6e 67 69 6e 65 20 |.| engine | 000006c0 34 30 30 20 34 30 30 20 30 20 36 34 20 36 34 20 |400 400 0 64 64 | 000006d0 33 38 34 20 34 30 39 36 20 28 21 21 21 29 0a 7c |384 4096 (!!!).|| 000006e0 20 20 20 20 20 20 20 65 6e 67 69 6e 65 20 34 30 | engine 40| 000006f0 30 20 34 30 30 20 31 30 30 20 32 38 38 20 31 36 |0 400 100 288 16| 00000700 30 20 31 37 32 38 20 31 30 38 30 30 0a 7c 20 46 |0 1728 10800.| F| 00000710 69 6e 61 6c 6c 79 2c 20 63 61 6c 6c 20 74 68 65 |inally, call the| 00000720 20 65 6e 67 69 6e 65 0a 2a 52 75 6e 20 3c 41 55 | engine.*Run <AU| 00000730 41 52 61 79 24 44 69 72 3e 2e 73 6f 75 72 63 65 |ARay$Dir>.source| 00000740 2e 65 6e 67 69 6e 65 20 34 30 30 20 34 30 30 20 |.engine 400 400 | 00000750 31 30 30 20 32 38 38 20 31 36 30 20 31 37 32 38 |100 288 160 1728| 00000760 20 31 30 38 30 30 0a | 10800.| 00000767