Once when studying at KTH we had a programming assignment consisting of building an application where Ladybugs would wander around on the screen living their life.
The hard part of that assignment was that each ladybug must be represented by its own thread which should handle all operations concerning the ladybug that it represented, including drawing to the screen. This exercise was mainly about learning to program correctly in the realms of multi-threading and the exercise was set to be done in C++ targeting the Win32 API.
Here follows a video of that application running:
<iframe width="640" height="480" src="//www.youtube.com/embed/mhjmqMw9Lnc" frameborder="0" allowfullscreen></iframe>I remember spending quite a lot of time on this assignment, not only on the programming part but also on the graphics side where I put some extra effort modelling and animating the ladybugs in 3D-studio. The year must have been 1999.
Ever since taking the Coursera course Principles of Reactive Programming I've had the idea to reimplement this old school assignment using Akka where each ladybug would be represented by an Actor.
My idea for the end result is be to display the ladybugs wandering around in a web-browser updating the current state in real-time through a websocket.
This project is currently a work in progress. It's not feature complete compared to the original, but will be eventually.
It can be seen live right now by browsing to: http://ladybugs.herokuapp.com/
The easiest way to run this application is with the following command in the base directory:
./activator run
After this it can be accessed from a web browser at http://localhost:8080/.
To run in development mode use:
./activator ~re-start
This will run it in such a way that it will recompile and restart upon changes thanks to sbt-revolver.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this project except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2014- Björn Westlin.