[phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 1582: number_format() expects parameter 1 to be double, string given
Do you use Python in Construct? - Scirra Forums

Do you use Python in Construct?

New releases and general discussions.

Post » Sat Jan 02, 2010 11:32 pm

I probably should do some more testing before I declare that Construct supports external libraries. :)

The correct statement right now is that Construct supports running external libraries from .caps, which really doesn't mean much. I also did get it working with an .exe as well, but it is just on my development machine with Python and the Python module/library preinstalled. I also got an error message popup when executing the .exe so it is buggy, but still works.

[quote="Madster":1on3dbrf]Does one have to copy the python libraries along with the .exe for end-users?[/quote:1on3dbrf]

I unfortunately don't have my system with Virtual Machines to test this with. Here is what I believe you would have to do to make this work as it is right now:

1. Install Python 2.6.4 on end users system
2. Install Python library on end users system (this may be an install or copy depending on library)
3. Run the exe

This is obviously not practical if you have to install the entire 14mb Python on end users system, but right now there is no python26.dll being copied along with the exported .exe. That leads me to believe that without Python preinstalled the .exe wont work. We need something like the py2exe program for construct. I'll do some more testing tomorrow and let you know what I find out.
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Post » Sun Jan 03, 2010 2:02 am

Ok, I finished testing a couple of external libraries with Construct. Cool thing is Construct and Construct games work fine in Vmware 7 workstation w/ 3d accleration enabled so that has been nice for testing.

Pretty much what I found is that you have to install Python 2.6.4 to get external libraries to work (at least without more work). I tried copying over the python26.dll file but still got lots of errors for missing dependencies. I also copied over a large number of .pyc files to try to cover the dependencies, but was not able to do it. I still believe there is a way since Py2exe does it.

However, until that type of support is added you have to bundle Python and the Python libraries with your .exe. Also there is an error message I get when the .exe first runs:



It still is pretty cool though the possibilities this opens up once it is working better.
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Post » Mon Jan 04, 2010 3:12 am

[url:2mavot44]http://www.tarind.com/depgraph.html[/url:2mavot44]

That might help find dependencies. Still, Python tends to go very deep. I guess you'd have to copy a LOT of files.
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Mon Jan 04, 2010 3:55 pm

I have tried using Python on a few occations and became frustrated because my knowledge of the language is almost nil but I believe that scripting is an asset in many circumstances...its just the learning curve that turns me off.

As for Construct in general and Python specifically...a true help manual of basic use and technique
would be a great help to the average low-level user. Im talking about a self-contained in-program help system not relying on internet access or even tutorials...just a straight up help .pdf file would be appreciated.

Perhaps there already is one but I havent seen it. Everything Ive learned has been primarily from trial and error experimentation ... which has its own benefits but documentation should really be a top priority. Python can be learned from reading available reading material but reading material on construct seems to be piece-meal...hit and miss...where is the manual??? If you make a feature write it up in a .pdf file and add it to the manual and send the manual with the download...some people dont love to spend loads of time online searching for answers from other users.

Just my thoughts...the Construct program with it's Python scripting is so powerful an idea but power is put to its greatest use with the knowledge of how to impliment that power...this I believe is where Construct falls short...maybe Im just ignorant of existing resources but please someone put out an in depth manual without the need to search posts and tutorials...I like one-stop-shopping.

Not having to drive all over the plpace to find one tid-bit after another..Anyway :wink:
B
2
S
1
Reputation: 400

Post » Thu Jan 14, 2010 2:36 pm

I dont use Python, but that is because I dont yet know how to use it. It is certainly true one of constructs features is that you dont need to use a scripting language to create a game. But to add my two pence worth, eventually only one open source game creater will be mainly used. And I think the piece of software that will prevail will be the one that offers three important things. Firstly, the ease at which you can get into the program. How many good open source programs are there out there (and I dont just mean game creating ones) that are probably good packages, but people dont use them because the learning curve is so steep, and it is not worth the time you invest into learning it when you can learn something else easier. Secondly, the program has to have a strong community behind it. If you have a question, its nice that you can toss a question into a forum and someone will answer it. Thirdly, some people will be more likely to use something if what they have to learn can be applied to something else. One of the considerations I had when I started to look at construct was that it would take Python code. Why was that so important? Well eventually (when I have the time) I would like to learn how to make a 3D game in Blender. Like construct you can make a game without using Python, but the fact that you can use a programming language that seems to be on its way up, will surely attract people who can program in python to look at (and maybe use the software). This can only be good for construct (and blender). So is python essential for construct? No, I dont think it is essential, but anything that expands the base of people using the software is a very big plus in my opinion.
B
4
G
3
Posts: 25
Reputation: 975

Post » Thu Jan 14, 2010 3:35 pm

[quote="scidave":2tc01hwa]
Pretty much what I found is that you have to install Python 2.6.4 to get external libraries to work (at least without more work). I tried copying over the python26.dll file but still got lots of errors for missing dependencies. [/quote:2tc01hwa]

does this mean it works on machines without python installed if you dont have external libraries...iwasnt sure if that worked or not...and if so, oes it still get the weird error?
Spriter Dev
B
88
S
21
G
12
Posts: 3,240
Reputation: 16,486

Post » Thu Jan 14, 2010 4:55 pm

[quote="lucid":31hkmji1][quote="scidave":31hkmji1]
Pretty much what I found is that you have to install Python 2.6.4 to get external libraries to work (at least without more work). I tried copying over the python26.dll file but still got lots of errors for missing dependencies. [/quote:31hkmji1]

does this mean it works on machines without python installed if you dont have external libraries...iwasnt sure if that worked or not...and if so, oes it still get the weird error?[/quote:31hkmji1]

I thought we tried this the other day in chat and had no luck getting it to work?
B
3
S
2
G
3
Posts: 628
Reputation: 2,531

Post » Thu Jan 14, 2010 6:08 pm

that cap was using pygame library
i guess i shoulda tried it with a reglar no extra library python cap, too
but alas...'tis too late
Spriter Dev
B
88
S
21
G
12
Posts: 3,240
Reputation: 16,486

Post » Thu Jan 14, 2010 7:08 pm

[quote="lucid":3nwdt49n]that cap was using pygame library
i guess i shoulda tried it with a reglar no extra library python cap, too
but alas...'tis too late[/quote:3nwdt49n]

Well if you can catch me while I'm awake in chat, we can always try again, since I've still not (and likely never will) install python.
B
3
S
2
G
3
Posts: 628
Reputation: 2,531

Post » Sat Jan 16, 2010 3:10 pm

[quote="lucid":gm0rea0k][quote="scidave":gm0rea0k]
Pretty much what I found is that you have to install Python 2.6.4 to get external libraries to work (at least without more work). I tried copying over the python26.dll file but still got lots of errors for missing dependencies. [/quote:gm0rea0k]

does this mean it works on machines without python installed if you dont have external libraries...iwasnt sure if that worked or not...and if so, oes it still get the weird error?[/quote:gm0rea0k]

Yes, that is correct. If you don't have external libraries then it works. [u:gm0rea0k]However, I am still getting the weird error message.[/u:gm0rea0k] I also still had to copy over a bunch of .pyc files to cover dependencies. However, I bundled all of these up so if someone wants to try what I did then it will be easier.

Here is a Hello World example w/ the required Python26.dll and the dependencies. You can either unpack into the same directory or unpack into a C:\Python26\dict directory.

http://www.box.net/shared/eghvdkxm10

I believe there will always be errors and issues until the support is added into Construct to have this all handled during "Build the exe time". That is when the input/export table is constructed and when links to libraries are set. It will probably always be buggy if we try to do this after the fact.
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

PreviousNext

Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 2 guests