World of Eldorantha

Started by Kazamatta, October 19, 2012, 07:37:40 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Kazamatta

This is written using Python as well as a python text based game pdf and refference to a text based game called Shadows of Kalendale:


mrlemke

How old is this PDF you are learning from? This looks a lot like C written in Python.
Have you learned about objects yet? I'm noticing code that should be placed inside of an object and not declared globally.
You could reduce the size your training function by moving often used code into functions and then using those functions.
You should also separate your data from your code by moving your room, npc, and item definitions into flat files (XML would likely be best).

Do you have any designs for this yet or are you just coding the engine first?

Hasabushi

#2
I thought the same thing, also a lot of the descriptions could be accessed from an external source like XML or csv text. Just saying.

Quoteoops just realized that I repeated what Dan said lol, I should probably read the entire post first :D



lightspeed15

#3
Triple posting...



Not on my watch!! :)

OMG You did not just MEME ME!


Hasabushi

I'm an admin I can post what the heck ever I want, You edit my posts again and I'll demote you to seedling :P

Also your post is outside the subject matter of this thread!

YOU HAVE BEEN WARNED!! o-E


Hasabushi

Here is that link I posted in chat Kaz, http://wiki.python.org/moin/PythonXml that will give you imports for using parsing XML, if you don't know XML you can always use a flat file of plain deliminted text files, though XML is easy enough to learn. I think python 3 may already have those imports.

Hasabushi

Also I'm not sure if you want to run this from shell or if your looking to use a framework, this is  a GUI that I'm currently using for windows development with python. http://dabodev.com/. I'm also seriously thinking that if we start offering programming tutorials (for games) and have the meta data reflect such we could get a lot more members.. just saying

lightspeed15

#7
Hasa what the hell, not funny

I've cheated the system and made myself admin once more

Kazamatta

Im not sure of the date of publication on the pdf file but when i had it opened before my comp ost power it said latest version of python was version 2.5.

Hasabushi

eww yeah python 3.3 is the newest it has supports alot of imports and new functions that 2.5 dosen't.

Hasabushi

Hey Kaza try this its kind of cheesy but it uses python 3.1 and there are some good coding techniques spread throughout it that will help.
http://inventwithpython.com/chapters/

binarymichael

Hey, glad my code came in handy for someone! I originally created the code for Shadows of Kalendale just to learn python, but it kind of evolved (which is why none of it was OO). The data was mean to be exported via Pickle when the game was finished, that way it could be "somewhat" encrypted which could be done to this code with very little work by dis-assembling the current load/save function and creating a copy as a new function simply for loading data. The main reason this was done was originally I was going to create a game editor as a separate program but never actually got around to it. However the code has been cleaned up quite a bit since this revision. I'm glad my weather system is still being used, I wasn't sure if I should keep it in or not, as I always considered kind of clunky. The executable can be found at shadowsofkalendale.blogspot.com but I may post the updated source there soon if it helps anyone.

Hasabushi

I'm currently programming In unity 3d they have a python style script called boo, glad to have you on. kaz hasn't been on on quite sometime I might try to email him to get him back. I wouldn't, mind seeing that updated code. :)


Throndir

I agree with Hasabushi there, if you've done work, you might as well show it to the world! :D

binarymichael

Done! Here's the Python script:

Shadows v00000.96 py

The method to my madness is posted on my blog. And awesome on using Unity! I've been playing around with it for a bit now too. I haven't touched Boo though, only C# and JS. Anything specific you're working on in it?