• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java video game

 
Thomas McAdams
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Java Ranch members, today I was coming up with ideas to do for my senior project. Everyone else I know are making computers, easy enough. Well I was thinking about making a Java video game. I know the basics of Java, but I have never really went farther. I was hoping for my senior project to make a 2D pixel game of some sort. With that in mind I do not know where to start. Should I learn OpenGL or use the panels that Java provides to get my results? Any feedback on this topic would be great! Thanks for your time.
 
Andrew Polansky
Ranch Hand
Posts: 310
18
Linux MS IE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are willing to do the game purely in Java API, then you can use the Java 2D API.

There are also third party libraries for 2D and 3D graphics, as well as game libraries (ie. LWJGL).
 
Thomas McAdams
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Would it be more beneficial in the long run to learn LWJGL, or should I stick with the java 2D library? My plan when I go to college it to receive a bachelors in CS.
 
Andrew Polansky
Ranch Hand
Posts: 310
18
Linux MS IE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you go purely with the Java API, without any third-party tools, you will learn much more about Java and game development. The purpose of libraries like LWJGL is to take off as much work from developer as possible, by providing ready-to-use mechanisms. That means, instead of learning how things works, you will get already working code. Creating a game will be mostly connecting the pieces together.

Another thing to consider is to learn C++. It is virtually "the" language of video games, and learning C++ will allow you to learn more low-level elements of computer programming than you would learn with Java. That will be very beneficial in the college. C++ has a bunch of great libraries for game development and graphics. The libraries that I enjoyed the most during my time of C++ game development were Ogre3D and Irrlicht (it has great community) for 3D graphics and Allegro for 2D graphics. You can also use low-level libraries like OpenGL or DirectX if you are interested.

Using Allegro with C++ would be the best way to start playing around with 2D games, IMO. There is a gaming development community website, Allegro.cc, where you can find a lot of games written in Allegro, along with source codes. It's perfect place to start learning and to get feedback from the community.

So, summarizing:

* If you just want to make a game for the project, use LWJGL.
* If you want to make a game and learn more about Java and game development, use pure Java API.
* If you want to get prepared before the college and write games in the future, go with C++ and Allegro
 
Les Morgan
Rancher
Posts: 717
17
C++ Java MySQL Database Netbeans IDE Oracle Tomcat Server
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thomas,

There is really quit a different consideration you have to pull into this: how much time do you plan on spending on your project? You have a finite amount of time, and I'll assume, you have other demands and considerations in life other than living in your room until the end of the school year. So decide this: how complicated of game do you want to do?

Do you want to have interactive text? -- and in that you need a real language interface along with an AI or just a few commands?

How well do you draw and what tools do you have available--and are proficient in--to create graphics?

Do you have time to render for 3D or 2D complex graphics? Do you really want to take the time to do so?

You can do a Zork type of game in a day or two, a Wompus type of game (limited basic graphics) in a couple more days, you can probably do a simple fly and shoot type of game in about a week (7 days for something along the line of space invaders or packman), after that things can get fairly complex depending on just what you want to do--a Zork type of game with a full real language and AI interface could be all you do and maybe more scope than you may have time for or what to do.

So the thing I basically am interjecting into your thought process is: choose a scope for your project first, then rigorously adhere to that scope plan and do not let it creep. More than one glorious project had died an ill-fated death due to scope creep and it is not just the beginner that falls into that pit. There is a short book that was required in my Software Engineering Class called the "Mythical Man Month". I suggest you find a copy and give it a read before you do much planning--it's a few hours of humorous read that has great insight into where you want to go.

Les

BTW: in that software engineering class we had to implement a cross compiler for our final project while working in a 4 person team environment. When we turned in our plan, most of the class laughed at our simplicity, but we had figured in real time what each of us could do. We completed our project on time and we all got an A out of the class. We found out after the final, that our team was the only one that was able to implement, everyone else ran out of time. Our plan was simple, but appropriate and we had a very difficult time completing it with our normal schedule of classes and testing, but we did. The others could not and had to turn in a project that was 1/2, or less, done. One thing you will be tested on is can you plan your work load appropriately for your desired outcome. Think about it and make a plan before you make other choices.

Thomas McAdams wrote:Hello Java Ranch members, today I was coming up with ideas to do for my senior project. Everyone else I know are making computers, easy enough. Well I was thinking about making a Java video game. I know the basics of Java, but I have never really went farther. I was hoping for my senior project to make a 2D pixel game of some sort. With that in mind I do not know where to start. Should I learn OpenGL or use the panels that Java provides to get my results? Any feedback on this topic would be great! Thanks for your time.
 
Thomas McAdams
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you so much for the feedback! I definitely want to look into that book you had mentioned as well I think it is best just starting with Java's integrated game environment.
 
Kyle Bradley
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would suggest making your video game using Unity which uses c# or the unreal engine (which i believe is now free?)

https://unity3d.com/

https://www.unrealengine.com/what-is-unreal-engine-4

Making a game is extremely difficult, and there is a lot more involved than you might initially imagine (create all graphics, create story, create ai, create user interactions, maintain performance, ...).
There is also a tremendous amount of tutorials and support online for the 2 mentioned platforms.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!