Archive for the 'I, small game dev' Category

Ask Robi new screenie

Tuesday, May 27th, 2008

This is the new screen-shot of Ask Robi. Now I need to get a new VPS so I can install it there and give it to few beta testers to trash it a little.

ask robi

If anyone wants to be a beta tester write me to janko DOT itm AT gmail DOT com.

btw: Ask Robi is not a chatbot. I made a chatbot years ago and in my oppinion they are basically usseles. This is more like a sort of wikipedia that communicates.

Bullshit Talks, Money Walks

Tuesday, 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.

Ocaml: mini SDL example v3

Thursday, January 24th, 2008

This is the 3rd iteration of OCaml SDLCaml game example that I make and learn OCaml at the same time. Changes are:

  • keyboard input as it should be (multiple keys at the same time, diagonal speed same as orthogonal)
  • ship shoots bullets (ctrl)
  • very dumb enemy space ships besides rocks
  • a scene record that holds all elements of the scene

Few codebits. Here we define the scene record and a function that creates an empty scene.

type scene = { ship: ship ; bullets : particle list ; rocks : particle list;  aliens : particle list; }
let empty_scene = { ship = {poss = (vec2 0 0); shoot_count = 0} ; bullets = [] ; rocks = [] ; aliens = [] }

This functions handle bullets. First updates each bullet and second one looks at a key-map and creates new bullets if needed.

let update_bullets r = { r with pos = r.pos +| r.vel }
let make_bullets bullets keys ship_pos =
	match keys.shoot with
		| 0 -> bullets;
		| _ -> { pos = ship_pos +| vec2 16 16 ; vel = vec2 12 0 ; size = 5 } :: bullets

If you are asking yourself what is +| - it is a vector operator (infix function). We defined it like this.

let ( +| ) a b = {x = a.x + b.x; y = a.y + b.y}

Click here to see the full source

Again thanks a lot to all who commented and suggested code improvements on #ocaml IRC channel. Especially asmanur suggested a lot of great improvements.

Ocaml: mini SDL example 2

Sunday, January 13th, 2008

Images residue in an array now, we passed them around individually before. This is how we load and free them.

let load_images () =
	[|
		load_image "data/background.bmp" ;
		load_image "data/ship.bmp" ;
		load_image "data/rock1.bmp" ;
	|]
;;

let free_surfaces images = Array.iter (function(img) -> free_surface img) images;;

game screenshot

Input is better handeled now. Ship moves while you hold the appropriate arrow key down. But it is not as it should be at the end. If you start pressing more than 1 keys at once it won’t work as expected.

Rocks have been added. They are records that residue in a list. Those two functions are used for drawing and calculating/making the new rock. The power that OCaml gives you with records shows here a little.

let draw_rocks screen images (r:particle) =
      let { pos = p } = r in apply_surface p images.(2) screen;;

let update_rocks (r:particle) =
      { r with pos = if r.pos.x > (-r.size) then r.pos +| r.vel else (vec2 650 r.pos.y) } ;;

That +|is an operator we defined. It represents the addition of two vectors. Vectors and this operator are defined in 3 lines of code.

type vec2 = { x: int; y: int };;
let vec2 x y = {x=x; y=y};;

let ( +| ) a b = {x = a.x + b.x; y = a.y + b.y}

Click to look at the source code.

I warn you however. I am learning OCaml as I type this and this is the first time I use SDL also. If you notice any mistakes or stupidities let me know. I am still proud (and surprised) that there is no mutable or global stuff in the code. Basically one chat on the IRC hinted me how I should think in FP at all, much better than anything I read before, and it worked so far. I intend to post that IRC chat here soon.

Thanks to bluestorm on #ocaml IRC for proposing few improvements to the code. It has been updated.

Compiling Ocaml, SDL and OpenGL on Windows (mini tutorial)

Monday, January 7th, 2008

One of two ways to get OpenGL into Ocaml is by using GLCaml binding. It is up to date and alive. GLCaml also includes so called compact drop-in binding for SDL SDLCaml. I am not much of a low level guy so I had real trouble figuring out how to compile the thing on windows and almost gave up. But the author replied to my mail and gave me few crucial hints which made it all work.

NeHe tutorial number 9 in GLCaml

Here is what to do:

  1. Download and install Ocaml for windows (the MingW version)
  2. Install MingW. Install at least the C package, but NOT make.
  3. Install MSys (also from MingW site) which also installs its own make.
  4. Install the SDL library for mingw. Unzip and copy it to appropriate folders in mingw or make sure mingw can find it.
  5. Unzip glcaml.zip somewhere, and go to that location with MSys shell. When you are there run make in MSys.
  6. All examples should compile (the binding has many SDL and OpenGL) examples.

Thanks to Elliot for making the binding and replying to my mail. I hope I will dig Ocaml and make something concrete with it and this binding. Here is some more info and screens GLCaml and SDLCaml.

Enjoy the camel ride!

p. languages: Haxe is quite elegant

Saturday, January 5th, 2008

I had one evening of time for programming these holidays and I decided to make progress at QUBIDRAW. On my to-do list was to remake QUBI PAIRS game in flash. Now it is very shakily implemented in html+js.

I hadn’t programmed in haxe for more than a month, my mind was clear. I wrote code and it just worked. Code flew together without including the reasoning side of my brain. At the end I looked at it and everything was very neat, clean and minimal. After all the code written in haxe I only now see that Haxe is a very cool language !

I also implemented few paradigms here and there that I learned from FP (functional programming) recently. Immutable data and anonymous functions.

Just some nothing-special snippet of code from Qubidraw Pairs:

var col:Int = 0;
var row:Int = 0;
var getXFromCol = function(i){ return 40 + i * 100; };

for (id in picIds3)
{
	pics.push(new PairItem(app, id, getXFromCol(col), 60 + row * 80));
	col ++;
	if (getXFromCol(col) > 350) { row ++; col = 0; }
}

This code creates PairItem objects (the pictures you have to find pairs) and calculates/puts them into right position. N items per row, until the certain width is filled and then it goes to the next row. A WIP version can be played here.

Yep, kids can draw

Saturday, December 29th, 2007

QUBIDRAW (the early release) is online for a while now. I have very little time to push the development forward but nice things happen on it anyway. Here are few of the pictures that kids have drawn:

QUBIDRAW is a online concept of my KUBI game. I plan to make many more activities and polish the thing up few times. Flash part is being made in Haxe, webpart in PHP. They communicate via my tiny RPC spec STRPC - SoTinyRPC.

180 bugs in one line of code

Monday, December 24th, 2007

I am not joking… look below..

<BugAfraid x="314" y="236" size="2" speed="2" type="0" loop="180" />

I had some time these days (holidays and all) and I made some progress at DEBUGR INC which became WATERISK now.

… in freezed state …

waterisk

… and in motion …


another vid..

This is all made with Processing.

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.

QubiDraw got a swap game

Wednesday, August 22nd, 2007

Qubidraw got the first game.. It’s called swap and it was the most popular at old KUBI. “Slide” will come next.

The visitor behavior shows me we are stepping in the right direction.
(this below is playable so press the buttons)

Brave Kid Games stats and more

Wednesday, October 18th, 2006

I post stats of www.bravekidgames.com from time to time… so here are some for september..

website (sept.)
Daily unique visits: 941
Daily pages/hits: 1516/35876

main referers for sept. (so the number below won’t cause confusion)
direct reqest –> 164807
that pirate portal(hotlink to kubi) –> 1565
google.com –> 1125

KUBI (sept.)
Kubi was downloaded: 1516 times
Biggest referal - some pirate site: 1565 requests
So you see why 1.5k downloads

sales from start to now:
sold printables: 1
sold affiliate games: 19 (best are: Ladybugs, Jr.Vet and Super Gerbal)
sold KUBI-s: 23

we got from advetisments (adSense + TLA):
aprox $100/month

some downloads from start to now:
Few most downloaded are:
Ladybugs: 6360 Ladybugs
Jr. Vet: 1412
Abracadabra: 1107
Androkids: 874
Charlie II: 867

some other news

  • One user of our printables made a very nice video where he uses our sudoku printables http://www.youtube.com/watch?v=0ZzJL-6ufeU
  • Ladybugs, made by Midori who I ported to flash brought us a lot of traffic
  • I have added a Brave Kid Blog which I think will be great (not ussual blabla)
  • I should make a new KUBI or any other game but have allmost no time for many months now due to few bigger php contract works
  • I sold for small bucks 9 games alltogether (smaller games I made) to quite big slovene magazine for kids BIM-BAM

Ok… that’s it… have fun. So, we are not there yet, but we are moving forward step by step.
Janko M.

Gameproducer.NET + Text-Link-Ads = ?

Sunday, August 27th, 2006

Recently there was a mini-riot towards Gameproducer.NET because he posted quite few posts about Text-Link-Ads with the affiliate link to them. My guess is he earned quite some money that way, yes… but I don’t see anything wrong with that. He doesn’t claim he is virgin Mary or something. I would probably do it too if I had his quantities of visitors.

I signed up with text link ads too after reading his post and what can I say 1 month after it.. Thanks Juuso! I earned you $25 but you earned me $76 in this month alone :) . And it really is more than AdSense in same time so I am very happy.

There was also other mini riot towards him on indiegamer forums… that by reading his blog newbies can think making a living by making indie games is easier that it really is. With this I partially agree.

Google-bots play our games between coffee breaks

Wednesday, July 26th, 2006

An interesting observation (Google bots download many many times) that lead to some more observations (after looking at the logs many people noticed that too) was posted on indie gamer forum today and revealed some facts (about how Google really indexes internals of various binary (exe) files on net too) and lead to some speculations (that these bots must be really stupid (unoptimised) to download one file that hasn’t changed so many times) . Read all about it here

Poking The Pirates - 1

Saturday, March 4th, 2006

You can see how many downloads can pirate users produce here and number continued to february (5714 downloads) and still not even 1 sale more than other months with 10x less downloads. On the other hand downloads do me no harm other than 6GB of transfers which is still survivable. But if one has a much more popular and bigger game this can be very expensive joke. It happened to Motorama which recieved 60GB/day transfer after it got cracked.

You can’t really prevent them from downloading without affecting the normal demo downloaders, but you can do a soft redirection and use those downloads to your own good.

Read the rest of this entry »

Kubi - a runaway hit in “the land of the 7 seas”

Tuesday, January 31st, 2006

Judging by downloads of Kubi demo we are sailing straight towards sunny days, aint that right Captain? ….. “Well… let me see, boy.”
Downloads of Kubi for Windows per month

month downloads
Nov 2005 126
.
Dec 2005 694
.
Jan 2006 5465
.

This week few things finaly clicked in my brain… I was noticing some strange number at logs for kubi download (win) hits… but I thougth it was mistake and didn’t bother much. Kubi for Windows was finally getting some buy-page views (as I saw on plimus monitor) too, but in 95% the currency was PLN and CNY. I didn’t think of it much but my brain concluded by itself… ok, game is getting popular in Polland and Canada. Referrers showed me allmost the same number of hits from some pirate pages as I got downloads…..

Then one day I was looking at Plimus monitor… thinking something like ( I just will citate my thougths) … “What the hell is wrong with you canadians.. I get 50 buy-now pageviews a day and noone buys it in whole week!?!…… And what is that Y doing in that CNY…. don’t they have canadian dollars or something…………………Jackie Chan is cool…. uh, I have to stop thinking about him……….Jackie Chan……. China Yen…… Uh……….this is China?!”

So I realized 95% of my buy-now (for windows) version are from Polland and China. And coincidence coincidence… those pirate websites that I get tons of referers from are Polland and China too. And Kubi was downloaded 10 times more this month than the last - and I didn’t get even 1 sale more.