don't do this:
do this:
One well known programming style is to separate (G)UI from implementation. The advantage here is that some script can also move the player right by calling that Method or Function.
Btw, if this is your first game, first experience, first code, first whatever: know that probably all ppl here have zillions of RPG's/tilemapscrollers projects in their blitz directories. An RPG is not difficult because of its code (a raycasting engine requires more math skills than a classic/retro Zelda), but because of its vastness.
If KeyDown(KEY_RIGHT) If !(TheTreeIsAt(x+1)) x:+1 EndIf
do this:
If KeyDown(KEY_RIGHT) MoveRight EndIf .. Method MoveRight() ' or a 'Function' if you're not using types .. EndMethod
One well known programming style is to separate (G)UI from implementation. The advantage here is that some script can also move the player right by calling that Method or Function.
Btw, if this is your first game, first experience, first code, first whatever: know that probably all ppl here have zillions of RPG's/tilemapscrollers projects in their blitz directories. An RPG is not difficult because of its code (a raycasting engine requires more math skills than a classic/retro Zelda), but because of its vastness.