perjantai 31. elokuuta 2007

OPL:n tulevaisuus/ OPL's future

Koodaaminen on jännää ja hauskaa puuhaa. Kun taannoin koodailin OPL:llä ohjelmia, se oli todella helppoa ja vaivatonta. Toimiva käyttöliittymä oli helppo rakentaa ja koodailu onnistui puhelimellakin. Nyt OPL on suuren kuolemisuhan alla S60 3rd Editionin binääriyhteensopimattomuuden ja projektin ylläpitäjien vähyyden (kaksi aktiivista ohjelmoijaa) vuoksi.

Itse koodailin alaani liittyvää laskinohjelmaa S80-alustalle, joka auttoi minua melkoisesti opiskelupaikassani. Ohjelmassa täytyi syöttää vain luvut dialogiboksiin ja ohjelma tulosti näytölle tuloksen (esimerkiksi ideaalikaasun lain lasku, pV = nRT). Hauskaa oli. Ja nopeaa koodaamista, kun kielenä toimi OPL. Nyt täytyy sitten alkaa vähitellen opetella Symbian C++:aa, jotta pystyy jotain tuollaista tekemään. Tai no, onhan noita Pythoneita ja muitakin kieliä, joista valita. Olisi ehkä järkevämpää opetella niitä ennen "hirviöön" siirtymistä...

Tässä kun kirjoittelen niin alkaa hirmuisesti kasvamaan taas koodailuinto. Pythonin alkeita siis opettelemaan.


Coding is exciting and fun. When I some time ago coded applications with OPL, it was very easy and painless. A working interface was easy to build and coding could be done on the phone also. Now OPL is under a threat of dying completely because of the binary uncompatibility with S60 3rd Edition and the project administrators' fewness (two active developers).

I myself coded for S80 platform a calculation application connected to my occupation, which helped me a lot in my school. In the program there was meant to enter only the figures into a dialog box and then the application printed the result onto the screen (for example the ideal gas law, pV = nRT). It was fun. And quick coding, for that matter, when the language was OPL. Now I must step by step learn Symbian C++ to be able to do that kind of applications. Well, there are these Python and other languages to choose from as well. It might be reasonable to learn them before moving onto the "monster"...

Now when I'm writing this, the coding enthusiasm begins to rise up extensively. So let's go to learn Python's ABC.

Nokia N93

Olen nyt muutaman viikon katsellut Nokia N93:lla otettuja kuvia ja laitteen speksejä sun muuta ja olen vakaasti päättänyt että sellaisen hankin. Sitten kun on rahaa. Laite on oiva pelipuhelin, koska suuntanäppäimistö on sen vasemmalla puolella silloin, kun pelataan vaakanäyttötilassa. Yleisin paikka peliohjaintenkin suuntanäppäimistölle on juuri vasemmalla puolella. TV-out-mahdollisuus on tietenkin plussaa, mutta en usko käyttäväni sitä kovinkaan usein. Kameraa sitten taas käytän hyvinkin usein. N93:n kuvat ja video sekä muutkin speksit näyttävät olevan samaa tasoa kuin ensimmäisessä digikamerassani, HP PhotoSmart M307:ssa.

SDL:llä pystyy myös tekemään pelejä tälle kännykälle, ja se onkin yksi kriteeri, jonka vuoksi hankin ko. puhelimen. Joskus sitten tulevaisuudessa varmasti tulee tehtyä jonkinlaista hyötyohjelmaakin Symbian C++:lla, mutta nyt tiedot ja taidot ovat liian heikot sellaiseen.


Lately I have been viewing photos taken with Nokia N93 and its specifications and else and I've firmly decided to get one. When I have the needed amount of mone, of course. The device is a brilliant gaming phone, because the directional pad is on its left side when the landscape mode is used for playing. The most common place of game controllers' d-pad is on the left side. TV-Out possibility is of course a plus side, but I'm not sure if I will use it very often. Then again I use the camera very often. N93's photos and video and other specs seem to be of the same quality as in my first digital camera, HP PhotoSmart M307.

One can make games with SDL for this phone, and it is one criterion, which affects to my decision to get this phone. Somewhere in the future I will surely make some utility programs with Symbian C++, but right now the knowledge and skills are too weak for that.

Capcomilta pelejä Symbianille/ Games from Capcom onto Symbian

Uusi Nokian N-Gage-alusta puhuttaa nyt maailmalla. Nokia on maininnut että se ei enää ole vain yksi laite, vaan palvelu, josta voi hankkia pelejä S60 3rd Ed. -laitteille. Tuetut laitteet ovat ainakin Nokian mukaan "yhteensopivat Nseries-laitteet". Tällä tarkoitetaan laitteita, joissa on mm. rautatason 3D-kiihdytys (käyttää PowerVR:n piiriä ja ohjelmointi tapahtuu käyttäen OpenGL ES:iä ja M3G:tä). Palvelu on siis saatavilla marraskuusta 2007 lähtien seuraaville laitteille:
- Nokia N73
- Nokia N81
- Nokia N81 8GB
- Nokia N93
- Nokia N93i
- Nokia N95
- Nokia N95 8GB

Tälle Nokian uudelle N-Gage-konseptille on lupautunut mittava määrä pelintekijöitä tekemään pelejä, mm. Capcom (tunnettuja pelisarjoja mm. Mega Man, Street Fighter ja Resident Evil), Vivendi Games (Crash Bandicoot, jonka tulo on varmistettu mobiilialustalle), Electronic Arts (FIFA 08, The Sims 2 Pets, Tetris ja Tiger Woods PGA TOUR, jotka ovat varmistettuja) ja Nokia itse (Bounce Boing Voyage ja Snakes Subsonic, jotka ovat tulossa hyvää vauhtia).

N-Gage-konseptin pelit maksavat 6-10 euroa ja maksutapana voi käyttää operaattorin laskua tai luottokorttia. Taas on vanhemmilla yllätys odottamassa kuun lopulla, kun poika on ladannut 20 kännykkäpeliä uuteen älypuhelimeensa.


The new Nokia's N-Gage platform gets talked about currently. Nokia has stated that this concept isn't just one device any more, but a service where one can obtain games for some S60 3rd edition devices. The supported devices are, according to Nokia, "compatible Nseries devices." This concern devices that have at least hardware 3d acceleration (uses PowerVR's chip and programming is based on OpenGL ES or M3G). The service is obtainable from November 2007 for following devices:
- Nokia N73
- Nokia N81
- Nokia N81 8GB
- Nokia N93
- Nokia N93i
- Nokia N95
- Nokia N95 8GB

A noteworthy amount of game developers have pledged to make games for this Nokia's new N-Gage concept. For example Capcom (famous game series include Mega Man, Street Fighter and Resident Evil), Vivendi Games (Crash Bandicoot, whose arrival is confirmed), Electronic Arts (FIFA 08, The Sims 2 Pets, Tetris and Tiger Woods PGA Tour, that are all confirmed) and Nokia itself (Bounce Boing Voyage and Snakes Subsonic, that are proceeding with substantial speed).

N-Gage concept's games cost 6 to 10 euros and paying methods accepted are operator's bill or credit card. Again the parents have quite a surprise waiting for them at the end of the month, when the boy has downloaded 20 games onto his brand new mobile phone.

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.

C++-ohjelmointi/ C++ programming

Nyt kolme kuukautta tosissaan opeteltuani C++:aa (aiemmin lainailin kirjoja mutta ne eivät oikein auenneet silloin) voisin sanoa, että perusasiat on oppinut älyttömän nopeasti kun on noin vuoden koodaillut OPL:llä ohjelmia Symbianille (S80-alustalle). Luokkajuttuja pitää vielä kerrata ennen kuin ne aukeavat kunnolla, jos aukeavat. Sitten siirrytään taas eteen päin kohti vaikeampia asioita. Vapaan itseopiskelun merkeissä tietysti, mitä nyt jonnekin tunneille tämän vuoksi vaivautua, kun kotona kaiken saa tehdä omaan tahtiin ja yritys-erehdyssilmukkakin pääsee täällä oikein perusteellisesti valloilleen.

Jos luet tätä etkä ole koskaan ohjelmoinut ja haluaisit aloittaa, en suosittele C++:aa, vaikka se kuulostaisikin kivalta. Kannattaa aloittaa esim. BASIC:n kaltaisesta helposta kielestä, jossa ei ole sekaannuttavia ominaisuuksia (puolipilkut, kaarisulut yms.) ja jossa vähäisellä koodimäärällä voi saada kiinnostavia tuloksia aikaan.


Now when I have been learning C++ seriously for three months (formerly I borrowed books but they didn't open up then), I'd say that I have learnt basic things really fast, because I have been programming applications for Symbian (S80 user interface) with OPL. I need to rehearse class things before they open up completely, if they ever will. Then I'll move forward towards more difficult things. Of course this is done by private studying; why bother going to some class for this, as one can progress at his own rhythm, and the trial and error loop gets loose here very thoroughly.

If you read this and have never programmed before and would like to start, I don't recommend C++, although it may sound like a nice option. You should start with, for example BASIC-like rather easy language, which has no confusing properties (semicolons, parentheses and others) and a little amount of code can produce some interesting results.

Blogin ja bloggaajan esittely/ Introduction

Bloggaus on nyt sitten aloitettu. Ajattelin tänne laittaa asiaa ainakin
- PDA- ja kännykkäaiheista
- ohjelmoinnista (C/C++, OPL + mahdollisesti muistakin)
- Symbian-käyttöjärjestelmästä ja sen ohjelmoinnista.

Lisää aiheita on mielessä, mutta ne tulevat sitten jos tulevat. Tällä hetkellä suurimmat kiinnostukseni ovat noissa aiheissa.

Joku esittelykin voisi olla kohteliasta, eli olen laborantin ammattiin valmistunut supisuomalainen mies, vuosikertaa 1988. Kiinnostuksina voisi mainita noiden ylempien aiheiden lisäksi valokuvauksen, yleisen tekniikan ja tieteen sekä hämähäkkieläimet.

Käännän blogia nyt englannin kielelle, koska se saattaa sisältää arvokasta tietoa kansainvälisille Symbian SDL -kehittäjille ja ehkä myös muillekin. Korostan englanninkielisen tekstin sinisellä värillä.


So, blogging has been started now. I thought I'd put here at least subjects about
- PDA and mobile phones
- programming (C/C++, OPL and possibly others as well)
- Symbian operating system and its programming.

More subjects are in my mind but they will come here if will. Currently my biggest interests are in these subjects.

Some kind of introduction would be appropriate, so... I'm a Finnish man born in 1988, who has graduated to laboratory assistant profession. In addition to those topics I mentioned, I could also name photographing, general technology, sciences and arachnids.

I have now started to translate this blog into English, as it may contain some valuable information for international Symbian SDL developers and maybe for others as well. I'm going to highlight the English text with blue colour.