The book of inspiration

August 31, 2009

Delaunay triangulation

Filed under: jsc — Tags: , , , , — zproxy @ 6:28 am

There is a new example in town and it is about Delaunay triangulation. The original java source code can be found here.



With this example I had to add a significant bit of awt and swing classes to ScriptCoreLibJava which ofcourse will deem helpful once it is time to start implementing Windows Forms for java.

PS. Did you know? javax.swing.plaf stands for platform look and feel 🙂

Problems at porting which should be fixed in the future versions:

  • C# won’t allow nested classes in interface. Workaround is to use “sattelite” nesting parent class.
  • Calling base method from a virtual method seems to be broken and will cause stack overflow. fixed
  • The is operator in if expression was missing parenthesis. Workaround is to use local variable.
  • The boolean comparision in if expression should be optimized. Workaround is to use local variable.

August 28, 2009

Windows Forms Everywhere

Filed under: jsc — Tags: , , , , , — zproxy @ 12:05 pm

Some time ago I had this idea to support Windows Forms in javascript. Recently I have started on implementing a new feature for the jsc solution in form of a metacompiler. What does this mean? You will be able to create a Windows Forms Application without referencing any of the ScriptCoreLib libraries which in turn also means you will not be required to explicitly mark your classes with the ScriptAttribute. With future releases the support for Windows forms could be extended to flash and java which in turn enables rapid application development :).

Contact me if you are interested in this technology and would like to buy it for your company.


TwentyTen is the codename for Visual Studio 2010. This is a project template for the beta version of TwentyTen.

jsc.png (96Ă—96)Open this example in your browser.

Browse the source code for this example.





Orcas is the codename for Visual Studio 2008.

jsc.png (96Ă—96)Open this example in your browser.

Browse the source code for this example.




Project templates


The two examples shown above are actually project templates for visual studio. The zip files should be copied to your template folder.


C:\Users\arvo\Documents\Visual Studio 2008\Templates\ProjectTemplates

In the future releases this could be automated by an installer.

What does the jsc.meta – the meta compiler for jsc do?

It will create the final glue to bind two object spaces together by automatically referencing the Base Class Library implementations within the set of ScriptCoreLib assemblies. The meta compiler could be used in the future to provide proxy services and alike to talk seamlessly over the network to the server or to a client side persistence service like SQLLite.

There are a few caveats:

  1. Long filename paths which include a space must be put inside quotes.
  2. You need to turn off the ‘optimize‘ feature in the release build in the project properties.
  3. You cannot use types which have no implementation in the ScriptCoreLib assembly. You should notify us if you want us to add specific support for you.
  4. Satellite assemblies referenced by your Simple Windows Forms Application project must at this time mark themselves with [assembly: Obfuscate(Feature = “script”)].
  5. You must use a post build event to instruct javascript translation. The first release build will take longer than the later incremental builds.
  6. The post build event is configured to not to run in debug build which enables you to run and debug your application within Visual Studio instead.
  7. In .net 4 you cannot define events at this time, due to the changes introduced in the generated IL. This will be resolved after .net 4 is released.
  8. In .net 4 you cannot use the lock keyword at this time, due to the changes introduced in the generated IL. This will be resolved after .net 4 is released. Supported when targeting  java in current version of .net.

PS2. The jsc compiler should be installed at c:\util\jsc\bin. If any of the examples have a relative reference to one of its assemblies and cannot find them you might want to edit their respective project files to reference by the absolute path instead.

Download jsc here. (Others already have!)

August 27, 2009

HeyZap Payment Contest

Filed under: games — Tags: , — zproxy @ 8:23 pm

August 22, 2009

Put some weight on it

Filed under: programming — Tags: — zproxy @ 6:00 am

We all know the concept of placeholders. I had never thought of using  memory placeholders as described by Dirty Coding Tricks  at Gamasutra.

static char buffer[1024*1024*2];

“See this?” he said. And then deleted it with a single keystroke. Done!

Come to think of it, it is really nice to know that after the features are implemented and optimized you can still get an extra performance boost by cutting the memory placeholder you had introduced to the code base from early on.


See also:

August 20, 2009

Armadillo – Talk about presence

Filed under: life — Tags: — zproxy @ 5:43 am

One of the things I was taught while at the army’s military police program was that the very least the police can do is to show presence. Gizmodo has highlighted one of its uses.

The idea is simple—police park this hulking monstrosity in pockets of high crime activity and just leave it there as a deterrent.

This is a cool concept and I think this idea could be somehow used in monetizable games. Think of buying presence or a recording black box.

August 14, 2009

Actionscript 3 AI Steering Behaviors Library

Filed under: programming — zproxy @ 6:38 am

I found this nice visulation of AI behaviors at Cheezeworld.


Bikini Cinema – Star Wars

Filed under: video — zproxy @ 6:05 am

August 13, 2009

Example: MatrixStuffExample

Filed under: examples, jsc — Tags: — zproxy @ 7:07 am

I have ported an actionscript Matrix3D example from Bit-101 blog to C#.

The code:

I would like to port this to WPF – can you help me?

Open Theme Hospital

Filed under: games — zproxy @ 5:54 am

OpenTH is a free, open source project aiming to recreate the classic Bullfrog title “Theme Hospital“. In this game, the player builds and runs a virtual hospital, treating comic diseases.

OpenTH Forums Forum Index

Theme Hospital was always a fun game 🙂 I wonder how long until someone (or me) ports it to flash/iPhone? In a year?


See also:



August 11, 2009


Filed under: games — Tags: , , , , — zproxy @ 6:52 pm

It was brought to my attention that there is a very awesome lecture about freemium payment model over at building43.

There was some other stuff in the video, so in case you are interested about “free” (or “freemium”) and the new pricing models, you might want to check it out:
[…] via Juuso
  1. People will pay to save time
  2. People will pay to lower risk
  3. People will pay for things they love
  4. People will pay for status
  5. People will pay if you make them [pay] (once they are hooked)

If you die in the free version you get to go back to the very beginning. But if you bought a teleportation stone you start nearby.

Front Cover

Listen this book at as told by geekology.

Read this too: Why $0.00 is the future of business.

Also a few posts back I mentioned 10 different payment models.

[… Chapter 9 …] Importantly you can’t buy a super weapon, because that would be unfair. The company does not want the people to be able to buy their way to power creating a two tiered society. Instead money is used to save time, look cool or otherwise do more with less effort. […] You do not have to pay but you may want to.

Update:  A nice post about rewarding players at

  1. Upgrades
  2. Achievements
  3. Quick rewards
  4. Locked treasure rewards
  5. Near end rewards
[…] money cannot buy you authority where people listen because they want to listen.

See also:

August 4, 2009

Viral: We Shot At Love

Filed under: life — Tags: — zproxy @ 10:35 am

Create a free website or blog at