Sign in to follow this  
Kevin Hall

Recommendations of A Langauge

Recommended Posts

Kevin Hall    105

Hi there! New to the forum and I'm wondering which langauge (the most common of all common questions) that you guys are most comfortable with creating video games with. I've heard that I should learn C++, or take a look at some of the nice engines that are available to use (Unreal, Unity, JMonkey ect.) Though I've always been they guy to want to his own thing. I've already a strong grasp of Java, and a somewhat understanding of HTML, my eyes were wondering on the web today and found Python and was wondering what people though ot developing with that was like. My goals as of making games are small, I don't want anything flashy, nothing big right now I'd be impressed if I managed to make a sprite move across the screen. So at your mercy mates! :D

Share this post


Link to post
Share on other sites

C++ has an advantage of programming for almost any system and saving memory but programming times can be a lot longer.

 

Python I have no idea as I've never used that style yet.

 

I would stick with HTML 5 and JAVA if its a small goal your looking for if you really enjoy making games then move up to C# and/or C++.

 

In the end its about the "style" and not the language you write it in.

Share this post


Link to post
Share on other sites
EWClay    659
If you don't want to use an engine and you know Java why not go with that?

Experiment with Python, it's a very useful language and easy to get started with.

C++ has the steepest learning curve and while you can ultimately do anything with it, it might take a while to get there.

Share this post


Link to post
Share on other sites
minibutmany    1998

If you go the Java route, I recommend using LWJGL or Slick2D(Their website is currently down).

People argue that C++ is more powerful, but since you already know Java there is no need to learn a new language for minor performance increases.

Share this post


Link to post
Share on other sites
Geometrian    1810

There have been a lot of extremely similar threads on this in the past. As usual, my advice is to:

1: Start with Python, because it doesn't get in your way while you're learning the basics

2: End up with C++ when you need more power

3: Avoid Java, because it is restrictive and bloated

4: Avoid game engines, because they prevent you from learning, get in the way, and take a lot of the fun out of development.

Share this post


Link to post
Share on other sites
minibutmany    1998

4: Avoid game engines, because they prevent you from learning, get in the way, and take a lot of the fun out of development.

I agree with this.

3: Avoid Java, because it is restrictive and bloated

 

It may be bloated, but it is not restricitve. Using a library Java is very powerful, look at minecraft, made with Java and LWJGL.

Share this post


Link to post
Share on other sites
wfrye2005    452

If you know Java, you basically know C#; C# has XNA, which will let you get to the point of moving a sprite around the screen in literally minutes--it obscures a lot of the low-level tedium from the programmer, allowing you to focus on the actually interesting game programming part and letting you get things done much faster. Sure, you sacrifice some perfromance for that convenience, but you'll probably never even notice (when you reach a point where XNA can't handle what you're doing, then it might be time to move to C++).

 

Personally, I learned Java, moved to C#/XNA, read Kurt Jaegers' XNA 4.0 Game Development by Example, then started extending the sample code provided to suit my own needs. It's a great beginner book, but the engine he builds makes a lot of really bizarre design choices early on that are a nightmare to change later--and to be completely honest, I've learned more from trying to "fix" his code than I did from the book itself. Maybe that was the point, though; I'd certainly claim it was if I was the author.

Share this post


Link to post
Share on other sites
Geometrian    1810

3: Avoid Java, because it is restrictive and bloated

 
It may be bloated, but it is not restricitve. Using a library Java is very powerful, look at minecraft, made with Java and LWJGL.

To clarify, the Java language itself is very restrictive. It lacks copy constructors, destructors, operator overloading, explicit memory management, and multiple inheritance among other things. When you become a more advanced programmer, not having these things starts to hurt. I believe it is best not to get involved to begin with.

Share this post


Link to post
Share on other sites

If you have a strong grasp of Java. I fail to see why it would be hard for you to learn C# or even C++ for that matter.

 

Just go ahead and teach yourself already, its not some giant impossible to climb curve to learn the language of C++ or even C#. Only way you will do it is if you do it.

 

No language should be seen as a stepping stone to another language they are all unique in their own rights, claiming you know C# from Java is a ludicrous statement. They have several unique differences.

Edited by DevLiquidKnight

Share this post


Link to post
Share on other sites
Akrucious    104

I'd recommend staying away from game engines in general. When I first started getting into game development I used engines and quickly found out how restrictive they were. On top of that it becomes harder to stray away from the use of engines in the future. 

Share this post


Link to post
Share on other sites
Aldacron    4544

I've already a strong grasp of Java, and a somewhat understanding of HTML, my eyes were wondering on the web today and found Python and was wondering what people though ot developing with that was like.


You can see from the posts above that there's no consensus on this. If you had come here with this post 10 years ago, you'd have seen a thread full of Java and C# bashing and lots of recommendations for C++. It's a different world now. My advice is to stick with what you know. I think it's better to learn game development in a language you're already comfortable with, rather than trying to learn both the process and a new language at the same time. Later on down the road, when you're more comfortable with what it takes to make a game, then you can more easily adapt that to experiments with different languages. Obviously, you could go the other route (learn a language or two then pick up game development), but we all know it's much more gratifying (for most of us) to go for the game dev stuff first.

Share this post


Link to post
Share on other sites
kazisami    558

4: Avoid game engines, because they prevent you from learning, get in the way, and take a lot of the fun out of development.

 

I also code with C++ and I know its fun. The OP also wants to code and thats a good thing. But I really don't see anything bad when it comes to using game engines. They are really good for fast prototyping. And if you want to make a fully polished game, then either you have to learn something from every aspect of game coding(as needed, not all) or you already have a very good code base. But it doesnt seem that the OP has enough or any code base ready(related to game development).

 

So let's offer him some choice. If he gets demoralized at some point(we all get sometime). He can look at one or two game engines. And some game engines also teach you how should make a framework for your game, like- Unity is a good example of component based architecture.

 

Lastly, game engines are one of the hottest part of game industry. Let him taste one or two. Dont say it like its a rule :P

Share this post


Link to post
Share on other sites
TheChubu    9454

 

I've already a strong grasp of Java, and a somewhat understanding of HTML, my eyes were wondering on the web today and found Python and was wondering what people though ot developing with that was like.


You can see from the posts above that there's no consensus on this. If you had come here with this post 10 years ago, you'd have seen a thread full of Java and C# bashing and lots of recommendations for C++. It's a different world now. 

Yeah, now its just mostly Java only bashing :P

Share this post


Link to post
Share on other sites
Serapth    6671

 

3: Avoid Java, because it is restrictive and bloated

 
It may be bloated, but it is not restricitve. Using a library Java is very powerful, look at minecraft, made with Java and LWJGL.

To clarify, the Java language itself is very restrictive. It lacks copy constructors, destructors, operator overloading, explicit memory management, and multiple inheritance among other things. When you become a more advanced programmer, not having these things starts to hurt. I believe it is best not to get involved to begin with.

 

 

You say this like it's a negative.  Multiple inheritance is one of the worst features of C++, there is a reason later languages got rid of it.  Operator overloading is another one of those language features that was so badly abused that it's value certainly becomes questionable.  Lack of implicit control over memory manage is the only real missing feature that actually hurts the language, and even in that case, 99% of the time this is an advantage as well.

 

 

The design ethos of C++ is to never make a decision for the programmer.  This is a double edged sword, as on one hand, it gives you maximum flexibility   On the other, you are left with dozens of options of how to do something, even in cases where one option was vastly superior to all the others.  Its a trade off of flexibility over productivity.  Neither is "right" or "wrong" per say.

 

That said, some aspects of C++ are simply "wrong" and there is a good reason for this.  C# and Java are both languages that came later and learned from C++'s mistakes.  Plus it's burdened with all kinds of legacy crap that are basically a land mine for new ( and experienced ) developers.  Some parts of C# and Java are "wrong" too  ( for example, pre-Generic data collections in C#, or well... most of the Java standard libraries ).  No languages get everything right, but generally later generation languages learn from their predecessors mistakes.

 

A couple links that might help you are my getting started guide, it's a long read, but presents most of the popular language options and libraries/learning resources for each.  On top this is a list of the most common 3D engines, the languages supported, costs, etc...

 

 

On the whole topic of using an engine starting out, I'm torn.  An engine hides you from a great deal of the complexity, and when learning, this is a very good thing.  You really shouldn't attempt to create your own until you actually understand how they work, or you will just waste a ton of time.  On the other hand, I am not sure if its a good idea to learn a language while using an engine, for example C# or Javascript with Unity.  I can see merits both ways, so can't really make a recommendation one way or the other.

Share this post


Link to post
Share on other sites
Serapth    6671

 

 

I've already a strong grasp of Java, and a somewhat understanding of HTML, my eyes were wondering on the web today and found Python and was wondering what people though ot developing with that was like.


You can see from the posts above that there's no consensus on this. If you had come here with this post 10 years ago, you'd have seen a thread full of Java and C# bashing and lots of recommendations for C++. It's a different world now. 

Yeah, now its just mostly Java only bashing tongue.png

 

My biggest issue with Java is C#.  It's hard to recommend Java when C# is cleaner, faster and generally better designed and frankly, is aging better.

 

The advantages of Java over C++ are fairly easy to state.  The advantages of Java over C# are .... well, are there any?

Share this post


Link to post
Share on other sites
TheChubu    9454

I don't know. Never programmed in C#. Though I like that you run the same VM on every Java supported platform. Code against Java 7 and you get exactly that in Linux, Windows and OSX (x86, x86-64, etc), plus Java ME for mobile devices. Not sure about how easy is going back and forth from .NET to Mono.

 

Boxing/unboxing in Java is kinda weird though.

Edited by TheChubu

Share this post


Link to post
Share on other sites
Serapth    6671

I don't know. Never programmed in C#. Though I like that you run the same VM on every Java supported platform. Code against Java 7 and you get exactly that in Linux, Windows and OSX (x86, x86-64, etc), plus Java ME for mobile devices. Not sure about how easy is going back and forth from .NET to Mono.

 

Boxing/unboxing in Java is kinda weird though.

 

C#'s native invocation system absolutely kicks the crap out of Java.

 

Mono is binary compatible with the .NET runtime, the experience should be remarkably consistent between platforms, just like Java.

 

The only catch is a handful of libraries aren't "open".  The area most affected by this is UI ( WPF/WinForms ), so if you want to do cross platform GUI work with Mono/.NET, you are often best of using a crossplatform library like GTK#.

Share this post


Link to post
Share on other sites
SimonForsman    7642




I've already a strong grasp of Java, and a somewhat understanding of HTML, my eyes were wondering on the web today and found Python and was wondering what people though ot developing with that was like.

You can see from the posts above that there's no consensus on this. If you had come here with this post 10 years ago, you'd have seen a thread full of Java and C# bashing and lots of recommendations for C++. It's a different world now.


Yeah, now its just mostly Java only bashing tongue.png


 
My biggest issue with Java is C#.  It's hard to recommend Java when C# is cleaner, faster and generally better designed and frankly, is aging better.
 
The advantages of Java over C++ are fairly easy to state.  The advantages of Java over C# are .... well, are there any?


The various JVMs have some advantages over .Net/Mono
1) better runtime performance on *nix servers and in some cases non x86 clients.
2) Java is the "standard" language on Android. (The only good CLR implementation costs $299-$1899 per developer)
3) Some ARM CPUs can execute Java bytecode nativly.

When it comes to the actual languages i can't think of any reason to use Java over C# though and i wouldn't recommend Java over C# to anyone, (If you know C# you can easily switch to Java in the few situations where it works better anyway) Edited by SimonForsman

Share this post


Link to post
Share on other sites
Geometrian    1810

You say this like it's a negative. Multiple inheritance is one of the worst features of C++, there is a reason later languages got rid of it.

No. Multiple inheritance has comparatively few applications, but it is not never the Right Thing. As the FAQ says: "People who spout off one-size-fits-all rules . . . make your design decisions without knowing your requirements. . . . there are some situations where a solution with multiple inheritance is cheaper to build, debug, test, optimize, and maintain than a solution without multiple inheritance."

 

Operator overloading is another one of those language features that was so badly abused that it's value certainly becomes questionable.

No. If a language feature is abused, that doesn't mean the language feature is bad. It means that the programmers who abuse it are stupid.

In this case, not having it forces a hypothetical Java BigNum class to have an API like: "new BigNum(4).exponentiate(51).mod(6).subtract(1)". You laugh, but I have often seen method chaining of such cruftitude in production code.

 

Lack of implicit control over memory manage[ment] is the only real missing feature that actually hurts the language, and even in that case, 99% of the time this is an advantage as well.

I agree somewhat, but not being aware of how memory is structured is a common pitfall of novice programmers. Exclusive use of Java encourages that. Finally, teaching ignorance of resource management is not merely suboptimal, but irresponsible.

I'm not going to deny that C++ isn't somewhat messy and that, at least with respect to Java and C#, its syntax is somewhat less intuitive. I don't fancy perpetuating a holy war about which is better though, mostly because I don't really care. I will stick with my recommendation not because I necessarily like C++ better, but since C/C++ is the de facto standard for games, game engines, and high performance computing in general.

Share this post


Link to post
Share on other sites
cr88192    1570

The various JVMs have some advantages over .Net/Mono
1) better runtime performance on *nix servers and in some cases non x86 clients.
2) Java is the "standard" language on Android. (The only good CLR implementation costs $299-$1899 per developer)
3) Some ARM CPUs can execute Java bytecode nativly.

When it comes to the actual languages i can't think of any reason to use Java over C# though and i wouldn't recommend Java over C# to anyone, (If you know C# you can easily switch to Java in the few situations where it works better anyway)

 
Jazelle is not really part of newer ARM ISA's, and has since been replaced by ThumbEE (now also deprecated).
ThumbEE, however, is not specific to JVM Bytecode, and can be used by CLR implementations as well.
 
 


You say this like it's a negative. Multiple inheritance is one of the worst features of C++, there is a reason later languages got rid of it.

No. Multiple inheritance has comparatively few applications, but it is not never the Right Thing. As the FAQ says: "People who spout off one-size-fits-all rules . . . make your design decisions without knowing your requirements. . . . there are some situations where a solution with multiple inheritance is cheaper to build, debug, test, optimize, and maintain than a solution without multiple inheritance."


 
FWIW, from a language/VM design and implementation perspective, MI is kind of a beast though, and its costs of supporting it tend to outweigh the cases where it is "actually useful", making a case for leaving it out of a language.
 
so, the classes+interfaces model can do "mostly similar stuff", and is much simpler/cheaper to implement (since the contents for every child class simply append onto the end of the parent class, ...).
another "cheap hack extension" to this model is making interfaces able to provide "default methods", which closes the gap a little more, but doesn't significantly increase implementation complexity (if a class implements an interface, and fails to provide an implementation of a default method, the one from the interface is simply grabbed and added into the class).
 
 


Operator overloading is another one of those language features that was so badly abused that it's value certainly becomes questionable.

No. If a language feature is abused, that doesn't mean the language feature is bad. It means that the programmers who abuse it are stupid.

In this case, not having it forces a hypothetical Java BigNum class to have an API like: "new BigNum(4).exponentiate(51).mod(6).subtract(1)". You laugh, but I have often seen method chaining of such cruftitude in production code.


 
yep.
 
traditionally, some amount of C++ code has abused operator overloading in stupid ways (some of which is present in the C++ standard library).
I suspect some of this may have been because it was still in the "new feature" stage, and many people will overuse and abuse new features until a sense of when/how they are best used develops.
 
but, they are still "pretty damn useful" sometimes, especially in cases where it actually makes sense, like extending the numeric tower with more types:
bignums or 128/256 bit numeric types;
vectors and matrices;
...
 
this is generally a big painful area in Java.
 
 
 


Lack of implicit control over memory manage[ment] is the only real missing feature that actually hurts the language, and even in that case, 99% of the time this is an advantage as well.

I agree somewhat, but not being aware of how memory is structured is a common pitfall of novice programmers. Exclusive use of Java encourages that. Finally, teaching ignorance of resource management is not merely suboptimal, but irresponsible.


 
yep.
 
better is to have things like structs and value-classes, and also an explicit 'delete' for cases where this is useful, ...
 
 

I'm not going to deny that C++ isn't somewhat messy and that, at least with respect to Java and C#, its syntax is somewhat less intuitive. I don't fancy perpetuating a holy war about which is better though, mostly because I don't really care. I will stick with my recommendation not because I necessarily like C++ better, but since C/C++ is the de facto standard for games, game engines, and high performance computing in general.

agreed.

Share this post


Link to post
Share on other sites
Bearhugger    1276

The short version is that Java is more foolproof than C++, but it comes at the cost of power. C++ has a few gotchas (like implicit constructors, pointers, operator overloading and multiple inheritance) that can cause you some obscure bugs if you don't know what you're doing.

 

Quite honestly, I don't think you'll hit a performance wall anytime soon if you're just starting with game programming and are aiming to make small games. Minecraft was written in Java so there's no doubt that Java can work to write games.

 

If your goal is to get started with game programming and eventually join the industry, a certain expertise of C++ is a must, but if you just want to make a small game on your own, Java sounds like the logical choice for you.

 

I have to agree that you should at least give a shot to C# though. The language is strongly inspired from Java so it's easy to switch, but it has built a lot on top of it over the years (and it's not just syntaxical sugar), and it is the default language for XNA, which allows you to make games for your PC and 360, which can be interesting. (XNA doesn't work on Metro or WP8 and there are rumors that it's being phased out, but it is still supported.)

Share this post


Link to post
Share on other sites
Trienco    2555

The short version is that Java is more foolproof than C++, but it comes at the cost of power. C++ has a few gotchas (like implicit constructors, pointers, operator overloading and multiple inheritance) that can cause you some obscure bugs if you don't know what you're doing.

 

I think the major gotcha of C++ is a standard that basically states that half the things you technically can do in C++ result in undefined behavior. Especially beginners will do a lot of trial and error coding, which is absolutely fatal in a language that allows you to the most horribly wrong thing without so much as a warning.

 

In my experience one of the main reason for obscure bugs aren't "complicated" features, but relying on doing things in a way that "seems to work just fine" until it doesn't.

 

Quick example?

 

struct Header {
    uint16_t version : 3;
    uint16_t msgId : 3;
    uint16_t msgSize : 4;
    uint16_t msgType : 5;
    uint16_t needAck : 1;
}; 
 
uint16_t receivedHeaderData;
Header header = (Header)receivedHeaderData;

 

What's wrong with this? Hint: byte order is the same on every involved machine.

Edited by Trienco

Share this post


Link to post
Share on other sites

This thread has somewhat gone off topic, to get things a little bit more straight:

There is no real conscience over what language to use, they are individual tools in their own right, simply comparing one tool vs another, won't get you anywhere. They all do basically the same thing, each has its own unique set of features it brings to the table, and their own nuisances.

 

Your project goals should be the main factor in determining which you use, or even use multiple languages to accomplish one goal as is being done much now of days.

 

Just use what is best for you. As for the OP I would suggest they go into C# or C++, either are good choices for making games. The majority of the game industry uses C++ from what I understand. If you have a strong grasp of Java there is no real reason to hinder you from learning either language.

 

Yes, there are gotchas in C++, there are gotchas in C# as well, and even Java. This is not that big of a problem, just learn to identify and re-mediate them, it will make you a better programmer in the long run.

Edited by DevLiquidKnight

Share this post


Link to post
Share on other sites
Anri    972

I use Java because it was the most used language on the Degree I recently finished.  I would have preferred it focused on my first language, C++, but despite some eye-rolling at the way Java does certain things, I've stuck with it.

 

Using it for games programming...I've found I've not had to turn to any dedicated game or graphics api outside the standard Java library. For any 2D graphics and as far as "3D" ray-casting, I just do my own software rendering with setRGB on a backbuffer(women scream, men faint!). Years ago I would have used DirectX for everything, but I feel now that I'm at the level where I can code it myself...and doing it that way has been not only rewarding, but rather enjoyable. Bit slow, but for what I am doing its fast enough. I feel my education with Java has turned me into a better programmer where I no longer rely on API calls to deal with every problem I come across.  I also keep the code to a minimum. 

 

If you know Java well, and have good physical and online references to hand, then its a great language for at least 2D games. Another consideration is the Android platform which also uses Java...and as much as I can't stand those "hip'n'radical" tablets...there does seem to be a good games market for them.  The days of "C++ is the only choice for games development" are now gone...although C++ seems to remain the main player.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this