Quote: "I would like to know how to make 2d levels in my game. I would also like to know how I can add textures to the map. thnx"
This code gets the screen prepared for your sprites and background image.
backdrop off
set sprite 1000,1,0 `Helps solve the blue background problem
set image colorkey 255,0,255 `Sets your transparent color to pink
For your background image, open a paint program and draw/paint something 640 x 480 and then save it as Background.bmp (or what you prefer). Also make sure it is placed in the folder with your source code so you can load it into your game. Then...
load image "Background.bmp",1,1
paste image 1,0,0
Quote: "I got a question about the camera also. How do I make it so that it follows my character(sprite)"
If your using pure 2d there is no camera. The method I will be using is when the player's Y coord is in the center of the screen I will stop the player from moving up any higher and then add to every other sprites Y coordinate so it will look as if the player is moving up and the background is scrolling down.
Heres a pic from commando that might help you understand my method better.
Quote: "And what is the basic setup of a function."
function PlayerBulletHitShield(Player,Shield)
if sprite hit(Player,Shield) = 1
BulletX(0) = PlayerX(0) + BulletOutOfGunX
BulletY(0) = BulletOutOfGunY
firing(0) = 0
endif
endfunction
This is a basic function from my 2d Shoot 'em Up engine.
to call this function during your game you would need this code
PlayerBulletHitShield(1,3)
Since my function is determining if the player's bullet hit the shield you need to specify the Player's Bullet sprite number which happens to be 1 in our case, and then you need to specify the sprite number of the shield (which happens to be 3) that we are trying to see was hit.
Well I hope that this helps you a bit but what you really should do is start looking at previously made 2d games in the codebase. That should give you a good idea how games are crafted.
http://www.angelfire.com/games5/db_games/