21st Century Smalltalk

July 5, 2007

Silverlight Games – Test 1

Filed under: Browsers, Games, Silverlight — pfisk @ 8:33 pm

game1

Above is Smalltalk/DLR running in a browser with Silverlight 1.1.

Above is a simple game created in a few minutes using the Designer. To run it, open a Designer window and select:

  • Server->Load->game1.des
  • Prev->Engine->Run
  • Press the space bar to release “bombs”

At the bottom is a target sprite which has been given a timeline that starts at the left then moves to the right and which also is set to automatically reverse direction.

At the top is the attacker sprite which has been given a timeline that starts at the right then moves to the left and which also automatically reverses direction. This sprite is also designated as a “shooter” which means that it will release objects when a key is pressed.

There are still several details to be worked out:

  • collisions for compound objects aren’t defined yet, so the “bombs” pass right through the car
  • when “bombs” reach the floor, they should probably disappear or explode – for now, they bounce
  • there is no way yet of keeping score

The positive aspects of this game are:

  • it was totally created in the browser with no outside tools
  • instant deployment – as soon as it is saved on the server, anyone in the world with a Silverlight 1.1 enabled browser can play it

All of the game parameters are stored on the server in a JSON dictionary.

The next release of Silverlight 1.1 will likely support sockets, which means that browser-to-browser communcations will become possible. Then, by exchanging JSON-encoded data in a similar manner, we should be able to build realtime user-driven games or other types of applications.

July 2, 2007

Online Silverlight Application Development

Filed under: General — pfisk @ 5:53 pm

Silverlight is a powerful new technology whose market is yet to be defined.

The development model promoted by Microsoft centers around the use of desktop tools – Visual Studio and Expression Designer. These are good tools and are ideal for teams of professional developers. However, they are far too complex for people who want to quickly create and deploy simple applications – in the same way that MS Word is not the best tool (for most people) for writing email or Usenet posts.

Making Silverlight development simple and accessible will be a major factor in its widespread acceptance. My guess is that most Silverlight applications will be developed online in an environment similar to Wikis or blogs:

  • libraries of “pre-built” components
  • very simple editing tools
  • very simple scripting
  • “instant” publication

 I will continue to focus on browser-based tools for the creation of games and shared applications using a visual scripting capability similar to MIT’s “Scratch”.

Animation Timelines and Physics Engine

Filed under: Animation, Games — pfisk @ 4:09 pm

designer5

Above is Smalltalk/DLR running in a browser with Silverlight 1.1.

There is now a “Physics Engine” included in the Smalltalk/DLR libraries. It has support for:

  • gravity
  • collision resolution with transfer of momentum
  • elastic connections
  • friction
  • rotational transfer of momentum
  • “fixed” or movable components

I am in the process of adding physics engine support to the Designer. The image at the top of the post shows a circle sprite bouncing on top of a “fixed” rectangle when the gravity field is turned on.

Another kind of animation involves “timelines” in which elements change properties such as location, color, size, rotation, or opacity over a fixed period of time – without regards to physical constraints.

Animations in Microsoft’s Expression design tool are built around the concept of timelines. The Smalltalk/DLR Designer supports both physical and timeline animation.

Blog at WordPress.com.