dop2000's Recent Forum Activity

  • [quote:2oqceny8]Turn off collisions for objects that don't need it e.g. background and GUI objects

    This is not really necessary. Construct only performs collisions checks for an object if there are relevant events or behaviors.

    If your background sprite has no behaviors like Solid or Physics, and is not part of "on collision"/"is overlapping" events, it will not generate any collision checks.

  • Check array dimensions, height should be 1

    If this doesn't help, could you share your capx? It's hard to guess by screenshots.

  • Use Touch.xAt(1), Touch.yAt(1) for the second touch.

    Unfortunately, you'll need to duplicate the event:

    On 0 touch start -> create particles at Touch.xAt(0), Touch.yAt(0) 
    
    On 1 touch start -> create particles at Touch.xAt(1), Touch.yAt(1) 
    [/code:ca6wszvf]
  • Look at the picture in my comment - event 3 is a sub-event, it should be nested under event 2.

  • You mean in editor?

    You can set size to negative values. For example sprite size is (100,200). To flip horizontally, set it to (-100,200)

  • Could you give more details?

    Those sprites - are they instances of one sprite, or different sprites?

    Do you want something like a deck of cards, which you shuffle and then deal cards one by one?

  • Isn't garbage collection done automatically? Can you force it in Construct project and does it make any difference?

    I learned that effects are slow. (at least on a mid-range Android phone). If I add any effect to even a small sprite in my mobile game, I'm immediately getting a drop in performance. With 10 sprites the fps can drop to under 30 and the game becomes unplayable.

    Same with "Force own textures" settings on layers. Each layer like this subtracts 5-10 fps.

  • With tutorial buttons what happens is two events are triggered.

    Change events 11-12 to this:

    On touched NextButton
       TutorialNo=1 -> Set TutorialNo to 2
                       Go to Tutorial2
      
       Else
       TutorialNo=2 -> Set TutorialNo to 3
                       Go to Tutorial3
    [/code:3i2nqh5u]
    
    "Else" is important!
    Do the same with BackButton.
    
    Also, there is no point in changing button's animation speed, because the layout will be changed immediately.
    If you want to highlight the button when it's touched, do something like this:
    
    On touched NextButton -> NextButton set animation frame to 1
    On any touch end  -> NextButton set animation frame to 0
    On NextButton tap -> .... (those sub-events from the code above)
    
    As for the Reset buttons, there could be a similar problem with the sequence of events. It's impossible to tell by just the screenshot.
    Also (I've seen this mistake in another project), when you reset data in Local Storage, you need to wait for "LocalStorage On All Set Complete" event. If you don't wait and immediately try to read data from Local Storage, you'll get previous (unchanged) values.
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Pretty poor code you bought... The store should have some kind of quality control.

    This is not how pathfinder works. In C2 start a new project and select "Pathfinder demo" template to see how events should be organized.

    Also, events 14-16 in your screenshot are executed on every tick, which is not good.

  • Not sure I understand. What's the problem with checking the collision polygons of mask sprite?

    Here, I made a demo:

    https://www.dropbox.com/s/86haw9omeh68q ... .capx?dl=0

    Circles are a bit rough, you can add more points to their collision polygon to make them smoother.

  • I think you can do this without the pixel RGBA check.

    You will mask out the terrain using invisible sprites, right?

    You can make your own version of raycaster. To check if there is a wall on the right, move a virtual point from the character to the right, constantly checking if this point is overlapping terrain and not overlapping masking sprite.

    For x=player.x to (player.x+50)

    ...Pick terrainSprite overlapping a point (loopindex, player.y)

    .......Pick maskSprite overlapping a point (loopindex, player.y)

    .......Else -> set wallDetected=1 ; Stop loop

  • Here is how I would do this:

    When you get JSON with search results from google, save it into text variable.

    Search it for "geometry" tag, this will break the text into blocks each containing one search result. You can use tokencount, tokenat (with "geometry" as delimiter).

    Or break into lines with tokencount/tokenat (newline as delimiter), and analyze each line using expressions trim, left, find.

    In each "geometry" block search for "lat:" tag (first occurrence only), the rest of the line will contain latitude, you just need to trim unnecessary characters. Do the same with "lng:" tag.

    Then search for "name:", this will give you the name of the place.

    You can retrieve other information (address, picture etc) the same way.

    When you finish with one "geometry" block, add a market with its coordinates on the map and proceed to the next block.

    There seems to be a few addons that can parse JSON, you can try them.

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 279 followers

Connect with dop2000

Trophy Case

  • 10-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • 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
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • x5
    Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • x3
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x14
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

30/44
How to earn trophies