Jump to content
  • Advertisement
Sign in to follow this  
metallicsoul92

best language to progam a game with?

This topic is 3173 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

Advertisement
If you know Java, keep going with it. There is no "best" language, though there are a few that you would tend to avoid.

Share this post


Link to post
Share on other sites
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
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
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
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
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
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
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
Sign in to follow this  

  • Advertisement

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!