About Store Forum Documentation Contact
Donations:
392$/mo



Post Reply 
Native Python Integration?
Author Message
baccenfutter Offline
Member

Post: #1
Native Python Integration?
Hi,

from searching the forum I understand that I should not be expecting EE to natively integrate any well-known scripting language. Instead it seems, I should only be expecting more proprietary and domain-specific solutions, if any (this was stated mostly regarding LUA integration posts).

If that is really the case that would be too bad, because the more domain-specific and proprietary components to a software, the steeper the learning-curve, if you ask me. It leads to more documentation, support and community-management efforts, than simply integrating a language that is already very well known, proven-to-work and in the end will probably cause less efforts compared to creating a completely new own language and reinvent the wheel.

Nevertheless, I think a native scripting language support would be very good for EE in terms of beginner-friendliness and I would really like to see it coming, this way or the other. I think, native scripting support would allow for faster rapid development and while massively reducing the required lines of code. Scripting would eradicate the entire problem of memory management and all its design facets, allowing the developer to concentrate on designing the game-play, rather than the code structure. Using a well-known scripting language would instantly turn anybody who has ever had contact with that well-known language to a possible EE developer, rather than forcing everyone to learn yet another scripting language, again.

I did search the internet and have found some very promising open-source projects. The most promising looking are:
- https://code.google.com/p/robin/
- http://www.riverbankcomputing.co.uk/software/sip/intro

Of course I could simply throw the EE header-files against Robin or SIP and then start writing EE in Python. However, EE would in no way understand how to bake my script code into the game. As far as I understand, that is nothing that I would be able to accomplish on my side, especially not being an open-source licensee. From my understanding, EE would have to implement according steps during pre-compilation process in order to bake Python script code as well as the Python interpreter itself into the resulting game.

Now I am a little bit lost... is there anything I can do at all or am I in a dead-end if I seek the possibility to write Python in EE?
08-06-2015 11:21 AM
Find all posts by this user Quote this message in a reply
Zervox Offline
Silver Supporter

Post: #2
RE: Native Python Integration?
EE doesn't really have a scripting language, what it has is a Compiler layer tied to Visual Studio or alternatives, what is actually compiled from EE's code editor is C++ files as you can see if you export your project from the Editor.

Having specific scripting language support for Python or Lua would actually turn me away from the engine, as it would no doubt become too bloated, and especially since it would make the obstacle of implementing another scripting language besides Python a bigger hassle and would make the Python scripted part bloat at that point.

An engine is not required to know what you do in script, it is for your script engine-script layer to tell the engine what it is doing.
There has been work done with EE in Lua through Luabind, and I've personally tested with not much hassle Lua,Squirrel and Angelscript, so I see no reason why it shouldn't be possible to integrate Python ontop of EE without having direct source access.
(This post was last modified: 08-06-2015 01:37 PM by Zervox.)
08-06-2015 01:33 PM
Find all posts by this user Quote this message in a reply
aceio76 Offline
Silver Supporter

Post: #3
RE: Native Python Integration?
I knew Zervox would be first in line to respond to this post smile

My response is "what is your purpose for the scripting language?" because if it's augment the native development, then I agree with Zervox's point. Greg has already done plenty to reduce the complexity of C++ but while still staying with C++! That's a big deal. There are many games, both on PC and console (XBox) that are completely developed on C++. But if your requirement for scripting is to be able to extend modding capabilities to your own product (game, etc), then you should know that there are already a few here that are doing that, albeit with a lot of effort since the engine wasn't necessarily designed to make that happen easily.
08-06-2015 01:44 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Zervox Offline
Silver Supporter

Post: #4
RE: Native Python Integration?
The greatest problem I've had is spending all that time to expose just what I would almost be guaranteed to need from EE in my scripts, its alot of typing, in some cases copy pasting, but exposing objects or similar is actually more about spending the time to actually write all the wraps around them.

the complexity of the object is actually a no issue, but the complexity of what you want that object to support in script is an completely separate matter as well. maybe you just want the script to alter it through reference, or maybe you want it to be able to construct and make new objects, possibly even extend a class that is in C++ through another proxy class in script which adds additional layer of the complexity, but this is actually irrelevant of the engine, it's about the time you want to spend to make a decent scripting layer between the engine and the scripts.

So as Allen said at the end, alot of time and effort. but then again, EE would have to spend that time and effort + even more time and effort if you want efficient and stable scripting support.
(This post was last modified: 08-06-2015 02:01 PM by Zervox.)
08-06-2015 02:00 PM
Find all posts by this user Quote this message in a reply
Pixel Perfect Offline
Member

Post: #5
RE: Native Python Integration?
I pretty much agree with the replies here! Esenthel is not proprietary in any way providing an industry standard C++ interface.

Any provision of scripting language support is best left to the community imo as there is unlikely to be any common consensus on the scripting language to integrate and, as such, it seems unreasonable to expect the engine developer to do so.

I personally use lua to write my AI by virtue of the AI engine l integrated but the debuging tools are poor and the language open to easily introduced errors in the hands of beginners. As Esenthel already provides a simplified C++ entry, making development faster, the only real advantage I see of a scripting language over the native language would be to provide modding support as Aceio76 mentioned.
08-06-2015 09:21 PM
Find all posts by this user Quote this message in a reply
Post Reply