dwesley's Recent Forum Activity

  • >

    > > So I'm working on exactly the same type of game and this is what I implemented (I'm assuming you have a pipe sprite called "Pipe" and a bird sprite called "Bird"):

    > >

    > > 1. Keep a variable inside each of your pipe sprites called "Scored" and set it to false upon Create Object. This we will toggle once the pipe has a lower x-position than the bird (bird has "flown past", ie pipe has scrolled left past the bird). The reason for this is if we don't set Scored to true once the bird has flown past, it will continue to score that pipe.

    > > 2. Add first-level action "Pipe.X <= Bird.X" AND a condition "Pipe: NOT Is Scored" (Pipe is not Scored, ie. Scored is false) which will test ALL pipes for which Score is false's x-location against the bird's x-location and run a command if true. The command simply adds 1 to your Score variable ("Add 1 to Score") and sets the variable Scored to true FOR THAT PIPE (Pipe: Set Scored to true action). Again, this is to prevent the pipe from being scored on every click.

    > >

    > > There may be a more elegant way (you could investigate dwesley's invisible sprite method) which may be more processor-friendly, but this worked for me.

    > >

    > > Hope this helps!

    > >

    >

    > I've tried this method and everything looked like it was correct but it didn't seem to work for me. I'm a complete novice so I'm still learning a lot of the ropes of construct 2. I will give this method a try again before trying the invisible sprite one. Maybe this time i'll get whatever I was missing before. Thanks for your help. Appreciate it.

    >

    Sorry, of course I meant Lancifer's invisible sprite method

    As a newbie, try using the Chome Console plugin to log some debug data when your bird flies past a pipe (See log-text-amp-objects-to-chrome-console_t65979 for the download and read up on how to install plugins.) This data will show up in Chrome's Console tab (right-click on the html page and select Inspect from the drop-down list to show the console).

    I'll try that. Thanks

  • So I'm working on exactly the same type of game and this is what I implemented (I'm assuming you have a pipe sprite called "Pipe" and a bird sprite called "Bird"):

    1. Keep a variable inside each of your pipe sprites called "Scored" and set it to false upon Create Object. This we will toggle once the pipe has a lower x-position than the bird (bird has "flown past", ie pipe has scrolled left past the bird). The reason for this is if we don't set Scored to true once the bird has flown past, it will continue to score that pipe.

    2. Add first-level action "Pipe.X <= Bird.X" AND a condition "Pipe: NOT Is Scored" (Pipe is not Scored, ie. Scored is false) which will test ALL pipes for which Score is false's x-location against the bird's x-location and run a command if true. The command simply adds 1 to your Score variable ("Add 1 to Score") and sets the variable Scored to true FOR THAT PIPE (Pipe: Set Scored to true action). Again, this is to prevent the pipe from being scored on every click.

    There may be a more elegant way (you could investigate dwesley's invisible sprite method) which may be more processor-friendly, but this worked for me.

    Hope this helps!

    I've tried this method and everything looked like it was correct but it didn't seem to work for me. I'm a complete novice so I'm still learning a lot of the ropes of construct 2. I will give this method a try again before trying the invisible sprite one. Maybe this time i'll get whatever I was missing before. Thanks for your help. Appreciate it.

  • dwesley

    Have you taken a look at the Flappy Bird tutorial here?

    https://www.scirra.com/tutorials/857/fl ... 10-minutes

    The tutorial itself doesn't cover the scoring, but the included capx has scoring in it.

    Another possible way is to position an invisible sprite block over the pipes and when the player overlaps it would add +1 to the score variable.

    I have tried the Flappy Bird tutorial but I must have did something wrong. I haven't tried your second suggestion. I will give it a try. Thanks for the help. <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile" />

  • Could try storing it in LocalStorage.

    I've tried storage and whatever else i can think of but it's just not only saving the score its getting a scoring system implemented in the game at all. I'm going to keep trying to figure it out and maybe i'll figure it out eventually. Any help is appreciated.

  • Hi,

    I've made many attempts to add scoring to Tappy Plane. My son wanted us to have a hobby something we could do together and since we both like games he suggested making games. So we are complete novices. So we've been trying to stick to simple stuff. We did the tutorial for Ghost Shooter and it turned out good. But my son wanted to do a flappy bird style game. So we gave it a try the only thing we can't seem to figure out is how to add scoring. I have read and watched tutorials but i must be missing something because it doesn't seem to work out. Any help would be greatly appreciated. Thanks in advance for any help.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • dwesley

    > Hi, this is my first time posting anything on a forum. I have just recently started making games and I am a newbie at it. I have had a idea for a little while and wanted to get peoples opinions on it and wanted to see if people would be interested in joining. I was going to start a website with a arcade where game making hobbyists could join and become a admin and help in the creation of the website and the games for the arcade. Members could discuss game ideas and bring them to life with Construct 2 and collaborate with me to just make a fun place for new gamers and hobbyists to hangout online. anyways I'm not sure if I'm getting my idea across properly. So just post some questions and start a discussion on it and i'll do my best to explain it better.

    >

    > Thanks

    >

    I don't see how your idea is in any way better than that which is currently available here.

    Sorry. I never meant it was better then what is available here. The site would be different in ways. There wouldn't just be construct 2 games but games made from other software too. And the idea was to start out with simple games in a online arcade and expand to more complicated games. And release original titles under the website.

  • Hi, this is my first time posting anything on a forum. I have just recently started making games and I am a newbie at it. I have had a idea for a little while and wanted to get peoples opinions on it and wanted to see if people would be interested in joining. I was going to start a website with a arcade where game making hobbyists could join and become a admin and help in the creation of the website and the games for the arcade. Members could discuss game ideas and bring them to life with Construct 2 and collaborate with me to just make a fun place for new gamers and hobbyists to hangout online. anyways I'm not sure if I'm getting my idea across properly. So just post some questions and start a discussion on it and i'll do my best to explain it better.

    Thanks

dwesley's avatar

dwesley

Member since 4 Feb, 2016

None one is following dwesley yet!

Trophy Case

  • 8-Year Club
  • Email Verified

Progress

9/44
How to earn trophies