torstai 30. elokuuta 2007

Simple DirectMedia Layer (SDL)

Kyllä täytyy nostaa oikein kunnolla hattua eräälle peliohjelmoijalle - nimittäin Sam Lantingalle. Hän on helpottanut peliohjelmointia huomattavasti tuomalla vuonna 1998 SDL-nimisen ohjelmointirajapinnan julki, jossa esimerkiksi kuvan lataus on erittäin nopeaa ja helppoa, mutta silti hyvin nopeaa, kun kielenä käytetään C:tä. Itse opettelen tällä hetkellä kuumeisesti ohjelmointia SDL:llä, sillä SDL:n funktioita käytettäessä koodia voi ajaa niissä laiteissa, joille SDL on julkaistu (eli Windows, Linux, Windows CE, Mac OS, Symbian OS + monia muita).

Käytän Markus Mertaman porttaamaa SDL-versiota Symbianille (käytän S60 3rd Edition Maintenance Release -softakehityspakkausta (SDK)), ja alkukankeuksien jälkeen olen saanut ajettua mm. XFlame-, Newvox-projektit emulaattorilla. Kyllä se on mahtava tunne kun saa jotain tuloksia Symbianille. Työn hedelmiä jaksaa katsella pidemmän aikaa, kun on yrittänyt ja yrittänyt ja lopulta onnistunut. Markus on paljon auttanut minua näissä jutuissa ja jaksanut uhrata aikaansa melko paljon viime aikoina kysymyksilleni. Olen hänelle todella, todella kiitollinen. Hän on kyllä Symbian-ihmemies.

Yritin taannoin S80-ympäristössä (v2 eli Nokia 9500, 9300 ja 9300i) saada SDL:ää toimimaan. Kokeilin peräti neljää SDL:n versiota, jotka ovat portattu Symbianille mutta eipä syntynyt tuloksia. Tai no, tuloksina olivat musta ruutu kännykässä tai koko projektia ei pystynyt kokoamaan Series 80-alustalle virheiden vuoksi (joita minä en ymmärtänyt ainakaan). Päätin luopua yrittämisestä ja myin Nokia 9500:ni pois, koska en enää yritä tehdä sille ohjelmia. S80 on niin epätuettu käyttöliittymä verattuna S60 v3:een. Jälkimmäinen on tulevaisuus. All roads lead to S60 3rd edition. Antaa S80:n kuolla rauhassa. Itse ajattelin, että olisin vielä aktiivinen S80-koodaaja vuosienkin päästä (ja loistokkaasti nimeni näkyisi my-symbian.comin S80-osaston uutissivulla monen monta kertaa, heh), mutta tähän on nyt tultu. S60 vei minut mennessään.


I must give some big credits for one particular game programmer - Sam Lantinga that is. He has made game programming way easier by bringing in the year 1998 to publicity an application programming interface named SDL, where, for example loading an image is very fast and easy, but still very efficient when the used language is C. I'm currently learning hectically programming with SDL, because when its functions are used, the code can be driven in all the devices that SDL has been published (Windows, Linux, Windows CE, Mac OS, Symbian OS + many others).

I'm using the SDL version that Markus Mertama has ported onto Symbian (I use S60 3rd Edition Maintenance Release software development kit (SDK)), and after some troubles at the beginning I have successfully driven XFlame and Newvox projects on the emulator. It sure is a wonderful feeling when one gets working results onto the Symbian. The work's products can be preferably viewed for a long time, when you have tried and tried and at last succeeded. Markus has helped me a lot in these things and managed to sacrifice quite much time for my questions lately. I'm very, very grateful for him. He sure is a Symbian MacGyver.

Not long ago I tried to get SDL working on the S80 environment (v2 (Nokia 9500, 9300 and 9300i)). I tried altogether four SDL versions that had been ported onto Symbian but results weren't born. Or better, the results were yet black screen on the phone or the whole project couldn't be compiled onto the Series 80 UI because of the errors (that I didn't understand at all). I decided to give up trying and sold my Nokia 9500 away, because I'm no longer going to try making applications onto it. S80 is so unsupported platform compared to S60 v3. The latter is the future. All roads lead to S60 3rd edition. Let S80 die in peace. I thought I'd be an active S80 coder for years after (and gloriously my name would show up on my-symbian.com's S80 section news page for many, many times, heh), but here I have come. S60 took me with it.

Ei kommentteja: