Predavanje na dnevu iger v FERI Maribor

May 16th, 2008

Včeraj je bil Dan Iger na FERI v Mariboru. Predavalnica je bila skoraj polna in vzdušje je bilo super. No, rekel sem da bom objavil predstavitev online:

Priporočam vam da malo po-googlate in preskusite kakšen demo igre ki jih naštevam, kakšen “engine” ali pa si pač ogledate kakšnega razvijalca…

Rekel sem tudi da bom objavil linke do mojih iger in cel intervju z Andyjem (saj dosti ga tuki ne manjka).. To bom naredu danes zvečer ali jutri dopoldne. Kr neki linkov do mojih iger pa lahko najdete na Janko’s “products”. Rekel sem da ne delam samo iger za otroke, nekaj takega je WATERISK samo na njem še delam..

This is the presentation from talk at “Day of games” about indie game development at FERI faculty in Maribor.


No geek_points for this (Honda CB600 Hornet)

May 12th, 2008

I never thought I will say this all in one sentence. My >50y father came to my sons 2y birthday party with his 600cc Honda bike, and left it here for a while (it was night and cold when we were done) :) .

And I am not complaining, I luckily had a business meeting today and of course I didn’t use the car to get there. If anyone thinks to meet with me he/she is very welcome for the next few days, I finally have the time for meetings!

honda

The bike looks exactly like this (borrowed from Wikipedia)

I had an enduro (off-road/touring) bike when I was too young to have a car, but then motorcycles started looking impractical and quite dangerous too me. Well but I have to admit now (not that I do it because of danger), as with kayak, the more dangerous it is the more alive you feel and I didn’t feel as alive as today in a year. And I wasn’t speeding too-much but sitting on a little bike that has more horse power than my previous 1.6cc car, feeling the air the surroundings and the road directly.. it’s just 10x more involved than “couching” in a car.


STRPC progress

May 8th, 2008

Factor (programming language)Image via WikipediaI was just making STRPC server in Factor because I need it for something I hope I will be able to release (very early version) soon. I made it work, but it’s still patchy at certain places. I have to write the Htmlize serialization and de-serialization in Factor, and add error reporting and input type checking and then it’s done.

STRPC itself is still very experimental (read crappy) right now, I used it at 5 projects but nobody else used it otherwise. And it does not surprise me. Who would use a nightly brain-dump of a XMLRPC frustrated coder that writes and changes it as he goes…

Well, I think I got the clearer idea of what exactly I want STRPC to offer now and I will update the spec, examples and libraries when I find some time. I have used it from PHP, JavaScript, Haxe, AS3 and Factor now.

The biggest change will be that it will now be serialization independent so the server could support any serialization (or many of them). Every server will have to support Htmlize serialization so if you write a client you can be sure that this one is supported. But besides it it can also support any number of other types. For example, why not use python’s (or php’s) native serialization if you have server and client written in python. The other example is Flash. AMF binary serialization is said to be much faster for flash and is natively supported so why use something that you have to parse by yourself in AS3. The same with JavaScript and JSON. Each server will be able to provide their clients with a list of supported serializations so client can programmatically choose the most suitable method…

Posts are boring if I don’t add some code so here is how you make a STRPC server in Factor now. This one adds and substracts two numbers and returns the result.

: strpc ( -- return )
    request -> query>>
    {
      {
        "math" "sum"
        { { "a" number }
          { "b" number } }
        number
        [ + ]
      } {
        "math" "sub"
        { { "a" number }
          { "b" number } }
        number
        [ - ]
      }
    } serve-strpc ;

: start-server ( -- )
  [ drop strpc ] fuj-def-responder set-global
   main-responder set-global
  8080 httpd ;

more readable version

You will put the words you want called instead of “+” and “-” . These words (functions) have NO rpc specific code and are totally general words.


Bullshit Talks, Money Walks

May 6th, 2008

I gave a talk in front of around 70 secondary school headmasters and teachers a month or so ago. It was about technical side of some e-learning project that I work for. I didn’t have that good feeling during the talk, but people said it was very OK. And (f*** it) I am OK with the OK

Then after a week (unrelated to the previous talk) someone contacted me if I could talk about indie game development on a game-dev event that they are preparing (there will be some AAA companies talking about their side, and I will represent the indies) at FERI (University in Maribor).

It sounded more fun than the previous talk (and previous was cool too) so I said yes. It will be on 15. may. I have 8 more days to figure out what I will talk about, make the slides.. etc.., then I want to record few answers from some known indies from abroad, so I have to find smart questions and find a way to record them somehow without stealing too much of their time, my son has a 2 year birthday and I have a bunch of work for multiple customers. tick.. tack.. tick.. tack.. tick….

As an sidenote… Slovenia seems to be such small country that if you make few games you are quickly amongst the “most productive” game developers in it.


Many ways to skin a FAt CaT OR …

April 27th, 2008

Some people go to church on Sundays and some find time to divulge to the non-urgent ie. play with Factor a little. Well, I am not playing, I started making something concrete in Factor. Something that was cooking in my head for 6 whole years, and if no one made it in this time I might just step out and do it.

Well the concept is still not fully cooked, but I decided it’s time to stop boiling it and put it out on a pan and burn it a little and see what we get. So today I made few more words and a bunch of unit tests for it. Ok, so I am coding a very concrete thing in Factor for the first time. I like when I see that the Forth philosophy about re-FACTORing (yeah, hence the name I think) words to smaller and smaller independent words showed it’s beauty.

My main words with very rich functionality basically needed very very little stack shuffling ( just a dup, swap or over here and there - and I didn’t use cleave combinators) but then I came to one very simple utility word that because of few specifics used them noticeably more.

It was no problem to write but because Factor is so versatile I was sure there are other more elegant solutions. So I pasted that word on Factor’s paste and asked on IRC and so far I have 4 solutions that used very different concepts each, so I think it’s an interesting example of Factor.

This is my original, made in the “primitive” way with just stack shuffling… The code takes assoc. array, extracts/processes few values from it and leaves 3 values on stack. Basically very simple unimportant stuff…

: unpack-answer-to-me ( array -- type_subj answer id )
    "type" over at "subject" pick at " " prepend append
    "answer" pick at
    "id" roll at ;

#! Example of use..
{ { "type" "typ" } { "subject" "subj" } { "id" 12 } { "answer" "ans" } }
unpack-answer-to-me .s
! returns
"typ subj"
"ans"
12

Itvar on IRC came to this solution, he used locals. I think it’s much more readable than mine..

:: unpack-answer-to-me ( array -- type_subj answer id )
  "type" array at
  "subject" array at " " prepend append
  "answer" array at
  "id" array at ;

Then Itvar made a word using the new cleave combinators. Cleave combinators are new “invention” (I think) in stack based world and I didn’t see them in action until this. This code looks very good to me and nicely reflects the logical structure of code.. The cleave stuff is that bi and tri

: rev-at swap at ;

: cleave-unpack-answer ( array -- type_subj answer id )
  [ [ "type" rev-at ] [ "subject" rev-at ] bi " " prepend append ]
  [ "answer" rev-at ]
  [ "id" rev-at ] tri ;

Before Itvar showed this code I was thinking that I could make some sort of “extract” combinator myself that could be useful in all such cases. I made modify-values combinator before and really liked what it allowed. Well it was too interesting to-not-do it so I made it and this is the usage..

: unpack-answer-to-me ( array -- type_subj answer id )
    { { { "type" "subject" } [ " " prepend append ] }
      { { "answer" } [ ] }
      { { "id" } [ ] }
    } extract-values+ ;

Well I am biased and I don’t know Factor well yet, but I like this solution the most :) . Cleave is cool too. I will post the code for this and some other combinators soon-ish. This post is getting too long already.

update

johnnowak , a guy who is making his own stack based language Fifth (5th — website should be coming soon) came up with yet another solution. I like this one because it creates/uses 2 very general purpose and useful combinators to get a very straightforward solution.

: 2dip -rot 2slip ;

: extract swap [ at ] curry each ;

: unpack-extract
  { "type" "subject" "answer" "id" } extract
  [ " " prepend append ] 2dip
;

Here is more readable formatted code for all 5 examples.


FotoLOAD mini will get released

April 25th, 2008

Finally, I am about to release FotoLOAD mini. I had the app almost ready for months, my sister made the website design now and it looks that the thing will get out of the house in the next week or so. Website is still not totally finished but here it is..

www.fotoloadstudio.com


screenshotThe page and app is in Slovene language for now, but it is already being translated to English and some other languages. It’s an application that photo-studios can use to offer their customers fast and simple way to upload photos for printing. I made such web-app for one studio like 7 years ago (with PHP and REBOL), I later made better one for another studio few years back, but this solution is made for “them all” and brings big improvements to the previous two. FotoLOAD mini is a mini and is somewhat limited but also free. There is also a non-mini which won’t be free :) , but I think it will still be very accessible.

So if you have (or know anyone who has) a photo studio, test it out and tell me what you think. English version will be out before fifth may also.


TFM :: another web-magazine from/for kids on o.n.

April 21st, 2008

I was checking out if there is anything urgent to fix on otroski.net today. I visited few random sites and it lead me to this nice and very up-to-date web-magazine called TFM. I was surprised that it was coming out for every month since Dec 2007 and I had no idea that it even exists. Well this is not so odd as my time spent on o.n. is very very limited and only focused on fixing very urgent things.

This is a link to april’s issue and to the main TFM page. It’s all in Slovene language so…

O.n. already had/has a magazine made in the whole and initiated by “kids” themselves called F.R.O.N. and I mentioned it here already.

I am lucky that “kids”/users make up for my lack of resources and vision with o.n. . I hope one day I will be at least what it once was. This can happen only in two ways though. Either I find some monetisation for it (that won’t suck) so it can support itself or other projects bring me so much money/time that I can devote to it more seriously again.


QUBIDRAW FIND - 4 activities done

April 20th, 2008

I have the standalone version of QUBIDRAW FIND activities finished. It consists of four activities and has 16 qubi-pics included in SWF itself so it can be published on any website. If you want to put it on your website you are welcome to do so. I took some more time to do the various slide-in/out and fade-in/out stuff than I do usually. I made something I called “async functions” (which were basically classes) that handled this stuff rather nicely. Because it’s a total mess to code it into main loop manually.

I can’t figure out if “NEW ITEM” and “SINGLE ITEM” activities need any instructions or will people know what to do in them. Did you get what you have to do when you first saw them??

It’s made in Haxe as all flash QUBIDRAW is.


NullCMS - my first webdev test in Factor

April 20th, 2008

I didn’t have real time to further experiment with Factor for the last month or more. I only took one Sunday weeks back and wrote a really mini mini CMS like thing to see my still very crude and young web-dev Factor libs in action for the first time.

Factor has it’s own webdev framework/libraries (and you should check it out), but I am experimenting a little here so I am making a sort of lower level and minimalistic libraries of my own. I don’t have time to install a VPS with Factor currently so I just made a quick video of it and posted the code at Factor’s paste. Here is the video..

And here is the Factor code + HTML templates.

It consists of roughly 27 lines of Factor code, 14 lines of HTML template code and 19 lines of JavaScript. For a cms to be somewhat useful I would need to add some user authentication also. Basically you can display, create, edit and delete pages and you get a flat menu for navigating them.


Mini tour to IMSGY

April 15th, 2008

My almost 2 year old son is sick with a fewer so he is just trying to sleep but wakes up every few minutes coughing. Really depressing when your kid is sick and anything you do doesn’t really help him much… For few hours I was staring in the air in minutes when he sleeps but now I got of my ass and wrote these slides to tell somethin more concrete about ex. tinyIMS that I mentioned yesterday and which I now named IMSGY. It’s all WIP..


tinyIMS, imessy, imsgy..

April 15th, 2008

A year or so ago I wrote something a sort of an alternative to email system. Email was bordering to unuseful to me at that time. Main problem was spam. I canceled and changed all of my info@domain.com mails on my websites because I got 20-50 spam email on each of them and got into trouble with missed emails. That’s when I wrote tinyIMS.

Later I canceled almost all of them and started using gmail for everything. Gmail is really well made thing and problem with spam is not really a problem there so the initiative to push out tinyIMS became void.

Now I am looking at it again. I have the thing written and it works, but it’s still a little rough and I would have to test and debug it.

But it has a serious chicken and egg problem and I don’t see a substantial reason why anyone would use it if there is email. It has some benefits (and also limitations in current state) compared to email, but they are all of sorts that normal user doesn’t really care that much.. And I don’t know how to name it as tinyIMS doesn’t sound good to me any more…

I have to find some niche need or some sort of evil plan how to inject it into someones needs..

I will write about features and tech next time I write about this.


You are getting boring with all that Python (3/3)

April 14th, 2008

So, To finish this one off. I wrote this because I needed some venting for seeing tons of posts about python on reddit (for few days or a week they were all over it) and because I am seeing some smart shit about python all the time from various people that didn’t-really-use-it but saw it a little and heard that it’s ultra nice.

Yes, python is nice, but it’s just a language like any other and there is a bunch of other languages that are “nice” too!

I think python is now just the most mainstream of these (I don’t know how to call them) higher level dynamic scripting languages. And those people who previously didn’t know it even exists or diminished anything dynamic while coding in old behemoths of that era (C++, Delphi or Java) are now falling on their asses because “python is so nice, productive and great!!”.

Also ruby was very “in” for a year or two and now that it sort of felt back to reality a lot of folks found rescue in it’s older cousin python.


You are getting boring with all that Python (2/3)

April 12th, 2008

Not awesome

OK, so why do I think python is nice but not the most awesome language there is.

I can not make in-browser (flash) games with python like I can for example in Haxe (swf).

I can not make cpu intensive games with it like I can for example in Java or Processing (like this). And these games can still run in a browser via applets, even with openGL if you are lucky.

I can use wxPython to make desktop apps, positive is that they have native GUI, negative is that I have to program in a dirty low level of a c++ to do it. You even look at c++ wxWidgets API docs to program python (at least few years back you did). Swing (yes from “horrible clumsy Java” that gets compared to py a lot) is the most advanced and elegant GUI thing I have ever seen for example. So at the end, I don’t want to use python to do GUI apps.

Python as a language is nice, but I would like something like OCaml with some added elegance 150x more, I want more FP power, I want revolutionary progressive/aggressive languages… like Lua, OCaml, Factor and Haxe/nekoML/neko-vm or clojure.. Guido guides python on too safe paths IMHO..

OKeyish

I will probably use python for not cpu intense casual games via pycap. Rabbyt and pyglet are also cool but only for non casual games (no DX) where I usually have different needs for cpu or if I don’t I do them in haxe to get flash deployment option too.

Python has a very nice set of 3d engines (Panda3d, pythonOgre, irrlich binding…) and if I was making something 3d and light on the cpu I could use it. ( Well, a big competitor for this use case for me is Luxinia with lua which I played with a lot and like it a lot ) but python still is strong in light 3d.

I might use it for web-apps also. I think there has some very good points compared to scripting relatives (php, ruby, perl..), it’s quite faster and I wouldn’t use Java for web-apps because I have a feeling it imposes to much structure for a web-app. But all these langs would loose my focus immediately if something like OCaml would have a good low level web server base to build upon. Currently my favorite here is Factor but I am in experimental phase with it.

I will write one more post about this.


You are getting boring with all that Python (1/x)

April 12th, 2008

Serial Computer PortImage via Wikipedia I quite like python. I used python as a first language for 2 years couple of years back.

I made a relatively complex web-app in it (using Zope, back then there were no Django’s and likes). Kids could create accounts and then create their relatively free-form multi-page websites and similar stuff.. it was sort of myspace before myspace… Later I rewrote the app in php because after I got 3000 daily users I had to reset the server every few days and getting into that ZODB mentality to fix and upgrade things was beginning to get hard for me.

I made 2 relatively complex GUI business apps in it (with wxPython), first was a complete program for managing a “snail” shop (not e-shop) and selling in it. As an interesting tidbit, python talked via serial port directly to that small printer to print recipes which was cool :) .

Another was more graphical and was used to graphically manage an industrial warehouse of stacked boxes and shelved packs and you would put boxes apart, take 2 packs and put the rest on XY shelf.. basically you simulated actions on a pc, got a “action recipe” and someone would then do it in real so you could then always know what pack is on which shelf or box and how many there are by looking at your computer.

Both apps still run today, the first one on multiple shops.

I also used python for millions of small things and everyday hacking and learning (from pygame to twisted matrix, pyAIML, medusa server, xmlrpc, panda3d, pyOGRE …)

For example I am sure I made the first AIML bot that could talk in slovene language (Robotek ROBI). I used pyAIML and made a custom XML server with Twisted that would talk to the flash front end. I stopped running it because I had to switch webhost and the new one didn’t let me run a custom python server and I basically didn’t like the AIML concept (back then there were no $5 VPS options like there are now, at least I didn’t know for them).

I will continue this topic as I haven’t really got to what I wanted to say at all. By “you” I mean all the python fans on reddit and everywhere else… Python is nice and I would use it in a lot of cases but I don’t see it as order of magnitudes different or better than most other solutions or the best choice for most of the use cases.


Hello worlders vs. Factorialers

April 2nd, 2008

A selection of programming language textbooks on a shelf. Levels and colors adjusted in the GIMP.Image from WikipediaIt struck me today. There are basically just two kinds of programming languages and programmers in the world..

The first one can make output without even blinking but complex algorithms don’t smell to good to it..

The second one elegantly calculates complex sequences of useless numbers but you will need a degree if you want to print them out..

OK, there is a group of languages that bite the big chunk of elegance from the second with the careless (power) of first one.

To me a evolution towards more functional coding came by itself by just writing a lot of code and slowly progressing my imperative based coding style (before I even knew what FP is).

As a quick example of FP-ish solution vs. the Imperativ-ish. I was writing some AS3 code yesterday and I figured out that AS3 is less FP-ish than the very similar Haxe language that I am more used to.

Haxe..

function sayHi(name:String)
{
    return "Hi" if (name != "") " " + name else "";
}

It hurt me but in AS3 I had to do it “yer olde” way

function sayHi(name:String)
{
    var t = "Hi";
    if (name != '') t += " " + name;
    return t;
}

It’s not about lines of code. It’s about that in haxe I made simple “direct” expression. In AS3 I had to make some state, then modify it if certain case is true and then return it.

This solution is so ugly for this very simple problem that I am not sure if I didn’t miss some better way to do it imperatively too.