Giter Site home page Giter Site logo

flappybird's People

Contributors

dreamhunter2333 avatar kingyuluk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flappybird's Issues

Interested to have Reinforcement Learning feature inside?

Hi,

I came across your Flappy Bird project and feel like it's a good chance to get it automated to train for a Reinforcement Learning Agent. You can use DQN to have RL inside to play the game for you.

We are currently developing a Java based Reinforcement Platform in DJL and can be easily integrate with this project. Are you open to have some time for a collaboration of a RL Agent?

can not run

Hello!
I have some problem !just as
I ran"F:\amusement\fun-1\FlappyBird>java -jar FlappyBird.jar"
but happened:
Caused by: java.lang.ClassNotFoundException: sun.audio.AudioStream at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:606) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:168) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) ... 36 more

Add game props: Shrink Potions

Issue Description:
In the current game logic, we believe that adding game props can make the game more interesting. Props can be randomly spawned during the game, providing players with additional challenges and rewards.

Proposed Solution:
We propose adding a new folder to the project dedicated to storing various props' code and resources. By implementing corresponding logic in the game element layer, we can randomly spawn these props during the game.

Related Discussion:
Our previous conversation has covered the logic of adding a shrink potion. Now, we aim to expand this logic to include more types of game props.

Steps or Plan:

  1. Create a new folder to store the code and resources for game props.
  2. Add logic in the game element layer to randomly spawn props during the game.
  3. Define the effects of different props, such as the shrink potion reducing the bird's size.

Future Additions:
Subsequently, more props can be added, such as invisibility potions (making the bird invincible during invisibility), one-time-use defensive shields, etc.

Discussion and Feedback:
We look forward to your feedback and suggestions to better integrate this feature into the project.

sun.audio is not universal

sun.audio is not universal. I think it can be replaced by java.sound. If AudioInputStream and AudioSystem are used, there is a good choice to replace score.wav with smaller file. At the same time, the data streams created by playFly and other classes are gathered together, and then closed at the end of the game to avoid the stuttering in the process.

repaint() 与 update()

repaint(); // 通过调用repaint(),让JVM调用update()

您好,看了您的代码,写的非常棒,我想知道这个地方使用repaint(),让JVM调用update()是什么意思呢?

getting error while trying to run "FlappyBird.jar" file.

Getting below error:
`
java.io.FileNotFoundException: resources/img/background.png (No such file or directory)
at java.base/java.io.FileInputStream.open0(Native Method)
at java.base/java.io.FileInputStream.open(FileInputStream.java:212)
at java.base/java.io.FileInputStream.(FileInputStream.java:154)
at java.base/java.io.FileInputStream.(FileInputStream.java:109)
at com.kingyu.flappybird.util.GameUtil.loadBufferedImage(GameUtil.java:30)
at com.kingyu.flappybird.component.GameBackground.(GameBackground.java:25)
at com.kingyu.flappybird.app.Game.initGame(Game.java:116)
at com.kingyu.flappybird.app.Game.(Game.java:46)
at com.kingyu.flappybird.app.App.main(App.java:12)
Exception in thread "main" java.lang.ExceptionInInitializerError
at com.kingyu.flappybird.app.Game.initGame(Game.java:116)
at com.kingyu.flappybird.app.Game.(Game.java:46)
at com.kingyu.flappybird.app.App.main(App.java:12)
Caused by: java.lang.NullPointerException
at com.kingyu.flappybird.component.GameBackground.(GameBackground.java:27)
... 3 more

`

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.