Sign in to follow this  
Sx2Kirby

C++ to Python or C#

Recommended Posts

Hello, I've been working with C++ for a little while and decided that I should step back and work with an easier language first (some C++ stuff was going over my head) so I've decided to learn Python or maybe C#.
I'm mostly interested in creating 2D games, and I do some of my developing on Linux and I don't think XNA is muliplatform.
And as far as Python is concerned I'm trying to decide whether to go for pygame or pyglet. I heard that pygame is better for 2D games and has more built in game functions (joypad, sound, graphics, etc) while pyglet is better than pygame + pyopengl for 3D.
So I'm wondering what do you think is easier and would transition easier back into C++.

Share this post


Link to post
Share on other sites
Don't worry too much about transitioning. Very few languages offer a truly "easy" transition into C++, because C++ is a minefield of nastiness and quirks and such; there [i]will[/i] be a learning curve no matter what you do. Your best bet is to get comfortable with a higher-level language and get your fundamentals of programming shored up before worrying about it at all. I wouldn't necessarily see C++ as an inevitable outcome, either; it's totally feasible to write great games and never touch it.

Share this post


Link to post
Share on other sites
Ah, thanks for the information. Yeah my plan is to dive into one of the other languages before tackling C++. But, do you have any recommendations as far as pygame, pyglet and XNA are concerned?

Share this post


Link to post
Share on other sites
Python is a very fun and easy language to work with (I've worked with it some, more so with it's Japanese cousin, Ruby, however) and I feel that anyone can learn a lot of basic programming concepts from it. C++ is a very ugly language in general, like our previous informer just told us, nothing will really prepare you for it (However, the best approach would be Vanilla C (yum!) and Java skill, since you could technically say C++ is essentially a mix of the two). Pygame is SDL based, and SDL is very fun to work with; I'd say for 2D gaming, pygame is your best option by far. I have never heard of pyglet; however a quick consultation with the God of Google informs me that this wouldn't be what you should be messing with for 2D gaming.

Good luck, inform us of your decision based on the given information you have recieved.

Share this post


Link to post
Share on other sites
I've decided to go with pygame, I do like the thought of having an easy and fun language. And the fact the difficulty of getting XNA to be multiplatform is a bummer. One day I hope to finish up learning C++, but for now I would like some actual results. And, I know that games aren't always built using only one language, you wouldn't happen to know which parts of games could be easily and efficiently constructed with python and which are better left to C/C++/Java?
And you wouldn't happen to know of any good resources for pygame outside of the website?

Share this post


Link to post
Share on other sites
[quote name='Sx2Kirby' timestamp='1317767411' post='4869123']
I should step back and work with an easier language first
[/quote]

For the record, if you were right in front of me right now, I would smack you for making that comment. Well, unless of course you were like 6'5 and a UFC fighter.


This mindset and bullshit machismo needs to die, yesterday. "Suffering for your art" doesn't exist in the programming world, and [i]easier [/i]languages should most of the time be said as [i]better.[/i]

If I had your mindset still from the time I started programming, I would still be writing assembly code and being looked down on by people that coded using punch cards.

Use what works and what you understand. Just because it's difficult doesn't mean its better. C++ has it's merits, but to 99% of programmers, even game programmers, it isn't worth the cost it incurs.

Share this post


Link to post
Share on other sites
[quote name='Serapth' timestamp='1317777478' post='4869174']
[quote name='Sx2Kirby' timestamp='1317767411' post='4869123']
I should step back and work with an easier language first
[/quote]

For the record, if you were right in front of me right now, I would smack you for making that comment. Well, unless of course you were like 6'5 and a UFC fighter.


This mindset and bullshit machismo needs to die, yesterday. "Suffering for your art" doesn't exist in the programming world, and [i]easier [/i]languages should most of the time be said as [i]better.[/i]

If I had your mindset still from the time I started programming, I would still be writing assembly code and being looked down on by people that coded using punch cards.

Use what works and what you understand. Just because it's difficult doesn't mean its better. C++ has it's merits, but to 99% of programmers, even game programmers, it isn't worth the cost it incurs.


[/quote]

Alright, I'll keep that in mind, and no I'm not 6'5" nor a UFC fighter, ha ha.
But what I mean is that there is a benefit to C++, it's just I realized I didn't care because I realized how much work I was putting in, and it's not like I want to make Crysis 3. So, I guess sorry for using "easier" instead of "better."

And also, does Code::Blocks really not support python, cause that would suck.

Share this post


Link to post
Share on other sites
[quote name='Sx2Kirby' timestamp='1317777858' post='4869175']
But what I mean is that there is a benefit to C++, it's just I realized I didn't care because I realized how much work I was putting in, and it's not like I want to make Crysis 3. So, I guess sorry for using "easier" instead of "better."
[/quote]

There is no benefit to C++ if it doesn't benefit you. The fastest and best lesson you can learn as you become a programmer is to look at languages as tools. If you have an aptitude towards certain tools, use them.

If I was to say to you that using a Acme hammer over a generic hammer would cause you to be a better carpenter, would you believe me? If so, wanna buy some swamp land?


As to Python IDEs, check out [url="http://www.activestate.com/activepython/downloads"]ActiveState[/url]. Frankly, it's more beginner friendly that CodeBlocks.

Share this post


Link to post
Share on other sites
[quote name='Serapth' timestamp='1317779063' post='4869180']
[quote name='Sx2Kirby' timestamp='1317777858' post='4869175']
But what I mean is that there is a benefit to C++, it's just I realized I didn't care because I realized how much work I was putting in, and it's not like I want to make Crysis 3. So, I guess sorry for using "easier" instead of "better."
[/quote]

There is no benefit to C++ if it doesn't benefit you. The fastest and best lesson you can learn as you become a programmer is to look at languages as tools. If you have an aptitude towards certain tools, use them.

If I was to say to you that using a Acme hammer over a generic hammer would cause you to be a better carpenter, would you believe me? If so, wanna buy some swamp land?


As to Python IDEs, check out [url="http://www.activestate.com/activepython/downloads"]ActiveState[/url]. Frankly, it's more beginner friendly that CodeBlocks.
[/quote]

Ah, I thought C++ had some speed/performance benefit or [i]something[/i] to make it worth the large learning curve.
Thanks for all the tips, but you're an instigator, ha ha. And also, thanks for the IDE.

Share this post


Link to post
Share on other sites
[quote]
Ah, I thought C++ had some speed/performance benefit or something to make it worth the large learning curve.
[/quote]
It [i]can[/i] have. It takes effort and experience though, it certainly does not come for free. [url="http://www.gamedev.net/topic/567483-c-vs-c-in-chinese-english-dictionary-test/"]Here is an example[/url] (the linked articles being the very relevant, not necessarily the thread itself).

Share this post


Link to post
Share on other sites
[quote name='Sx2Kirby' timestamp='1317777858' post='4869175']
[quote name='Serapth' timestamp='1317777478' post='4869174']
[quote name='Sx2Kirby' timestamp='1317767411' post='4869123']
I should step back and work with an easier language first
[/quote]

For the record, if you were right in front of me right now, I would smack you for making that comment. Well, unless of course you were like 6'5 and a UFC fighter.


This mindset and bullshit machismo needs to die, yesterday. "Suffering for your art" doesn't exist in the programming world, and [i]easier [/i]languages should most of the time be said as [i]better.[/i]

If I had your mindset still from the time I started programming, I would still be writing assembly code and being looked down on by people that coded using punch cards.

Use what works and what you understand. Just because it's difficult doesn't mean its better. C++ has it's merits, but to 99% of programmers, even game programmers, it isn't worth the cost it incurs.


[/quote]

Alright, I'll keep that in mind, and no I'm not 6'5" nor a UFC fighter, ha ha.
But what I mean is that there is a benefit to C++, it's just I realized I didn't care because I realized how much work I was putting in, and it's not like I want to make Crysis 3. So, I guess sorry for using "easier" instead of "better."

And also, does Code::Blocks really not support python, cause that would suck.
[/quote]

Python is a good choice. Its also a nice addition to C++ if you want to learn that later.
The best python editors I have found (and I have been searching for years) is Visual Studio and Spyder.

[url="http://pytools.codeplex.com/"]Python tool for Visual Studio[/url] (Works with Visual Studio 2010 Integrated Shell, which is free)
[url="http://code.google.com/p/spyderlib/"]Spyder[/url] (Works on the linux platform too)


They both have auto completion that works very well, and more importantly, they both have integrated debuggers that works great

edit:
I said editor... I should have said IDE of course.
The best editor would be Vim...

Share this post


Link to post
Share on other sites
[quote name='rip-off' timestamp='1317808684' post='4869331']
[quote]
Ah, I thought C++ had some speed/performance benefit or something to make it worth the large learning curve.
[/quote]
It [i]can[/i] have. It takes effort and experience
[/quote]

... as well as a problem where any such benefit would actually matter.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this