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 / I need darkbasic training

Author
Message
vid1987
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Oklahoma
Posted: 19th Feb 2005 08:45
Hello i really want to learn to program games ive learned a lot but there's still some commands i dont know yet i need a mentor... i need someone good at programming to help me plz give me your email address if you have msn and ill add you. no flaming plz and thx

David
WarGoat
20
Years of Service
User Offline
Joined: 19th Sep 2004
Location: Montreal
Posted: 19th Feb 2005 09:48
What command you need to understand?

Windows XP,pentium IIII, 1,9 MGZ, 256 mb memory, 128 mb video card ATI Radeon 9200 se s80
Gil Galvanti
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 19th Feb 2005 10:43
yes, please just ask specifically what commands u need help on and others and I will be glad to help u

Video games…they can take you places unreachable, impossible, unfeasible. They put you in the book...they put you in the movie...they put you in a world, a world that before could only be imagined.
vid1987
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Oklahoma
Posted: 19th Feb 2005 11:10
i need to learn how to make objects solid where other objects cant go through them : and i also need to learn how to use mouseclick on certain objects : ad i need to learn how to make it where if an object touches another object then something happens command : and i need to learn how to use the gosub command and how to use it with the if command : if a certain key is pressed at a certain time then something happens : there's a few more commands i dont know but thats all ill ask for now thx

David
Gil Galvanti
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 19th Feb 2005 12:14 Edited at: 19th Feb 2005 12:15
k, lets start with making objects solid...Look into the collision commands, try them out post ur problems, cause personally i havent worked with collision before .
Mouseclick...in 3D or 2D? in 3D ive never done it but 2D i have, just say if its 2D or 3D and ill try to help u more
For the making objects touch something and then something happens, figure out collision first, then make an if...then statement saying
if <however you figure out to do the collision>
say to do whatever
something like...make object box 1,1
endif

The gosub just goes to a section of ur code, pretty much just organization like this:
gosub control_player
control_player:
return

is all you do, then put all ur code for controlling player put before return and after "control_player:"
for the key press problem try this:
if keystate(key scancode #)=1 and <insert various other conditions here, such as player position>
say what to do here
endif

hope that helps, sry i couldnt fully answer all of them

Video games…they can take you places unreachable, impossible, unfeasible. They put you in the book...they put you in the movie...they put you in a world, a world that before could only be imagined.
WarGoat
20
Years of Service
User Offline
Joined: 19th Sep 2004
Location: Montreal
Posted: 19th Feb 2005 23:15
You can to something like
make object box 1,3,3,3
position the object
position object 1,5,0,0
make object box 2,1,1,1



for character and a wall and do some movement for the character if the box don't have collision

if object collision(2,1)=0

the object collision command will return a value and the number in the () is the object num, object num.

if upkey()=1 then move object 2,1 etc
endif

now for if the collision = 1
if object collision (2,1)=1

the object collision command will return a value and the number in the () is the object num, object num.
now in the if statement you should put something like that
if upkey()=1 then move object 2,0
if downkey()=1 then move object 2,-1
if leftkey()=1 then turn object left 2,3
if rightkey()=1 then turn object right 2,3
endif

here the complete code:


Hope it help

Windows XP,pentium IIII, 1,9 MGZ, 256 mb memory, 128 mb video card ATI Radeon 9200 se s80

Login to post a reply

Server time is: 2024-11-11 23:56:24
Your offset time is: 2024-11-11 23:56:24