|
|
|
 |

June 15th, 2004, 03:36 AM
|
 |
Corporal
|
|
Join Date: Jan 2004
Location: Upstate NY
Posts: 181
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Random map files and annotations: Python
Actually I am trying to teach myself Python right now and would be interested in looking at your code. As long as you do not mind me possibly using some of it. I do have a few questions about Python. Do you reccomend any references for someone to help learn Python? What is the execution speed comparable to? What cross-platforms have you used with success? Sorry for the questions but I am inquisitive by nature. I will PM you my e-mail if you allow me to look at your code. Thanks
__________________
Every normal man must be tempted at times to spit upon his hands,
hoist the black flag, and begin slitting throats.
- Henry Louis Mencken
|

June 15th, 2004, 05:32 AM
|
Private
|
|
Join Date: Feb 2004
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Random map files and annotations: Python
The number-one and only real reference I can suggest is the documentation section on python.org, the tutorial is quite good and the Library Reference has a lot of information. That’s what I personally used learning the language.
Pure Python code’s execution speed is generally poor, its fully interpreted and does not compile to native code. If performance is a serious problem there are several solutions. The first is to rewrite the program’s hotspots in C; Python is implemented in C and can easily integrate modules and functions from C to improve performance. In fact there are some automated tools to make python wrappers for C libraries. I’ve never extended tried to do this so I can’t comment much.
The other solution to performance issues is to use the excellent support libraries which are generally in C. For example, the Numerical Python libraries provide matrix and array operations if you need to do serious number crunching and are generally very fast.
Most of the code I’ve written runs faster than I can notice anyway.
I have used Python under Linux (Debian, Slackware, Red Hat) and Windows (98, XP). Python has been ported to a pretty wide variety of systems, I would not expect that would be a problem.
Quote:
Originally posted by Pirateiam:
... I do have a few questions about Python. Do you reccomend any references for someone to help learn Python? What is the execution speed comparable to? What cross-platforms have you used with success? ...
|
|

June 15th, 2004, 04:17 PM
|
 |
Corporal
|
|
Join Date: Jan 2004
Location: Upstate NY
Posts: 181
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Random map files and annotations: Python
Thanks for the reply nakomus! I am currently in the middle of the tutorial. Thanks
__________________
Every normal man must be tempted at times to spit upon his hands,
hoist the black flag, and begin slitting throats.
- Henry Louis Mencken
|

June 15th, 2004, 07:19 PM
|
 |
Shrapnel Fanatic
|
|
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
|
|
Re: Random map files and annotations: Python
@Nakomus:
Well, if you take a look at some more of my stuff which is semi popular ( www.dom2minions.com) you might get an idea as to how your gathering info from the map file will allow a program to do what I do, but better.
Such as.... I randomly scatter castles and monsters across the map. The result is land castles in water, water castles on land. Same with monsters which drown as soon as you attack the province.
If you paired your program gathering info about a map, with one which maintains the same info for castles, natives, monsters, sites, pre-made interesting provinces, province names based on terrain (woods, water, mountain, island, swamp).... then doing a BETTER random program might be very interesting.
[ June 15, 2004, 18:21: Message edited by: Gandalf Parker ]
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
|

June 16th, 2004, 02:19 AM
|
 |
Shrapnel Fanatic
|
|
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
|
|
Re: Random map files and annotations: Python
I have shelves and shelves of OReilly books. I dont recommend them for learning. On any new subject I get a yellow "for Dummies" book first. Those are great books. Even if all it does is convince me that I already knew more than I thought on the subject its a good start. (never get the orange "for Idiots" books)
In-between, a SAMs book is good for learning. QUE is great. WAITE is abit heavy but good.
OReilly you get Last. In my opinion its alot of help but only if you already know the subject. Plus its impressive on the bookshelf for those who know what an OReilly book is. 
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
|

June 16th, 2004, 02:41 AM
|
 |
National Security Advisor
|
|
Join Date: Dec 1999
Posts: 8,806
Thanks: 54
Thanked 33 Times in 31 Posts
|
|
Re: Random map files and annotations: Python
You could use the tutorial on the web at first, and a book like the O'Reilly for a reference and to figure out more details.
PvK
|
Thread Tools |
|
Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
|
|