Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / My first 3D attempt...

Author
Message
Barrett
22
Years of Service
User Offline
Joined: 12th Feb 2003
Location:
Posted: 18th Jul 2003 05:35 Edited at: 18th Jul 2003 05:42
Well I finished my first attempt at anything 3D related a few minutes ago, so I'll post the source. (I wrote a little scancode checking program too...so I could see what keys I should be checking for...) I'm definatly a newbie, and no, I didn't spend hours on the textures...just a little program I whipped up:

Print "Use F1 key to change object textures."
Print "Use arrow keys to rotate object."
Print "Use + and - keys to speed up object rotation."
Print "Press ENTER TO BEGIN."
DO
If scancode()=28 then goto start
LOOP
start:
MAKE OBJECT SPHERE 1, 500
Load Image "C:3demograsstxt.bmp",1
Load Image "C:3demosmiletxt.bmp",2
Load Image "C:3demomoontxt.bmp",3
Load Image "C:3demoeyetxt.bmp",4
Texture Object 1,1
c = 0
s = 5
begin:
Do
If Upkey()=1 Then x = x + s
If Downkey()=1 Then x = x - s
If Leftkey()=1 Then y = y + s
If Rightkey()=1 Then y = y - s
If x < 0 Then x = 360
If x > 360 Then x = 0
If y < 0 Then y = 360
If y > 360 Then y = 0
XRotate Object 1,x
YRotate Object 1,y
If Scancode()=59 Then goto texturechange
If Scancode()=12 Then s = s - 1
If Scancode()=13 Then s = s + 1
If s > 10 then s = 10
If s <= 0 then s = 1
Loop
Texturechange:
Wait 250
c = c + 1
If c = 4 then c = 0
If c = 0 then Texture Object 1,1
If c = 1 then Texture Object 1,2
If c = 2 then Texture Object 1,3
If c = 3 then Texture Object 1,4
goto begin

Anyone know where I could host the .exe's at for cheap (i.e. FREE )

Thanks,
Barrett

Ag3ntSm1th
22
Years of Service
User Offline
Joined: 13th May 2003
Location:
Posted: 18th Jul 2003 05:53
i actually have a spot on my site for user submissions. if you'd like me to post it for you, zip it up and send it to [email protected]

it'll be on the site in my signature, in the downloads section... if you'd like of course

"The secret to creativity is knowing how to hide your sources." - Einstein
my DarkBasic creations - http://www.sixurbanninjas.tk

Login to post a reply

Server time is: 2025-05-19 10:45:54
Your offset time is: 2025-05-19 10:45:54