Quote: " How do I make it so the food randomly apears on the screen"
Use
randomize timer()
near the start of your program and use random x and y coordinates for placement [see the help files for rnd() if you have a question]. You should check to make sure nothing is in the place where you intend to place the food.
Quote: " how do I make his bodys get longer"
This would depend on how you are displaying the images and how you are tracking them. I would suggest using arrays with sprites.
Quote: "HOw can I make it so I dont have to keep presing the keys to make him go forward "
You check the keystate of the key that you want to use to move forward. You could just use the up arrow key, which can be coded like this
if upkey()=1 then (code to move snake)
.
If you want to use a different key, but don't know what number the key is, you can use [/code] k=scancode() : print k
to tell you the key number. You then use the code [code] if keystate(k)=1 then (code to move snake)
If it were me, I would have the program automatically move the snake forward based upon the direction it is pointing, the user would only have to turn left or right. In later levels, you could speed up the snake to make it harder.
Quote: "can someone explain a bit on 2d moveing(moving your object/main character)
"
Typically, sprites are used for 2D movement. They are easily controlled. However, DBC has poor collision detection capabilities and some collisions may not get detected. Anyway, you should decide how many sprites in total that you want in your game: 30 sprites for the snake, 3 sprites for food, 6 for other objects for a total of 39 (or something like this). You then track the location and status of the sprites using arrays. For example, you could use dim snake(30,10) and then snake(4,1)=100 (x coord), snake(4,2)=200 (y coord), etc. to track different aspects about each snake piece (which image to use, it's x and y locations, what direction it is moving, etc.)
Hope this helps you,
LB