c# to javascript, actionscript

July 2, 2009

Client Vendor Relationships

Filed under: life — Tags: — zproxy @ 7:41 am

June 30, 2009

New ways to make money equals new stuff to design

Filed under: games — Tags: — zproxy @ 5:40 pm
  1. Advertising model
  2. Sponsorship model
  3. Licensing model
  4. Portal model
  5. Premium model
  6. Subscription model
  7. Micropayment model
  8. Rental model
  9. Ransom model
  10. Patronage model

That is what will get me there

Filed under: life — Tags: , — zproxy @ 11:11 am

Yes another rep, another rep, because that will make my dream turn into a reality

via MM

June 29, 2009

Avalon Tycoon Mansion

Filed under: games — Tags: , , , — zproxy @ 5:11 am

Yet another WPF powered flash game is ready for you to play. The game is written in C#. Let me know if you’d also want to see the source.

AvalonTycoonMansion by dadeval.

June 28, 2009

updated example: ExposedFunctions

Filed under: jsc — Tags: — zproxy @ 12:03 pm

Today I have extended the ExposedFunctions example. In our scenario we have written a javascript library in c# with jsc and we would like to consume some of its exposed functionality. We are going to edit our html file with Visual Studio inside the WebApplication1 subproject.

In the previous version the API consumer was only able to set text and index fields.

ExposedFunctions1

This time around the consumer is able to optionally specify mouse handlers and invoke GetString function on demand in javascript.

ExposedFunctions2

In this html file I have added two new buttons to consume the exposed API. The Example2 button will react on mouseover and mouseout events. Clicking on the data will invoke the onclick handler in which we will invoke the C# code to provide us some text to be displayed.

ExposedFunctions3

June 22, 2009

new example: ThreadingExample

Filed under: jsc — Tags: , , , — zproxy @ 9:08 am

In this example I am going to demonstrate how to write a java applet with a background thread.

Here is a list of the use cases for code written as such:

  • Java Applet
  • Java Console Application
  • .NET Console

Additionally I have added support for mouse enter and leave events the java way. While in .net it is easy to subscribe to events using anonymous delegates, such a feature is not yet supported by jsc compiler for java target. It could be resolved in the future releases by adding support for generics and build dynamic invokation on reflection. Google App Engine and Android markets are probably going to trigger that update.

For what do we need a background thread

I have created a simple infinite incrementing loop to serve as our business layer. There is a special class ThreadedAction, which abstracts away thread creation, which in turn differs from .net to java from being delegate based to being interface based.

24 while (true)

25 {

26 Value++;

27

28 // we should be running on our own thread

29 // which enables us to loop forever and sleep when tired :)

30 Thread.Sleep(100);

31 }

How do we spawn a new thread

As I enjoy the AtDelay and AtInterval extension methods I make use of while programming for actionscript and javascript, I had to implement something similar for the threading API. Therefor spawning a new thread is dead simple:

57 CurrentThreadedAction = 0.AtDelay(Current);

Why not try to test it out running as a console.

The assembly has been defined as a console exe. Hitting F5 in debug build will show you the console asking your input when to stop the computation.

ConsoleScreenshot

We now saw that our threaded application does run inside .net. It is time to run it on java virtual machine. To do that we need to build our project with release build. This will trigger jsc to genereta java source code and afterwards java compiler will add final magic.

You cannot just press F5 now, instead you should start run.jar.bat. I am using Scite and by double clicking on the bat file Scite shows up in which I can press F5.

JVMConsoleScreenshot

Notice that, only the title is different.

Let’s add an applet interface

Console applications are cool, but applets also have its role to play in our example. The applet form is set up in two steps. In file DemoApplet.Designer.cs I am going to define the buttons and attach handlers.

37 this.Button3 = new Button {};

38 this.Button3.setLabel(“Compute”);

39 this.Button3.addMouseListener(new Button3_MouseEnter_Handler { Target = this });

40 this.Button3.addMouseListener(new Button3_MouseExit_Handler { Target = this });

41

42 base.add(Button3);

I know you would rather use delegates – I would, but I cannot just yet. In file DemoApplet.cs I am going to define the actual handlers.

97 #region [this.Button3_MouseEnter]

98 [Script]

99 class Button3_MouseEnter_Handler : MouseListener_MouseEnter

100 {

101 public ThreadingExample Target;

102

103 protected override void Invoke()

104 {

105 Target.Button3_MouseEnter();

106 }

107 }

108 #endregion

109

110 public void Button3_MouseEnter()

111 {

112 this.Button1.Enabled = false;

113 this.Button2.Enabled = false;

114

115 this.MyComputation.Start();

116

117 this.Button1.setLabel(“start @ “ + MyComputation.Current.Value);

118 this.Button2.setLabel(“Stop computing”);

119

120 }

In the applet I could start the computation either by explicitly clicking on the start button or hovering your mouse on the third button.

Summary

In this example I demonstrated how to write a threaded applet which handles mouse enter and mouse leave events for starting and stopping computation.

ThreadingExample
[source:svn]

June 21, 2009

Flash Indie Developer

Filed under: games — Tags: , , — zproxy @ 2:54 pm

Manfred Weber hat ein Talk gegeben, wo er ganz kurz alles, was mit dem Flash Gamez zu tu tun hat, zusammen genommen hat.

Nachdem Ihren Spiel fertig ist, passen sie auf für die rightige Reihenfolge:

  1. Mochiads
  2. Kongregate / Armorgames / Flash Gamez
  3. Premium Version auf eigener Webseite
  4. Lizenzen

Die folgende Artikkeln von Florian Wein sind auch ein Muss für lesen. Ich finde sie ech gut und interessant.

Flash Indie Developer Part 1: Skills und Fähigkeiten

Skills-Mindmap Flash Independent DeveloperSkills-Mindmap Flash Independent Developer

Flash Indie Developer Part 2: Anforderungen und Idealismus

Mindmap - Anforderungen (Flash) Independent DeveloperMindmap – Anforderungen (Flash) Independent Developer

Flash Indie Developer Part 3: Gefahren

Gefahren-Mind Map (Flash) Interaction DeveloperGefahren-Mind Map (Flash) Interaction Developer

Flash Indie Developer Part 4: Unser Produktportfolio im Überblick

Mind-Map Verdienstmöglichkeiten Indie DeveloperMind-Map Verdienstmöglichkeiten Indie Developer

Flash Indie Developer Part 5: Geld verdienen mit Flash Games

Independent Game Developer Mind MapIndependent Game Developer Mind Map

Flash Indie Developer Part 6: Kleines Taschengeld durch Online Werbung

Mindmap - Online Werbung für Flash Independent DeveloperMindmap – Online Werbung für Flash Independent Developer

Flash Indie Developer Part 7: Querfinanzierung durch Schulungen

Mindmap SchulungenMindmap Schulungen

Flash Indie Developer Part 8: Verkaufe deine digitalen Produkte

Mindmap digitale ProdukteMindmap digitale Produkte
Ist ja schön falls man auch deutsch mehr oder weniger kennt, ne? :)

June 18, 2009

new example: ExposedFunctions

Filed under: jsc — Tags: — zproxy @ 8:28 pm

I have prepared an example to demonstrate how to expose your C# coded function for scripting.

ExposedFunctions
[source:svn]

Read the commented source code of that project for better understanding.

The short anwser to the problem looks like this:

31 [Script(NoDecoration = true)]

32 public static void ExposedFunctions_AddData1(Data1 e)

June 16, 2009

Questions every team and dev lead should ask themselves

Filed under: life — Tags: , , , — zproxy @ 10:28 am

Team Leader Royalty Free Stock Photo

Whole team

  1. What can we automate?
  2. where are we “Reinventing the wheel”?
  3. what are the tools that slow us down?
  4. what tools can we use better?
  5. are there bugs that I could have found earlier? how do I make sure I find them earlier?
  6. when do we find out we built the right thing?
  7. when do we find out our code\design sucks? how can we make that earlier?
  8. How do we show progress at the team level? at the management level?
  9. How many meetings does each dev have every week? how can we remove them?
  10. Are we building by feature or by layer?
  11. can we make all our team sit in the same place?

Team Lead

  1. daily: what bottlenecks exist in the team? what have I solved?
  2. will my devs be better in a month or two than they were before? if not, how do I make that happen?
  3. what prevents my devs from working? what am I doing about this?

via RoyOsherove

June 10, 2009

The Cloud Effect

Filed under: jsc — Tags: , , , — zproxy @ 2:15 pm

This example is a port of CloudEffect.



Management Lessons

Filed under: life — zproxy @ 9:05 am

Consider the following aspects while at management just like they do at the US Navy.

  • Inspiration
  • Perspiration
  • Teamwork
  • Recruiting and training
  • Accountability and continuous improvement
  • Respect
  • Overcoming fear
  • Work/Life balance
  • Reverence and irreverence
  • One-hundred percent performance

Honor. Courage. Commitment. Not bad principles for any company.

June 9, 2009

Minecraft

Filed under: games — Tags: , , — zproxy @ 7:01 pm

http://www.minecraft.net/img/logo.gif

Check out this cool java game :)

minecraft by you.

“Word Play” Flash Game Contest

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

wordplay

  • 1st Place – $7,000
  • 2nd Place – $4,000
  • 3rd Place – $2,000

Dictionary.com is even providing a word list to help you get started! The only rules for using this list is to mark on the Title Screen of your game that it is being powered by “dictionary.com”.

BCL implemented by Java API vs Java API implemented by BCL

Filed under: jsc — zproxy @ 10:59 am

While developing for java with jsc you could run your application on .net for debugging if one of the following condition has been met:

  • BCL implemented by Java API
  • Java API implemented by BCL

Even if I am talking about Java, this idea applies on other platforms jsc has support for including ActionScript, JavaScript and PHP.

BCL implemented by Java API

You application will not talk directly to the underling platform. Every feature must be implemented via a BCL class. This ensures your application will run on .net and after crosscompilation via jsc also on the target platform java. The downside is, your application will include the sourcecode BCL classes, which for embedded systems could be a problem. For Java Card 2.0 you must use only one namespace or package. To overcome that limitation the next option should be considered. On the other hand, your application could also be recompiled for another platform with no effort on your part, assuming the target has BCL classes ready for use. This is why currently you are able to write a .net application for Windows Presentation Foundation and have it compilable to javascript and actionscript.…

AvalonExampleGallery
[source:svn]

BCL implemented by Java API

Java API implemented by BCL

Your application will directly talk to the underling platform. You need to manually reimplement the external API via available BCL classes. You might not be able to implement all features the platform has to offer, which in turn limits your debugging experience. This is considered a better option for embedded systems
Java API implemented by BCL

ScriptCoreLib and Java

At this time my compiler does not support generics nor delegates for java, which it could in the future. Even though I was more biased toward actionscript and javascript lately java has gained some significant importance. Here is a list to name a few reasons I am investing into jsc java support:

  • Java applet applications inside a browser
  • Java console applications
  • Java plugins for external applications
  • Java for JavaCard
  • Java servlets at Google App Engine
  • Java for mobile devices, including j2me
  • Java for android

If you are interested to learn more, let me know.

June 7, 2009

Stay hungry stay foolish

Filed under: life — Tags: — zproxy @ 7:20 pm

Life is too short not to do what you love to do…

  1. Steve Jobs dropped out of college only to drop in to interesting courses
  2. Steve Jobs got fired from Apple and found NeXT and Pixar
  3. Steve Jobs was diagnosed of cancer and was later cured
Older Posts »

Blog at WordPress.com.