Sunday, October 25, 2009

Cheese Boys on new Pygame and Python

In past weeks I moved from my (quite broken) Kubuntu 8.10 to the new Karmic Koala release 9.10.
The Pygame version here is the new 1.9.

Also I simply don't wanna continue using and supporting the old 2.5 Python version... so I tested the game and all related libraries on Python 2.6 and Pygame 1.9.
I had no problem at all! Or better: I found that the KexMenu version released on pypi (version 0.3.1) was currupted, so I released the new 0.3.5 fixed version.

I don't wanna spend time for now to explore the new Pygame features, I only need to move back to work on Cheese Boys!

Saturday, August 29, 2009

Still the Cheese Boys project is not dead

This is my first "starvation" post, to comment how the game seems not grown in latest month...

Life, work and the summer moved me away from this project for month.

I'm really sure that this is not forever...
  • First of all I was planning to perform some operations on secondary libraries I implemented (and now required) like KTextSurfaceWriter.
    For some reason I'd like to release a new version of this software before continuing with CB.
  • Again, pygame 1.9 has been released. I'm not planning to move to it right now (my Kubuntu OS can't take anymore... I need to format my PC before).
But I must keep in mind what I always said: I need to keep things simple... If the release of KTextSurfaceWriter will became too long, simply I need to keep current version and continue developing the game as it is!

Boscolo has not been defeated yet!

Friday, May 1, 2009

0.2.0 (or 0.1.999?) version!


Last night I finally released the 0.2.0 version on the pygame website. This is not the release I originally planned (no "The South Bridge" level for now, and now story line) but is an important release! The pathfinding module is ready (maybe a little buggy right now, but works)! So... you will play again the the same 2 levels of the last releases, but the game engine is more mature right now!

From this release, I added dependencies to other modules I released on Pypi... read the documentation in the pygame page.

Sunday, March 29, 2009

Damn crates! Finally I will be able to move around you!

No, the project is not dead!

I worked on Cheese Boys a little in those weeks, but today I finally reached a great result! I used the pathfinding implementation (and the code) found on this great tutorial that open me a way to complete this important task.

The most important thing: Bendersky's code is done to be used as an indipenden module! Was quite simple for me to integrate this in my engine.

Today the first good news: even if no real sprite movement is done using the pathfinding result, I'm now able to see inside the computed_path GameCharacter's attribute... and it works! This list store the path for moving from A to B without collide with blocked cells... I added two creates Sprite to the game and the hero "know" a way to move around them!

...yes. I say cells. In the end I was forced to transform my non-tile game a little, giving a grid-like super-structure. This is not perfect, I know, but I need to reach some result and continue with the game implementation!

Saturday, February 7, 2009

Finding the Path...

The projects is passing one its bad moment.

As I figured out the first real game level (will be called "The Last Bridge") very complex, I wanna reach this target. But drawing the level with a lot of enemies, allies and presentations is not enough!

In the first level the stealth mode will be very important, but the Hero must be able to hide behind objects.

So I developed the sigh feature (in a way that probably must be refactored later... how can I know if a vector is passing on a solid object? Mah!).

The game has a lot of problems now with the physical borders. Enemy and the hero itself often block the walk when touching a wall or something similar.

I need a pathfinder algorithm! Very popular is the A* (read it a-star) but I need to port it on a non-tile reality...

On the pygame mailing list something suggest a long discussion to read. I hope this help!

Saturday, January 17, 2009

The future of Cheese Boys is in the Cheeseshop

For the last time: the name of my game is not related at all with the Python Package Index (also know as Cheeseshop). When I start to develop the game, I didn't know at all pypi!

In those days I didn't developed anything directly related to Cheese Boys (it's not true... I'm near to fix and finally close the Stealth mode) but my attention was moved back to another project of mine: KezMEnu.

KezMenu started as an internal Cheese Boys module, but then I decided to create a more stable, indipendent and debuggable library. So I released it as an indipendent package.

This is related to my personal "war" againts the other pygamers, because I find that Pygame community has a lot of great ideas (some developer released great games), but too often not well structured.

Problem one: start a project aiming to the sky
I mean: often I saw developer start great projects, release in a very short time a lot of good working examples and then... nothing. Projects had dropped.
Why? Obviously is always possible that this is for personal choice, but I also think because many try to get "all and immediatly" and when the difficulties went out the game was too bad structured to be funny again developing it.
Yes, because making a game is FUNNY (or so is for me).
Cheese Boys started very (too) slowly: I have a few time for free develop what I like, but every release always had a precise (but near) target. In the 0.0.1 version I didn't aim directly to get a game with the stealth mode, but only to move a Glenn sprite on the screen.

Problem two: unstructured, caothic code and not OOP
Structure the code is important, refactoring is more important. Maybe that every release of mine lead to minor or major code refactoring.
The use of the Object Oriented Programming is the key for a friendly code. I downloaded a lot of funny games from Pygame. Often I played great games and I begin to look at their source founding that they weren't readable at all (call this the Dark Side). The comment (and the pydoc strings) are very important, but not required if the code is well readable itself.
The most dangerous thins I found is the idea that releasing a game or a libray in a single file is good. Wrong!
This can be true for very simple games (and libraries), and as well this can really help sometimes in integrating 3rd party library (like I did when for the first time I included Vector2 class, or EzMeNu), this must not be a develop metodology!
Split your file! Make it a module composed by many .py sources (Light Side)!
Taking the Dark Side is simpler, and lead to immediatly results (don't think that I never evaluated to drop Cheese Boys and start a new simpler, Space Invader's like game!) but can't lead you to complex results!
One of my favorites, unfinished, game on Pygame is Gladius I, another creation of one of the best Pygame community member: PyMike. This game lead me to say "I really want to be able to create a game like this". I really liked the only release avaiable (not on the Web anymore... I have my personal copy if you wanna try).
I found this a great game, but the code inside can't lead it to be finished (Yes... sometimes Mike is one of the most powerfull Sith of the community :-)!

Problem Three: separation of concerns
If the game is becoming too big, begin to split it in general modules. Put those modules away and make they a game dependencies!
This will help other people to use you code (and maybe improve it), and the final result is the same! Today with Python the library dependencies are simple to maintain!
Use the Python Cheeseshop! Learn how to write python eggs!
You are interested? So learn how to use Python Distutils. I wrote a tutorial on it!

Problem Four: too multitasking
I mean there the programmer's multitasking, not the program's one! Develop few projects in the same time! Too often game were drop to start another...

Conclusion
There are hope for Pygame? Yes! In the last time I see many developer release good code... I hope to help somebody to pass to the Light Side and begin using the For... erh... the Cheeseshop!

</offtopic>
Ok, now lets turn back to Cheese Boys. As I reported in the title of this post one day (may be immediatly after the 0.2.0 version) I will begin splitting the game engine from the game.
The engine future is as an egg onto the Python Package Index!

Wednesday, January 7, 2009

Free Gamer talk of Cheese Boys!

Before going to bed I was looking at my site webstats.
Thanks to the referer (the 21th century Big Brother) I found that the Free Gamer's blog wrote of Cheese Boys!
A few lines, but I found this great!

What are you waiting for? Christmas? Go and read the article!