R0J0hound's Recent Forum Activity

  • Sure, go ahead.

  • Wouldn't an inverted "is touching inventory_menu" work as a replacement for that condition? The idea of the event is to stop dragging if the first click is just on the invisible part of the scroll_pane. You could just remove the event if worse comes to worst.

  • Lerp isn't actually for easing, it's for getting a position between two points. But I get what you're saying and my guess is you're using keep in an event like this.

    Every tick

    ---Sprite: set x to lerp(self.x, 100, 0.5)

    Which gives the effect of moving fast to slow. What it's doing is just moving half the distance per frame.

    You'll need to add a variable for a reverse effect.

    To start it set the variable to say o.

    Set speed to 0

    Then every tick set a new x and increase the speed

    Every tick

    --- set x to min(self.x + speed, 100)

    --- add 1 to speed

    The min() is to keep from overshooting. Also note this only works for a positive direction. For a negative direction do this:

    Every tick

    --- set x to max(self.x - speed, -100)

    --- subtract 1 from speed

    Also you can fix it up to use dt so it behaves the same regardless of the framerate.

  • Arima

    That does sound like something is broken with it. I'll try to get it working in a day or so.

  • Here's a further extension of the capx that does a 3d platformer like the op.

    It's rather cluttered but here's an incomplete list of what was done:

    z-sorting, shading, improved obj loader, multiple object loading, transformations on individual objects.

    https://www.dropbox.com/s/nwuqaz6xm9gjp ... .capx?dl=1

    /examples21/paster_3d_2.capx

    jayderyu

    With c2's renderer quads are drawn with affine transformations so I can't do perspective correct texture mapping, or at least not easy. One way to reduce it is use more smaller polygons.

  • The reason is arbitrary. You could use a sprite if you like.

    Edit: Tiledbackground doesn't have per-pixel collisions, it only has bounding box collisions so it should be a bit faster for collision checking. Of course you could set the sprite to use bounding box instead of per-pixel at which point there would be no difference.

  • [quote:1run7x68]Nope. niether paster nor canvas would be able to do the pseudo 3d shown by the OP

    Bold words.

    Anyway here's a wip using the Paster plugin like newt mentioned.

    /examples21/paster_3d.capx

    https://www.dropbox.com/s/1c4t63wvly3s2 ... .capx?dl=1

    It is able to do rotated cubes like the op's coin block. Notice however the distortion of the textures, we are just distorting in 2d so there is no perspective correction that you get when using true 3d.

    This is pretty much just a proof of concept and is lacking many things to make it useable for a 3d platformer.

    The main thing missing is polygon z sorting. This will be needed when you have multiple cubes or have sprites moving around them. Without this polygons will be drawn in the incorrect order.

  • Well, looking at the manual for the audio object:

    https://www.scirra.com/manual/109/audio

    It would appear that the Analyser effect could be used in the audio expressions. A search for "Analyser" didn't give too many results but almost all were relevant. One mentions that C2 comes bundled with an example in it's install directory which appears useful.

    1. Looks like it can with the audio object.

    2. Perhaps.

    3. "Audio analyser.capx" in the Contruct 2's examples folder is a good start.

  • Sure, but you'll still need to connect by the id of each person you want to connect to. It get's a bit more problematic for more than one other person to. A server is still needed for something like a lobby so a list of other people can be retrieved and connected to automatically.

  • It helps to visualize if you draw a picture or move the scroll_pane around in the editor. Clamp is used to limit how high and low the scroll_pane goes. Basically we're doing this: "set y to clamp(self.y, low_y, high_y)". To find the low_y move the scroll_pane as far up as possible so the frame object covers the last bottom portion. Where the y position of the scroll_pane in relation to the frame. It's the scroll_pane's height above the bottom of the frame or "frame.BBoxBottom-scroll_pane.Height". Next to find the high_y move the scroll_pane as far down as possible so the frame object covers the topmost portion. Notice that the top's of both objects are the same so high_y is "frame.BBoxTop". Now if the hotspot of the frame is topleft it also is valid to use frame.Y instead of frame.BBoxTop.

    Generally you want the scroll_pane at least as big as the frame. Also you could also use two events to compare scroll_pane's y position instead of using clamp for the same effect.

  • Doc Ai

    The Construct 2 (C2) behavior "Scroll to" is the same as Construct Classic's (CC) "center view on me" attribute. Click on an object and browse the property panel on the left to find attributes. Also "Solid" is an attribute in CC.

    "Bound to layout" is new for C2 but the simplest way to do it in CC is to put a tiledBackground object with the solid behavior just outside the whole edge of the layout.

    Also with a C2 licence you can export to exe with node webkit. It's one of the export options.

    nyway,does C2 have everything CC has?

    No, they are very similar but they both have features that the other doesn't have.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • TwinTails

    Close, vx and vy are the horizontal and vertical velocities and ax and ay are the horizontal and vertical accelerations. Also g is the acceleration for gravity. In event 10 the acceleration is used to change the velocity and the velocity is used to change the position. Of course the player only actually is moved up and down and the terrain is changed by the horizontal position.

    When the player is in the air ax is 0 and ay is g. But when the player is on the ground the acceleration's direction is changed to be along the slope.

    Here is the math behind the slope acceleration:

    http://www.physicsclassroom.com/class/vectors/u3l3e.cfm

    Increasing the acceleration would be one possible way to boost the player. Adding a event like this to the end of the event sheet will multiply the acceleration by 10 while spacebar is down.

    Key spacebar is down:

    --- player: set ax to self.ax*10

    --- player: set ay to self.ay*10

R0J0hound's avatar

R0J0hound

Member since 15 Jun, 2009

Twitter
R0J0hound has 157 followers

Connect with R0J0hound