1 / 15

on the TI series calculators

Game Programming. on the TI series calculators. By Chris Williams & William Lord. Two languages available. Assembly Basic. Assembly. allows sound allows high level graphics compiled language typically large large degree of flexibility. Basic. primarily text-base

kalila
Download Presentation

on the TI series calculators

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Game Programming on the TI series calculators By Chris Williams & William Lord

  2. Two languages available • Assembly • Basic

  3. Assembly • allows sound • allows high level graphics • compiled language • typically large • large degree of flexibility

  4. Basic • primarily text-base • easy to read and write • interpretive language • typically small size • similar to PC basic • limited functionality

  5. Output • Three forms: • Disp - standard output • Outpt( - defined location • Text( - in graph window

  6. This screen demonstrates the disp output function. Code: 1.) Program:hello :ClLCD :Disp " HELLO WORLD","---------" Program:hello :ClLCD :OutPt(7,0 "HELLO WORLD" :OutPt(0,10 "---------" Program:hello :ClGRW :Text(7,0 "HELLO WORLD" :Text(0,10 "---------" :Pause

  7. Input • for integers • Input “prompt” , variable • for text • InpSt “prompt” , variable • Each key has it’s own address • the program can wait for a specific keystroke.

  8. This screen demonstrates the input function. Code: 2.) Program:Pokemon :Input "*Selection: ", Var1 Program:Pokemon :InpSt "*Name: ", Name1 getKy->K If K==105:Then Disp "You pressed Enter." End

  9. Variables • Defined during assignment • integers • “number”  variable • strings • “String”  Variable

  10. This screen demonstrates the variable declaration. 3.)

  11. Function keys • Assigned with menu command • each key has it’s own address • usage • menu( 1, “title”, goto, ...

  12. This screen demonstrates the function keys. Code: 4.) Program:PRS :Lbl Top :ClLCD :Disp "Paper Rock or Scissors" :Menu(1,"Pap",ramp,3,"Roc” ,ramr,5,"Sci",rams

  13. Gotos • Program is segmented by labels • Lbl LABEL • gotos transfer control to a label • Goto LABEL

  14. This screen demonstrates Goto statements. 5.)

  15. Merry Christmas

More Related