scidave's Recent Forum Activity

  • Does the "Is visible" work for multiple instances of a sprite. So say you have 100 instances of one sprite on the layout, but only 5 that are visible would that only put the 5 instances in the SOL?

  • I'll take a crack at answering your questions, although I'm not a big network programmer myself.

    Are there any examples of some MMORPGs using it

    • Eve uses Stackless Python.
    • The creator of PodSixnet is making an MMO that should support hundreds of players at one time.
    • OpenRTS is written in Python/Pygame

    And can you say for certain that using a python library for networking will work well with a fast paced online action game with construct, and there isn't any reason why it shouldn't be fine.

    It hasn't been done yet so nobody can say for certain, although I don't see any roadblocks assuming the following issues are addressed:

    • Access to Object private variables in Python
    • Access to behaviors from Python code

    While there are workarounds to the two above cases it will make for messy and inefficient code. You need to have access to behaviors in order to interpolate and predict properly. Until that is done, Construct/Python code will be limited to turn-based and slow action games over internet.

    MMORPG in a 2D sense would probably mean 6-18 characters in a room cooperating.

    This is already a given in Python. I'd venture to say even in PodSixNet you could do this for faster pace assuming that you also interpolated the players positions and perhaps added predictive code. I don't know how fast your characters will be moving so if things are happening insanely fast you might have issues w/ TCP. You wouldn't even need to do the GGPO type things you are talking about.

    There are different levels of netcode which handles various levels of lag. From simple to more complex:

    1. Basic TCP/UDP library. PodSixNet is an example of a basic TCP library. It performs what it needs to do quite well and integrates perfectly with Construct. However, by itself it is only practical with slower online or fast LAN games. You will start to notice the effects of lag over a 150ms latency (300ms round-trip).

    2. Interpolation: Even with a UDP library you can't escape lag. Interpolation is used to smooth the movement of the player from the prior position to the new position. This is usually done with tiny movements each frame until the player reaches the new position.

    3. ClientSide Prediction (Dead Reckoning): If there are large amounts of lag even interpolation will not be sufficient. In that case, the clients can predict where other objects will be by keeping a rolling average of the latency and using speed,direction characteristics to predict the actual position.

    4.Lock-Step: This is usually used in a peer to peer networking scheme where each client will take a fixed amount of latency in exchange for seemless play with other peers (of similar latency). Usually, everybody will have a latency of say 100ms and that allows for deterministic play between all of the peers.

    5. Roll-back: This is used in GGPO and in a bunch of FPS games as well. Sometimes a player will die on the server, but then an update comes from the client saying that he would have moved in time. The game is then rolled back on the server and all clients get updated information.

    I think roll-back will be a real pain to implement and I have no idea how it would fit in with Construct. I'll have to leave the timedelta issues and implementing it to the developers.

    I'd like to know if this isn't more suited to a C++ plugin or something else.

    I think we can all agree that a plugin is going to be more suited to networking than Python. If a plugin was written it could handle a lot of the synchronization for fast-paced games behind the scenes you might have to do with Python. That being said, PodSixNet integrates well with Construct so for its use case I would say it is well suited.

    So to summarize all of this:

    If you want to make turn-based, RTS, or slow action online games use PodSixNet. It integrates easily with Construct and is easy to understand and use.

    If you want to make fast-paced games then as of right now it is not practical (because of Python access to behaviors). Once the Python support is improved then it is probably up to the skill of the programmer, but you are in uncharted territory.

    Edit: Based on frpnit's work with UDP, the Mastermind library might be a good alternative as well.

  • Unfortunately, this is a somewhat tedious step.. but hopefully the next update to Construct will make this easier. Make sure you select the .pyc libraries when you are creating the executable.

    You must select all of the .pyc libraries (except the encodings directory entries.. don't check those) when you get to the portion in the export wizard on python settings.

    This should be in page 4 of the quickguide on creating the .exe. You probably have around 25 .pyc files that you need to check.

  • Awesome!! Way to go. You've helped me out as well identify how I can make the instructions better.

    Nice work!

  • 2. I installed GTK+ and added directory "C:\gtk\bin" to my system variables and named it "gtk"

    You need to add "C:\gtk\bin" to the "Path" system variable. Remove the "gtk" variable and add the directory to your path.

    <img src="http://i43.tinypic.com/256dwyb.jpg">

    For example, I installed mine to C:\opt\gtk\bin and this is how my path looks.

  • You should never have any problems running the code inside of Construct. The part with using cx_freeze and the library.zip is only when packaging for others.

    If it fails inside of Construct, that means that your pyGtk, or other library install is somehow wrong. Are you able to run this Python script from the command line?

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

    Does it correctly produce a screenshot? If it fails then go back and make sure you followed all the steps in the tutorial (especially the steps in page 3 about setting your system path).

  • Uh... isn't using python library solely for taking screenshots a bit excessive?

    Of course it is. but how else would you have him accomplish this? Write his own plugin in C++??

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sounds like you are close to getting the build to work. Here are the steps from where you are at.

    1. On page 3 of the Part 2 tutorial there is a Python script. You need to create a file called "test.py" and copy the import lines of the script into that file. Read the Python_quickguide if you have not already.

    The file should have the imports:

    import sys

    import pygtk

    import gtk

    2. Once you have the script, you need to build a cx_freeze build script called "setup.py" like below in the same directory as the script you just created. This is shown in the Python_quickguide.

    from cx_Freeze import setup, Executable

    setup(

    name = "screenshot",

    version = "0.1",

    description = "Basic screenshot example",

    executables = [Executable("test.py")])

    3. Once you have done that, open up a command prompt, cd to your directory and run the tool:

    "setup.py build"

    4. This step produces the library.zip file and all of the other dependencies that you see I copied with the executable. You unzip the library.zip file into your Construct\Data\Python directory. The other dependencies you bundle with your executable. You might also have to bundle the vcredistributable as I was explaining earlier.

    Give the quickguide a short review and hopefully this all works!

  • See my post before your. I just uploaded a new version with the vcredist and some new Dlls.

    Please remove Python26 and try the new version out first without installing the vcredist. If that doesn't work then try installing the redistributable. It is only 2mb so much better than installing Python.

    Ok, I duplicated your error message after I uninstalled Visual C++ on my XP system. I then installed the vcredist and that solved the error message.

    As far as releasing new instructions, that isn't necessary. Just follow everything in the tutorial and the only addition is to install the vcredist. If you don't want to install the vcredist then read the Part 1 tutorial where I discuss packaging your own msvcr90.dll and manifest file.

    Good luck!

  • oops, I forgot to include the Python26.dll. I have uploaded a new version with the Dll. Try this one out: http://www.box.net/shared/ip1ez68ggz

    I tried this on a clean XP Sp2 system, just built with no Python installed and everything worked good. Also tried it on a system with Python installed and it worked. However, there have been a few rare cases where people couldn't get them to work.

    If it still has an error, could you run the Microsoft vcredist executable I now have in the directory? If that still fails to solve it please tell me what the full exact error message is? Also, what operating system is your friend using (XP, vista, 7?) and what service pack?

    EDit: Just uploaded new version so redownload the one with the vcredist executable in it.

  • Here it is:

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

    Do the plugins all update when you install new updates?

    Good question. I don't know.

  • I can't get it to crash whether I disable the sound events or not. I am using .99.84.

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