R0J0hound's Recent Forum Activity

  • I thought that last example capx I made was fixing it. It was for me at least. It bypasses how the textbox is positioned the next frame by instead positioning it directly.

    If that doesn’t work or it isn’t a usable solution then filing a bug report in the official way would be a good path to a solution.

  • Like I said above, it lags because they are positioned a frame behind. The reason is because the position is updated after the frame is drawn.

  • You can also set the strength of the motor. By default it will use up to an infinite force to make it turn. There’s an action to change the setting of a joint by tag. Use “” for the last created joint.

    I forget if there were other settings you could do for other joints. Guess you may need to refer to the chipmunk manual. This plugin is just a wrapper for the chipmunk library. There are things it can do that I’m not familiar with.

  • Instead of setting velocity have you tried adding a motor joint to yellow instead? Or maybe apply a torque if the angular velocity is too low.

    Physics engines don’t seem to like it when you set positions or velocities, but maybe Box2D can handle it better? My best guess why it’s different is the chipmunk library does things differently somehow.

    For best results the engine likes doing stuff with joints, forces and impulses.

  • Do you have your game working up to the point where you draw the lines and need to calculate the area? The solution is going to look different depending on the rest of your game.

    Here's my idea for such a game. There are other ways though.

    uce6ca908d56586ea0b927400cbf.dl.dropboxusercontent.com/cd/0/get/CiHl3kIR7fpp5H9U4E5Hhza0X5XU3qJF9we2CCKOl-qVKeR2JhGGjFhElFIGmpV_klJqi2UPqHPKaJi_phoU-Q31E9cMPaCQdUtma9EJaQQAvmyJqjyu7kw0jL7xYuJBHq0/file

    Basically after each turn I do flood fills to find enclosed or open areas. It doesn't come out looking too simple.

  • Here is a quick fix you can use in your project. Event 2 to be specific. Just put it after whatever scroll events you have.

    ucbaba32d9a2452d5564b1d2d0da.dl.dropboxusercontent.com/cd/0/get/Ch4uNvSGZ1SWVVzbNPGQreWxdIhJ8MDlQarrQqQYhu5Ym03euma1bQUOKpqfo6gnLDCGOPGX7q4IJ7bTmy91AP-bDCul6CIr-nqkVnalLSyv16T5bfwTlNuwopYr8b74Ytc/file

    I put red boxes under the textboxes as a visual test. With event 2 enabled you don't see the red boxes when scrolling. When disabled you see the issue you have.

    The only issue now is when the textboxes are half off the screen. That other capx should help with that but it's a problem for another day.

    cheers.

  • We can try to fix the bounce so it never ends up going horizontal. The original breakout only changed the angle the ball moved when it hit the paddle, otherwise the bounces were perfect.

    Here's a test of some ideas.

    uce3819dc9c11379b29220fa568e.dl.dropboxusercontent.com/cd/0/get/Ch7r9TDEo2QPnvqnQndTojhCmqbSeude_0C52LTK82cdP_1xlhUVRy4cFlfkAk2N9iWEPgcUgNkR8BhVEcrYOb7idM_m4sSSKJrnjwGJSH5sMEz0aj7FFmKFxiESAs4qklI/file

    It has three on collision events. Only one should be enabled at a time.

    The first is probably what you're already doing. It uses the bounce action and sometimes the ball starts going very horizontal if a corner is hit. The issue case.

    The second one tries to fix the bounce angle to be perfectly mirrored or flipped from before the collision. It works mostly but when a corner is hit the ball can start going in the opposite direction.

    The third takes it a step further. Instead of fixing the bounce it will calculate the bounce itself. To do that it first backs the ball up until it's no longer in the wall and then uses overlap at offset to check if it's next to a horizontal or vertical wall.

  • By inside do you mean the gravity is always away from the center of the planet?

    If that's the case you can just reverse the objects in your expression like this:

    angle(gravity.X,gravity.Y,Player.x,Player.Y)

  • Hello,

    Since I made the paster plugin here are the two ways to install it.

    1. Just drag the c2addon file onto the c2 editor. It should tell you it installed.

    2. Rename the c2addon to a zip file. You can then get from it those four files:

    Runtime.js

    Edittime.js

    Common.js

    Icon.ico

    There are other files in there as well to make it work as c2addon file, but they are not needed to make it work.

    Anyways just make a folder named “paster” in “c:\program files\construct 2\exporters\html5\plugins” and copy those four files over.

    Also as a side note if you install via dragging and dropping the c2addon file the files will be put in a folder elsewhere within the c:\users directory somewhere. Just in case you wanted to look at the source later.

    Anyways, that should get you running with it. If you have any issues or questions about it feel free to ask in the paster topic. It has it’s share of issues but is still useful imo.

    Cheers

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There’s the canvas recording with the “user media” plugin.

  • I meant since it’s c3 it’s more likely to get fixed.

    But a custom text input could be nice. It would give you more freedom to style it. Tedious, but gives more control.

    Btw here’s the capx I mentioned above. It was solving a different problem but may have useful bits.

    ucca4bd4a9abfb530ad1bce5e2b5.dl.dropboxusercontent.com/cd/0/get/Ch5o7v9oiUsTgXBHHrtBZ6GWQXqxqMvXhStmEiRWKJpEEh2xsqYkF9QFkP7RrVzCAQU8fLNx7Ygq6DJ1eWAf3asqDdmbHBuHoCnyEP6bBu4NNRBcRIbMuziSZBfopSjBA5I/file

    I was going to rant about construct quirks/bugs and website issues but eh. I’m just a casual user. Maybe they could hire a dedicated bug tester instead of just users that encounter bugs and go through the effort to report them.

  • It looks like it’s lagging a frame behind to me.

    As I recall, the order things run in construct is basically:

    1. Update plugins

    2. Run event sheet

    3. Draw

    4. Repeat

    The edit box’s position is probably updated in 1, so if you set the scroll position at all in events then it will take till the next frame to update the editbox’s position, hence the lag.

    Probably would make a nice bug report if you want to go that route.

    For a more immediate solution you can position the editboxes manually with events. I don’t mean the set position action though. I’m pretty sure that still won’t update the physical position till the next frame.

    Anyways you can try using some css to position it since there’s an action to apply some css to the object. I don’t know offhand which css to use but you should be able to find a list of them perhaps. Positions will be relative to the page instead of the layout so you’ll need to convert it with the layoutToCanvas expressions.

    A second idea is to use a bit of js. If you set the id property of the editboxes you can access it in js with document.getElementById(“id”).

    From there you’d need to look up the js properties exposed that you can use.

    I apologize it’s a bit vague. I did post a similar example capx once before, but I doubt I’d be able to find it while on my phone.

    Since this is in the C3 section, the easiest bet would be a bug report and hopefully it can be fixed in a timely manner.

R0J0hound's avatar

R0J0hound

Member since 15 Jun, 2009

Twitter
R0J0hound has 156 followers

Connect with R0J0hound