Git Product home page Git Product logo

Comments (10)

niccokunzmann avatar niccokunzmann commented on July 18, 2024

I guess, the problem is that the obstacles layer of Gotham is a background and not a obstacle layer.

Someone can comment and solve it :)

from flappy-svg.

mukesh14149 avatar mukesh14149 commented on July 18, 2024

Yeah sure!

from flappy-svg.

mukesh14149 avatar mukesh14149 commented on July 18, 2024

I think the obstacles layer of gotham is correct i.e Gotham_obstacles, but still this not working, when i change (createObstacles("Gotham_obstacles"); to createObstacles("cactus"); ) in method gothamShow() in background.js file it works fine but with Gotham_obstacles it doesn't work, can you help me little to resolve it @niccokunzmann

from flappy-svg.

niccokunzmann avatar niccokunzmann commented on July 18, 2024

Okay, I think the problem might be that only g objects (groups) are allowed as obstacles. We discussed this would need treatment. The problem could be here. Obstacle collision still needs work but we have a basic version running.
You can try around, what would be best.
In all cases, we should open a new issue that improves obstacle collision and adds all the concerns we could have.
Maybe easy was misjudged. I should not tag issues with difficulties if I do not know them, maybe.

from flappy-svg.

mukesh14149 avatar mukesh14149 commented on July 18, 2024

g objects(groups) is used for every layer like background, SunAndMoon, sky, Gotham_obstacle, cactus etc so i tried replacing different layers for createObstacles(layer) and found only cactus layer react as obstacle.

from flappy-svg.

niccokunzmann avatar niccokunzmann commented on July 18, 2024

I am referring to

var list = layerNamed(layer).getElementsByTagName("g");

especially to getElementsByTagName. This line says that only group objects can be obstacles. In case the obstacles in the gotham theme are not grouped, they can not be hit. Are they grouped?

from flappy-svg.

mukesh14149 avatar mukesh14149 commented on July 18, 2024

I think they are grouped.
screenshot from 2016-02-08 01 47 26

from flappy-svg.

niccokunzmann avatar niccokunzmann commented on July 18, 2024

This is only one grouped. Look further.... The creator used clones to keep the file size down. There are several objects: the one g object and the use objects, the clones.

from flappy-svg.

hkveeranki avatar hkveeranki commented on July 18, 2024

@niccokunzmann We can close this issue.

from flappy-svg.

niccokunzmann avatar niccokunzmann commented on July 18, 2024

Yes, #115 closes this.

from flappy-svg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.