Let's say I've got a code like this:
This works well, as every time the sub (or should I say the equals sign) goes one point, it erases the one behind it. Unfortunately, ever since I press a key to make it go a direction, I can't change the direction. What would I need to change in order for the game to let me change the direction I'm going? (and what do I need to put in order to use the arrow keys instead of W, A, S, and Z (w=up, a=left, s=right, and z=down). If you need more code, then tell me and I'll post the whole thing.
Need to change something?
Line 260 reads:
it should read:
Also, why the GET H$ on line 220?
Code: Select all
260 GOTO 202
Code: Select all
260 GOTO 200
Just another thought, the line
will pause the program at that line. If the game is to run realtime (sorry, I've not seen the Atari version yet), then I would replace it with
This would then make the submarine continue in the direction specified until another key is pressed.
Code: Select all
200 GET H$
Code: Select all
200 H$=KEY$
-
- 2nd Star Corporal
- Posts: 29
- Joined: Tue Jun 05, 2007 1:45 am
- Location: Oregon, United States
- Contact:
I want the sub to move like Pac-Man and Nibbles do. The sub should keep going until it either A=reaches a wall until it dies, or B=changes direction when a player presses a button. If I change line 260 to read "GOTO 200", then the player will move one space and then stop. That's why I changed it to read "GOTO 202" By the way, I've decided not to add walls and just make this a Nibbles-type game for now (without the growth, of course.) He can still crash into the edges and die, though.