R0J0hound's Recent Forum Activity

  • You could use two sine behaviors with one setting the "period offset" to a quarter of the period.

  • Here is an effect that puts a colored outline around a sprite. I does it by offsetting silhouettes of the sprite in eight directions so it can look a bit weird with large line widths.

    https://www.dropbox.com/s/dkg43r4xwzkvr ... e.zip?dl=0

    Feel free to modify.

  • Relevant examples:

    http://www.scirra.com/forum/destruction-of-ground_topic55414_post345920.html?KW=worms#345920

    http://www.scirra.com/forum/how-do-i-simple-worms-game_topic47872_post300449.html#300449

    The per pixel collision detection is what takes most of the events in the examples, but it's pretty simple. The canvas object is used to get the opacity of pixels and for drawing a visualization of the terrain.

  • Can you make it so the window size is smaller (my max is 1280x900), or move the text objects to the top/left of the layout so they can be read.

    Anyhoo, I changed the window size to 800x600 and all I can read is the "Max Sprite Particles" text. It seems to run fine until it reaches about 1600 and after that the window is not very responsive until it reads about 1700 at which point it crashes to the desktop.

    2nd run crashes at about 1200.

    3rd at about 1266.

    4th at about 1300.

    1. It crashes every time, but you can rule out window size as a cause since it crashes with a smaller window too.

    2. My specs:

    cpu:1.5 ghz intel celron m

    gpu:Mobile Intel(R) 915GM

    3. I couldn't read to fps text (I'll try to move it into view if it's needed).

    Can you give me more of an idea of what the test does? One bug that causes a crash with the physics behavior that has to be worked around is you can only create a certain number (255) of physics objects per tick. It's an arbitrary limit built into the box2d library. If you create any more than 255 physics objects per tick your game will crash to the desktop, so you have to come up with a way to spread the creation over multiple ticks.

    -Happy bug hunting.

  • I've tried the physics approach before using a physics rope as a base. I didn't quite get it to have the feel of a cape. I probably didn't tweak it enough though. If you lower the density of the pieces of rope and reduce the gravity it can look close to what you want.

    The only thing that's lacking is for it to catch wind. If the cape were in a complete vacuum it would probably act just like the rope. To do air resistance it might be enough to apply a force 100*sin(anglediff(link angle, angle of motion)) perpendicular to each piece of rope. I haven't tested that but it should simulate more resistance when the rope moves perpendicular to it's angle, and allow free motion when moving the same direction as it's angle.

    This is all a rough idea but hopefully give you some starting points of how to tackle it.

  • Use the canvas object, it has a property "grab layout" that if set to "before drawing" takes whatever was drawn under it. You can then apply effects to that area.

  • Keepee beat me to it but here is another way to do it

    http://dl.dropbox.com/u/5426011/examples15/answers_from_a_set.capx

  • You won't see the bundled python files since they are embedded into the exe. I did a further test and this is a list of all the python libs you need to check when you export:

    __future__.pyc

    _abcoll.pyc

    abc.pyc

    copy_reg.pyc

    genericpath.pyc

    linecache.pyc

    ntpath.pyc

    os.pyc

    random.pyc

    stat.pyc

    StringIO.pyc

    types.pyc

    UserDict.pyc

    warnings.pyc

    I found this by running this script at the start of the layout:

    sys.path=sys.path[-2:-1]
    import random

    Then exporting to an exe, running the exe, and if it can't find a lib re-export with that lib included and repeat.

    Once you get it working you can remove the line with sys.path.

    Here is another way of finding out what files need to be included:

    http://www.scirra.com/forum/python-external-libraries-w-ai-speech_topic39525.html

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • From the manual:

    https://www.scirra.com/manual/78/expressions

    he expression Self can be used as a short-cut to refer to the current object. For example, in an action for the Player object, Self.X refers to Player.X.

  • This works if there is only one object type in a family:

    For each 3DSprite

    for each Sprite

    do comparison...

    In this case 3DSprite and Sprite allow for two separate picked instance of sprite.

  • You could perhaps use this formula:

    speed * time = distance

    but solve for time:

    time = distance/speed

    distance is 100 since you create the tiledBgs with an x of -100

    so you get this:

    100/40 = 2.5

    100/50 = 2

    100/60 = 1.666

    The last number you had is closer to 50/60 = 0.8333 which also works since the tiledBg texture is 50 pixels wide, you just end up with more overlap.

    You can get the same effect without the warmup time by just positioning the tiledBg's in you layout and setting their speed. Then replace all your events with one every tick event:

    Every tick

    set x to self.x%50-50

    Change the 50s to whatever the texture width is.