need sample games programming code

Hi, I am helping a high school student design 2 simple games.

First, a simple strategy game (like aiming and shooting a cannon).

The second must use the keyboard or mouse to move an object through a course from one scene to another where a feat must be accomplished in each scene (example, jump over a fire). There has been no instruction about keyboard/machine interface. Can anyone send me any sample code or demo programs of something similar to these two programs, or advise about where to look to get an understanding of commands where the 'player' uses the keyboard to control graphics on the screen?
I really would be appreciate some help.
Thanks everyone,
Mary

Comments

where can you find the

where can you find the tbDemos Folder?

re: tbDemos

It should be in the main TrueBasic directory--along with TBHelp, TBDo, TBLibs, etc. At least that where it is in all the Gold versions going way back. I assume it is included in Bronze as well. If you don't see it, check in the other folders in that directory. I know that sometimes one can accidentally move a file or folder into another without meaning to.

rwt

Games

Hi,

You will find a program called "archery" in the TBdemos folder. You can download the free DEMO version to find the source code for this game.

The second game is more complex, but the basic principles are given in the demo program called "Arrow", i.e. plotting an object at different locations to give the impression of animation.

I also have a demo program that shows an alternative way of creating "motion". In this demo, motion is achieved in the same way as motion pictures, i.e. showing a series of pictures.

Regards
Big John

Games, stop motion command?

Thanks, I learned some new things from the demo folder. We are animating figures (motion of a solid figure based on arrow key strokes) using a Do loop with a key pressed command. Our problem currently is: we can't stop the motion after one key stroke. What command does this? May we look at the code of your animated demo program?

Also any "Let's Program It" purchasers out there? The demo programs disk that came with the book only works for me if I cut and paste their library (called on in the program) onto the code. Even then not all the programs work. Any suggestions for making these demos more useful?

We would appreciate suggestions from anyone else as well,
Mary

Games, stop motion command?

There is in Tbdemo folder program turtle.tru.

It uses routine to examine keyboard buffer continously.

More information in True Basic Gold manual chapter 4, page 32 (pdf page 54).

In every tested cycle when f.ex. 'L' key is pressed and Your program turns arrow left your code must move it only one step.

Kalle