kingyuluk / flappybird Goto Github PK
View Code? Open in Web Editor NEW基于Java基础类库编写的Flappy Bird
License: MIT License
基于Java基础类库编写的Flappy Bird
License: MIT License
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?
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
Newest java no longer have package sun.audio
there is no sun.audio jar in MusicUtil as well as Internet.
So how can I get this jar
如题。直接java -jar运行会失败,报错:Error: Invalid or corrupt jarfile FlappyBird.jar
-windows 10 jdk 1.8
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:
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. 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(); // 通过调用repaint(),让JVM调用update()
您好,看了您的代码,写的非常棒,我想知道这个地方使用repaint(),让JVM调用update()是什么意思呢?
老哥,你这程序有时序图和类图吗。。。
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
`
用IDEA看代码的话,好像有点问题,这个工程既不像安卓工程,又不像简单的java工程
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.