scidave's Recent Forum Activity

  • I update the link to the correct .cap. I must be doing something really stupid because I tried the system events. Of course, this .cap has a bunch of other changes where I started fiddling with other settings, but it didn't work even before I tried adjusting extra random stuff.

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

  • I don't know what is going on here, but I can't get it to work either! It seems so simple but I can't get anything to scroll or zoom. Must be doing something really stupid or .99.72 broke this.

    Here is the .cap I have been messing with:

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

    I updated the above link...

  • Yeah this game is awesome. Probably the best production quality I've seen yet here. I suck at the game too. I don't know how long the game lasts, but I die within the first minute every time!

  • 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:

    <img src="http://i47.tinypic.com/2dtd7kn.jpg">

    It still is pretty cool though the possibilities this opens up once it is working better.

  • 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.

    Does one have to copy the python libraries along with the .exe for end-users?

    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.

  • Well Diaz pointed out to me that external libraries are working. I went back and tried my old example that was not working and figured out that I was making a stupid mistake. Construct was all along importing the library.

    So I am happy to say that Construct DOES support external libraries!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • diaz You are awesome!! That gave me enough motivation to try again to figure out why my example wasn't working. For whatever reason when I was instantiating a PyAiml object using k=aiml.kernel (), I was not getting any return value when printing it out. I normally get a return value when printing from a regular python program. So I went back and looked at my example and tried casting the output k as a string str(k). Sure enough that did the trick and now it is working.

    I kinda feel like an idiot thinking all along it was not working... but this just made my day!

    Edit: Just tried to build an .exe and I get an error message popup from your example and my code. Do you have the same problem?

  • This is pretty good work for a first game. The part that I found the most fun was changing characters and eating the food to make the ghost/white dude get bigger. You should play that part up more. With a little more work this could be much more exciting. I would add:

    • have the enemies hurt the player instead of restarting the level
    • make the enemies chase you
    • allow you to talk to more people
    • make it a requirement to switch to different characters more often
    • add more game content (the game world felt empty)
    • add a short back story

    I also quit on Phase 7. I avoided the weird yellow glow because I was afraid it would kill me (like the fire) or make me disappear. You might want to change that to just hurt the player. After dying from the dude at the bottom several times I tried walking around in the yellow glow but it didn't seem to help. I was lost at this point and couldn't figure out how to get past the level so I stopped.

    Looking forward to the next game!

  • First: thanks Lucid, Now I know how to access different instances of objects in python.

    Second: Madster, yes you can import python libraries just add an action like this:

    System: Run Script("import math")[/code:3chu1h2w]
    Then retrieve some function later like:
    [code:3chu1h2w]Text: Set text to Python("math.pi")[/code:3chu1h2w]
    
    
    

    Has anyone gotten external libraries to work with Construct? I have tried a couple times before with no luck. I'm talking about libraries that are not part of the built-in Python 2.6 libraries.

    Thanks Lucid for the fix... this is really nice work.

  • Fantastic information. It is much appreciated.. please keep it coming!!

  • I am in the same boat as many of the people here on Python. Hearing that it doesn't work isn't going to encourage too many people to use it. I'd love to use it and I think it adds tremendous capability if supported well.

    The other thing that I feel is misleading are those folks that say "Events can do everything that Python can do" or "it can do nearly everything Python can do". That isn't even close to the truth if Python was used to its full potential. A big reason to use Python that I see, is to support external libraries (not things like "import math"). For example, if you want AI for your game just re-use a python library. Or if you want an NPC to appear really intelligent use a Python library that uses advanced text processing. You can't compare these kinds of things to events. Of course, there are some things that you could use either Python or events for...

    So, I've tried using Python before, but since it doesn't have good (any??) support for external libraries I haven't put much time into it. Also discouraging is I can't get an answer from the devs on Python support for external libraries. How is someone supposed to use something that has little to no documentation and little to no support? Sorry if I sound harsh.. but it was frustrating trying to do stuff with Python and just shooting in the dark.

  • You need to make sure that all the members of the family have the RTS behavior.

    If they do then you should be able to do a Family[RTS].MovAngle .... and you will get what you want.

    You have to include the "[RTS]"

scidave's avatar

scidave

Member since 4 Jul, 2009

Twitter
scidave has 1 followers

Trophy Case

  • 15-Year Club
  • Email Verified

Progress

16/44
How to earn trophies