![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#11 |
|
Programmer
Join Date: May 2005
Posts: 60
Rep Power: 4
![]() |
Can' thank you guys, enough
.I'm going to finish chapter five of the http://www.ibiblio.org/obp/thinkCSpy/index.htm tutorial today, and I'm finding things quite interesting. I'm picking most things up, but am having some major difficulties with creating my own functions .Aside from that, and some of the more complex mathmatical functions (like sin), which I can't ever see myself needing to know anyway ... I'm grasping things. Once again ... thanks guys. ![]() |
|
|
|
|
|
#12 |
|
Newbie
|
creating your own functions 2-seconds howto:
def hello(): print 'hello, world' also, note that all py2exe does is pack together the python.exe, your script and all dependencies. So yes, they have to download the interpreter, but they don't know it ![]()
__________________
now go away or I shall taunt you a second time :D |
|
|
|
|
|
#13 |
|
Programmer
Join Date: May 2005
Posts: 60
Rep Power: 4
![]() |
I understand how to simply create functions, it's when something like this is used ...
def printTwice(python): print 'python, python' is used and then I make another intstruction like this ... printTwice('programming'*4): shouldn't the result look something like this ... programming, programming, programming, programming, programming, programming, programming, programming instead errors just occur .Anyway it's not a HUGE issue, I can just take the extra minute to create a seperate function from scracth ... and besdies I can't imagine using it too frequently. |
|
|
|
|
|
#14 |
|
Newbie
Join Date: Feb 2005
Posts: 8
Rep Power: 0
![]() |
Works for me!
def printTwice(python): print python, python >>> printTwice("programming "*4)
proramming proramming proramming proramming proramming proramming proramming proramming |
|
|
|
|
|
#15 |
|
Programmer
Join Date: May 2005
Posts: 60
Rep Power: 4
![]() |
Cool, well I'm going to continue to explore Python, but I'll also branch off into trying to go back to VB6 aswell as from what I've been told it would be much easier to create something using VB.
I will continue with Python though ... from what I understand the more programming languages you can grasp the better. |
|
|
|
|
|
#16 |
|
Professional Programmer
Join Date: Feb 2005
Posts: 434
Rep Power: 4
![]() |
If you can muddle through VB6 then Python should be a breeze!
__________________
I looked it up on the Intergnats! |
|
|
|
|
|
#17 | ||
|
Newbie
|
Quote:
(1) portability -- say you say vendor lock-in? (2) support -- I think ms are laying off all vb6 and going all .net; also, the last time I looked at vb, it was kludgy and will teach you bad programming habits. Quote:
hth --Jonas
__________________
now go away or I shall taunt you a second time :D |
||
|
|
|
|
|
#18 |
|
Programmer
Join Date: May 2005
Posts: 60
Rep Power: 4
![]() |
Do you seriously think Python wold be best for my game?
The reason I was changing my mind was because ... A) I couldn't find anywhere to create objects and controls, on VB6, it's a breeze, and a game like mine would need tons. B) After browsing through somestuff I couldn't see anywhere that a 2D engine could be made. I mean, if these things can dfinately be done, I might reconsider Python and you make a good point about VB.Net being prefered over VB6. |
|
|
|
|
|
#19 |
|
Newbie
|
A)
objects are simple to create class foo: pass # put your class definition here def somefun(): myobj = foo() myobj.x = 0.5 myobj.name = 'foo' exactly what do you mean by `controls'? widget-like things part of the ui? b) assuming `somestuff' means `some stuff': which stuff? Did you look at pygame? Be warned: game development isn't easy, but it is rewarding. else: what is `somestuff'? I tried googling for it, but the links looking most promising turned out to hang/drop/dangle.
__________________
now go away or I shall taunt you a second time :D |
|
|
|
|
|
#20 |
|
Newbie
Join Date: Feb 2005
Posts: 24
Rep Power: 0
![]() |
I've not actually got around to reading it yet, but IIRC Game Development With Python (Sean Riley) details creating a 2D game engine using PyOpenGL.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|