Perspective 3D Graphics

Anything QL Software or Programming Related.
User avatar
tofro
Font of All Knowledge
Posts: 2702
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: Perspective 3D Graphics

Post by tofro »

Look here.

Helpful if you forgot how to use a SuperBASIC command.

And no, you cannot swap drive numbers with that command - You should do that in the QPC2 configuration window.


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
dilwyn
Mr QL
Posts: 2761
Joined: Wed Dec 01, 2010 10:39 pm

Re: Perspective 3D Graphics

Post by dilwyn »

Depending on what Steve wishes to achieve, he could also use the DOS_DRIVE command to reassign the dos drives:

DOS_DRIVE dos_drive_number%, path$

E.g. DOS_DRIVE 5,"D:\myfolder"

As tofro said , use the QPC2 configuration menu for more permanent changes. If it doesn't appear as you start qpc, just hold down the shift key as you start QPC2.

Another source of SMSQ/E commands info is the online SMSQ manual at http://www.dilwyn.me.uk/docs/ebooks/sms ... c536391834


stevepoole
Super Gold Card
Posts: 717
Joined: Mon Nov 24, 2014 2:03 pm

Re: Perspective 3D Graphics

Post by stevepoole »

Thanks Dilwyn,

DOS_DRIVE 5,"D:" did indeed solve the problem, as drive "D:" is assigned to a USB key on Drive 2....

That will save me a lot of work, instead of modifying programs in future !

Steve.
_________________


stevepoole
Super Gold Card
Posts: 717
Joined: Mon Nov 24, 2014 2:03 pm

Re: Perspective 3D Graphics

Post by stevepoole »

Hi Folks,
Nearly finished preparing a space-rescue program in false 3D, the next version to be in fully perspective 3D, (much harder).

You have to guide an errant astronaute onto his docking bay (the red dots), avoiding flying spatial debris.

Tested on QPC2, using (ESC)quit, (N)ext screen, (i)nwards, (o)utwards, and numpad 4,6 2,8 for x & y directions.

After final testing, to be released shortly.... Steve.
Capture d’écran (4).png


stevepoole
Super Gold Card
Posts: 717
Joined: Mon Nov 24, 2014 2:03 pm

Re: Perspective 3D Graphics

Post by stevepoole »

Hi again,

Here is the program, tested on QPC2. On SGC, change line 1120 For k=1 to 2 , to account for a slower processor speed.

Just UNZIP and LRUN, then use the keys as stated in the previous message. Can you discover the winning strategies ?

The beeps are there to help you see when to tap keys. Do not continuously press any... but tap rapidly...

Needs a lot of perserverence to avoid being killed !

Regards, Steve.
MajorTom2D_bas.zip
(2.52 KiB) Downloaded 32 times


stevepoole
Super Gold Card
Posts: 717
Joined: Mon Nov 24, 2014 2:03 pm

Re: Perspective 3D Graphics

Post by stevepoole »

Hi Folks,
Work on the perspective 3D version of the 'space rescue' is progressing steadily, despite regular visits for hospital treatments....

As you have to control any rotations anywhere in space, it needs hard thought to avoid using too many variables and their keyings !

My aim is to keep the code short and readable by anyone. (May take a couple of weeks to get the time to complete).

Steve.
Capture d’écran (8).png


stevepoole
Super Gold Card
Posts: 717
Joined: Mon Nov 24, 2014 2:03 pm

Re: Perspective 3D Graphics

Post by stevepoole »

Hi Folks,
Here is a provisional version of the SpaceMan3D rescue program. All instructions are found in REMarks 130 to 190.

You have to dock the man on the blue frame, using the decribed keys to navigate around and rotate him.

There is a slight tolerance on the printed positional values to make things slightly easier.

I am trying various methods to make the game more challenging, this being a work-in-progress.

Steve.
SpaceMan3D.zip
(3.56 KiB) Downloaded 23 times
Capture d’écran (9).png


qbits
Trump Card
Posts: 177
Joined: Sun Dec 11, 2016 3:32 pm

Re: Perspective 3D Graphics

Post by qbits »

Hi Steve
I have been keeping an eye on your progress and downloaded the various Progs to date with interest. I encourage you to keep going. Hope the hospital visits haven’t been to gruelling.

SpaceMan_bas
Suggestion for User Interface Key controls. Use Left Right cursors for X movement and Up Down cursors for Y movement. For Z use +/- for Forward OUT and Backward IN motion. Then use x, y, z for Loop, Spin, Roll anticlockwise and X, Y, Z to Loop, Spin, Roll clockwise. I think this would be less confusing than 4,7,5,8,6,9 and x, c, y, u, z, e. N for New and Esc to exit no problem. Screen readouts of X, Y, Z rotation and the x,y,z no doubt you will reposition later and don’t forget to add a Title to your Work!
SpaceMan.jpg
All the Best QBITS


stevepoole
Super Gold Card
Posts: 717
Joined: Mon Nov 24, 2014 2:03 pm

Re: Perspective 3D Graphics

Post by stevepoole »

Hi Qbits,
I see we are both up to our eyes in remedial therapies.... so I hope yours is fully successful !

Thanks for your suggestions about key choices. I had my reasons, but no doubt most people will prefer yours...

After a great deal of tearing out of hair, I have finally resolved the 'final ?' element to incorporate in the game.

The rotattions of the spaceman and the blue docking-frame are now fully independant, making the game more challenging.

But, to dock, all rotations must be undone in the exact opposite order in which they were effectuated ! Aieee !

Before release, I will tidy up and fully commment the code, as there is still a lot of redundant stuff in there.

Steve.
Capture d’écran (10).png


stevepoole
Super Gold Card
Posts: 717
Joined: Mon Nov 24, 2014 2:03 pm

Re: Perspective 3D Graphics

Post by stevepoole »

Hi Folks,
Well, here is the release version2 of the Spaceman Rescue program in 3D perspective, tested on fast QPC2 and slower SGC(smsq).

The bulk of the program was written in three days, the problem was discovering a winning strategy, (impossible without readouts).

I finally realised the only sure method was Ariadne's thread to quit a maze : Undo all movements in the opposite order to effectuation!

The other alternative would be to simulate thrusters on inertial trajectories, which would greatly complicate the code.

If at first you don't succeed, hit the 'n' key to move on to a fresh start. Full instructions at head of listing.... Good Luck !

If you find any bugs, please let me know, as I have tested scores of times ok, since the final tweak.

Steve.
SpaceMan3Dv2.zip
(4.28 KiB) Downloaded 23 times
Capture d’écran (11).png


Post Reply