1. Looking For Some Simple Code
Does anyone know where I can get some simple code for simple games.
e.g. Tetris, TicTacToe, etc. I have the ones included on win32lib.ew.
I was just lookin for some more. I am new and am looking for some
code with lots of remarks. Thanks.
2. Re: Looking For Some Simple Code
David Roach wrote:
> Does anyone know where I can get some simple
> code for simple games.
I've also written a 'Stones' game (clone of 'Same Game') and 'GlassWorks'
(clone of 'Stained Glass'). I think the code in them is a bit more readable
than those included in Win32Lib. There are some complexities, but at the
core they just do some hit testing and screen painting.
For most Win32Lib games, it makes sense to double buffer your screen output.
That is, draw everything to an off-screen bitmap the size of your play area,
and then update the window by drawing the bitmap in the window. The demos in
Win32Lib take a more obscure approach to things, and as a result are a lot
more difficult to understand and modify. The nice thing about double
buffering is all the onPaint() routine has to do draw the bitmap.
Also, be sure to take a look at the 'Pretender' demo in Win32Lib - it shows
off what you can do with sprites (bitmaps with transparency), something I
haven't done in any of the other demos. I had originally written the
transparency code so I could drag playing cards with curved corners around
in a window. The code is for an outdated version of Win3Lib, but I could
send it if you are interested.
If you are still interested in card games, you also might want to take a
look at:
http://wildsau.idv.uni-linz.ac.at/mfx/pysol-cardsets/index.html
for a lot of different card sets.
-- David Cuny
3. Re: Looking For Some Simple Code
David:
Go Here: http://www.rapideuphoria.com/contrib.htm
Enter the word game in the search box and you will have a list of 75
games that you can download ( not all games use windows )
Bernie