tunepunk's Forum Posts

  • ASHLEY. It could be a windows 10 bug, but a lot of other softwares fire the right click context menu on tap & hold which is the standard right click equivalent when using touch, not only stylus.

    For example. Photoshop handles the tap&hold in the interface but not on the canvas (by design) so it must be something that has to be supported by the software i guess. My FTP software handles tap&hold, intel XDK is not very touch friendly but fires context menu on tap & hold. Maya handles tap&hold also. When it fires the circle touch indicator will turn to a sqare. I suggest buying or borrowing a touch enabled win 10 device to test it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ashley, Thanks I didn't get that at first, so you can close the bug.

  • I have a quite a lot of sprites that I turn on and off collisions for depending on if they are on screen or not. Since I did this optimization I seem to get a bit of stuttering when the game scrolls (on mobile). Without this optimization i get better frame rate and no stuttering but higher CPU usage.

    Without optimization i have around 20-40 collision checks/tick

    With optimization usually about around 2-5 collision checks/tick.

    Does the turning on and off of collisions for sprites do anything behind the scenes that could be causing this stuttering? Collision cells that needs updating?

  • 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.

  • 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.