AllanR's Recent Forum Activity

  • that chooses a random location for the new apple. the x coordinate must start at 50 and then it adds a random amount to that between 0 and 400.

    the y coordinate also starts at 50 and then it adds up to 250.

    this was just a quick way to place the apples... and it sometimes puts apples floating in the air if it chooses a place that doesn't overlap the tree.

  • I had forgotten all about your Easter egg hunt!

    Very good job again - I found them all :)

  • I just ran a quick test and I think Wait -1 doesn't wait at all. code after the wait ran before the next event ran - nothing was deferred.

    technically, Wait 0 defers until the end of the current tick.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have seen that before - I think the fix is to put a one pixel transparent boarder around the edges of the images. You can automatically do that in the C3 image editor by clicking crop button.

  • Here is a sample of what I do. It might not seem very obvious at first, but a lot has to happen in the correct order to handle multi-touch and over-lapping buttons and windows.

    the way you are using global variables may not work the way you expect if there is more than one active touch going on...

    I use a Family called SpriteButtons that has family instance variables to describe what each button does. When I have over-lapping windows/menus, I use a family member that is not Type "Button" to act as a shield to make buttons under it not accessible.

    in this sample there are three buttons, the Home button changes the background colour. The Pause button disables/re-enables the Home and Settings buttons. The Settings button calls up a dialog that mostly covers the three buttons so you can see how the buttons below get blocked, except for the parts not covered. The dialog box can be dragged around and has a close button.

    To make a button do something, you click on it. But if you change your mind and slide the mouse (or touch) off the button, then nothing will happen. If you touch someplace not over a button and slide the touch onto a button, nothing will happen. Or if you click on one button and slide to another button, nothing will happen.

    if you click and hold down a button, but then another touch disables that button, the first button will not activate when you let go. You can't have two touches trying to use the same button... and plenty of other weird multi-touch scenarios you might not expect but your users will accidentally do.

    Each button has an instance variable that tells what function should be called when it is clicked. So, to add new buttons, all you have to do is add the sprite to the SpriteButtons family, and create a function for what you want the button to do. You don't have to change any of the core Touch Start/Is in touch/Touch End code. (Buttons need Up, Hover, Down, and Disabled animations)

    This is the first time I have done this in C3. In C2 it is easy to call a function from text in an instance variable - in C3 you have to remember to set up a mapping for that unless I am missing something... I also think I have found a multi-touch bug in C3 - a new Touch that hasn't moved at all seems to sometimes prevent other touches from updating properly. I will test that out a little more to make sure it isn't my fault and may submit a bug report.

    https://www.rieperts.com/games/forum/MyButtons.c3p

  • all sprite instances share the same image data.

    if you want to load different images for each instance, then you need to load each image into a different animation frame and then set each instance to the appropriate animation frame.

  • there are plenty examples in the forums, but searching for them can be tricky...

    I did an Angry Birds demo years that draws a line the bird will follow:

    https://www.rieperts.com/games/forum/angry_birds.capx

  • I downloaded it from my site and it opened fine...

    I made it in the R189.2 stable version - what version are you using?

  • here is a quick sample:

    https://rieperts.com/games/forum/AppleTree.c3p

  • if you don't care which apple gets destroyed you could use System - Pick a Random Instance, and then destroy that one.

    If you give them bullet behavior (turned off by default), then you could activate it and have the apple "fall" out of the tree.

  • Tick Count is just a count of how many ticks have past since your game started. It has nothing to do with performance, so there is nothing wrong with that.

    If you are only getting 11 fps and 90% cpu, then you must have a lot going on - effects or behaviours, collision checks, huge images, faulty logic in your events, etc...

    we would have to see your capx to know more.

  • could be just about anything... without seeing your code.

    could be that the layer you are moving it to is scrolled or zoomed differently so that the sprite is not visible. And if you have code that destroys objects not on screen, that could cause it to be destroyed.

    I have never heard of anyone having issues like this, so it is likely a bug in your code, or a new issue from the most recent update. if all else fails, you may have to file a bug report... but I have a feeling it is some combination of actions in your code.

AllanR's avatar

AllanR

Member since 21 Nov, 2013

Twitter
AllanR has 23 followers

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
  • Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

20/44
How to earn trophies