.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Scenarios, Maps and Mods (http://forum.shrapnelgames.com/forumdisplay.php?f=146)
-   -   Dom-III PBEM manager (http://forum.shrapnelgames.com/showthread.php?t=31098)

Gandalf Parker October 19th, 2006 03:24 PM

Re: Dom-III PBEM manager
 
Python is one of the more "english" of programming languages. So I would rank it as one of the easiest to learn. But its also very full featured.

Of couse just about any language could have done this. If you want to compare programming languages here is a really fun site to look at. I love looking at this site. http://forum.shrapnelgames.com/images/smilies/happy.gif
http://www.99-bottles-of-beer.net/
It has 1019 different programming versions of simple programs to work thru the 99 bottles song. http://forum.shrapnelgames.com/images/smilies/happy.gif

Gandalf Parker

Nerfix October 19th, 2006 03:49 PM

Re: Dom-III PBEM manager
 
Quote:

Endoperez said:You should be asking whether or not it would be worth it to learn Python. To answer that, the ones in the know would need to know what you'd use it for.

But Python leads to Ruby and Ruby and Java (Java I can handle somewhat) lead to Groovy and Groovy...Groovy is the future! And will lead to something else in future. http://forum.shrapnelgames.com/images/smilies/happy.gif

Endoperez October 19th, 2006 04:12 PM

Re: Dom-III PBEM manager
 
Quote:

Nerfix said:
But Python leads to Ruby and Ruby and Java (Java I can handle somewhat) lead to Groovy and Groovy...Groovy is the future! And will lead to something else in future. http://forum.shrapnelgames.com/images/smilies/happy.gif

Java is in the past. http://forum.shrapnelgames.com/images/smilies/frown.gif My personal work with Java, that is.

I haven't touched my map randomizer for a year or so. It was supposed to randomize poptypes/defenders/sites etc in totally new ways. A random .map generator instead of a random map graphics generator. It's written in Java, but probably only works in Windows.

WraithLord October 19th, 2006 07:09 PM

Re: Dom-III PBEM manager
 
Quote:

Gandalf Parker said:
Python is one of the more "english" of programming languages. So I would rank it as one of the easiest to learn. But its also very full featured.

Of couse just about any language could have done this. If you want to compare programming languages here is a really fun site to look at. I love looking at this site. http://forum.shrapnelgames.com/images/smilies/happy.gif
http://www.99-bottles-of-beer.net/
It has 1019 different programming versions of simple programs to work thru the 99 bottles song. http://forum.shrapnelgames.com/images/smilies/happy.gif

Gandalf Parker

Wow, this site is spectacular. I think I'll need to spend some time there, to get all the strange languages.

WraithLord October 19th, 2006 07:16 PM

Re: Dom-III PBEM manager
 
I have worked with C, CPP, Perl and Java (for RT, not J2EE).
Python, I've heard a lot about and decided to check it recently. I think its a superb language, elegant and consice and with a giant code base on the web.

So Nerfix, It all boils down to what you need done. C is best for performance, Java for web, Perl for information mining and Python for prototypes I use them all depends on what I need done, Oh and don't forgot to use VIM as your text editor http://forum.shrapnelgames.com/images/smilies/wink.gif

Nerfix October 20th, 2006 08:39 AM

Re: Dom-III PBEM manager
 
I think I should learn Java properly first. We had a longish course about it in the BC but we barely reached the objects. http://forum.shrapnelgames.com/images/smilies/frown.gif I studied it a bit in home but then schools started and work piled up on me. D: I did manage to program some sort of store software using objects & all with it though... http://forum.shrapnelgames.com/images/smilies/happy.gif

We'll have a course about PHP though and it's supposedly a lot like Java.

But studying a smitter of some easy to learn language that's still useful would be helpful in the future. i'm bizarrely interested in coding though I have recently heavily shifted toward HTML, CSS & all. Learning Javascript would propably be the next logical step.

Ahhhhh, so many choices....

Gandalf Parker October 20th, 2006 09:49 AM

Re: Dom-III PBEM manager
 
It depends.
JavaScript is good if you are interested in doing more with what the user sees on their screen.
PHP is good if you want to do more with what goes on at the server end for providing services.

On a Dom3 website JavaScript would be good for making a god-creation tool people could play with.
PHP would be good for making a web-based game managment system

IMHO

Cheezeninja October 21st, 2006 08:17 PM

Re: Dom-III PBEM manager
 
Could you post a block of text showing what the PBEM_conf file would look like correctly filled out? Do you enter the information within the < >'s or just replace that whole part with the correct information. You leave the < >'s out completely right?

Also what does the /cygdrive/ in the path signify? Should I remove that since it is not part of the path on my computer, or is that something Python related?

edit: Also thanks a bunch!!!!!!!

Edit2: Also when I try running the module with Python (2.5) I get an indentation error of some sort. Any and all help would be appreciated, I really don't know what I'm doing.

WraithLord October 22nd, 2006 08:28 AM

Re: Dom-III PBEM manager
 
1. Full config file:
[GENERAL]
# Windows values:
dom_path = D:\Program Files\dominions3
temp_turns_path = D:\temp
backup_path = D:\temp\domIII

host_email = name@gmail.com
host_pwd = 1234
sig_msg = Thanks, name
active_game = test

[GAMES]
games= test

[test1]
players = player1@gmail.com:mid_oceania, player2@yahoo.com:mid_pythium, player3@whocares.com:mid_vanheim

sent_turns_msg = have fun http://forum.shrapnelgames.com/images/smilies/happy.gif

2. /cygdrive, is for cygwin - a Linux flavour OS on top of MS windows. Just ignore it if you work on windows, use windows path instead.

3. Thanks for your interest http://forum.shrapnelgames.com/images/smilies/happy.gif

4. You should seriously consider upgrading to python 2.6. Also python is white space sensitive. The script was tested on windows and cygwin and should work ok. Could it be that the file was edited by mistake?- Maybe try to DL it again. If that fails please post here or PM me with the exact error you get and I'll look into it.

Cheezeninja October 22nd, 2006 07:04 PM

Re: Dom-III PBEM manager
 
Okay. I think I've done everything right, I don't have libgmail in the python folder if that matters, which it doesn't seem like it should(?), or your module either. I open up the Python gui, open your file, and select run module. It gives me this error:

Error: Inconsistent indentation detected!

1) Your indentation is outright incorrect (easy to fix), OR

2) Your indentation mixed tabs and spaces.

To fix case 2, change all tabs to spaces by using edit->Select All followed by Format->Untabify Region and specify the number of columns used by each tab.

It also takes me to a line in the middle of your module and highlights the line that says "self.ga.login()"


All times are GMT -4. The time now is 01:32 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.