Archive for November, 2007

Python - Java - !#$% - Python

Thursday, November 29th, 2007

I was programming in Python a lot for web and desktop few years back. At that time I thought Java is the horrible clunky bureaucratic language (”public static void main”) that nobody sane uses. OK, only old block-headed grunts who are to stiff to change. I stopped using python one day. I made games in c++, web in php and no desktop apps for some time so python sort of fell off.

.. time passed ..

I had a complex desktop project to make. I started with C# and just for joke switched to Java. I was blown away by some alien elegance of this beast. I fell in love with Java. My definition of Java goes like this “Java is complex to do simple things and still just complex to do very complex things”. I decided I will never use c++ again and will use flash (haxe) for online light games and java for desktop games.

.. time passed ..

One of my web-games will be upgraded to full casual (portal-ish) down-loadable game. Because this is a casual game I needed a DX renderer for windows and here the quest started. “How to do casual hardware accelerated games that use DX on windows with a higher level language than c++??” . The answer is problematic.

After one month of seeking I found nothing. I was looking at solutions for Java & Scala (both JVM), Lua, Python, Ruby, Lisp, Scheme, Ocaml, Nekovm, Haskell. Everything I could find was software rendered or openGL accelerated.

I found nothing, so I returned back to c++ and started making a engine with embedded neko-vm (btw. neko-vm is great and systematic thing) and (great) PTK library. Then I realised that I am making THE wrong thing that I kept seeing other game-devs make continuously (do you want to make engines, or do you want to make games ? ).

I had licence for TGB from a year back and never used it. I started playing with it for the first time and it got quite interesting.


Then the python apocalypse came. I stumbled over SpriteCraft, a python game engine with a very nice clean API and DX renderer!?! I played with their shooter demo - tweaking the code all night to the morning. I was hooked. I concluded that this would be great for light casual games.

Next day I came to Rabbyt engine. Python + openGL + some very cool features. It would be great for some of my harcore-ish games. I came from there to Pyglet which also has an interesting mix of “media” powder. Note that these two are both openGL.

A day after that - the PyCap was released. This is the python binding for Popcap games framework and if you know anything about “casual games” you know who is Popcap.

Only one sentence comes to mind for the end “All paths lead to Pytown”.

Well Java is still also cool, and so are many other languages, but python showed itself as cool tool with the right “batteries” for the job needed in this case and it leaped forward noticeably in the few years I wasn’t using it.

Java 2D CAD video posted

Sunday, November 11th, 2007

I decided to post a short demonstration video of that cad I made a while back. The reason is also to show what can be achieved quite nicely with Java & Swing, Piccolo 2D Scene-graph and Synthetica LAF and some SwingLabs components (TreeTable).

Maybe interesting to someone.. this app. saves and loads drawings and symbols (roughly) as SVG files which you can open directly in Ink-scape or even FireFox. Because of request of the user it also creates a full scale (with styles, embedded images and more) MS Excel files via Apache POI-HSSF project (HSSF means Horrible Spreadsheet Format :) )

This was basically my first application made in Java. I always thought before that Java is a clunky old language but I was and remain impressed by it. I like that although Java/JVM/JDK is HUGE it still remains pure and minimal in another aspect. For example I made whole application (which took several months and thousands lines of code) using a normal (but cool) text editor JEdit and few .bat files to compile and run it.

Where did all the RIAsses go?

Saturday, November 10th, 2007

I am not sure if this was only my perception or if it was true. Around 6 months ago when I was making a desktop application in Java for some client, the whole desktop world was talking about RIAs (Rich Internet Applications). Flash was making buzz with Flex and Apollo (now named Adobe AIR), MS released Silverlight (- aka the Flash Killer) and Sun had to do something too and they announced JavaFX on JavaOne.

The language wars warmed up on blogs and forums, “applets are dead”, “flash is still slow and clunky”, “MS only cares for the money” … I think everybody had a feeling.. “uh shit, If I don’t pick the winning new technology or continue with this old tech I will be left behind while everybody else will be writing declarative MXML and making cool animated and shaded web-apps with transitions in minutes”. The other side of my brain didn’t agree…

So after 6 months… where are the killer RIA apps from Flex, Silverlight and Sun that squish old clunky web-app-wannabes on first sihgt?

www.fron-revija.org is alive

Saturday, November 3rd, 2007

I promised Zala - the “boss” of F.R.O.N kids magazine - that I will prepare them separate ftp and mysql account on otroski.net . Well but setting 2 separate users on 1 domain is a mess so I decide that I will “sponsor” them a domain name… So here it is www.fron-revija.org . The magazine is in Slovene language, the special thing is that it’s totally managed by 10-13 year old people (mostly girls) … they know all about databases, phpmyadmins, wordpreses, javascript, xhtml, doc-types, and they can write in a cool way - unlike me :)

p. language: HaXe & Neko

Saturday, November 3rd, 2007

I should have mentioned this language ages ago. Almost all my flash games are made in it. Haxe is interesting because it has 3 target platforms. It can create flash SWF files, javascript inside a browser and a general Neko Virtual Machine.

The language is similar to javascript but is strongly typed and has some specialities that I don’t yet totaly understand. Although I made around 5 flash games in it I know to use it only in basic ways. It seems I will be doing some more things in it and then I can post some interesting code.

So, language Haxe is interesting, but Neko the VM is maybe even more interesting. If all goes well I will be able to report about it in a while…