R0J0hound's Recent Forum Activity

  • Here is Animmaniac's method tweaked to work with any sized texture. Also fixed an issue with my first example where a seam would show up from the Image manipulator being 0 based and the canvas being 1 based.

    http://dl.dropbox.com/u/5426011/examples10/sphereTex3.cap

  • For sine interpolation:

    Lerp(0,IM.GetImageHeight, (1+Sin(LoopIndex("j")*180/IM.GetImageHeight))/2)

    But that still won't eliminate the distortion at the poles.

    Paul Brouke's method eliminates the pole distortion but causes seams because parts of the image are discarded.

    <img src="http://local.wasp.uwa.edu.au/~pbourke/texture_colour/texturemap/sketch.gif" border="0"> The area in that shape is the only part of the image that is preserved.

    The libnoise website it has some sphere textures that are distorted in a way similar to pbrouke's method but I think that it was generated special for spheres.

    http://libnoise.sourceforge.net/examples/textures/index.html

    Also the Photoshop method just blurs the texture near the poles, it would still have the pole distortion.

  • I thought this interesting enough to try out.

    http://dl.dropbox.com/u/5426011/examples10/sphereTex.cap

    The results look pretty bad...

    Either his method is flawed or another method is needed for texture mapping a sphere.

  • Resources are inside the exe. The Resource plugin extracts them from the exe to a temp file and creates a hashtable associating a name with the filename. Try "Set text to Resource("img1")" to see where the file was extracted to.

  • I don't see any actions to destroy joints...

    The only way to destroy a joint is to destroy one of the connected objects. If you save the object's position, angle and velocity to global or local variables before you destroy the object, you can recreate the object in the exact state it was before.

    ex:http://dl.dropbox.com/u/5426011/examples10/destroyJoint.capx

  • It's pretty simple. Use the action "extract resource" to assign a name to a resource, you would probably do this at the start of the layout.

    + System: Start of layout
    -> Resource: Extract Resource "brick.png" as "img1"
    -> Resource: Extract Resource "box.png" as "img2"

    Then you can load the resource with any action that loads from a filename.

    -> Sprite: Load frame from Resource ("img1")
    
  • You can copy the image of a Canvas to a Sprite with the ImageManipulator object. Specifically with the two actions "copy from sprite" and "copy to sprite". Even though it says sprite it will work for copying from a canvas.

  • I am curious why you are using the canvas plugin for the Lemmings example and not setting it up like a platformer? Is there any technical reason for this?

    It's a technical reason. Sprites use polygon collisions which are not changeable at runtime. Canvas' can set/get individual pixels so it can be used for per pixel collision and tunneling.

  • The resource filenames are not included when exporting.

    You can work around it with this plugin:

    http://www.scirra.com/forum/plugin-resource-access_topic39986.html

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This breaks a common use for Else.

    Opps, I forgot to think of that. And now that you mention it that is the main reason I used "else" in CC.

    In that case I agree with you that option A is the best option. It will work with System conditions and single instance objects exactly as expected. Any complexity added when using multiple instances of an object can be solved in the same manner as conditions such as "Sprite| X=Sprite2.X" when multiple instances of each are invoved.

    edit

    Logic only would also be ok. Case 2 would then be soved with a "for each Sprite", which is pretty common solution used for a situation like that.

  • My thought is Else should just be shorthand for all the conditions of the previous event inverted.

    Case 1 and 2 would work as expected.

    Case 3 would read like this:

    +-----------------------+
    |System| variable1 = 0  | -Do this
    |Sprite| X<320          |
    +--+--------------------+
       |
    +-----------------------+
    |System| variable1 != 0 | -Do that
    |Sprite| X>=320         |
    +--+--------------------+
       |

    Which may or may not be what is desired. If it isn't then sub-events can be used like Ashley pointed out.

    This is how it seemed to work in CC with the exception that the inverted selection was a bit wonky which made "else" only useful for simple events.

    So, option A, but explain it's behavior as all the conditions of the previous event inverted.

    My 2c.

  • I missed the fact that this was in the Construct Classic section.

    In CC here is a way to slice up an image into separate pieces:

    http://dl.dropbox.com/u/5426011/examples10/sliceCanvas.cap

    It doesn't remove the issue of making it work with physics. Physics uses polygon collisions not pixel collisions, so the links I posted are still relevant.

    To use physics the approach I would take is use some python working with pyBox2d or pymunk.