Stepped into the Android game market

June 11th, 2014

I remember asking my friend “How do they create games” when I was 15 or so. I knew that he was playing games in the arcade and on commodore 64 at home. 2-3 years later when I actually got my hands on a 64 I realized the question was really hard and a stupid one actually. After all my friend was just playing games and his insight into all of these was not beyond the sprite feature of c64 which I had merely grasped when he had explained to me.

Nevermind, then I was more into general programming with the c64 discovering machine language and so on so never got the inspiration to code a game. Later when I was studying in the university I wrote a minesweeper clone in Pascal of which the most interesting part for me was the flood fill algorithm I wrote and the introduction into recursion. Later I tried to write a Nibbly’92 clone which I never finished mostly because I wrote it in C with inline assembly optimizing graphics for the famous 320×200 256 colours graphics mode. Having no protected mode back then game crashing often paved the way to restarting the computer taking away all the enthusiasm I’d put into the project. Along with crappy graphics I painted with deluxe paint of course :)

Then this huge flappy bird and then 2048 craze got again got me into game programming, this time in java on android. Initially I transformed two programs I wrote before to android apps :

1.  Romaji to Kana which translates japanese written in latin alphabet to Hiragana and Katakana. Base code for the program was a voluntary homework I made at home for the Compiler course. I had used a state machine to convert Romaji to hiragana. Program looks like this, not too fancy

2. Kanji Wall which was previously named Kanji Desktop written when I was studying japanese. It was using Kanji database of Jim Breen creating desktop wallpapers from randomly selected kanjis. Creating the android app was fun as I had to use database converting previously used access database to sqlite. I learned touch controls on android with this app. Here is how it looks like

Then… I finally came across this nice game library LibGdx and started working on my first game to be published. Tried to create a variation of 2048 game which I nearly completed minus the graphics. But then the resulting game was severely lacking in the touch control compartment and I decided to stop that project. I may transform it into a different game later… Quickly switched to the next game which I got the idea from a stackoverflow question post, the user asking the question was trying to paint a continous curved line on screen. Told to myself, what about a game you control by touching the line and the line keeps moving. You keep following the line.

I wrote the game’s barebones in 3-4 days in my spare time. I especially didn’t search if similar games existed or what elements they used in those games. Then a friend told me there is already a game like mine. The news was not surprising at all, thinking the question I saw may have inspired others let alone the fact that the question holder was possibly writing a similar game :) So a release was imminent and I also published the game on google play store the next day fixing a few loose ends.

Here is the resulting game, still to be a lot polished… The good side is it’s still authentic as I especially avoided looking into  similar games eliminating getting affected by their design. Finding a game idea is like finding a good main melody for a music. You get an inspiration first then you freely improvise upon it.

Name of the game is Tipped, available on google play store : https://play.google.com/store/apps/details?id=com.tepetaklak.tipped.android

Here is a screenshot :

Well, it’s over for this blog post… The worst decision about this game I made was using the name Tipped actually. I wasn’t aware cows were tipped too :) And the tipping word is closely associated with basketball too which I only realized after I published the game and can’t find the game on market searching the game with it’s unique name.

Android , ,

30 Ekim 2013 Çarşamba İstanbul Koşu Sıralaması

October 29th, 2013

Kombine sıralama

1.Ayak : 4-7-1-3-5-8-9-6-2        Jokey
2.Ayak : 4-7-8-9-3-11-1-6-13-12-10-5-2    Tahmin Antrenör    Handikap
3.Ayak : 7-1-3-6-2-9-8-5-4        Tahmin Kıyas Jokey Baba
4.Ayak : 1-2-7-3-5-6-4            Handikap
5.Ayak : 2-9-1-6-8-3-7-5-11-4-12-10-13    Tahmin
6.Ayak : 2-6-1-7-11-5-4-10-12-13-3-8-9    Tahmin Kıyas    Handikap

Tahmin
1.Ayak : 1-4-7-9-5-3-8-6-2
2.Ayak : 4-7-8-3-9-11-5-13-2-6-1-10-12
3.Ayak : 7-1-6-3-2-8-4-9-5
4.Ayak : 7-2-1-3-6-4-5
5.Ayak : 2-9-6-8-3-5-1-10-12-7-11-13-4
6.Ayak : 2-6-1-4-3-12-5-13-7-8-10-11-9

Kıyas (1. ve 4. ayak yok)
1.Ayak : 7-3-8-9-2-1-4-5-6
2.Ayak : 1-7-6-10-8-13-4-11-3-5-9-12-2
3.Ayak : 7-2-1-9-3-8-6-4-5
4.Ayak : 6-4-7-1-2-3-5
5.Ayak : 1-11-3-9-7-2-8-4-5-6-10-13-12
6.Ayak : 2-6-11-13-1-4-10-12-5-7-8-3-9

Perf ( 1. ayak yok)
1.Ayak : 7-6-9-8-5-2-1-4-3
2.Ayak : 2-1-3-4-7-8-12-10-13-9-5-6-11
3.Ayak : 8-3-7-1-4-5-2-9-6
4.Ayak : 3-5-7-6-1-4-2
5.Ayak : 8-2-7-11-3-5-10-9-12-6-4-1-13
6.Ayak : 4-9-2-12-7-3-13-11-1-5-8-6-10

Jokey
1.Ayak : 4-7-5-9-8-3-6-1-2
2.Ayak : 8-13-4-7-11-10-3-9-6-12-2-1-5
3.Ayak : 7-2-1-3-6-8-5-9-4
4.Ayak : 4-6-2-1-3-7-5
5.Ayak : 6-2-1-5-4-9-8-11-10-3-12-7-13
6.Ayak : 6-7-4-2-5-12-9-13-11-1-3-8-10

Antr.
1.Ayak : 3-8-5-7-4-2-6-9-1
2.Ayak : 4-7-11-13-8-12-9-6-2-3-5-10-1
3.Ayak : 3-8-4-2-7-9-1-5-6
4.Ayak : 5-1-7-4-6-3-2
5.Ayak : 11-13-3-2-12-9-5-6-7-1-10-8-4
6.Ayak : 6-7-2-4-5-3-9-8-13-11-10-1-12

Baba
1.Ayak : 7-3-8-9-2-1-4-5-6
2.Ayak : 9-4-7-1-3-12-11-13-5-10-2-6-8
3.Ayak : 7-9-8-1-3-2-6-5-4
4.Ayak : 6-7-5-1-4-2-3
5.Ayak : 4-9-12-2-7-8-5-6-3-11-1-13-10
6.Ayak : 7-9-6-4-12-8-1-3-13-11-2-5-10

Ana
1.Ayak : 8-6-7-9-5-1-3-4-2
2.Ayak : 9-6-12-8-5-1-7-3-11-13-4-10-2
3.Ayak : 9-7-5-3-8-6-1-4-2
4.Ayak : 5-3-6-7-1-4-2
5.Ayak : 9-6-2-11-12-5-10-8-3-1-7-4-13
6.Ayak : 8-6-13-9-12-10-7-1-4-5-11-3-2

Handikap
1.Ayak : 7-6-9-8-5-2-1-4-3
2.Ayak : 4-3-9-7-12-8-6-11-10-5-13-1-2
3.Ayak : 3-9-7-6-5-1-4-2-8
4.Ayak : 1-2-5-3-7-6-4
5.Ayak : 7-8-1-9-2-3-4-12-5-6-11-13-10
6.Ayak : 2-1-10-11-7-6-5-3-9-13-12-8-4

Sahip
1.Ayak : 8-7-5-1-2-6-3-9-4
2.Ayak : 9-4-7-2-6-11-13-8-12-5-3-1-10
3.Ayak : 3-8-7-6-4-5-2-9-1
4.Ayak : 2-5-1-7-6-4-3
5.Ayak : 7-1-11-2-5-8-3-12-9-10-13-6-4
6.Ayak : 6-5-7-2-11-12-8-4-9-1-13-10-3

At yarışı, Türkçe ,

29 Ekim 2013 Salı Adana Koşu Sıralaması

October 29th, 2013

Bu da Adana yarışı için programın çıkardığı sıralama,

1.Ayak : 6-8-1-2-5-7-4-3        Tahmin    Ana    Sahip
2.Ayak : 1-4-5-3-11-9-2-8-7-6-10-12-13    Tahmin    Kıyas
3.Ayak : 6-3-8-9-4-5-10-2-7-1    Tahmin    Jokey
4.Ayak : 7-3-5-8-6-2-4-1    Jokey    Handikap
5.Ayak : 4-2-6-1-3-5-7        Kıyas    Performans    Ana
6.Ayak : 1-16-10-9-5-3-2-7-6-11-4-14-8-12-13-15

Yarış sonunda program sıralamasının başarısı şu şekilde oluştu : 4 / 1 / 2 / 5 / 3 / 7 = 840

Dönüp bir bir tekil kriterlerin başarılarına baktığımızda ise durum aşağıdaki şekilde. Burada küçük olan rakamlar daha başarılı. Buraya beşli yapmıştım, son ayak 7 at ile 2′yi bulmama rağmen 5. ayakta 4 numarayı tek attığım için yattım. İlaveten gözümden kaçan bir detay da ilk ayakta Kıyas, Perf., Jokey, Ant. ve Baba aynı atı ilk sırada vermiş. Ben ise kombine kupondaki ilk at ile diğer kuponları karşılaştırdığımdan bu detay gözümden kaçmış. Daha programda geliştirmeye açık çok nokta var.

3 / 1 / 2 / 6 / 1 / 7  Tahmin= 252
1 / 1 / 6 / 2 / 7 / 10 Kıyas = 840
1 / 9 / 1 / 4 / 2 / 4  Perf. = 288
1 / 10/ 4 / 6 / 2 / 7  Jokey = 3360
1 / 9 / 5 / 4 / 1 / 5  Ant.  = 900
1 / 6 / 3 / 3 / 7 / 1  Baba  = 378
4 / 4 / 1 / 3 / 7 / 11 Ana   = 3696
6 / 2 / 1 / 7 / 1 / 4  Hand. = 336

At yarışı, Türkçe ,

29 Ekim 2013 Salı Ankara Koşu Sıralaması

October 29th, 2013

Dünkü Bursa yarışında programın 1. ve 6. ayaklar için ürettiği tahminlerin oldukça kötü olduğunu görüp bir inceleme yaptım. Kıyas yapan kısımın bug’lı çalıştığını tespit ettim ve oturup bu kısmı wikipedia’daki ilgili algortimanın pseudocode’undan faydalanarak baştan yazdım. Sonuçları bir iki yarış için elle kontrol ettiğimde mantıklı sonuçlar verdiğini gördüm.  Düzeltmeden sonra dünkü yarışta ilk ayakta gelen at birinci sıraya, son ayakta gelen at ise 4.5 sıralara yerleşti.

Programda Handikap puanının katsayısını %45 – %50′ler mertebesine çıkardım, ikinci sırada en başarılı olan tahminlerin ve başarıda üçüncü sırada olan Kıyas’ın da yine katsayılarını arttırdım.  Neural network kısmı yeniden design edilene kadar katsayısını %2′ler mertebesine düşürdüm.

İleride düşüncem katsayıları ve yarışların zorluklarını belirleme kısmını öğrenen bir sistem ile halletmek. Her bir kriter için bir neural network ve her gün yarışlar sonuçlandıktan sonra bu network’lere yarışı kaçıncı sırada bildiği sorulup, cevabı alınıp eğitilecek. Input pist tipi, pist durumu, mesafe, koşunun şartı, grubu, ingiliz / arap taylarının yarışı, maiden, kilo aralığı gibi değerler olabilir.

Uzatmadan geçelim bugünün tahminlerine,

1.Ayak : 3-1-2-10-7-5-6-8-9-4            Perf.     Ana    Hand.
2.Ayak : 8-6-4-7-9-10-11-3-1-12-5-2        Tahmin    Kıyas    Perf.    Jokey    Handikap    Sahip
3.Ayak : 2-1-9-6-5-3-8-4-7            Baba
4.Ayak : 1-6-2-4-5-3                Tahmin    Perf.    Jokey    Handikap    Sahip
5.Ayak : 6-4-3-7-5-1-2 Tahmin    Jokey    Baba
6.Ayak : 3-5-4-15-11-13-6-14-9-2-7-1-10-8-12    Tahmin    Baba    Handikap

Ben bugün 5′li yapacağım ve beşlinin ilk ayağında 8′i tek atıp, üçün ayağını ise sadece 1 ve 6 ile geçeceğim.

At yarışı, Türkçe ,

28.10.2013 Pazartesi Bursa Koşu Sıralaması

October 28th, 2013

1.Ayak : 2-1-4-9-10-8-6-3-7-5-11-12        Ana    Handikap
2.Ayak : 1-5-6-3-8-2-9-7-12-4-10-11        Tahmin    Jokey    Sahip
3.Ayak : 2-4-5-8-1-3-7-6            Tahmin    Sahip
4.Ayak : 2-4-3-1-5-6-8-9-7            Jokey
5.Ayak : 9-8-2-4-10-3-12-11-1-6-5-7        Kıyas    Jokey
6.Ayak : 2-3-7-4-6-10-1-9-5-12-8-13-14-11    Perf.     Jokey    Ana    Handikap

At yarışı, Türkçe ,