Archive | January, 2011

Project 365, Day 030

30 Jan

Reflections of stained glass

Project 365, Day 028

28 Jan

Sunsetting on my busy little metropolis

Project 365, Day 026

26 Jan

A baby Squirrel.

A curious squirrel

Curious? Yes curious, I say this little guy while walking on the road, I managed to snap this picture from quite the distance afraid to get closer in case he runs off. He was hanging around for a few minutes cautiously peeking into the hole behind him before ducking in to explore a whole new world.

Specifications for the Design, Development and Deployment of a Text Based Adventure or SDDDTBA

26 Jan

Introduction
I spent a large part of January planning this game, and as of writing this the coding has yet to start but I estimate that completing the game will take no more than a few hours this weekend to complete. The chunk of time I spent design the game, the pseudo / actually code scripts and figuring out how to track user events, game events and the flow chart has helped sort out a lot of key problems I would have otherwise had if I used my usual head first method of diving right in making a mess getting an idea of how things should flow scraping work done and starting all over again.

Game Objectives
A text adventure has the beauty of being as complex or as simple as I the designer wants. I wanted to design a game that is follows a fairly linear path and that changes during each play through. Using this idea as my corner-stone I decided that I wanted the game to have two character options, a ranger or a mage, the ranger was a male character and the mage a female one. The game is radically or more accurately subtly different when playing with either character, it is simple things such as the ranger has to complete the game without loosing health and the mage can cast healing spell, or the ranger is capable of dealing and taking more damage than the mage.

The game is subdivided into two main sections, the first section is the Tower where your character needs to traverse the game and save a princess or prince depending on whom you’re playing, this character is intricately woven into the gameplay by being able to provide the player with health and distance attacks if the player is the ranger or a defensive / offensive mover if the player is the mage, the player must not let this character die or will need to start again.

Story
The main trunk of the story will be the same for either character, the only change will be about social interaction between the two characters, hopefully create an emotional connection by the player towards the two main characters.

A simple overview the player enters a magical forest and decides to camp in a clearing for the night and when the player awakens to see a tower that sprouted overnight and being the curious type, they enter the tower.

Setting and Game Play
I’m trying to design the game to be as non liner as possible, or to be more accurate and less misleading, I want the game to be dynamic, the gameplay is dynamic through having different characters with different stats, and most enemies will have more than one method of defeating or getting by.

The Tower
The tower consists of four floors and each floor has something to overcome and an item to collect that may or may not help in the future. The top floor you need to fight the main tower boss and save the character trapped in their.

Forest
The forest has been divided into a grid similar to that of a tic tac toe board numbered from 1 to 9, number for each zone will be given at random so that the player will not go through the same path on each play through, however due to time constraints each zone will be fairly linear.

As an additional challenge the player needs to escape the forest with a set limit of time or they will be lost in the forest forever.

Code: Buggy and Hackey
Even though I spent countless hours trying to perfectly plan the game in my head, on paper and in small utility scripts I think all that will go right out the window when I sit down to write it. The game will work but I have a nasty feeling that the code will be ugly and hackey unless I have time to refactor it.

I’m hoping to separate everything into classes, functions, or separate files so that in the future I will be able to reuse the code or atleast the concepts in the code. I’m trying to keep the code as readable (ugly but readable) and forgo trying to make it as efficient as ever maybe someone else can go ahead and do it for me.

The version of Python I have decided to use for this game is Python 2.7 in the IronPython flavour simply because I have yet to see a IDE better than Visual Studio. As of this moment no additional modules are needed or will be used, except maybe for the countdown timer or a curses module for the UI.

Summary or tl;dr
Nothing much to say in all honesty I’m still trying to learn the intricacies of programing and particularly python, so this is a learning experience much more than anything else.

Considering how much time has actually gone and that I have only a weekend to complete I hope that I can complete my specifications and make the game I want.

This is not an excercise in coding it is in completing a game, and in doing so I will write it as hackey as I need to just so that it works.

Project 365, Day 025

25 Jan

Winne

Winne Keychain

Project 365, Day 023

23 Jan

Coconut in the sun, enjoyed by a squirrel.

A coconut that had been attacked by a squirrel

Project 365, Day 022

22 Jan

Sunset.

A stormy sunset.

Gripes with Python

22 Jan

When I started my rather large undertaking to try to complete 12 games in 12 months I took python as my language of choice. I had very little experience in it and wanted to becoming versed in the language and its intricacies by the end of the year.

For January I decided to write a small text-based adventure (specifications will be put up shortly) it seemed to be right up Pythons alley, lots of string manipulations, none to very little data storage and the code is almost script like rather than a complete program because no external modules are used. All my code is kept in a box.net folder along with a python setup executable so that I can access the data and code / debug from anywhere on almost any computer. This setup was perfect for about 2 days when I started to run into various problems.

Gripe 1 – No proper IDE
Before everyone starts chewing off my head, I come from a C / C++ background with a Windows OS. I use Linux (Ubuntu or Fedora) and have love / hate relationship with it, I regularly use the command line for compiling and debugging and often switch between Visual Studio my IDE of choice and Notepad++ when coding. However Python has no proper IDE for Windows that can match Visual Studio for convenience and in my humble opinion quality, it just works and if I’m not mistaken that Python unofficial motto.

Gripe 2 – Whitespace or Tabs
Many people attribute this as a key component for improved productivity. For me however its been nothing but a headache. I’ve been forced to change my entire coding methodology as I can’t move from Visual Studio to Notepad++ with causing some sort of white space error. I spend more time trying to correct syntax errors than actual coding.

Gripe 3 – Lack of Braces
Using braces comes naturally to me because of use in C / C++. Python does not use any while this is not a major problem I find the syntax rather a little difficult to read as I find it difficult to find out where a condition ends particularly when it is multi-lined.

Gripe 4 – Multiple Versions
Python has far too many versions and to use any tool created I need to use a different version of Python or jump through hurdles to print “hello world”. While trying to program games I’m dabbling in the Google App Engine and it requires Python 2.5, I use IronPython in Visual Studio which is compatible with Python 2.7 and when I’m using Pygame or Panda 3D I need to use Python 3+. It is very annoying as each implementation has different syntax and modules are not cross-compatible with Python 2+ and Python 3+, with most not having finished conversion as yet.

Positives
Even though I have some genuine problems and irritation working with python I’m finding its community to be very helpful and patient with new users particularly those on r/python.

Code samples are readily available in Python, especially for those looking for large projects that include scaling and other popular buzzwords used today. There are some very interesting projects that are written in Python and following them, editing some of the source is interesting and makes for a good challenge.

It is very easy and very quick to write simple scripts and small utility programs. But only if the modules you hope to use are compatible with the version of python you have installed.

The biggest relief for me was the built-in data structures, I did not have to look for or write my own templated data structures. Along with data structure I find that I prefer Python’s weakly typed arrays, mixing numbers and strings without the use of a custom data structure is a real time saver.

Conclusion
Overall while I’m struggling with the language I’m going to continue using it as it has a lot of scope for the future with its popularity in web app development and game scripting. Hopefully the guys on top sort a few of the language issues and move to Python 3+ and we can all live in peace.

Project 365, Day 021

21 Jan

The flower is from a chili plant.

A spicy flower

I think that the flower looks a little sad. The chili plant is quite captivating to look at, little flecks of white and red peeking through a rich dark green colour. While chili isn’t my favourite it is an essential part of cooking without which most food would taste rather bland, it’s a testament to the chili that even though its such strong spicy fiery flavour, the plant is quite peaceful and calm.

Project 365, Day 020

20 Jan

A classical beauty left to the elements