Construct and Python

For questions about using Classic.

Post » Mon Feb 14, 2011 3:12 pm

Hello everyone,

I've just started using Construct and I'm interested in using script instead of the graphical user interface that Construct provides. But after searching around for a bit, I haven't found anything about only using script (like python) to create an entire game.

I know that with Game Maker you can create an entire game using only the Game Maker Language. Is it possible to do the same with Construct and Python? Or are there reasons why I wouldn't want to do that?

Thanks in advance,
Maarten
B
2
S
2
G
1
Posts: 109
Reputation: 1,068

Post » Mon Feb 14, 2011 3:21 pm

Well, I'm sure in the future it would be possible to integrate a scripting language as a plugin, since Construct 2 is being developed with extensibility in mind.
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Mon Feb 14, 2011 3:40 pm

After reading my opening post again, I think that it might be a little bit confusing.

I'm not looking for a custom built script like the game maker language. I'm just curious to see if there is a way to create a game in construct using python. (And not have to use the visual interface of Construct)
B
2
S
2
G
1
Posts: 109
Reputation: 1,068

Post » Mon Feb 14, 2011 5:34 pm

You can do most of your game with python, but you'll need to use events for stuff like triggers and all the system conditions. I'd say a full python game probably not feasible, but a hybrid approach, part events and part python, would work well.
B
79
S
24
G
54
Posts: 4,746
Reputation: 40,755

Post » Mon Feb 14, 2011 6:15 pm

Thanks for the info, that does sound pretty good. Do you happen to know any examples or tutorials on how other people use python in games like this?

I've searched for examples or tutorials, but didn't really find anything. If there are no examples, I'll just try some methods and see where that takes me.

Thanks!

edit: I found this, which looks really helpful (in case someone else finds my post in the future): viewtopic.php?f=3&t=7231
B
2
S
2
G
1
Posts: 109
Reputation: 1,068

Post » Wed Feb 16, 2011 2:53 am

Hi.. I'm surprised you haven't found a lot of examples.... There are all sorts of examples of Python used with Construct!

Pyshell
[url:1yc10apw]http://www.scirra.com/forum/viewtopic.php?f=3&t=8430&p=64211&hilit=PYTHON#p64211[/url:1yc10apw]

Ctypes and Drag and Drop
[url:1yc10apw]http://www.scirra.com/forum/viewtopic.php?f=3&t=8420&p=64158&hilit=PYTHON#p64158[/url:1yc10apw]

Exporting External Library
[url:1yc10apw]http://www.scirra.com/forum/viewtopic.php?f=3&t=8282&p=63344&hilit=PYTHON#p63344[/url:1yc10apw]

Accessing the SOL
[url:1yc10apw]http://www.scirra.com/forum/viewtopic.php?f=3&t=8260&p=63261&hilit=PYTHON#p63261[/url:1yc10apw]

JamesX Tutorial List
[url:1yc10apw]http://www.scirra.com/forum/viewtopic.php?f=8&t=8169&p=62644&hilit=PYTHON#p62644[/url:1yc10apw]

Online Multi-player Networking with Python
[url:1yc10apw]http://www.scirra.com/forum/viewtopic.php?f=8&t=6299[/url:1yc10apw]

The Wiki
[url:1yc10apw]http://sourceforge.net/apps/mediawiki/construct/index.php?title=Tutorials#Python_Library_Tutorials[/url:1yc10apw]

Taking Screenshots
[url:1yc10apw]http://www.scirra.com/forum/viewtopic.php?f=2&t=8028&p=62406&hilit=PYTHON#p62406[/url:1yc10apw]

Transparent Backgrounds
[url:1yc10apw]http://www.scirra.com/forum/viewtopic.php?f=3&t=7515&p=61340&hilit=python+transparent#p58425[/url:1yc10apw]

Executing a remote Python Script
[url:1yc10apw]http://www.scirra.com/forum/viewtopic.php?f=3&t=8099&p=62291&hilit=PYTHON#p62291[/url:1yc10apw]

Playing Videos with Python
[url:1yc10apw]http://www.scirra.com/forum/viewtopic.php?f=8&t=7823&p=61865&hilit=PYTHON#p61865[/url:1yc10apw]

Python Construct Guides/General Python Programming
[url:1yc10apw]http://www.scirra.com/forum/viewtopic.php?f=3&t=7993&p=61730&hilit=PYTHON#p61730[/url:1yc10apw]

That should be enough to get started.. :wink:
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Post » Wed Mar 02, 2011 2:42 pm

Thanks a lot scidave. I've been reading a lot about python and actually want to give it a go. But I have one more problem:

I don't know what to do with the python26.dll file. I've read that I have to copy it somewhere in this thread: viewtopic.php?f=3&t=6193
Bit I don't know where I have to copy it to..
B
2
S
2
G
1
Posts: 109
Reputation: 1,068

Post » Wed Mar 02, 2011 3:53 pm

Also, muur
I originally came from gamemaker and kept wanting to know about using scripting, because in game maker that's the only way to anything serious. Construct is not like that. Users have made everything from procedurally bone animated characters to 3d lighting and physics(neither is a built in feature) only using events, with no python. Quazi made a 3d game where you can use an in game editor to custom skin your character and save and load the skins. Definitely try eventing, it's much quicker(quicker to create stuff, it runs about the same speed) to use than python, and simpler, but unlike gamemaker and some other point and click gamemaking apps, its actually superpowerful. I think you'll be pleasantly surprised. If you want to give some examples of things you'd like to do, I and other users can tell you whether its worth it to script it.
And welcome to scirra
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Wed Mar 02, 2011 5:28 pm

Hey Lucid, yeah I know that scripting isn't necessary in Construct. When I started this topic I was comparing different game engines for my study. I've now chosen to work with Construct and have created some game mechanics already. So I know what I can do without scripting.

I've read a tutorial on how to create multiplayer games in construct with python though. And since I love multiplayer, I wanted to do some tests to see what the possibilities are and if I can use it or not. But because of the error, I can't really do any scripting.
B
2
S
2
G
1
Posts: 109
Reputation: 1,068

Post » Wed Mar 02, 2011 9:52 pm

[quote="Muurtegel":k9s7h98n]I don't know what to do with the python26.dll file. I've read that I have to copy it somewhere in this thread: viewtopic.php?f=3&t=6193
Bit I don't know where I have to copy it to..[/quote:k9s7h98n]

You should copy it into the same directory that your game .exe is in. What type of error are you getting? What version of Construct are you using?
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests