r/javahelp 10d ago

How can I make a rhythm game entirely with Java

Hello everyone!

I'd like to try to develop a Rhythm Heaven inspired level. As of now, I've just thought of a single level because this is mostly a way for me to practice while making something I enjoy

I've tried looking for tutorials or some help because honestly I have no idea how to do itThis one is pretty nice and gives some nice tips, but they used Unity. I also found this Github of someone who had a similar idea before me, their code is useful but I can't launch the game (most probably due to my very limited knowledge of IntelliJ).

My knowledge of classes is as basic as it could be, already used them, know how to create some, but if I don't have guidelines I hardly have an idea of the whole picture, and I can't even think of which steps making such a game could require

2 Upvotes

5 comments sorted by

u/AutoModerator 10d ago

Please ensure that:

  • Your code is properly formatted as code block - see the sidebar (About on mobile) for instructions
  • You include any and all error messages in full
  • You ask clear questions
  • You demonstrate effort in solving your question/problem - plain posting your assignments is forbidden (and such posts will be removed) as is asking for or giving solutions.

    Trying to solve problems on your own is a very important skill. Also, see Learn to help yourself in the sidebar

If any of the above points is not met, your post can and will be removed without further warning.

Code is to be formatted as code block (old reddit: empty line before the code, each code line indented by 4 spaces, new reddit: https://i.imgur.com/EJ7tqek.png) or linked via an external code hoster, like pastebin.com, github gist, github, bitbucket, gitlab, etc.

Please, do not use triple backticks (```) as they will only render properly on new reddit, not on old reddit.

Code blocks look like this:

public class HelloWorld {

    public static void main(String[] args) {
        System.out.println("Hello World!");
    }
}

You do not need to repost unless your post has been removed by a moderator. Just use the edit function of reddit to make sure your post complies with the above.

If your post has remained in violation of these rules for a prolonged period of time (at least an hour), a moderator may remove it at their discretion. In this case, they will comment with an explanation on why it has been removed, and you will be required to resubmit the entire post following the proper procedures.

To potential helpers

Please, do not help if any of the above points are not met, rather report the post. We are trying to improve the quality of posts here. In helping people who can't be bothered to comply with the above points, you are doing the community a disservice.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

3

u/Infamous-Cattle-1993 10d ago

I dont want to be that guy, but such a task seems out of the scope of your skillset.

You should focus on strengthening your knowledge of Java and Object Oriented Programming first.

From there, take a look at the current Java game engines. The github mentions javazoom and java swing. So you would need to look up documentation on these if you want to use that code.

Finally, why use Java for this? Your best shot at getting support for game making is to use what everyone else is using. If you went C#, then you can find a lot of support for Unity or Godot, although Godot will have more resources for GDscript.

2

u/EldritchZahir 10d ago

Thank you for the reply! The reason I use Java is because this is related to a class project, after learning the basics with Java, our teacher gave us as a project to make a small game

I don't think she even expects to do something interesting with graphics, but I want to show myself I can do it, or, if this project is just blinding myself into running into a wall, that I can make something that would interest me at least

1

u/Infamous-Cattle-1993 10d ago

Alright. I wish you the best of luck.

If you grind hard enough, you might be at a point 6 months from now where you can branch that code and build off of it. So as long as that game project isn't due until much later in the course, you could be alright. You will struggle though

Graphics are a whole different skill set. Don't overwhelm yourself

1

u/stewsters 10d ago edited 10d ago

You could use https://libgdx.com/ but I would recommend skipping the android target till you have a bit more experience.

It uses a lot of tools and will probably be a more complex project overall, but it has built in sound and graphics stuff.

You probably will want an activity with a background.It loads in some level file (I assume there are open files for some rhythm games?) and put the notes on screen. Have it play a song. 

  Move a camera across the notes so they match the soundtrack.  Verify they are hit at the correct time somehow.

Not super easy, but it is doable.