tunepunk's Recent Forum Activity

  • How big is the game? Took me ages to load the Beta. Or maybe just my connection is bad momentarily.

  • Works better if you have 2 lerp values, otherwize you get strange behaviour if you are moving along an edge.

  • This way you can set the lerp value to decrese close to the edges so that it will never have a sharp bump. Always smooth even when hitting the layout edge.

    the disbottom,top,etc sets the distance to all the edge.

    lerp step picks the lowest of these values and limits it too 200, the devides to get a good lerp value.

  • probably that's a bit more tricky. But i think you could decrease the lerp step based on how close you are to the edge, so it would have the feeling that it slows down close to the edge, not completely stop quickly.

    I think you would need a lerpStep variable that changes based on the distance to the edge.

    not really sure how to do that, but I can try. give me a moment.

  • you could just add conditions to the event.

    cameraObject.x < OriginalWindoWidth/2 +1

    cameraObject.x > layoutwidth-(OriginalWindoWidth/2)-1

    scrollto - cameraObject.x

    when the center of the scroll is at the edge camera object shouldn't move

    something like that i think would work.

    and same for y if game scrolling that way also.

  • It's better to spend time to create a popup screen for pople without webGl enabled phones.

    Sorry this game is not supported on this device.

    That way you will save yourself a lot of bad reviews from people having a bad experience with a laggy game.

    Unless you completely design your game for low end users and If your game runs well on a low end phone without webGL, don't worry about tint.

  • I'm also looking for something similar but I havn't found anything very useful yet. My solution so far: - Don't cater for people with crappy phones/old browsers, the game is probably not gonna run well anyway. So worry about tint, when the overall experience is gonna be laggy/slow is a waste of time.

    My game with webgl constant 60fps on a midrange phone. Without webgl even on same phone feels choppy and slow 30-40fps

    Now imagine without webGl on a low end phone. Unplayable. Don't waste your time.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Lmao looking at that formula you have there is making my eyes hurt this early in he morning. That'll teach me for trying to brain before I coffee.

    Glad you resolved it I'll check it out again once my hamster starts running.

    ~Sol

    HAHAHA How's that for a hearty breakfast? I used the same formula elswhere in game to determine weather an object was on one or the other side of a line between two points, (without the 'abs'), and it worked. returns the distance to that line, very useful in many cases.

    So credit goes to R0J0hound for solving it earlier in this thread.

    https://www.scirra.com/forum/viewtopic.php?f=147&t=148922

    Awesome piece of formula.

  • That sound's cool. I'm interested.

  • R0J0hound yes yes, thats the easy way but in order to use overlap you need collisions turned on. So the hard part this time was not using collisions, because i want to turn on collisions for objects in the line of fire of the player.

    I'm Optimizing the game, so took down collision checks dramatically from approx 90 tick, by defaulting everything off, and just turning on for certain objects when needed. In this case, just before firing, and off again on hit. By only turning on colisions for objects in the line of fire, now my game runs at 1-2 colission checks per tick, mostly zero if any characters or bullets are not moving, or close enough to any obstacles.

  • SoldjahBoy

    newt

    I managed to solve it finally.

    dtAim is the distance to the center line between two imagepoints of the player.

    if the distance to the center line is less than a certain ammount(in this case less than the obstacle widht/2, pick those objects.

    Now i'm just gonna filter out objects based on distance, and objets behind the player.

  • dl.dropboxusercontent.com/u/666516/picklinosight.capx

    SoldjahBoy

    We're getting closer, but i think I have to write something custom with events. Larger objects will fail to detect, or if you are close to objects. I need to detect based on the Bbox, and not the XY, so back to the drawing board, and play with events.

tunepunk's avatar

tunepunk

Member since 2 Mar, 2014

None one is following tunepunk yet!

Connect with tunepunk

Trophy Case

  • 10-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
  • Coach One of your tutorials has over 1,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

16/44
How to earn trophies