Err: after the 5,500 lines of code in each of 1200 objects in my Devawriter Pro I have metamorphosisedare only 43 lines of code to write!
into the ultimate minimalist; and 43 lines makes me feel fairly nervous.
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Err: after the 5,500 lines of code in each of 1200 objects in my Devawriter Pro I have metamorphosisedare only 43 lines of code to write!
Accepted. But then I wonder why your rawkeydown handler from above has 100 lines and not 15?Richmond wrote:... I have metamorphosised into the ultimate minimalist ...
Cough!I wonder why your rawkeydown handler from above has 100 lines and not 15?
Code: Select all
on rawKeyDown RK
global POZZ
if RK is not among the items of "65308,65309" then pass rawkeydown
set backPattern of grc "gun" to the id of img ("gun" & POZZ)
if RK is 65309 then put max(1,min(8,1+POZZ)) into POZZ
else put min(8,max(1,-1+POZZ)) into POZZ
put line POZZ of ("860,240,541,633" &cr& "810,300,513,590" &cr& \
"750,360,477,546" &cr& "690,420,442,507" &cr& "630,480,408,467" &cr& \
"570,540,368,434" & "510,600,323,407" &cr& "450,660,282,365") into L
set width of grc "pathX" to item 1 of L
set height of grc "pathX" to item 2 of L
set loc of grc "pathX" to item 3 to 4 of L
end rawKeyDown
Well that's what I meant to imply. You can get the code for generating the actual parabolic curve of a projectile from Phun Physics. It involves a little math which you can certainly handle and maybe even an acceptable amount for your students?On a personal basis (nothing to do with the classes) I am not very happy with having to use a half ellipse as a fake parabola;
but cannot get my head around some relatively simple way to let the points of a parabola in a listField.
Well; first off; I don't have any students on my Summer courses: they are all school children; pupils.an acceptable amount for your students