First few classes and ideas

Mood: Blissfully Ignorant

Installed latest versions of Python and Pygame (latest Python seems to come pre-packed with a text editor, but it doesn’t work too well, after promptly imposing itself as my default for opening .py files. Gah!). I’ll be doing all the coding in XCode as I work with a Mac (Macbook 2.0Ghz with 1GB RAM, if anyone’s interested. The Macbook isn’t set up for hard graphics, but we’re not going there!). Hmm, lots of brackets.

Currently playing around to see what kind of classes I’m going to need for a base. I’ve never done anything like this before, so it’s all very hit and miss. So far have:

Location(MapID, RoomID, x, y)
GameObject(uniqueID, Location)

My plan at the moment is to read all the map information in from an external file, so that the game loop just looks for the MapID, inputs some kind of array(s) with the relavant data and puts the images up on the screen. Then, as the player pushes an “action” button the game compares the player’s current location with locations stored in the matrix to see if there’s anything there; if there is, the corresponding event will occur – ah, need event class. That’ll be quite important then.

I’m debating whether or not to start off with a textinput for testing, and then call the graphics once I know the behind-the-scenes stuff is working. It could be useful to define some commands for later use such as GoTo(place) or something. I am weary of writing code for a text base only to have to re-work a huge amount for a graphical display, which I feel is going to be the case.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: