home *** CD-ROM | disk | FTP | other *** search
- A 3D simulation of radio control model jet.
- (using amos 3d)
-
- Author: David Lawrence. e-mail.. muddle@voyager.co.nz
-
- Best with fast A1200. ( There is a crude time limit to prevent very fast
- machines from producing uncontrollable flight. Remove at will)
- ...........................
-
- Notes on A500 use.
-
- A500 with 1mb, will ONLY WORK IF the user has Amos Voodoo 3d xtn. to run the
- source code. Ideally control and speed variables should be changed to allow
- for slower frame rate. Then the sound frequency variable would have to be
- changed from it's direct relation to the SPEED variable. ( you have to poke
- hardware to alter frequency while a sample loop is 'playing' in amos.
- See code)
-
- An amos autoexec floppy disc version of the program will also run on
- an A500 with 1 mb. Which would be nice for those without amos or the
- 3d extension, but I don't think this can be archived to aminet in a
- way that will work..?? And would that be legal?
- Any advice .. anyone?
- also.. I'm not too keen on making and sending floppy disks all round
- the world from way down here (new zealand)... Sorry.
- ........................................
-
-
- Will run on PAL or NSTC, the last by accident since the model sits on the
- ground in sight in nstc with some screen out of view. Ideally the user could
- redo the prog. to smaller screen.
-
-
- The archive includes:-
- - a compiled workbench version for non-amos users
- - amos source code
- - the necessary sample bank, screens, 3d objects
-
- - ( note- the 3d library is part of the compiled version ..it's not
- useable as an amos extension.
- Also note, the 3d extension referred to herein is
- the voodoo 3d extn, not 'stars' or other)
-
-
- The program expects all the above archive to be extracted into
- the same directory.(any name)
-
- Please advise author if things don't appear to be working, as I can't
- be quite sure if the prog. is relying on something on my hard drive
- which may not be on others. I think it's just getting the normal math lib.
-
- -------------
-
- This archive is put here so that other amos programmers can freely
- modify, improve on, (or just have a good laugh at ) one persons attempt
- to overcome rotation limits in amos 3d. It should be possible to make
- some sort of more interesting game out of the basic program. e.g. Missiles,
- 3d targets, or 'round the pylons' racing against a computer opponent.
-
- Or for those who can happily use the object modeller, one could improve the
- plane or convert it ( and the sound bank) to various curious aircraft.
- Or to a flapping dragon or whatever.
- The whole scene could be changed from a vaguely N.Z. rural flavour to
- an airport, or fururistic .....
-
- The background could just be a 'rainbow' horizon to enable greater speed
- for more 3d interaction. The rainbow has to move up and down with the
- view elevation. It works, I tried it somewhere on the old A500 for speed.
-
- It might be best to just poke a custom copper list on the fly to create a
- split or change in a colour register(s) at a movable raster line.
- ( A command to do this is an almost incomprehensible
- ommission from standard Amos, of a basic, simple and very useful command..
- The ' rainbow' commands are usable, but complex and limited. Good grief.
- you can only change one colour register for a start.. a sad effort I think )
-
-
-
- Amos programmers, note that the full rotation in 3d requires a background
- much larger than a standard screen can be. Hence two linked screens
- are used.. anyone who knows how to simplify this, or create a larger screen
- is hereby urged to tell me....
- If A3d didn't use a masking method to draw one could use the machine code
- copy command, which would be faster and could handle the size... but...
- . ......................
-
- If anyone wants to obtain amos 3d I have no suggestions that are legal.
- You could try annoying Europress?. They are unlikely to respond, and it
- sounds like maybe someone else has the rights to the 3d code and object
- modeller. (But you could still annoy them any way..... )
- It was on a mag. disk some years ago, you may find a friend who has a copy.
- They must be around somewhere.
-
- As an alternative :-
- It should be possible to use AMCAF vector rotations for Amos pro to make a
- similar program. I think that's what I would do now if starting again.
- And you could make use of full colours etc. And make a better object modeller.
- .....at least as long as you kept it all simple.
- But it would be a LOT OF WORK,and probably need some assembler routines
- if you wanted to handle large numbers of co-ords. Or to check for surfaces
- and lines both in front of and behind the viewpoint.
- This would not matter with a simple 'object way out there' model sim.
-
- ........ ....................
-
-
- ABOUT AMOS 3D
-
- This writer was depressed to discover that amos3d is not ideal.
- It is quite fast for a blitter system, and I find the commands fit my
- approach .
- BUT...
- There are very restricted colour choices, it can write over screen
- edges and crash from (seemingly) memory problems, and since it uses
- masking to draw objects ( probably to gain speed), it is incompatible
- with other drawing operations. Also the screen conversion doesn't handle
- off screen positions.
- And the object modeller though it has some good ideas, drives me completely
- up the wall !!!!..
- Hence the minimal objects in programs I make).
-
- But above all the rotation angles are limited, and do not match the
- manual which implies the ability to rotate objects and viewpoint about
- their own axes with simple commands..
- In fact the z rotation axis of objects and viewpoint remain
- permanently aligned with the z axis of the co-ord world.
-
- It did not have to be that way as the amcaf vector rotations for example
- seem to rotate relative to their current alignment.. using matrix maths.
- It may be possible to use complex sin* cos formula to make amos3d
- work that way, but all my attempts failed at the angle extremes..
- (My '3dtests' dir is full of things like;- 3dcalc, novertcalc, nearlythere,
- finally?, .... very depressing.)
- -------------------
-
- The partial solution used here and in my other programs, is to change the
- normal point of view and hence the apparent way the objects rotate.
- It's as simple as setting the initial view angle at rt. angles to normal
- on the A angle axis .
- And then being sure you put your objects in the new world ground plane
- of X, Y co-ords (instead of x,z as normal) with their A angles also moved
- one rt angle...
-
- It may be clearest to visualize as follows;-
- Imagine you have stuck your head into the co-ord world through your monitor
- and are looking straight down. Now twist your head to look to your right.
- The effect from your point of view, is that the world z axis now seems
- vertical ( i.e. off the top of your head.. Ha! joke) while the x goes away
- into the distance ahead and the y goes from side to side.
-
- Your ground objects are put on the new ground plane,( which from the
- old point of view was the plane parallel with the screen )
- For convenience I chose start angles which gave positive z upwards,
- positive x away into distance, y positive to the right, but the x,y
- (set by initial angles ) could be any chosen direction.
-
- The main thing is that while the z axis rotations still remain aligned
- with the 'world' z axis, this is no longer the longitudinal Z axis of the
- objects and viewpoint... from your new point of view.
-
- --------------
- It is possible now to point an object in any world direction on the
- z axis (angle c), elevate with angle B, and roll any angle with A.
-
- I'll call this;- mode3
-
- The limits of this are:-
- 1. The object can not use td forward, since the rolling angle A
- is not the axis used by td forward.
- Instead you have to use a sin/cos formula to move.( see source code.)
- 2. since the viewpoint cannot align along the A angle/ axis
- the VIEWPOINT cannot be flown about as in a proper flight sim.
- 3. A seperate 'yaw' response is too difficult to arrange.
-
- None the less it is possible to fly an object around properly if
- it is saved from the object modeller at right angles (pointed left) to the
- normal angle. (if you used td forward it would go sideways)
-
- This is the mode used by the jet model simulator. It was very tricky
- to understand how to adjust the rotation angles as the object pointed
- upwards in the world.. because the roll angle (A) gradually becomes a change
- in the direction in the world. (angle C )
- It's in the source code, but if anyone needs more I could supply extra
- notes... once I've re- worked it out myself! (Don't think this was worked
- out by a blinding quick brain. It mostly happened by hours of experiment
- over many months, and step by step advance. NOW it seems simple)
-
- ..............................
-
- It is possible though, to use td foward for objects and viewpoint
- with the world in this orientation, if you use angle B for rolling and A
- for elevation. Angle C still sets world direction.
- Call this mode 2
-
-
- The limits of this mode are:-
- 1. the B rolling axis is always parallel to the 'ground' plane.
- (Though you can point it in any direction on that plane.)
- Therefore when you elevate with angle A and try to roll with B, the object
- or view 'skews' or 'barrel rolls' it's nose around in an arc.
- The greater the elevation the greater the skew.
- It is possible to use a simple sin (or cos?, I forget) to reverse the
- skew in the inverted part of the roll.
- This is just enough to make it useable as a limited flight
- sim with a proper travelling viewpoint but held within limits up and down.
-
- See example. ( to be uploaded to aminet if this gets there!).. A3Dsimplesim.
-
- Or to use to fly independent targets or enemies which bank and
- fly with some realism.
-
- See example .to be uploaded .. A3Ddefence
-
-
- There are other possibilities with both modes, and there are probably
- proper games that could be written along these lines- especially for fast
- machines.
- .. but the writer is done for now. Too much trial and error.
-
- I should mention that the td 'bearing' command does not work in the
- new world order. It works only for direction in the x,z plane and not
- the new x,y plane. I have a method which should enable it's use, but since I
- never needed the command it is untried. ( You have to substitute the co-ord
- positions as if they were in the old mode, use td bearing command, then
- put results back into the new world.. I think. e-mail if desperate)
-
- Td face command is also affected- it puts the object horizontal on the OLD
- ground plane i.e. stands it on end in the new world, and then spins it on
- that plane to face the viewpoint or other ob. It would be rather
- complicated to try and use that.
-
-
- ------------------------
-
- Feel free to use anything here for your own programs. Or to upgrade the
- whole thing, I have spent too much time worrying to optimise !
- There may well be some other way to improve A3d .. go to it.
-
- I really believe that a complete new, and faster 3d system- using fast ram
- (bit planes or chunky) and cpu drawing techniques is what is needed for amos.
- It may be possible to do quite a lot with the amcaf vector rotation
- commands. But then, one needs a polygon command which doesn't crash
- the machine when off screen right somewhere!
-
- I hope someone might come up with something before the Amiga expiry date
- passes.
- Or my expiry date!!
-
- Also... sorry to have not got this stuff out much earlier when amos and 3d
- were still around, and this might have been a bit more use.
- But I felt isolated in a bit of a personal black hole, and the internet
- was not on my event horizon at all.
-
-
- Good luck all. David L.