Board Thread:General Discussion/@comment-24454571-20140204220440/@comment-24854750-20140507212922

I'm glad I could help, and thank you for your kind words about my game. I'm sure the simplicity of the coding, though, has a lot more to do with my amateur coding experience than anything else. I have found it can be easy to get lost in a long code.

I think the best overall advice I can give, which is really just an echo of what others have said, try sticking to one idea. If you run into a problem, try simplifying it. Completed projects/ideas are very satisfying.

Now for more direct advice: I have been working on a project of mine which uses the bottom screen heavily for user input, specifically, menus and buttons, and I can explain how I created them. There are system variables which detect and hold information such as if the bottom screen is being touched (TCHST, 0 means the screen is not being touched and 1 means the screen is being touched), how long it is being touched (TCHTIME, I didn't need this variable for my program), and the x and y coordinates of where it is being touched (TCHX and TCHY). So first, I set up the bottom screen, using PNLTYPE "OFF" to remove the keyboard, and then PNLSTR to create and place the boxes (the second page of the keyboard has some thick lines that are good for creating "box" shapes). After I have found the right position for the boxes, I set up a loop that prints the system variables TCHX and TCHY.

PNLTYPE "OFF"

PNLSTR 5,1," /-\"   'the top part of the box

PNLSTR 5,2,"|  |"   'the sides of the box

PNLSTR 5,3,"\_/"   'the bottom part of the box

@LOOPY

CLS

PRINT TCHX;":";TCHY

GOTO @LOOPY

When you run the program, you can find the top-left and bottom-right corner coordinates (Specifically the left-most and the right-most x values, and the top-most and bottom-most y values). From there you can program commands inside the loop based on if the area inside the x and y values is touched. Such as:

IF TCHX>=42 AND TCHX<=58 AND TCHY>=12 AND TCHY<=28 THEN PRINT "BOO!"

One downside to the TCHX and TCHY variables is that these will always be equal to the last place touched on the screen. So if you were to add the above command to inside the loop in the further above sample program, and touched inside the box, the program would continuously display both BOO! and the x and y coordinate of the last touched location. So you can add a command that detects if you are touching the screen and the skips the boo-printing if statement. In the end, the loop might look like this:

@LOOPY

CLS

PRINT TCHX;":";TCHY

IF TCHST==0 THEN GOTO @LOOPY

IF TCHX>=42 AND TCHX<=58 AND TCHY>=12 AND TCHY<=28 THEN PRINT "BOO!"

GOTO @LOOPY

Now, only if you are touching the screen inside the box will BOO! be printed.