0 Members and 4 Guests are viewing this topic.
Run program which stores the 15*23 level into a matrixWhile 1Menu (view map, change club, swing, save, load, quit)Lbl view mapLoop: check matrix bit by bit, return each valueIf value = 1draw grass 4x4 spriteIf value = 2draw rough 4x4 spriteIf value = 3 and so onEndLbl Change clubMenu (Driver: 1->Z 5->Distance, Iron: 2->Z 4->Distance, Wedge:3->Z 2->Distance, Putter: 0->Z 1->Distance)Lbl SwingDraw thermometerLoop: expand line to match swing power like a normal power barIf max set variable to downLoop: Shrink line accordinglyIf line reaches bottom, go back to menuIf 2nd pressedStart new line below first, Going down towards accuracy markTest accuracy variable with closeness of line to markIf 2nd pressed, send variables to shot calculation programLbl SaveSave all variables such as position, club, hole, level pack to listLbl LoadLoad variables from listLbl QuitGoto Lbl ZLbl Shot CalculateUse trig, wind value vs z value, and matrix data to calculate new positionEndLbl ZOutput "Thanks for playing!Output (block done token)
"welcome to the world of computers, where everything seems to be based on random number generators"
If anyone wants to use the posted code structure for there own golf game, * boot2490 points to flyingphisch and his CASIO i will be MORE than glad. It is a lacking genre on the calc. Just don't make it too much better than mine
'Run program which stores the 15*23 level into a matrixWhile 1Menu (view map,1,change club,2,swing,3,save,4,load,5,quit,6)Lbl 1Loop: check matrix bit by bit, return each valueIf value = 1Then draw grass 4x4 spriteIf value = 2draw rough 4x4 spriteIf value = 3 and so onIfEndLbl 2Menu (Driver:,A,Iron:,B,Wedge:,C,Putter:,D)Lbl 3Draw thermometerLoop: expand line to match swing power like a normal power barIf max set variable to downLoop: Shrink line accordinglyIf line reaches bottom, go back to menuIf 2nd pressedStart new line below first, Going down towards accuracy markTest accuracy variable with closeness of line to markIf 2nd pressed, send variables to shot calculation programLbl SSave all variables such as position, club, hole, level pack to listLbl LLoad variables from listLbl QGoto Lbl ZLbl XUse trig, wind value vs z value, and matrix data to calculate new positionIfEndLbl ZClrText"Thanks for playing!(block done token)StopLbl A1->Z:5->D:Goto 3Lbl B2->Z:4->D:Goto 3Lbl C3->Z:2->D:Goto 3Lbl D0->Z:1->D:Goto 3