Tuesday, September 28, 2010

Work Progress - Sept 29 - Oct 5

Demo URL: here

* Allow loading of external XML file (Ref). Now by specifying the location of the sample file in the JNLP file as follows, one can load a default script by saving it as an XML file and putting it on the web.

<jnlp ... >
...
<applet-desc name="pCSDT Applet" main-class="SB.SBGui" width="1000" height="600">
<param name="DefaultScriptUrl" value="http://www.rpi.edu/~laut/SBtest/SB2.xml"/>
</applet-desc>
...
</jnlp ... >

References: 1, 2, 3, 4

* On rolling over the simulation canvas, we now indicate the name of object that can be selected.
* Rename "On: Simulation" to "DoForever"
* Polynomial/curve: I implement an "Arc" object using center of a circle to indicate its location, and its radius, start angle and end angle to define the arc. You may try adding it from the "Create New Object" button.
* Skateboarder: To model the wheels better (so it wouldn't fall down in the following situation)
I model the skateboarder as rounded rectangle as follows:

TODO:
* Better default file
* Pose
* Forgiving cursor (still need to wait for Jason for some core code)
* Simulation canvas moves with the main character.

New ideas:
* Providing the option of adjusting the weight of the skateboard and the skateboarder. (Different relative weight may affect skateboarding stability.)
* On pressing a keyboard key, the skateboarder responses, like accelerate or jump.
* Better Skateboarder's kick functions - for example, accelerate and jump should be allowed only when he (his bottom to be more precise) is in contact with some surface).
* Ollie, which is rotation about multiple axes. We need to model the skateboard better (e.g. with two wheels and a board rather than a soild mass) in order to model that correctly.

Tuesday, September 21, 2010

Work Progress - Sept 22 - Sept 28

Web demo: here

Work done:
  • App programmer can now put the properties in either "Basic" or "Advance" group. To put an AutomatableProperty in the basic tab, use the following construct:

    @AutomatableProperty(name="init-x", desc="x coordinate of initial skateboarder position", group="basic")
    public float m_initx;


    To put an AutomatableProperty in the advance tab, use the following construct:

    @AutomatableProperty(name="friction", desc="friction of the skateboarder", group="advance")
    public float m_friction;


    If you do not specify the group to which the AutomatableProperty belong, the Core will assume it is a basic property.
  • Forgiving cursor - when the mouse is on somewhere where we have some object to click, we indicate that at the top of the simulation canvas. (See top left)
TODO with the SB app/Core:
  • Forgiving cursor - making certain allowance on the minimum selection area (difficult as current code works with logical positions not screen position)
  • Curved lines would be really nice—perhaps the same polynomials we put into the synth tool, and throw in a sine wave as well.
  • Different poses (still in experiment, and should be done only when concrete direction of SB app is confirmed)
  • Proper count on the current number of different PObject subclasses, so on creation of new subclass object we can assign appropriate numbers.
  • Allow images for Engine (now renamed background)
  • We need a better default file, one that has zero elasticity and more attractive behavior.
  • It is very natural to want to place a “kick” at a certain time or location (or combination of the two). This will offer an opportunity to use a conditional, once we have one.
  • It is a little counter-intuitive to think of kick in terms of iteration, I would not put that in the default file. I assume it is just in there because you needed to test the iterative loop.

Friday, September 17, 2010

Work Progress - Sept 15 - Sept 21

Web demo: here

Done:
  • Restrict the number of decimal places shown in property window. As long as the number has not more than 2 decimal places, only 2 decimal places are shown.
  • Resolve object selection when multiple objects lie on the same place. Now if multiple objects lie on the same position, any one of them has equal chance to be selected once we click on that point.
  • Highlighting selected object available to apps using Graphics2D engine as well.
  • The vertical order of the coordinate is now X first, then Y below.
  • [Now the bounding box/highlight is gone when simulation goes on.] When the user starts, we don’t want a bounding box around the skateborder. But we probably want the skateborder’s script to show up as the default. So maybe he can just change color the way the lines do, rather than placing the bounding box around him.
  • Get rid of “current x,y” and have only “initial x,y”.
  • [Solved by resetting whenever we are updating any property of the object.] When you change a line position parameter, it’s hard to know what effect you had on the line, there is no immediate feedback to the user. It would be nice if you could see the line change BEFORE you press “begin.
  • [I highlight which endpoint is which when the line segment is selected.] I found myself was struggling to figure out which end of the line was x1,y1 and which end was x2,y2. Not sure what is best to solve that problem. We could make a more pictorial version of the properties panel but that would burn up a lot of coding time. On the other hand it is important to keep in mind that the success of this hinges on reducing the amount of frustration experienced by the kids.

TODO with the SB app/Core:
  • Proper count on the current number of different PObject subclasses, so on creation of new subclass object we can assign appropriate numbers.
  • Allow images for Engine (now renamed background)
  • We need a better default file, one that has zero elasticity and more attractive behavior.
  • Curved lines would be really nice—perhaps the same polynomials we put into the synth tool, and throw in a sine wave as well.
  • It is very natural to want to place a “kick” at a certain time or location (or combination of the two). This will offer an opportunity to use a conditional, once we have one.
  • It is a little counter-intuitive to think of kick in terms of iteration, I would not put that in the default file. I assume it is just in there because you needed to test the iterative loop.
  • When trying to select a line, it is easy to accidentially select the display screen instead. We need a “smart” mouse cursor that realizes that if you clicked really close to a line, that you wanted the line and not the screen.
  • I think I would have only line position show up, and for the other parameters (color, width, elasticity, friction) I would make them click on “advanced” before they see them.

Friday, September 10, 2010

Work Progress - Sept 8 - Sept 14

Web Demo: here

Tasks completed:
  • Core: Object duplication completed. Now after you right-click on the object and select duplicate, a new object with the same properties and scripts is created.
  • Core: Allow default naming convention of individual objects to be changed via overriding the setNamingConvention() method of the pObject. Now when you create a new object, the default name of the newly created object looks better.
  • SB: Rename default objects to desired names. (e.g. The default line is now named Line_0.)
  • Core: Make OnCall() codelet a global feature available to all pCSDT apps. So now you see OnCall() event and the Launch object codelet for all the objects.
  • Deployment: Allow both applet and Web Start versions of pCSDT to run on different OSs and CPU architectures.

Wednesday, September 1, 2010

Work Progress - Sept 1 - Sept 7

Work done:
  • Now dragging method codelet away does remove the method from the script.
  • SHOW GOAL IMAGE -> SHOW GOAL IMAGES
  • Reduce the font size of the codelets a bit to make them smaller