R0J0hound's Forum Posts

  • joelmayer

    Updated it again to fix that error when loading into c3. Also I found the set color effect works different in c3 so I fixed that as well so it will work correct if run from c3 or c2.

  • They aren’t available. You can see the runtime portions of them with the browser console when previewing, but the edittime part is obfuscated with the rest of the editor.

  • Updated again:

    * fixed the coloring issue.

    * let you use "white" or "black" as a color in addition to "r,g,b".

    * added an option to change the background to be darker when using lighter colors.

    * now generates the "spacing data json" that C3 uses. So in c3 no events are needed to setup the spacing. joelmayer

    * some general event cleanups.

  • Here’s one example of a way to do it. It’s a bit old so it should be possible to do it in a cleaner way now.

    construct.net/en/forum/construct-3/your-construct-creations-9/example-mesh-distort-sphere-161470

    The gist is you make the meshes by bending distort meshes around. Worst case you use a sprite per face. So you’d have a list of vertex positions that you’d rotate by multiplying by a 3x3 rotation matrix or something like that.

    Other more recent examples of distort mesh 3D. But they are focusing on some other aspects.

    construct.net/en/forum/construct-3/your-construct-creations-9/3d-raycasting-obj-loader-test-167475

    construct.net/en/forum/construct-3/how-do-i-8/create-3d-dice-rotation-167723

  • totoe

    Unfortunately in the browser you can only check if a font is installed. You can’t get a list of all the installed fonts.

    Most online editors just have a list of fonts that they check to see are installed. Perhaps I could do something like that at some point.

  • joelmayer

    I need to look around at the asjson format at bit more. It’s no problem generating it, but I don’t need all the data such as position and size.

    Currently you still need to fiddle with the grid sizes and offsets so that all the characters fit in their own boxes. A future idea would be to automatically find those values for a best fit and smaller overall image size. A side effect is it would allow larger textures too without as many workarounds as I have now.

  • ashconstruct

    Download again. It now lets you change color.

    tarek2

    I added an option to remove the aliasing with an effect. Beyond that I’ll have to go beyond construct to have more rendering options. The text object will look blurry if you change the construct project setting from high quality to low quality. So I think construct renders text at a higher res and scales down.

  • Updated.

    * aliasing with threshold.

    * offset x and y instead of using the same value.

    * color

    * gui cleanup

    * gridlines to see if the characters fit in the bounds.

    * fix so characters are less likely to be clipped.

    * fix some math errors.

    Known bugs:

    FIXED: * color with threshold seems to be broken.

    * If the image size is bigger than 1024x512 things will break.

  • Here is a tool to help generate a Spritefont from any font:

    dropbox.com/s/zh299ngxv6lbfwq/spritefont_gen.capx

    Here is an example of using the generated spritefont:

    You setup the spritefont with the generated image, set the character width/height to the same as what you used in the tool, and finally use one event to set the individual character widths from the tool. Or in C3 you just set the spacing data.

    C2 example:

    dropbox.com/s/3iw0zrr0xh8skdi/spritefont_test.capx

    C3 examples:

    dropbox.com/s/3iw0zrr0xh8skdi/spritefont_test.capx

    dropbox.com/s/6xlkjo1blewshff/spritefont_test_arial.c3p

    known bugs:

    * You need to make sure all the letters fit onscreen or it will break.

    -cheers

  • That’s got me a few times. With array: for each x it doesn’t set loopindex, you have to use array.curX

  • You just have to use two numbers to represent a vector. And do math per component.

    So instead of something like c=a+b you’d do:

    cx=ax+bx

    cy=ay+cy

    And instead of normalize(a) it would be:

    mag=sqrt(ax*ax+ay*ay)

    ax = ax/mag

    ay = ay/mag

    And stuff like that. So you may need more variables to to temporarily store the steps of the calculations.

  • Sure, I have discord, reddog. I’ll probably delete this post after you message me though.

  • Ah, you must have edited your post, I thought you posted a link.

    You can think of the rope as a purely visual effect and just move the hook up and down by other means.

    Here's a stripped down version without the collision detection and other extras. It just puts a rope between two sprites with drag and drop. Also added line sprites between the points for added visual. I put settings variables at the top so you can adjust the distance between points, gravity, and fluid friction.

    dropbox.com/s/z8u9sper7u3b6ya/rope.capx

  • Alternatively to using the physics behavior you can do some event based physics. Gives endless things you can tweak to give better results at times.

    You can find more info about this method online by looking up "verlet rope physics".

    Anyways, this roughly follows that with additional tweaks.

    The collision detection was probably the most math. I kind of liked the effect of the chain pulling the player, but you can tweak the mass in event 2 to make the player less or more affected.

    dropbox.com/s/p9fdgbpk59dvc4h/verlet_4.capx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If the motion is done with behaviors the collision response when moving along walls has never been great. There hasn’t been much traction in getting it fixed either.

    Smoother wall sliding can be done with events. A fair amount of ideas here:

    construct.net/en/forum/construct-2/how-do-i-18/8-direction-behavior-slide-95148

    When you use two behaviors to move an object at once their velocities are combined. Probably the simplest solution would be to divide the speeds by sqrt(2) when you’re moving and moving sideways to counteract the speed up. Or you can cap the speed by measuring the speed with

    Speed= Distance(0,0, sprite.behavior1.velocityX+sprite.behavior2.velocityX, sprite.behavior1.velocityY+sprite.behavior2.velocityY)

    Then when that’s more than a maxSpeed you’d multiply the speeds of both behaviors by:

    MaxSpeed/speed.

    If a behavior doesn’t have velocityX/y the usually have speed and angleOfMotion. You can calculate xy velocity from that

    Vx=speed*cos(angle)

    Vy=speed*sin(angle)