Jump to content
  • Advertisement
Sign in to follow this  
newbie2015

Side scrolling infinite platformer game python or c++ ?

This topic is 686 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I need to know the pros and cons of using python or c++ for developing a builder for infinite side scroller / platformer game.

The reason i am asking this is because I read up a few blogs where it was mentioned c++ is better when it comes to rendering graphics whereas python is better when it comes to implementing the logic.

But what about procedural generation of terrain for infinite side scrolling games with all physics parameters incorporated. Does python suit better for that as compared to c++ ?

Are there some limitations when it comes to implementing physics with pygame?

Is it possible to build an engine on top of pygame in which we can define the parameters for every object and terrain and use the physics simulation already available in pygame?

In simple words is it possible to build something like gamesalad on top of pygame? or it is ideal to create that using c++.

Share this post


Link to post
Share on other sites
Advertisement

Python is an easier language to work with, across the board. Well-written C++ runs significantly faster than Python. Those are your 2 main concerns.

 

Neither is really 'better' at graphics, or logic, or procedural generation.

 

Pygame doesn't include a physics simulation system. There may be 3rd party ones available. Most of the physics engines are written in C or C++ and then they can often be used with Python as well. Box2D is one example.

 

The tooling side of Gamesalad is certainly something you could make in Python, but it would be a large undertaking to do so. But then it would be a large undertaking in C++ too. The features you need from your "builder" are even more important than the features you need in your game, when it comes to how complex this task would be.

Share this post


Link to post
Share on other sites

It really depends on your goals.

I'll describe which goals you'll achieve with each:

C++
- Good 3D graphics.

- Usage of low level api (More control- Harder to master/learn)

- Building big games.

- Be in the industry standards.

- You have time.

 

Python:

- Good for 2D.

- Fast development.

- Low on budget. (In case you want to sell the game). 

 

Other goals that are not mentinoed here are pretty much equal. 

Edited by WoopsASword

Share this post


Link to post
Share on other sites

The Biggest deference is speed.. You can have a prototype of your game written in python in an afternoon. C++ executes faster. python has a super extensive third party library collection which means most of the grunt work is already done. Also. pretty much all platforms have a python interpreter available, meaning, as long as you follow pythons conventions(using the Path class, etc) your program would run on win32, linux, and mac.

HOWEVER. python has a very long( comparatively speaking) execution time. if your game is even a little graphically intense, you will have a lot of frame rate issues. C++ on the other hand is super fast check out a project called irrlicht, it is a supper easy to use graphics engine, that is lightweight and fast. To answer your question directly about the side scroller, if its is 3D and you plan to add a lot of effects to make it look cool, stick with c++. but if is going to be really simple ( or simple 3D) python will have you up and running way faster. That may be very important if you are working by yourself.

 

help with panda3D(popular python graphics engine)https://www.panda3d.org/manual/index.php/Performance_Tuning

 

irrlicht project:

Edited by Yeah_Phantom

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!