[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
DenTut16-Pas
EzE has released a trainer! It is on the speeding up of 3D for normal 3D and for virtual worlds. Check it out, it is quite good (even though I get a bit of ribbing in his quote
) It will be in PCGPE ][, to be released
shortly.
I have set up a mailserver (that doesn't seem to work all the time, but the ones that miss I post manually). It works like this :
Send mail to denthor@beastie.cs.und.ac.za with the subject line : request-list ... it will automatically mail you back with a list of subject lines with which you can grab certain files. You will then mail me with the subject line of a specific file and it will send you a uuencoded version of that file automatically. Cool, huh?
With scaling to can easily strech and shrink your bitmaps.
For the horizontal area, I am going to calculate a certain step value. I will then trace along the bitmap, adding this step to my position, and placing the nearest pixel on to the screen. Let me explain this simpler ...
Let us say I have a 10 pixel wide bitmap. I want to squish it into 5 pixels. Along the bitmap, I would draw every second pixel to screen. In ascii :
The equation is as follows :
We also find the step for the height in the same way.
Our horizontal loop is as follows :
... don't worry, it's commented.
In the sample program, instead of using reals I have used fixed point math. Refer to tut 14 if you have any hassles with fixed point, it is fairly straightforward.
I also use psuedo 3-d perspective transforms to get the positions smooth... after Tut8, this should be a breeze.
There are no new commands in the assembler for you, so you should get by with what you learned in tut7/8 ... whew! A lot of back referencing there ;) We really are building on our knowledge :)

I have a lot of work ahead of me for a while, so this may be the last trainer for a few months ... unless I can find some free time available. So please be patient!
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
DenTut16-Pas
ÕÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͸
³ W E L C O M E ³
³ To the VGA Trainer Program ³ ³
³ By ³ ³
³ DENTHOR of ASPHYXIA ³ ³ ³
ÔÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ; ³ ³
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
--==[ PART 16 ]==--
- Introduction
EzE has released a trainer! It is on the speeding up of 3D for normal 3D and for virtual worlds. Check it out, it is quite good (even though I get a bit of ribbing in his quote
I have set up a mailserver (that doesn't seem to work all the time, but the ones that miss I post manually). It works like this :
Send mail to denthor@beastie.cs.und.ac.za with the subject line : request-list ... it will automatically mail you back with a list of subject lines with which you can grab certain files. You will then mail me with the subject line of a specific file and it will send you a uuencoded version of that file automatically. Cool, huh?
- What is scaling?
With scaling to can easily strech and shrink your bitmaps.
- Okay, so how do we code it?
For the horizontal area, I am going to calculate a certain step value. I will then trace along the bitmap, adding this step to my position, and placing the nearest pixel on to the screen. Let me explain this simpler ...
Let us say I have a 10 pixel wide bitmap. I want to squish it into 5 pixels. Along the bitmap, I would draw every second pixel to screen. In ascii :
1234567890 13579 +--------+ +---+ | | | | | bitmap | | |dest | | | | +--------+ +---+As you can see, by stepping through every second pixel, I have shrunk the bitmap to a width of 5 pixels.
The equation is as follows :
step = origionalwidth / wantedwidth;
Let us say we have a 100 pixel wide bitmap, which we want to get to 20 pixels.
step = 100 / 20
step = 5
If we draw every fifth pixel from the origional bitmap, we have scaled it down
correctly! This also works for all values, if step is of type real.We also find the step for the height in the same way.
Our horizontal loop is as follows :
For loop1:=1 to wantedwidth do BEGIN
putpixel (loop1,height,bitmap[round (curpos)],vga);
curpos:=curpos+xstep;
END;
And the vertical loop is much the same. Easy huh? So east in fact, I wrote the
procedure in pure assembler for you In the sample program, instead of using reals I have used fixed point math. Refer to tut 14 if you have any hassles with fixed point, it is fairly straightforward.
I also use psuedo 3-d perspective transforms to get the positions smooth... after Tut8, this should be a breeze.
There are no new commands in the assembler for you, so you should get by with what you learned in tut7/8 ... whew! A lot of back referencing there ;) We really are building on our knowledge :)
- In closing
I have a lot of work ahead of me for a while, so this may be the last trainer for a few months ... unless I can find some free time available. So please be patient!
[ "Sir! My computer has just gone haywire!"
"What?" shouts the CO. "That is a multimilliondollar machine!
find out what's wrong! This is a critical time lieutenant!"
"Yes sir"
The young lieutenant furiously types away at the keyboard, but
the machine totally ignores her.
"What is going on, soldier?"
"I don't know sir! It is just doing totally arbitrary things
after it's assigned tasks are completed. In the computer world
this is known as Denthorisms."
The computer starts to make random beeps, and prints out a payroll
program.
"Get it working NOW soldier"
The lieutenant ignores him, and contines typing. She gets partial
control of the system, she can run programs, but the computer is
continually running arb tasks in the background. One of the
techhies who have gathered behing her suddenly cries "Hey! It's
accessing the missile codes! It wants to launch them!"
The typing gathers speed, but to no avail. Another techhie says
"I could disconnect the computer from the link, but that would take
hours! And this thing will have the codes in under five minutes
at the speed it's going!"
A smile forms on the lieutanants face, and she leans back in her chair.
"What the hell are you doing?" yells the CO. "Why have you stopped?"
Again ignoring him, the lieutenant instead turns to the techhie. "Go
disconnect the machine, I know how to get you the time you need."
"How on earth will you do that? The machines going at top speed!"
She smiles again, leans forward, types in three letters and hits the
carriage return. The computer grinds to a halt.
The smile breaks into a grin. "Maybe it _does_ have it's uses after
all."
]
- Grant Smith
15:30
23-9-94
Byeeeee.....
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
