Sign in to follow this  
metallicsoul92

best language to progam a game with?

Recommended Posts

Scionwest    100
It depends on the kind of game you are wanting to develop. If it's something simple then java would work, but I would use a managed language such as VB.NET or C#. The C# syntax is closer to Java's than VB. You'll see a major performance boost moving to a .NET language instead of staying with Java for a game.

Share this post


Link to post
Share on other sites
Talroth    3247
Quote:
Original post by Scionwest
It depends on the kind of game you are wanting to develop. If it's something simple then java would work, but I would use a managed language such as VB.NET or C#. The C# syntax is closer to Java's than VB. You'll see a major performance boost moving to a .NET language instead of staying with Java for a game.


What are you smoking and where are you getting your information from?

Have I been sorely misinformed? It was my understanding that the 'managed' portion of the .net languages was in part the same concepts that Java used.

How is VB.net or C# going to magically give a 'major performance boost' over Java?

Share this post


Link to post
Share on other sites
lightbringer    1070
Scionwest, you haven't been looking at Java in the last five to eight years then. Java can handle a lot. If C# was that much better speed-wise, we'd have heard of it by now. Hobby developers can easily go with Java (and probably C#, I have no experience with it, but Microsoft does make their XNA Game Studio, which looks quite nice) which, apart from being nice on the eyes and fast to program in, is more than capable (HotSpot looks at how your code is performing and optimizes and compiles it to native code as needed, meaning that it can theoretically surpass C++ in speed since the C++ compiler does not have access to this profiling information at compile time) and has a feature-rich standard library as well as many great open source libraries (from IoC to XML parsing to logging to AOP, you name it), many game-oriented ones among them (bindings for OpenGL and OpenAL, a port of Bullet physics, at least five different scene graphs, Sun's much-touted Project Darkstar persistent game server, a number of smaller pure-networking libraries, plus various libraries for drawing OpenGL guis or doing 3D-accelerated 2D graphics). Cross-platform support is just the icing on the cake.

Share this post


Link to post
Share on other sites
http://en.wikipedia.org/wiki/Java_OpenGL

there are openGL bindings for java, and i'm sure there's an SDL port to java as well. So, you have options.

Python is another nice language with lots of libraries and good at being cross platform.

Lua is a scripting language that's been getting a lot of attention lately. http://love2d.org/ love2d is a pretty decent and stable lua based game engine.

Share this post


Link to post
Share on other sites
lightbringer    1070
Quote:
Original post by KaptainKomunist
there are openGL bindings for java, and i'm sure there's an SDL port to java as well. So, you have options.


There's an SDL binding, and LWJGL provides both OpenAL as well as input (on Windows they even use DirectInput I believe). Unlike sdljava, LWJGL works on Mac also.

Python is great to cut down on coding time. I've heard of people porting programs to Python with the result being 1000 MLOC vs 5000 MLOC original. It does have OpenGL bindings also, although I wonder about efficiency (it's not compiled to native code at runtime as far as I know, but feel free to correct me). Dynamic typing is scary but I'm faking dynamic typing in my Java entities anyway so I have no right to disparage it.

Lua has been around forver, too. Wasn't it used for scripting as early as Baldur's Gate?

Share this post


Link to post
Share on other sites
jbadams    25674
Quote:
Original post by metallicsoul92
I know only basic Java and that's it. What should I start out with?
If you already know some Java I would personally recommend that you stick with it for now unless you specifically want to use your game project to learn a new language. Java is more than capable of producing basic games and even taking you through to some pretty high-end stuff, and the experience you get in programming with Java will transfer over to other languages if you want to change over down the line.

Any language1 can be used to program games, and if you wish to make the best game you can and not waste time then a language you're already familiar with is often the best choice. As a beginner it's probably more important for you to pick a language and stick with it than to spend a lot of time trying to choose the "best" language.

Depending how familiar you already are with Java I'd recommend you either
a) Spend some time making console (text based) games while you get more familiar with the language, or if you already feel you've done that enough and have a good grip on the basics
b) look into choosing a graphics library and learn about making some basic graphical games. Start by just drawing a rectangle or simple bitmap, then make it move, then make it bounce of things, then turn that into a 'Pong' game, etc.



If you do want to choose a different language then Python or C# would also make good choices - but realistically almost any programming language you might choose will do just as well as long as you're willing to stick with it.


Hope that helps. [smile]

1. For those who want to nitpick: markup languages, some esoteric languages and languages with poor or no support for graphics operations and/or 'realtime' input would likely not be suitable for the sort of projects a beginner is likely to want to try. I do not however consider this to be particularly relevant as a beginner is unlikely to stumble across or choose these sorts of languages anyway.

Share this post


Link to post
Share on other sites
leeor_net    343
That's a highly subjective question and one that will take some consideration of what it is you're hoping to achieve and what kind of market segment (I use the term loosely) you're interested in.

C++ is a good option if you're willing to take months to learn it and years to get good at it. It's great for portable applications, has a very large community of helpful programmers, hundreds of API's, is generally fast (although there are faster languages) and is the industry standard for middle ware (e.g., game engines). However, it's frustrating and has a very long learning curve. It's also not a good choice for anybody new to programming in general.

You mentioned that you're familiar with BASIC. Which version? There are a lot. FreeBasic and DarkBasic are based off of QBasic (a favorite of mine when I was growing up) but it's really not going to win you awards. It's good for hobbyists and young people interested in learning but other than that, I'd say learning something else.

Visual Basic is a good option for rapid development of GUI applications but it's also feasible for a number of different kinds of games especially as modern hardware has allowed VB programs to run fast enough to be plausible for real time applications. The downside is that programs developed in VB will only run on Window and, while you can play around with DirectX (and possibly OpenGL, haven't looked into it) you're not going to be creating the next Doom 3 or World of Warcraft with it. Period. It's much better for business applications and utilties.

Java is a great all-around language. I personally don't like it for anything but GUI apps but that comes from my own prejudices. I've seen some pretty cool stuff developed with it and the plus side is that anything you build with Java will run on any system with a java run-time environment. It's extremely portable, has a lot of similarities with C++ and does a lot of the behind-the-scenes stuff that C++ doesn't do.

I've seen some interesting stuff coming out of C# and I like the idea of managed C++ code (which is effectively what it is) but again it comes at the cost of being Microsoft specific. Sure, you can probably get it to run under Linux with Wine but that's iffy at best. If you're not concerned with your games running on any platform besides Windows and XBox, than this may be your language of choice.

Python is generally good for a lot of things. I've personally found it to be somewhat primitive in that it requires specific source formatting (I think, I don't know if that's since changed) but it's easy to learn and has a lot of bindings with a variety of API's like Ogre, OpenGL, SDL, etc. There's also a pretty good game development framework called Panda3D that works primarily through Python bindings so that may be of interest.

As you can see, there are a great many choices. No language is 'the best' as there are so many different types of applications for each of them. Depending on your skill, your patience and what you ultimately want to do with your life will determine what language is the best for you.

Now, another suggestion for you and something that I see time and time again, do yourself a favor and don't try to reinvent the wheel. Don't think that you're going to build the next cutting edge engine because it's not going to happen until you've gained a great deal of experience working with other software and working with other programmers. Start off small. Finish projects. Set goals.

I hope this helps. Good luck!

Share this post


Link to post
Share on other sites
justkevin    252
I'll throw in ActionScript 3 as a suggestion, the language of Flash apps. It's syntactically very close to Java.

It has poor performance relative to any of the other languages mentioned, but has one very big advantage: almost anyone in the world can play your game just by visiting a web page, which is fantastic for playtesting game mechanics.

Share this post


Link to post
Share on other sites
Scionwest    100
Quote:
Original post by Talroth
Quote:
Original post by Scionwest
It depends on the kind of game you are wanting to develop. If it's something simple then java would work, but I would use a managed language such as VB.NET or C#. The C# syntax is closer to Java's than VB. You'll see a major performance boost moving to a .NET language instead of staying with Java for a game.


What are you smoking and where are you getting your information from?

Have I been sorely misinformed? It was my understanding that the 'managed' portion of the .net languages was in part the same concepts that Java used.

How is VB.net or C# going to magically give a 'major performance boost' over Java?


That assumption was based off past experiences developing in Java using Eclipse. The IDE was slower than VS at the time, which was roughly 3 years ago, and maybe I was doing things wrong, but the JRE started slowly when I was using it. Granted I haven't touched it for a few years and have upgraded my PC's several times since then but that is where I am getting my information from.

No need to take my statements personal. A simple 'You are misinformed' would have sufficed.

Share this post


Link to post
Share on other sites
rip-off    10976
While I might have worded it softer, I think "For Beginners" deserves extra attention to detail. If you are not sure what you are talking about, here it is better to stay silent.

Far too many beginners become infected with notions about particular programming languages being "fast" or "slow" without really understanding that this is irrelevant to them. There are no popular languages today that are too "slow" to write fun games in, excepting perhaps the AAAA 4-D Quantum-Threaded Super-Massive Multi-Player games that beginners are unlikely to start out making.

Share this post


Link to post
Share on other sites
lightbringer    1070
I can't speak for Eclipse on Windows, or for Visual Studio, but on my Ubuntu box (now five years old) Eclipse is pretty snappy and only needs about 100 MB RAM (less than Firefox). For all the things that are going on in the background to support Eclipse's complex feature set, that's a bargain.

Share this post


Link to post
Share on other sites
taijianT    128
A little bit off topic but Elcipse seems to be (slowly) losing favour, I would suggest trying NetBeans or IntelliJ if you want an IDE for Java. I find the user experience to be more consistent and efficient.

Back on topic, if you are starting out I would suggest sticking with what you know (java?) unless you specifically want to learn another language or engine.

Share this post


Link to post
Share on other sites
lightbringer    1070
Both Eclipse and NetBeans are powerful (and I happen to like some of the Eclipse features more), but are current popularity trends a reason to switch? And what are you basing this on, anyway? >_>

Share this post


Link to post
Share on other sites
Scionwest    100
Quote:
Original post by rip-off
While I might have worded it softer, I think "For Beginners" deserves extra attention to detail. If you are not sure what you are talking about, here it is better to stay silent.


I thought i knew what i was talking about, and now I stand corrected.

Share this post


Link to post
Share on other sites
taijianT    128
Quote:
Both Eclipse and NetBeans are powerful (and I happen to like some of the Eclipse features more), but are current popularity trends a reason to switch? And what are you basing this on, anyway? >_>


Okay one more off topic(ish) post :)

Trend is just based on what I have seen/heard recently, absolutely not based on any well measured empirical data. I recently started using NetBeans for some personal projects (after it was recommended by a few of ourdev guys) and in my experience I have found it to be a touch more user friendly and a little more stable than Eclipse.

Given that Eclipse has such a big market share it can't hurt to give the alternatives a plug right?

Share this post


Link to post
Share on other sites
lightbringer    1070
Quote:
Original post by taijianT
it can't hurt to give the alternatives a plug right?

Of course not, I usually mention both together when recommending a Java IDE anyway, and I'd mention IDEA if I had any familiarity with it - no intention to start an IDE war here ^_^. But when you come out with statements like that, you better be ready to back them up.

Share this post


Link to post
Share on other sites
taijianT    128
Although it was off the cuff, I do stand by what I said ("Eclipse seems to be (slowly) losing favour")...

Obviously hard to back that up but:

Eclipse (http://www.google.com/trends?q=eclipse+java)


NetBeans (http://www.google.com/trends?q=netbeans+java)


for one small piece of anecdotal evidence.

I'm not saying this proves anything, however it does give a little support to my claim that eclipse "seems" to be losing favour. There are also quite a few reputable blog/reviews (e.g. JavaWorld) where NetBeans is rated slightly higher than Eclipse.

BTW: I still think Eclipse is a good IDE :)

(Argh suckered into replying off topic again, bad me!)

Share this post


Link to post
Share on other sites
lightbringer    1070
Heh ok fair enough, even though Google Trends are just about meaningless but eh, considering that eclipse also includes "solar eclipse", "lunar eclipse" while netbeans is pretty specific, that's a bit bleak. 95% is probably from the "java" part, though. I can counter with: "Eclipse users have fewer problems and a more experienced user base so they search less, NetBeans has many bugs and comes bundled with Java, so more beginners use it and more people are looking for help", but I'm just making that up as I go. ^_^;;;

Share this post


Link to post
Share on other sites
lithos    414
At the level that you're at it DOES NOT MATTER which language you use. Any performance road block you hit will be your fault and not the language's.

use whatever language you enjoy coding in. It doesn't hurt to try others and by trying other languages you'll end up a better programmer in ANY programming language.

Share this post


Link to post
Share on other sites
bitshifter    113
I agree.
First to make it work, then to make it work better.
In my personal preference i like to code in C.
When i find a slow spot i replace it with assembly language.
Now that we have SIMD technology the world is quite different.
I would go ahead and code it in the language you already know.
Then find the slow spots and improve them.

Share this post


Link to post
Share on other sites
Beyond_Repair    116
There really is none. Judge the language by more precise criteria instead.

- Is it easy to port code to a different platform?
- It the executon fast enough for the intended type of game?
- To what extent are libraries available to spend less time reinventing wheel?
- How much knowledge is required to write decent quality code?

To take C++ as an example, it would score highly in some questions and very badly in others. The same applies to Java and every other languages, there are always trade offs.

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