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.

Newcomers DBPro Corner / about shooting

Author
Message
piki
17
Years of Service
User Offline
Joined: 28th May 2007
Location:
Posted: 25th Jun 2007 20:51
hi

here is a new ultra noob=me
but i do think that the best way to learn, is to play with the commands and to make some action on the screen and during the time, to add more commands to the knowlege and again...play with them

anyway..i made this code and i want to shoot bullets from this box (lets imagine it is tank).

i want the bullets to go from the tank-deep into the screen (3d shoot) and the most important thing..i wants the simplest way around to do that thing this will help me go on.
(the object that act as a bullet will be the sphere)

set display mode 800,600,32

sync on

hide mouse

rem color background and make two object and also color them.
color backdrop rgb(0,100,100)
make object box 1,2,2,2:color object 1, rgb(30,140,120)
make object sphere 2,1:color object 2, rgb(100,0,255)
rem start main loop
do
rem locate objects and camera
position object 1,ox1#,0,-15
position object 2,0,1,-13
position camera 0,15,-37
rem some key movemants
if leftkey()=1 and ox1#>-15.7 then ox1#=ox1#-0.005
if rightkey()=1 and ox1#<15.7 then ox1#=ox1#+0.005
if upkey()=1 then yrotate object 1, OBJECT ANGLE Y(1)+0.1
if downkey()=1 then xrotate object 1, object angle x(1)-0.1


sync
loop

noob wants to learn
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 26th Jun 2007 02:29
Hallo piki....I made a code for you...i hope you like it...


Cheerz.



oh my god
piki
17
Years of Service
User Offline
Joined: 28th May 2007
Location:
Posted: 26th Jun 2007 16:30
haha thanks chafari..this is way above my skills but i will try to lean as mutch as i can from this code you made

its not bad

i will take one step back to some 2d like pacman to understand better.

noob wants to learn

Login to post a reply

Server time is: 2024-09-27 01:12:47
Your offset time is: 2024-09-27 01:12:47