Results 1 to 25 of 25

Thread: Python

  1. #1
    Ja mata, TosaInu Forum Administrator edyzmedieval's Avatar
    Join Date
    May 2005
    Location
    Fortress of the Mountains
    Posts
    11,389

    Question Python

    So, I started learning the Python language.
    www.python.org

    Anyone know this language? Any feedback on it? Easy or hard to learn?
    I want to learn this, along with modelling, so I can maybe start my own game in the summer. A couple from Turkey did that, which resulted Mount&Blade. Why can't I do that?

    Thanks.
    Ja mata, TosaInu. You will forever be remembered.

    Proud

    Been to:

    Swords Made of Letters - 1938. The war is looming in France - and Alexandre Reythier does not have much time left to protect his country. A novel set before the war.

    A Painted Shield of Honour - 1313. Templar Knights in France are in grave danger. Can they be saved?

  2. #2
    Boy's Guard Senior Member LeftEyeNine's Avatar
    Join Date
    Sep 2003
    Location
    Yozgat
    Posts
    5,168

    Default Re: Python

    Sorry, I'll not be directly helpful but all I can say is that you have a good ambition, keep it going. Civilization 4 masterpiece is a game coded in Python and that should be enough to demonstrate its strength indeed. What's more, my homemate is a coding freak and he told me that his uncle had advised him a year ago, to start learning Python telling him that it was a really promising language to be very popular through the following years. And so it seems..

    Keep it up!

  3. #3
    Ja mata, TosaInu Forum Administrator edyzmedieval's Avatar
    Join Date
    May 2005
    Location
    Fortress of the Mountains
    Posts
    11,389

    Default Re: Python

    So it seems. Mount&Blade is also made in Python.

    Ok, started learning.
    Ja mata, TosaInu. You will forever be remembered.

    Proud

    Been to:

    Swords Made of Letters - 1938. The war is looming in France - and Alexandre Reythier does not have much time left to protect his country. A novel set before the war.

    A Painted Shield of Honour - 1313. Templar Knights in France are in grave danger. Can they be saved?

  4. #4
    Pinko Member _Martyr_'s Avatar
    Join Date
    Dec 2002
    Location
    Dublin, Ireland
    Posts
    2,882

    Default Re: Python

    I'd say start with C++ and SDL, to write your first few games. C++ is still by far the most used language for gaming (and most other things at that...). SDL ( Simple DirectMedia Layer) is, from the website... "a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer", basically its a great set of libraries that takes care of most of the media and input/output of your game. Its a great place to start in my experience. Plus, having c++ under you belt will stand to you very well.

    Believe me, no matter how tallented or hardworking you are, you wont be able to just start programming and come up with something like M&B. It takes years of programming experience, lots of experience with the process of creating games and lots of technical know-how. I'm not trying to dampen your enthusiasm. Just dont expect to be able to program anything too complicated in the very near future. Its a LOT harder and infinitely more complicated than it appears. Im a few years into my Electronic Engineering degree and Ive just completed my first real game, its pretty much a glorified Space Invader clone, but it took me a good few weeks, if not months of hard work, and long hours of coding, and Id consider myself not too shabby at programming with c++.

    So in otherwords, my advice to you is to not aim too high at the beginning, whatever language you choose. The games you will be able to make in the first year or so will be more in the Tetris/Pong realm rather than something like M&B. If you aim too high you will just get really frustrated and quit. Good luck with whatever you do!
    Eppur si muove







  5. #5
    Ja mata, TosaInu Forum Administrator edyzmedieval's Avatar
    Join Date
    May 2005
    Location
    Fortress of the Mountains
    Posts
    11,389

    Default Re: Python

    Constructive criticism. I appreciate that very much at a person.

    I thought of all the aspects you have told me. I am fully aware of what is necessary and what is what with all the programming around here.
    I've been studying programming since the 6th grade(I'm now in the 8th grade), so I know how do you eat this thing. On the bad side though, unfortunately, I kinda slacked off the "writing" part of the programming, so I have to start the algorythmic stuff again.

    I started C++ in the 5th-6th grade, in private. I went on really well, till I got to the informatics school, which unfortunately, was doing Pascal. This thing really messed up my brains, and I basically mixed up everything I learnt.

    I still know the pseudocode, and how it works the stuff, but I need to learn again the "conversation".

    As for my project, I hope I can learn and do something small first, then progress steadily.

    Thank you for the tips again Martyr.
    Ja mata, TosaInu. You will forever be remembered.

    Proud

    Been to:

    Swords Made of Letters - 1938. The war is looming in France - and Alexandre Reythier does not have much time left to protect his country. A novel set before the war.

    A Painted Shield of Honour - 1313. Templar Knights in France are in grave danger. Can they be saved?

  6. #6
    Pinko Member _Martyr_'s Avatar
    Join Date
    Dec 2002
    Location
    Dublin, Ireland
    Posts
    2,882

    Default Re: Python

    Sounds like you will be well on track then once you familiarise yourself with C++ again. As I said in the previous post, a great place to start is with SDL. It takes the sting out of making a simple game and lets you focus on your game itself rather than testing specific hardware conflicts or something, while still involving you enough so that you learn whats going on.

    Download the library here: http://www.libsdl.org/index.php

    Good luck!
    Eppur si muove







  7. #7
    Ja mata, TosaInu Forum Administrator edyzmedieval's Avatar
    Join Date
    May 2005
    Location
    Fortress of the Mountains
    Posts
    11,389

    Default Re: Python

    Thanks for the appreciation and feedback.
    I really need to get my "minds" back, as I need to learn again C++, on the algorythm part. Even though I did 2 years, I still don't know much unfortunately. Guess I'll have to start again.

    Thanks for the SDL Library.
    Ja mata, TosaInu. You will forever be remembered.

    Proud

    Been to:

    Swords Made of Letters - 1938. The war is looming in France - and Alexandre Reythier does not have much time left to protect his country. A novel set before the war.

    A Painted Shield of Honour - 1313. Templar Knights in France are in grave danger. Can they be saved?

  8. #8
    Member Member ZombieFriedNuts's Avatar
    Join Date
    Feb 2006
    Location
    England
    Posts
    504

    Default Re: Python

    I’m learning python in university good luck to you, still haven’t got the hang of it.
    I was going to give a link to the worksheets we were using then I realised the lecturer didn’t put them on the web.
    Make Beer Not War

  9. #9
    Ja mata, TosaInu Forum Administrator edyzmedieval's Avatar
    Join Date
    May 2005
    Location
    Fortress of the Mountains
    Posts
    11,389

    Default Re: Python

    You need to read those tutorials carefully to understand Python.

    I wonder how CA built their TW engine....
    Ja mata, TosaInu. You will forever be remembered.

    Proud

    Been to:

    Swords Made of Letters - 1938. The war is looming in France - and Alexandre Reythier does not have much time left to protect his country. A novel set before the war.

    A Painted Shield of Honour - 1313. Templar Knights in France are in grave danger. Can they be saved?

  10. #10
    zombologist Senior Member doc_bean's Avatar
    Join Date
    Oct 2004
    Location
    Riding Shai-Hulud
    Posts
    5,346

    Default Re: Python

    Well you probably know this already, but, some general programming advice:

    1. learn object orientated programming (if you're using an object orientated language), NOT procedural programming in an object-orientated language. Of course, knowing procedural programming is pretty much essential in itself, but do know the different 'âparadigms of coding and when to use them. Learning how to program is different from just learning a language.


    2. Document your code: you have to understand what everything does a year from now, at least, write what your code expects as input and what it gives as output: be complete and write in logic code if possible. This is the part about programming I really hate, but i've seen the benefits...

    3. write simple tests for pretty much every function you implement, and keep running them when you change or add things. Correcting a 'completed' program is a *****, even correcting one class can be a huge undertaking. Intermediate testing will save you time in the long run.

    4. Have fun ! Don't start a big project where you will only see the results years from now (it takes a year for a modern 3D engine to be build I think, and those are done by experts). Start with little projects and work your way up, or divide a bigger project into little pieces that have results of their own (like a graphical representation, a basic form of abstract game mechanics, a data handling system, input interface, etc.).

    Good Luck !
    Yes, Iraq is peaceful. Go to sleep now. - Adrian II

  11. #11
    Ja mata, TosaInu Forum Administrator edyzmedieval's Avatar
    Join Date
    May 2005
    Location
    Fortress of the Mountains
    Posts
    11,389

    Default Re: Python

    1. learn object orientated programming (if you're using an object orientated language), NOT procedural programming in an object-orientated language. Of course, knowing procedural programming is pretty much essential in itself, but do know the different 'âparadigms of coding and when to use them. Learning how to program is different from just learning a language.
    Python is an object orientated programming, so that's a big plus. Plus, it says here it's easy to learn. It might be, but the tutorials are stuffed with material.

    2. Document your code: you have to understand what everything does a year from now, at least, write what your code expects as input and what it gives as output: be complete and write in logic code if possible. This is the part about programming I really hate, but i've seen the benefits...
    At least I know the logic code good... That's a plus, makes you understand how the stuff works.

    Well, I'm learning Python and C++ in parallel with other stuff, and I learn these in my free time. I gave up gaming for these, so I can do my own projects in the summer.
    Ja mata, TosaInu. You will forever be remembered.

    Proud

    Been to:

    Swords Made of Letters - 1938. The war is looming in France - and Alexandre Reythier does not have much time left to protect his country. A novel set before the war.

    A Painted Shield of Honour - 1313. Templar Knights in France are in grave danger. Can they be saved?

  12. #12
    zombologist Senior Member doc_bean's Avatar
    Join Date
    Oct 2004
    Location
    Riding Shai-Hulud
    Posts
    5,346

    Default Re: Python

    Quote Originally Posted by edyzmedieval
    Python is an object orientated programming, so that's a big plus. Plus, it says here it's easy to learn. It might be, but the tutorials are stuffed with material.
    From what I've read about Python it certainly seems like an interesting language. I don't like tutorials much since they're usually to slow for my taste, but they're a necessary evil, most of the time.

    Well, I'm learning Python and C++ in parallel with other stuff, and I learn these in my free time. I gave up gaming for these, so I can do my own projects in the summer.
    What's the project you are planning, if you don't mind me asking ?
    Yes, Iraq is peaceful. Go to sleep now. - Adrian II

  13. #13
    Ja mata, TosaInu Forum Administrator edyzmedieval's Avatar
    Join Date
    May 2005
    Location
    Fortress of the Mountains
    Posts
    11,389

    Default Re: Python

    First of all, I'll start something like Tetris, to keep my interest up.
    My bigger project is a sort of RPG, Mount&Blade style only.
    Ja mata, TosaInu. You will forever be remembered.

    Proud

    Been to:

    Swords Made of Letters - 1938. The war is looming in France - and Alexandre Reythier does not have much time left to protect his country. A novel set before the war.

    A Painted Shield of Honour - 1313. Templar Knights in France are in grave danger. Can they be saved?

  14. #14
    Ja mata, TosaInu Forum Administrator edyzmedieval's Avatar
    Join Date
    May 2005
    Location
    Fortress of the Mountains
    Posts
    11,389

    Default Re: Python

    So I'm sort of halfway to making the Tetris in C++. Hope it works. Wish me luck.

    If the mods don't mind(especially LEN, but he's easy to fool...Some Asian women and he's toast ), I'll keep my progress here.
    Ja mata, TosaInu. You will forever be remembered.

    Proud

    Been to:

    Swords Made of Letters - 1938. The war is looming in France - and Alexandre Reythier does not have much time left to protect his country. A novel set before the war.

    A Painted Shield of Honour - 1313. Templar Knights in France are in grave danger. Can they be saved?

  15. #15
    Boy's Guard Senior Member LeftEyeNine's Avatar
    Join Date
    Sep 2003
    Location
    Yozgat
    Posts
    5,168

    Default Re: Python

    No probs for me as long as you feel it's suitable for forum scene. But Granpa may have something to say though.

  16. #16
    Senior Member Senior Member Duke John's Avatar
    Join Date
    May 2003
    Location
    Netherlands
    Posts
    2,917

    Default Re: Python

    Have a look at Panda3D. It's a free 3D engine that can be accessed through Python.
    http://www.panda3d.org/

  17. #17
    Ja mata, TosaInu Forum Administrator edyzmedieval's Avatar
    Join Date
    May 2005
    Location
    Fortress of the Mountains
    Posts
    11,389

    Default Re: Python

    Wow, it looks really nice. Check this project, which is so cool:
    http://www.etc.cmu.edu/projects/orb/images.htm

    For Python stuff, I'm learning Blender. Panda3D might be a suitable addition.
    Ja mata, TosaInu. You will forever be remembered.

    Proud

    Been to:

    Swords Made of Letters - 1938. The war is looming in France - and Alexandre Reythier does not have much time left to protect his country. A novel set before the war.

    A Painted Shield of Honour - 1313. Templar Knights in France are in grave danger. Can they be saved?

  18. #18
    zombologist Senior Member doc_bean's Avatar
    Join Date
    Oct 2004
    Location
    Riding Shai-Hulud
    Posts
    5,346

    Default Re: Python

    Quote Originally Posted by LeftEyeNine
    No probs for me as long as you feel it's suitable for forum scene. But Granpa may have something to say though.
    I rather like the idea of a game development thread, it should certainly have it's place here imho.

    edyzmedieval: which development environment are you using ?
    Yes, Iraq is peaceful. Go to sleep now. - Adrian II

  19. #19
    Boy's Guard Senior Member LeftEyeNine's Avatar
    Join Date
    Sep 2003
    Location
    Yozgat
    Posts
    5,168

    Default Re: Python

    Feel free to use this for Phyton related development. Constructive and progressive threads would not bother in numbers, at least I feel so. Granpa ?

  20. #20
    Ja mata, TosaInu Forum Administrator edyzmedieval's Avatar
    Join Date
    May 2005
    Location
    Fortress of the Mountains
    Posts
    11,389

    Default Re: Python

    Quote Originally Posted by doc_bean
    I rather like the idea of a game development thread, it should certainly have it's place here imho.

    edyzmedieval: which development environment are you using ?
    Yeah, it's a nice idea.

    As for the environment, I am still learning Doc. Keep in mind, I dropped C++ some time ago, and I never knew anything about Python until 2 weeks ago.
    I'll do some basic scripts first in C++, to get my skills on the track.

    Or what do you mean by Development Environment?
    Ja mata, TosaInu. You will forever be remembered.

    Proud

    Been to:

    Swords Made of Letters - 1938. The war is looming in France - and Alexandre Reythier does not have much time left to protect his country. A novel set before the war.

    A Painted Shield of Honour - 1313. Templar Knights in France are in grave danger. Can they be saved?

  21. #21
    Arbeit macht fleisch Member ScionTheWorm's Avatar
    Join Date
    May 2005
    Location
    Norwegen
    Posts
    778

    Default Re: Python

    http://www.ogre3d.org/

    you can't write a game like m&b in python using blender (if you mean the actual battle scenes)

    python is my favourite language, though it performs about 11 times worse than a c++ application when using plain python loops. making a game as good as m&b would be very difficult alone as far as I know, if you're not experienced. c++ would certainly be required, m&b does not have that a high framerate in relatively large scale battles. using an engine like ogre3d from python could work though, but stuff like AI and other custom algorithms should be implemented in c++.

    I'm starting to get pretty anxious about starting up a M&B mod, it has so much potential and yet it's so much easier to mod than rtw. wounder if I could get people interrested from this forum...

  22. #22
    Ja mata, TosaInu Forum Administrator edyzmedieval's Avatar
    Join Date
    May 2005
    Location
    Fortress of the Mountains
    Posts
    11,389

    Default Re: Python

    I'd be interested.
    But only a bit, as I want to start my project.

    I don't get the first parts of the Python tutorial...Any help?
    Ja mata, TosaInu. You will forever be remembered.

    Proud

    Been to:

    Swords Made of Letters - 1938. The war is looming in France - and Alexandre Reythier does not have much time left to protect his country. A novel set before the war.

    A Painted Shield of Honour - 1313. Templar Knights in France are in grave danger. Can they be saved?

  23. #23
    zombologist Senior Member doc_bean's Avatar
    Join Date
    Oct 2004
    Location
    Riding Shai-Hulud
    Posts
    5,346

    Default Re: Python

    Quote Originally Posted by edyzmedieval
    Or what do you mean by Development Environment?
    Something like eclipse, which is primarily for java, but has python plug-ins I've read. Essentially a text editor for programming that points out the obvious errors and offers several functions for faster (and correcter) programming.
    For instance if you have an object named thing (from a certain class) and you type "thing." it will give you a list of all the functions that could apply (like for instance thing.getName()), this way you don't have to remember every exact name you've used for your methods or variables. It will also point out every (in theory) error the compiler would give if you were to compile ate that moment, with access to a list of suggestion how to fix it (adding throw clauses for instance).

    I don't get the first parts of the Python tutorial...Any help?
    I don't know Python, but perhaps you could point out (and/or quote and/or explain) exactly what you don't get ?
    Last edited by doc_bean; 05-09-2006 at 19:26.
    Yes, Iraq is peaceful. Go to sleep now. - Adrian II

  24. #24
    Ja mata, TosaInu Forum Administrator edyzmedieval's Avatar
    Join Date
    May 2005
    Location
    Fortress of the Mountains
    Posts
    11,389

    Default Re: Python

    You learn new things every day.

    The thing I don't get... The intepreter stuff. Chapter II of the documentation.

    www.python.org/doc



    EDIT: I kinda got the hang. The Interpreter is the Python program. Right?
    Last edited by edyzmedieval; 05-10-2006 at 13:00.
    Ja mata, TosaInu. You will forever be remembered.

    Proud

    Been to:

    Swords Made of Letters - 1938. The war is looming in France - and Alexandre Reythier does not have much time left to protect his country. A novel set before the war.

    A Painted Shield of Honour - 1313. Templar Knights in France are in grave danger. Can they be saved?

  25. #25
    Boy's Guard Senior Member LeftEyeNine's Avatar
    Join Date
    Sep 2003
    Location
    Yozgat
    Posts
    5,168

    Default Re: Python

    Oh interpeter and assembler are some very basic concepts, aren't they ?
    Last edited by LeftEyeNine; 05-10-2006 at 13:30.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO