addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwchatcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobegmailgoogleimageimagesinstagramlinklocation-pinmagnifying-glassmailminusmoremuplabelShape 3 + Rectangle 1outlookpersonplusprice-ribbonImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruseryahoo

The Central Ohio Gamedev Group Message Board › Question on langauages

Question on langauages

A former member
Post #: 5
As I have said I have this project in my head. a first person type educational application.

I have been invited by a member of KDE's Educational Development Team to submit a proposal and I am trying my best to write the best one possible.

I started looking at C++ coding because it is well documented with plenty of tutorials and open source code. So I have some C++ code that performs as I desire.

Then it was suggested that I use Python. I have found some Python scripts which also fit my needs.

Is there a way to combine Python and C++ into a hybrid application?
Will I need to rewrite the C++ code into Python?

Of course keep in mind that when I say "I" I really mean the poor crazy fool who decides to help me in my Quixotic quest.

Again thanks for any advice,
Todd B.
Westerville, OH
Post #: 39
Is there a way to combine Python and C++ into a hybrid application?

Yes, there are ways to combine Python and C++, mostly by allowing C++ to load and execute Python scripts. Exactly how this is done is rather complex. Though there's likely some tutorials out there that will provide the necessary code.

Will I need to rewrite the C++ code into Python?

It depends. Without seeing the code, and without knowing more about what you're trying to do, there's not really any good single answer for this.

Sidenote: The likely reason that Python was mentioned to you is that C++, while well documented, is also incredibly complex, and is a language that is very easy to get confused by. Python, meanwhile, along with a few other higher level languages, simplifies a lot of things and allows for a new programmer to get a grasp on some of the basics of coding before learning some of the more complicated things that C++ introduces.
Alan M.
user 5794556
Galloway, OH
Post #: 26
Is there a way to combine Python and C++ into a hybrid application?
Yes, but bear in mind that it can work in both directions:
1. Program is mostly C/C++, but it executes Python scripts for some things
2. Program is mostly Python, but it calls some functions in a C/C++ DLL for some things.
Valentine B.
user 48357992
Delaware, OH
Post #: 1
I write games in pure Python, so if you have any questions about it, I'd be happy to answer them or at least point you in the right direction!
A former member
Post #: 7
OK Todd and Alan thank you for clearing the muddy water for me.

I apologize but I do feel I am having trouble expressing my thoughts in this format without creating a 10 page post.

As I have been researching this project I have found and obtained permission to use some C++ code that does part of what I want and some Python code that does what I want. So it pleases me that there may be a way to combine the two. Although if I get to the point where I can actually have an expert assist me they will most likely have the knowledge and skill to obtain the desired results without mixing the two languages.

Now for Valentine, why did I have to move from Delaware to Columbus? You and I could be having a coffee at Franco's place or the Mean Bean about now discussing the insanity I am immersed in. So be aware that I will have you in my sights come Saturday.

In the meantime thank all 3 of you and I will have be trying to explore the suggestions.
Powered by mvnForum

Our Sponsors

  • Unity 3D

    They help fund our bi-yearly Meetup organizer fees.

  • Multivarious Games

    Support venue space, food, supplies and other game-dev opportunities.

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy