Jump to content
  • Advertisement
Sign in to follow this  
Eamonn Dev Rea

Game development with Java

This topic is 1752 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

So, I am 13. Yes, I've been told there are serious legal issues because of this. Let's put them aside for a moment, and focus on the main question.

 

I've been coding in Java recently, and I love it. It's my favourite language(next to Lua)! So, I found LibGDX. Yes, it didn't really make sense, but now it makes a whole ton of sense! But, even though I love it, is it suitable to make a good game? Minecraft was made in Java, and it's kind of slow. Yes, it is badly coded and that is a big problem too, but anyway. The biggest game I'd ever wanna make with LibGDX is a Minecraft clone. If I make that, that'll be like the climax of game development for me(though I will still continue).

 

People have said Java is slow. Some argue it is wrong, because it has gotten better now. Yes, some parts of the language is slow, but not as slow as it was.

 

People say that Java can be as fast as C++, depending on how efficient your code is. Maybe even just a little slower.

 

So, should I continue to use Java for game development, or is it pointless(keep in mind about the best game I'd wanna make)?

 

Thanks! Any help is appreciated!

Share this post


Link to post
Share on other sites
Advertisement

Well Minecraft's performance issues seem to be more than just a language choice. It is also likely over 100,000 or so lines of code (I have 13,000 just to efficently generate and render some voxels), so not likely to be a good solo project target.

 

I did some bits with OpenGL in Java and never encountered any problems I could not solve with some effort. The only things I really missed there was being able to have vectors and oher such objects treated largely like a primitive syntactically, and the need to wrap an interface that is not an object into an object did not seem that great ("GL gl = getGlFromSomewhere(); gl.glFoo()" rather than just "glFoo()" in C/C++).

 

The problems faced by Minecraft would apply to other languages as well. Namely working out how to efficently render a dynamic voxel landscape (rather than a nice pre-created mesh from a 3d modelling program), and how to run logic on multiple threads. So learning an easier language (e.g. Java rather than C) would be a good idea if you plan to take those on within the next few years, I also am not aware of any off the self engines that will solve them for you.

 

 

One thing I will note on my latest project (which is a minecraft type thing with a voxel landscape) however is that using Direct3D (with C++) made for some far nicer debugging expierences than some similar ones with OpenGL. Being able to use the Microsoft tools to step through the rendering of a frame action by action (and going, "that texture coordinate is completely wrong") is really useful. When I first did OpenGL directly I had a lot of annoying things like objects being transformed off the screen, backface culling being wrong, some other code changed a state and did not put it back, etc, and most of them have no errors reported by the API, and also nothing gets drawn to the screen.

Edited by SyncViews

Share this post


Link to post
Share on other sites

A badly written c++ program is woefully slower than a well written java program

If you ever find yourself wishing that you were writing C++ because of the potential speed gains as a beginner, you're focusing on the wrong things

 

It will take you years, if not decades, to get to the point where you can not only write perfect backends for your games, but also exploit C/C++ to get that extra juice out

Last but not least, for every line in Java you write, you'll need about 50 in C++, in my experience smile.png

But, you know, I have a tendency to write everything myself. Take that last one with a grain of salt. You do learn alot by doing it, though.

Edited by Kaptein

Share this post


Link to post
Share on other sites


People say that Java can be as fast as C++, depending on how efficient your code is. Maybe even just a little slower.

 

Don't obsess over speed, just follow practices and principles of whatever language and game development in general and you will be fine. I don't know about Java but this speed scare tactic on languages really has to stop and im sure Java has some way to interop with C++ just as C# does.

 

I am not hating on C++ either, I use the language happily with C# and neither compilers complain. Pick the language you like, avoid comparisons (seriously just avoid them or you will go mad) and enjoy.

 

Also what legal issues? :S

Share this post


Link to post
Share on other sites

Legal issues being that a moderator in this forum told me that I need to be 18+ to submit a game to Steam/iOS/Android. I've seen people that are 13-15 year olds write Android apps though, so Google won't ban a 13 year old for submitting an app and going against their Terms(it states in the apps that I have saw that the submitter is 13), but they'll ban an app for having the word "SEO" in their description.

 

Algorithms: Yes or No? I was told to learn them twice, and told not to 5 times. Algorithms are meant to be about getting really REALLY close to the metal, which I don't plan on doing. I know how painful comparisons are. Python VS Lua VS Ruby.... ughh!

 

Yes, Minecraft would not be a good solo project. I just said that a Minecraft-type game would be my big goal, so you'd know whether or not Java is right for me. 

Share this post


Link to post
Share on other sites

Also what legal issues? :S

The only one that comes to mine is it is generally required for one to be at least 18 before they can sign contracts, such as a non-disclosure agreement (NDA), which would make working in a team difficult. I seem to recall that a parent can sign on behalf however, but it still complicates things a bit.

 

EDIT:

I expect that the processes for submitting to app stores such as apple and google include legal agreements. I am also not sure how tax applies.

Edited by SyncViews

Share this post


Link to post
Share on other sites

 


Also what legal issues? :S

The only one that comes to mine is it is generally required for one to be at least 18 before they can sign contracts, such as a non-disclosure agreement (NDA). I seem to recall that a parent can sign on behalf however, but it still complicates things a bit.

 

You hit the nail on the head my friend! :D

Share this post


Link to post
Share on other sites

If you haven't looked through LibGDX's gallery I would check that out. A few of the more popular games made using LibGDX being Apparatus, Clash of the Olympians, and Ingress.

 

Yes, LibGDX is fine for game development and I enjoy using it. There's a great community behind it as well if you ever get stuck. As far as Minecraft and 3D, I believe the 3D API is still in the works. I'm not sure how fully-featured it is. You'll have to look around a bit. I do know it hasn't yet been put into a 'stable' release so you'll have to run the nightly builds which I've been doing with no trouble.

 

I would advise just jumping in and trying it out, at least for a little while. If you don't like it, try something else. If you only really care about desktop deployment you can look at jMonkeyEngine, LWJGL, or JOGL.

Edited by David.M

Share this post


Link to post
Share on other sites


Algorithms: Yes or No? I was told to learn them twice, and told not to 5 times. Algorithms are meant to be about getting really REALLY close to the metal, which I don't plan on doing. I know how painful comparisons are. Python VS Lua VS Ruby.... ughh!

 

That is not what algorithms mean. Algorithms are the mathematical version of programming. It's the opposite of the metal. It's the completely abstract land. So yes, learn algorithms. Languages may come and go, but algorithms will remain.

Share this post


Link to post
Share on other sites

Yeah, algorithms are just recipes for doing operations, they don't even need to be done on a computer.

 

When Gauss was 10 years old or thereabouts, his Father told him to occupy himself for a while by adding up the integers from 1 to 100. The story goes that as he was walking up the stairs he realised that 1 + 100 = 101, 2 + 99 = 101, etc. and there are 50 pairs of numbers between 1 and 100, so the answer was 50 * 101 = 5050. That forms the basis of an algorithm for adding numbers from 1 to N (when N is even, working out what to do isn't hard for odd N though) which is more efficient than summing 1 + 2 + ... + N. Algorithms exploit things like that to do operations in a more efficient way (in general, anyway).

 

EDIT: Embarrassing addition fail typo ;)

Edited by Paradigm Shifter

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!