dop2000's Forum Posts

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

  • This is possible with tilemap, see this post, there are lots of useful info:

  • Does this happen in APK only or in preview as well?

    Please share your capx (preferably) or a screenshot of your event sheet.

  • Here are two ways to do this:

    To pick bottom box, replace order to "descending" in event1, or condition to ">=" in event 4.

    if all boxes are at the same X, you can use "Box pick nearest/furthest" event.

  • Try this:

  • You can put main sprite on layer with parallax like 5,5 and its shadow on another layer with parallax 10,10 and scroll to mouse position. (or opposite to mouse position)

    Unfortunately, you can't skew or add perspective to a sprite in C2 without some external addons.

    Here are a couple of links:

    how-do-i-skew-or-distort-a-sprite_t164666

    https://www.scirra.com/store/royalty-fr ... usion-1636

    effect-mode7_t77858

  • Like I mentioned in another post, on my laptop the flickering is very minor. I have Intel HD 620 GPU.

    I believe it's a hardware/driver issue..

    Have you tried playing with project parameters like Enable WebGL, Sampling, Downscaling etc?

    If I set "Fullscreen scaling=Low quality", then the tilemap flickering becomes much worse.

  • Cool examples as always, R0j0!

    I improved mine. It looks better and the flooding speed now depends on the area.

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

  • No, containers are not similar to families at all!

    You can combine different object into a container, for example sprite+text+particles.

    Container holds instances of these objects, only 1 instance of each object per container.

    For example, you can have your main Spaceship sprite, Thruster sprite, TrusterFlame particles, MainWeapon sprite, HealthBar 9patch. Add all these objects into one container.

    When you create a new Spaceship in runtime, all instances of other objects from the container (Thruster, MainWeapon etc.) will be created automatically. You will only need to position them properly and pin if needed.

    If you create 10 ships like that, you'll basically have 10 containers.

    (If you create Spaceships and all other sprites from the container manually in editor, you need to do be careful to add them in order. Otherwise you might end up with different objects attached to wrong spacehips.)

    When you destroy a Spaceship, all instances of other objects from the container will be destroyed automatically.

    If you pick one object instance in an event, you can reference all other objects in the same event. For example:

    Bullet On collision with SpaceShip

    -----------------> SpaceShip Subtract 1 from health

    -----------------> HealthBar set width to SpaceShip.health

    (notice you don't need to pick this spaceship's HealthBar , it's picked automatically)