Ir al contenido principal

Ralsina.Me — El sitio web de Roberto Alsina

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!

John Kuang / 2006-04-03 15:03:
John Kuang / 2006-04-03 15:03:

I am writing a go game like robocode.

ade / 2006-04-03 15:04:

Similarly, I have some really old Xlib based board games -- six in a row, and gess -- that should be ported to _something_ new someday. It'd be a nice start for PyQt (er, shouldn't that be PyKDE?)

Philippe Fremy / 2006-04-03 15:05:

You can check klotski for an example of a PyQt game written a few years ago.



http://phil.freehackers.org/klotski/index.html

Roberto Alsina / 2006-04-03 15:06:

Philippe: thanks!



John, if you want to take a look at the code, email me (little yellow envelope), It's not really fit for general use yet, that's why I'm not showing it in public :-)

Grant Morgan / 2006-04-03 16:37:

Is this code available for beta use? I have started writing this from scratch but would be inrested is see what some one more experiancedwith PyQt has done.



Cheer,

Grant Morgan

phone number lookup / 2011-12-03 22:42:

this is really interesting viewpoint on the subject i might add

employment background check / 2011-12-27 23:34:


Well, the write-up is truly the freshest on this laudable topic. 


Contents © 2000-2020 Roberto Alsina