jobel's Recent Forum Activity

  • there is some math involved... but it's only 2 events.

    you need:

    -the full length of the bar graphic

    -a variable that holds the max value of your bar

    -a variable that holds the current bar value

    Event: Every Tick

    Action: Set bar_graphic Width to: bar_value * (bar_fullwidth / max_bar_value)

    Event: OnKey pressed

    Action: Add 1 to bar_value

    You can use max/min in the equation to prevent you from going over the max or minimum width

  • you'll want to look into raycasting. There are a number of examples in the forums.

  • is there something specific that you want your platformer to do?

    often most things can be achieved with combining bullet, 8-dir and platformer. You obviously need to enable/disable behaviors in the process depending on what you are doing.

    For example I once used the platform behavior for the gravity and "on landed" trigger alone. And used a completely different movement type for normal movements.

    Another example is combining bullet with 8-dir or platformer. Both enabled at the same time can make a cool kick-back effect if you set the bullet speed to 800 and accel to -1600. Bullet will essentially "shut off" when it reaches 0 since that behavior cannot go backwards.

  • UI programming is difficult in general, this is NOT limited to Construct. Take for example all the UIs out there, the terrible ones and the great ones etc...because you have such a wide range of well and not-so well designed UIs can help to understand how making an effective UI is more than just having a "good tool".

    sure there could be some behaviors or objects that help you achieve this. but like Newt said, there's nothing you can't do with regular events in Construct.

    Sounds like you just want a scrollbox plugin. Request it!

    construct3.ideas.aha.io/ideas

  • AllanR - I noticed your tiling system for your spacebackground... a totally different approach, here's how I am doing it...

  • thanks AllanR yep that works!

    thank you oosyrag I knew R0J0hound had an example of it somewhere! seriously I wish there was a R0J0hound-only channel with all examples, helpful tips and maths!! it would be a great resource!

    I'm not having a good experience searching the forums with this new website, its really hard to find stuff, it used to be a lot easier... I miss old scirra.com :(

  • thanks newt for some reason your code puts my player in the top left corner when going right and the bottom right corner when going left! I'm sure I could mess with it a bit.

    also thanks oosyrag I think your solution will work! I didn't even think to use the dx and dy!

    I still get that shakey problem on the momentum sprite because the the max speed thing, but it doesn't matter since the scrollTo is on the camera. And a nice side effect is that when my player hits things and the speed suddenly drops it creates a camera shake effect! awesome thanks!

    Do either of you remember a custom Behavior called Spaceship Behavior? I don't think it's supported anymore, but do you have any idea how they capped the maxspeed? For a movement that Accelerates at self.angle?

    The problem is if your max speed is 300, when you're at 300 you can no longer accelerate in any direction. The only way to slow down is to accelerate in the opposite direction. I played with this a lot. The best I found was to knock the speed down a hair in order always be accelerating a little, that way you can change direction or slow down. My way works for now, but I would like a more "real" solution if there is one! thanks!

  • On second look I don't think this will work, when the player hits something that suddenly decreases its speed the screen snaps jarringly to the new speed. So I need to find a way to ease that movement... and now I'm back to the beginning of needing a lerp equation!

  • I added a lerp to the camera and it is better.. although the camera sprite is wobbling like crazy, but the player isn't.. so maybe its okay??

  • R0J0hound

    thanks! that works great, however it introduced another problem I was not aware of...

    I use Custom Movement behavior, so in order to make a Max Speed cap I do this:

    so when you are at max speed, the camera shakes violently because of constantly being set to 1 less than the cap. The player moves like the game Asteroids, so you can rotate while still moving in the direction you accelerated to. So this was my bad solution in order to turn around and apply acceleration in the opposite direction. So now need a new solution.. I could maybe make that interval smaller...

  • Try Construct 3

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

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

    I thought of that, but, when the player slows down I want the screen to then be centered on the player. Like what it currently does with lerp(scrollx,player.x,dt) so it visually looks like the lerp "catches up" to the player when the players speed approaches 0.

  • it seems like I would need to use Angle of Motion from the player to determine whether to add or subtract the X or Y.

    but honestly I was first just trying to get it to work going right - where I know it will always be adding to X - but it doesn't work either!

jobel's avatar

jobel

Member since 27 Jul, 2013

Twitter
jobel has 8 followers

Connect with jobel

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • x4
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

18/44
How to earn trophies