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

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!

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!

Tuesday, January 6, 2009

I'm here, but you can't see me!

With the revision 149 today I uploaded onto the SVN a fully playable version of the game with the stealth mode (I prefer the term rogue mode).

What this mean? First of all, the next 0.2.0 release will have a new tag "roguelike" on the Pygame page, when I'll finally release it! :-)

More important is that the game has now some more doable action. This modality will be really important in the future first level called "The Last Bridge" (see the map).
You can enable this pressing the SHIFT key.

All the stealth logic has been moved away from the Character main class, into a specific class Stealth. Some modification has been done outside the new class too (mainly in the Level class).

The Stealth class incapsulates all code needed to perform a stealth attempt, but also all code required to "resist" (AKA get noticed of the rogue enemy).

Every character now has a stealthLevel, in addition of the more common experienceLevel. The stealthLevel:
  • reduce the prey sight range (only if the character is in stealth mode)
  • raise the character stealthIndex (not done yet).
  • modify (but only a little) the anti-stealth feat of the character.
The most important property of the stealthLevel attribute is the second ones. This isn't done right now (a rogue that isn't moving has a 0.5 value, 0.7 if he's moving).

The prey sight reduction is automatic (10%, +5% per every stealth level) and doesn't depends on random roll.

For the last point I think this: a character that know well how to hide himself is also capable of find better other rogues. But mainly the anti stealth depends on the character experience level.
How this works? I think this logic: the success of the rogue hiding in shadows only count on the rogue's attributes (so he has the same success chance with a level 1 or level 5 enemy... this is the same for the thief old D&D first edition rules), but the prey experience level will indicate how often the prey can repeat the check if he fails!

Also an attack done while the prey isn't noticed of the rogue presence do a lot of damage. If the targer die in the attack the rogue remain hidden, otherwise the stealth effect finish when hit.

How often you can enter and exit the rogue mode?
Not every time. Each character need a little time to reenter the the rogue mode when exits from it (because you release the SHIFT key, or you have been damaged).

So why don't always stay in the rogue mode? Because you are slower... a lot slower!

Sunday, January 4, 2009

First post of the Cheese Boys project!

Welcome to Cheese Boys!
This project is aimed to realize a powerful engine that can help Python developers to realize RPG games.
Cheese Boys is based on the powerful Pygame library. Pygame is obviously based on Python language itself.
Cheese Boys is a game engine, but also a videogame (an implementation of the engine usage). In future I'll talk often of Cheese Boys - the engine, and Cheese Boys - the game.
Cheese Boys has many related pages on the Web. This blog will help me to keep track of all Cheese Boys related activity, and talk with Cheese Boys "fans".
There I can also talk of other argument not so related to the project (but I think never complete off-topic!).

At the time I'm writing this post there is no difference from the engine and the game (they are released both together).
The available release of Cheese Boys is the 0.1.1. The 0.2.0 version is in progress.

Ok, stop with this. Lets only write down some useful links.
That's all! See you in next days!