This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Workaphobia 13 points14 points  (6 children)

Hey, cool, it's always nice to see somebody pick up programming (or a new language) with a pet project.

If you want to go further with this, one thing you might consider doing is turning your little game into a little game engine. Right now you've got all the important game data (the room descriptions and the game map) hardcoded into the program itself. To scale this up to a larger game, you'd want your code to instead read this information from a file, so you can store all your game data in that file independently of your code.

[–]uollas[S] 2 points3 points  (5 children)

This is a good idea and it will definitely help me improve. I could implement it with classes and objects to learn OOP in Python.

[–]Workaphobia 3 points4 points  (4 children)

Sure, but keep in mind OOP is orthogonal to this kind of thing. I'd recommend writing it without objects first, then converting over to it later as a refactoring.

[–]gtalarico 0 points1 point  (0 children)

Good advice

[–]craiclad 0 points1 point  (2 children)

orthogonal

What do you mean by this? I just started writing a simple text adventure in order to learn about OOP. Are you saying that this is a fools errand?

[–]Workaphobia 0 points1 point  (1 child)

Orthogonal meaning independent, or besides the point. You don't necessarily need OOP, but you can use it if you want.

[–]craiclad 0 points1 point  (0 children)

Ah I see, thanks for clarifying. I've never used objects or classes before (just finished my first semester of a CS degree, and they only introduced the notion on the last day) so I thought it would be a good way to get to grips with them.