Jump to content

  • Log In with Google      Sign In   
  • Create Account


Is it time to move on to c++?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 game of thought   Members   -  Reputation: 212

Like
0Likes
Like

Posted 14 March 2013 - 03:37 PM

Hello, i finished reading learn python the hard way by Zed Shaw 2 months ago and have made a rather complex text based game using the standard library(modding, save/load, morale).

From then i have learned some more stuff such as some very basic PyOpenGL(for some reason it will randomly freeze, Intel video card with toshiba bespoke drivers? Doesn't exactly sound like a match made in heaven, does it?)and the speed as well as the indentation is a bit annoying.And as a result of seeing some of the speed benefit(30x from one post) and the huge variety of libraries and the fact it is compiled(i found it very annoying having to distribute the game without the source). So i was wondering if it is worth it?Or do you feel i am not qualified for it?


Thank you for your time.

Sponsor:

#2 Bacterius   Crossbones+   -  Reputation: 8523

Like
2Likes
Like

Posted 14 March 2013 - 04:58 PM

What do you mean by "move on"? You don't "move on" to another language, you just learn it. And do you think raw C++ will be any easier?

 

Also, I doubt you'll get a 30x speed increase anyway. Or even close to 4x. The entire graphics pipeline is language-agnostic and those parts of the game logic which require some CPU power are generally compiled to C by Python for efficiency (even more so if you use stuff like scipy for arrays). Obviously it's going to suck if you are using text-based dictionaries to store tile cells...

 

Sure, you can give C++ a shot - it will only take you a week or two to get comfortable with the basic C++ syntax and libraries, and then you can try and write stuff with it and see if you find it easier, more comfortable/productive or simply enjoyable to you.

 

And PS: you can always distribute your sources along with the compiled executable, if you so desire.


The slowsort algorithm is a perfect illustration of the multiply and surrender paradigm, which is perhaps the single most important paradigm in the development of reluctant algorithms. The basic multiply and surrender strategy consists in replacing the problem at hand by two or more subproblems, each slightly simpler than the original, and continue multiplying subproblems and subsubproblems recursively in this fashion as long as possible. At some point the subproblems will all become so simple that their solution can no longer be postponed, and we will have to surrender. Experience shows that, in most cases, by the time this point is reached the total work will be substantially higher than what could have been wasted by a more direct approach.

 

- Pessimal Algorithms and Simplexity Analysis


#3 EddieV223   Members   -  Reputation: 1406

Like
0Likes
Like

Posted 14 March 2013 - 05:14 PM

Python is very slow and hogs memory.  Sure if you call a function that does lots of work like parsing a file, it turns it into c calls, but most of your code isn't like that.  It's meant to be a scripting language.

 

If you want to learn c++ then learn it, you should have a fairly easy time since you already can program in python, and you can even use python from within c++.

 

Grab yourself 2 books.  1 for a introduction/tutorial type book and the other should be a reference type book.  Also add to your browser favorites/bookmarks sites like

www.cppreference.com

www.cplusplus.com

www.msdn.com

 

Possible intro book

http://www.amazon.com/Beginning-C-Through-Game-Programming/dp/1435457420/ref=sr_1_3?s=books&ie=UTF8&qid=1363302867&sr=1-3&keywords=c%2B%2B+beginner

Possible c++11 reference book

http://www.amazon.com/Standard-Library-Tutorial-Reference-2nd/dp/0321623215/ref=sr_1_2?s=books&ie=UTF8&qid=1363302837&sr=1-2&keywords=c%2B%2B+reference


Edited by EddieV223, 14 March 2013 - 05:19 PM.

If this post or signature was helpful and/or constructive please give rep.

 

// C++ Video tutorials

http://www.youtube.com/watch?v=Wo60USYV9Ik

 

// Easy to learn 2D Game Library c++

SFML2.1 Download http://www.sfml-dev.org/download.php

SFML2.1 Tutorials http://www.sfml-dev.org/tutorials/2.1/

 

// SFML 2 book

http://www.amazon.com/gp/product/1849696845/ref=as_li_ss_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=1849696845&linkCode=as2&tag=gamer2creator-20

 


#4 superman3275   Crossbones+   -  Reputation: 2011

Like
1Likes
Like

Posted 16 March 2013 - 05:51 PM

EddieV, have you ever actually programmed in Python? How long?

I'm a game programmer and computer science ninja ph34r.png!

Here's my 2D RPG-Ish Platformer Programmed in Python + Pygame, with a Custom Level Editor and Rendering System!

 

Here's my Custom IDE / Debugger Programmed in Pure Python and Designed from the Ground Up for Programming Education!

Want to ask about Python, Flask, wxPython, Pygame, C++, HTML5, CSS3, Javascript, jQuery, C++, Vimscript, SFML 1.6 / 2.0, or anything else? Recruiting for a game development team and need a passionate programmer? Just want to talk about programming? Email me here:

hobohm.business@gmail.com

or Personal-Message me on here smile.png!


#5 wintertime   Members   -  Reputation: 1643

Like
0Likes
Like

Posted 17 March 2013 - 06:17 AM

There is a benchmark for you: http://www.azillionmonkeys.com/qed/CritLoops.html wink.png



#6 freeworld   Members   -  Reputation: 325

Like
0Likes
Like

Posted 17 March 2013 - 06:39 PM

No need to bash python.... op ask your self. Do I want to learn c++¿ if the answer is yes. Than by all means do so else.... well I think you catch my drift. Do what you want to do.

Also don't blame your hardware before you got proof.... you more than likely have a bug in your code causing it to freeze. Take time to fix it and learn from it.... things don't get easier just by jumpi g to another language.
[ dev journal ]
[ current projects' videos ]
[ Zolo Project ]
I'm not mean, I just like to get to the point.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS