I see you have only 5 posts so far (but everyone has to start somewhere
I hate to see new forum members struggle with simple problems,
but on the other hand I don't want to just spoon feed you code.
It always works out a little better (I personally find) if coders have to struggle a bit to come to an answer..it provides a firmer learning experience if they discover things (through a extra little bit of effort on their part).
That said though..I don't want to let you get too frustrated (or to feel you are ignored).
First off when you said:
Originally Posted by Chazz85
Okay I'm planing to begin making a 2d rpg game..
in this post
maybe you didn't realize this is one of the hardest things you can do, not just in terms of programming,
but specifically it's actually probably one of the most advanced
types of games to program.
So..a very ambitious goal to be sure but not unachievable if you take it one step at a time.
Secondly (on the step you are working on now) there are several ways of doing what you are trying to do --basically coordinating key presses with character movement.
I have to point out:
you are not the first programmer to try and do this (which I'm sure you probably know
but you are smart in terms of looking around with some working code to start out with
--and not just trying to "re-inventing the wheel" by struggling to write some random non-working code.
You've probably been searching far and wide on the Internet (looking for code),
but have you actually tried looking in the forum's VB.Net KnowledgeBase first
It's a really great resource!
Specifically I would point you to the Code Library section of the KB that has IcePlug's "Quick example of a Tile Map" thread
(and specifically Post2: "Tile Map with animating character on it"
that handles keyboard input).
Of course this is just is one
way to handle keyboard input.
Iceplug is one of the forum's more advanced coders (and a gaming specialist to boot).
His coding definitely represents one of the preferred way to doing things for an intermediate and above coding perspective.
However, maybe you could also benefit from a beginning tutorial:
Making an RPG in VB.NET: Tutorial 1
This tutorial shows a little less sophisticated way of doing things, but if it may help give you a good starting point.
Just don't get frustrated and do a whole bunch of posting at once thinking no one is noticing or looking to answer your questions.
The forum is a lot slower than it used to be in terms of traffic,
but that can be a good thing,
because hopefully it helps you to really think
about how to solve things yourself,
and only post when you've got something (like an code attachment) that "sort of" works
and you need help just taking it to next level
(or because you are trying to integrate some extra code that isn't quite there in terms of programming).
Here's another quick tip:
Most of the early games I did in VB.Net, that required keyboard input,
I would set the form's KeyPreview property
(if you haven't already done so in your particular project),
just to make things a little easier (and not have to worry about possible focus related difficulties).
Anyway, good luck on your project.
My specialty in graphics (as you probably guessed from my forum name)
--so I'm specifically looking forward to seeing what your rpg game comes up with in that area.