I am an advanced QBasic programmer (text wise), but I have <<<NO>>>
graphic experiance. Is there a good tutorial out there for me to use?
Or better yet, how about some 1 on 1 help.
Keep in mind, I need to know about the following items/commands:
> Poke > Using BMP or PCX Files (preferably BMP)
> Peek
> Binary Files
Oh thank you...
Brandon (Brandos)
> It's me again! I've got another question for you all. This one is a
> good one too. Okay, I was at a friends house today, and I watched him
> play Zelda (C) on his N64. This got me thinking... How do I do
> perspective with QBasic?
>
> I am an advanced QBasic programmer (text wise), but I have <<<NO>>>
> graphic experiance. Is there a good tutorial out there for me to use?
> Or better yet, how about some 1 on 1 help.
You won't like basic for games (way slow)
Try Euphoria - lots of games have been written in Euphoria, which can
easily manage 50 -60 fps graphics., and otherwise runs about 20x faster
than QBasic. Also, it has built-in commands to load/display/save bitmap
files,
and supports most any resolution and color depth.
A free public-domain version can be downloaded from
http://members.aol.com/fileseu
along with lots of sample programs.
Irv
<snip>
> I am an advanced QBasic programmer (text wise), but I have <<<NO>>>
> graphic experiance. Is there a good tutorial out there for me to use?
> Or better yet, how about some 1 on 1 help.
One does /not/ do 3D graphics in any Microsoft BASIC, and expect it to be
speedy, or even slow, come to think of it.
What you want is to take a book out of your local library about x86 assember,
and then one of 3D graphics etc...
I can supply source to 3D stuff written in ARM assembler, using a VIDC20a
as the video processor, but I doubt that's much use to you.
Cheers,
Rob Kendrick
--
E28F0018 E5D02000 E232202A E4C02001 1AFFFFFB E28F0004 EF020002
EF020011 445D456E 5E435D0A 43670A42 59455849 0B5E4C45 0000002A
http://www.kiwisoftware.demon.co.uk
Remove NOTSPAM to email personally.
Computer: a device designed to speed and automate errors.
I've glanced at a tutorial and the thing to keep in mind is that the
further back you go, the smaller things get.
Well I'm guessing that by perspective you mean transforming a 3d object
into a 2d representation, with perpective transformation, so that things
look like they are going off into the distance,
and don't bother looking at most of the 3d programs you can get from
things like ABC, because they don't do the transformation correctly, and
produce fisheye distortion of the image,
they use a simple formula for transforming a point with actual X,Y,Z
co-ordinates, to screen X,Y co-ordinates.
something along the lines of :-
screen X = Actual X / Actual Z
screen Y = Actual Y / Actual Z
This as I mentioned before does not transform the point correctly, and
does not allow for using variable Field Of View (FOV)
to implement field of view you also need to work out the X,Y Components of
the Viewing distance this is calculated like this :-
dx= ( center_x ) / TAN ( FOV / 2 ) ;
dy= ( center_y ) / TAN ( FOV / 2 ) ;
and then to use this as part of your perspective transform you do the
following
x= center_x + (dx * x / z );
y= center_y - (dy * y / z );
if you are in 320x200 you will also need to multiply your x terms by a
correction value (200/240) as the pixels are not square.
TTFN
Arclight