QUOTE(space invader @ 23 Jul, 2007 - 02:55 PM)

but i can't find code that will set the screen boundaries so that my player wont go of the screen. and the second is getting non-player characters to move. i have seen many diffrent techniques for it but it has confussed me about how i should go about.
The method you use depends on the type of game your wanting to work on. Do you want the player to bounce off the edge of the screen, or just stop, or even continue on the opposite side of the screen (as in asteroids, for example)?
As for NPCs you could either have them march along a predetermined path (A to B, back to A), and there are various algorithms for determining how they go around obstacles, or you could make them follow simple instructions (like following the left-hand wall, as in some basic puzzle games)...
What I'd suggest is that you try a couple of ideas out in separate projects, and see which you think works best for you.