Skip to main content

Ralsina.Me — Roberto Alsina's website

Games using PyQt

As some may re­mem­ber, a long time ago I start­ed writ­ing a Be­jew­eled! looka­like us­ing PyQt.

While that game is ac­tu­al­ly playable, it most­ly showed me I had no idea how to write a de­cent game ;-)

So, I have been for a cou­ple of weeks try­ing to cre­ate a high lev­el pack­age for cre­at­ing games, specif­i­cal­ly board games (yes, I clas­si­fy Be­jew­eled as a board game).

Well, it's work­ing. I am writ­ing a few li­braries, and I am writ­ing three games us­ing it.

  • Scroogle: a dumb bog­­gle/scrab­ble mix­­ture

  • Name­­less1: The be­­jew­­eled clone

  • Name­­less2: A crafty-­­com­­pat­i­ble chess­board

Since I have ab­stract­ed stuff like pieces, squares, and such, these games are quite small in size, which means easy to im­ple­men­t!

For ex­am­ple, scroogle can keep score, use a dic­tio­nary for word val­i­da­tion, re­place used tiles with new ones, so it's ba­si­cal­ly com­plete.

It's un­der 200 lines of code.

The chess game is, again, al­most com­plete, ex­cept for stuff like sav­ing games, or board edi­tion, but you can play ( it can't tell if you win or lose and has no timer, though ;-)

It's 210 lines of code (the crafty in­ter­face is 70).

Why am I men­tion­ing this? Well, I think that if I ev­er make this good enough to re­lease it, de­vel­op­ing sim­ple games for KDE will be­come much eas­i­er.

And those games will be a 80KB down­load, in­clud­ing art.

That would be good, would­n't it? But...

... if you are think­ing of writ­ing a game, I need your help. I want you to try us­ing this, so I can fig­ure out if it's good or how it should be changed!

Please con­tact me if you know a lit­tle PyQt and want to write games!


Comments powered by Disqus