Python support announced

New releases and general discussions.

Post » Thu Dec 13, 2007 6:20 pm

Hey everyone, we're planning on integrating Python scripting in to the IDE. This will allow you to either:
- Write entire games using Python scripting.
- Use normal event sheets as before, but include snippets of Python to perform complex loops, calculations or other areas difficult to express in events efficiently.

You can find out about Python here:
http://www.python.org/

We won't be forgetting about events - they're just as important as scripting. So we won't be leaving events behind and making Construct a script only tool, but we won't be making Construct an events only tool with scripting bolted on. We're going to make them work together and make both useful.

If you have any ideas on what you want to see in Python scripting, or what it should be able to do, get your ideas in here :) We should have it ready in a couple of builds, around 0.9, so have your say now :)
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Thu Dec 13, 2007 10:02 pm

Oh wow, this is so cool. I was thinking about learning Python a few weeks ago, and didn't start. Now I will! This is an incredible feature to add, and the best idea yet. I'll offer some suggestions as soon as I familiarize myself with the language.
B
2
S
1
G
5
Posts: 31
Reputation: 1,462

Post » Thu Dec 13, 2007 11:42 pm

Ashley, I cannot tell you how much I love you ;D

But seriously, this is great. More freedom, more flexibility. Thanks.

Btw, I began to study C++ thanks to Construct - 'cause some day I will contribute developing it too >:D. Bwah hah. Actually, I studied it long time ago, but didn't have much use for it, so I forgot pretty much everything :P. Now I have use, at last. I should just review the code and try to understand how it works. It'll be interesting christmas for me...
B
3
S
2
G
5
Posts: 263
Reputation: 2,201

Post » Fri Dec 14, 2007 4:02 am

I don't post here often, but I think this is an excellent idea. Python is a pretty easy language, personally only took me a few days to learn.

How about being able to write extensions in Python? It's a far simpler language than C++, which would make it easier for amateur developers to write extensions for Construct. Python has great interoperability with C++, so the Python SDK could be entirely based off the C++ SDK.
B
1
S
1
G
5
Posts: 8
Reputation: 1,391

Post » Fri Dec 14, 2007 8:39 am

I have two reactions to this announcement...

1) Yay! Scripting is great! :D

2) Nooooo! Not Python! Can I somehow convince you to switch to Ruby instead? It's much more beautiful to work with.

Great work anyway! :)
B
2
S
1
G
5
Posts: 50
Reputation: 1,500

Post » Fri Dec 14, 2007 9:07 am

Lua is a great little language too. Very lightweight.
Easy to add. Doesn't force the programmer to count the spaces and tabs. ;)
B
2
S
1
G
5
Posts: 50
Reputation: 1,500

Post » Fri Dec 14, 2007 2:49 pm

[quote="xinok":13xzun7w]How about being able to write extensions in Python? It's a far simpler language than C++, which would make it easier for amateur developers to write extensions for Construct. Python has great interoperability with C++, so the Python SDK could be entirely based off the C++ SDK.[/quote:13xzun7w]

I don't think writing extensions in Python is a good idea. That would effectively nullify the one of the major benefits of extensions in C++: C++ is fast. It's a compiled language. Python is interpreted language, so it doesn't perform any faster than Construct's events, which are, too, an interpreted language. Actually, I think that events might perform faster than Python, because they are very simple. But I don't know, it's about the optimisation of the interpreter, after all.
B
3
S
2
G
5
Posts: 263
Reputation: 2,201

Post » Sun Dec 16, 2007 5:01 pm

[quote="Drasa":lrv74ee9][quote="xinok":lrv74ee9]How about being able to write extensions in Python? It's a far simpler language than C++, which would make it easier for amateur developers to write extensions for Construct. Python has great interoperability with C++, so the Python SDK could be entirely based off the C++ SDK.[/quote:lrv74ee9]

I don't think writing extensions in Python is a good idea. That would effectively nullify the one of the major benefits of extensions in C++: C++ is fast. It's a compiled language. Python is interpreted language, so it doesn't perform any faster than Construct's events, which are, too, an interpreted language. Actually, I think that events might perform faster than Python, because they are very simple. But I don't know, it's about the optimisation of the interpreter, after all.[/quote:lrv74ee9]

Only for close loops; for many things you can bind to C++ for any function you'd want to impliment that's available in the C++ world to python but not available to Scirra by finding the python bindings and attaching it to the scirra plugin SDK wrapper for python. This is useful for people who don't like C++ but will tolerate easier-to-use languages like python and would only want limited extension creatibility... I guess it all depends on what sort of extensions you could create with inline python rather than importing it...


As for Ruby and Lua, please god no. Beauty in language? Are you guys smoking your CS majors? The whole idea about easy tools like Construct is that form follows function -- it does what it does and it does it good, effective, and easy. I should disclose my personal bias by saying that I'm a BASIC programmer and I don't give a crap about "beauty" in the classic programmer's sense -- verbosity makes it much easier for ANYONE to get into programming vs. something that looks like a math problem.

Edit: To not sound like a hypocrite I also request that Scirra's inline python editor provide auto-tabs
B
2
G
5
Posts: 34
Reputation: 1,318

Post » Sun Dec 16, 2007 5:18 pm

I think no matter what scripting language we pick, X people would say "OMG awesome!!" and Y people would say "no way not that one!!". We've investigated a few, and picked python for several reasons, one of which being it has got very good C/C++ integration which makes it very flexible for Construct.

Also for highly algorithmic stuff (tight loops with lots of variables), Python is almost certainly faster. In Construct if you add to a counter or global variable or whatever, you still have the overhead of jumping in to an action, whereas Python just knows to increment a variable and probably does this in a very optimised fashion. That's part of the use of having Python. There will also be bindings to call actions (and possibly conditions and expressions) from Python itself, but when you do this you still get the overhead of jumping in to an action.

As for SDKs, Python plugins etc. we have plans to significantly improve the modularity of coding with events, and python fits in to this rather neatly. We'll be announcing more stuff in future :)
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Sun Dec 16, 2007 6:53 pm

[quote="Ashley":fbbgk6ke]As for SDKs, Python plugins etc. we have plans to significantly improve the modularity of coding with events, and python fits in to this rather neatly. We'll be announcing more stuff in future :)[/quote:fbbgk6ke]

Yay. That's nice to hear :).
B
3
S
2
G
5
Posts: 263
Reputation: 2,201

Next

Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 2 guests