News:

Function Finder  Find all the functions within source code files

Main Menu

I'm learning about vectors

Started by LemonWizard, December 08, 2009, 05:22:50 PM

Previous topic - Next topic

LemonWizard


I'm learning about Vectors.
I made this this morning/afternoon. thought it was kinda fun. to test how this works.


PlayBASIC Code: [Select]
; PROJECT : Project1
; AUTHOR : Carbonized
; CREATED : 08/12/2009
; ---------------------------------------------------------------------

x1=0
y1=0

x2=100
y2=100
xlength=20
ylength=20
v1x=300
v1y=300
v1x2=310
v1y2=310
x=300
y=300
z=300
main:

line x1, y1, x2, y2
line x1+10, y1+10, x2+10, y2+10
line x1, y1, x1+10, y1+10
line x2, y2, x2+10, y2+10
line x2, y2, v1x, v1y
line x2+10, y2+10, v1x2, v1y2
line v1x, v1y, v1x2, v1y2



box x1, y1, x2, y2, 0

if upkey() then y2=y2-1
if downkey() then y2=y2+1
if leftkey() then x2=x2-1
if rightkey() then x2=x2+1
if not spacekey()
x1=x2-xlength
y1=y2-ylength
endif



sync
cls rgb(0,0,0)
goto main




maybe I can understand rotations in 3d on a simple level once I understand these basics.
the guy who did the tutorials that taught me this stuff was really good but he stopped at #19 so I couldn't find #20 and continue. shame to. it was really well done.