Saturday, 14 December 2013

Petit Computer Tutorials: Set 1

                                                                                                                                                  
Hello! Welcome to my Petit Computer tutorials! Today we will learn how to make a game! First, make a title screen. Then, follow this code.

FOR X=1 TO 24
PRINT "
NEXT

This makes the entire top screen move up off the page!
                                                                                                                                                
Next, we will find out how to clear the bottom screen (CLS won't work-it'll clear the top screen as well) and put a design in the keyboard's place. First, use GRPED to draw a design. Then use this code.

LOAD"  ( Here, write GRP1. Then, write its name.)

When you finish, go into run mode and write the command RUN. Nothing should happen. Go back into edit mode and type this code.

PNLTYPE "OFF"

This makes the keyboard disappear, so your design takes its place.    
                                                                                                                                                  
Next, let's learn how to move a text character on the top screen using the circle pad!  Use this code.

@LOOP
K=BUTTON(2)
IF K AND 1 THEN Y=Y-1
IF K AND 2 THEN Y=Y+1
IF K AND 4 THEN X=X-1
IF K AND 8 THEN X=X+1

LOCATE X,Y
? " A" (Or another text character)

VSYNC 1:CLS
GOTO @LOOP

You can now move a text character!                                                      
                                                                                                                                                  
Now you have made a simple game!
Thanks for reading Petit Computer Tutorials: Set 1:-)
                                                                                                                                                  
                                                                                                           



2 comments:

  1. Next time,tell us how to load a sprite onto the page.

    ReplyDelete
  2. I'm excited to read more tutorials!

    ReplyDelete