Jump to content
  • Advertisement
Sign in to follow this  
penubag

(yet another) best language to code a game?

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

Whenever I search for an answer to this, I always get "what you're best at", Python, Java, C#, C++, as the main answers (C#, Python mentioned in this board's FAQ).

 

I program for a living and know many languages so don't mind learning more, so "what you're best at" isn't really an answer. The question here is more of which language is the best tool for the job, as in best libraries and performance.

 

 

Python has pygame which I hear mixed things about, the framerate, speed, and portability is sub-par (from what I hear), and filesize of the exe. But has a lot of useful libraries for sound, gfx, etc.

 

C# had XNA but it's discontinued and I can't find any tutorials or anything online. I think I found a resurrection movement around but I'm not really impressed. Plus, couldn't find any tutorials or anything which how to start a game in C#.

 

Java is the one i hear the most about probably because of its ease of use but I also hear things about performance and overly verbose coding. Plus for gfx you mainly have to use OpenGL which is a nightmare.

 

C++ is another one I'd consider but as a first time game project, maybe avoiding C++ would be better?

 

I'd like to stay away from engines like Unity3d or Flash, and hope to be able to code a platformer with some 3d movements to run on a PC system (not interested in mobile).

 

So out of these or others not listed, which is the best tool for the job? Fastest to write, easiest to maintain, lots of game related libs (maybe even physics?), good performance/filesize, etc. I know this is going to be opinionated, because probably there really is no best language. But I'd love to read what you guys think.

Edited by penubag

Share this post


Link to post
Share on other sites
Advertisement

Python - best for scripting, not games

C++ - well, its a industry standard for a reason. Its fast, kinda hard to get the hang on for beginners but you have a programming background so i think learning it will be easy for you, allows you to do things that Java or Python for example wouldn't and its the best choice for 3D games (IMO) with libraries like SDL

Java - good for 2D games (IMO) and applications, easy to learn, easy to use, lots of libraries and tutorials but its a little bit slower than C++ and i wouldn't use it for 3D games

Edited by UAas

Share this post


Link to post
Share on other sites

TL;DR

I'll say it even 100 times (I've been stating this my whole life).

Pick the best tool for the job, There is no such thing as "Best library". Each tool has its advantages and disadvantages over over tools.

Examine what you need and pick it up. (You won't use a hammer to saw wood just because they told you it's a good hammer).

--------------------

It's not about languages anymore but the tools each language provides. (Affected by the indurstry and communities, I'm speaking of my own experience with different tools).

Usually C++ is good for 3D games, using a high level library/game engine or plain openGL/DirectX. (Good for 2D also, but there are simpler tools).

The usage of C++ is mainly for real time performance, meaning, Performance is crucial (such as in high quality 3d games). 

 

C#/Java is also good for 3D games, and sometimes simpler than C++. Most of the times the game is slower than it could be on C++. However with recent hardware it doesn't even matter. 

For 2D I'd pick java or C# for their simplicity to code, maybe even a simple engine like Game maker. 

 

Personally I'm not fond of scripting languages for games, I've always favorited low level tools therefore I won't be objective about it.

Python is great for scripting, the simplicity works well here, I'd keep it for small games or even just POCs. 

+ I was not involved with python for much, Seek someone who actually wrote a full working game to get a good point of view on that one. 

 

There's is no "Best library" for games, if the industry had one, You would not see so many engines and libraries around.

If your goal is to learn, go ahead and seek platforms and libraries with ALL languages. 

The best learning is by self examining libraries and tools. 

 

If your goal is to develop a commercial game, than you have a lot of planning to do.

First design your game, see what kind of elements do you need, what kind of graphical/processing capabilities you need to accomplish your goal,

then choose the right tool for it.

Edited by WoopsASword

Share this post


Link to post
Share on other sites


I'd like to stay away from engines like Unity3d or Flash, and hope to be able to code a platformer with some 3d movements to run on a PC system (not interested in mobile).

Why? (not a trick question)

 

Engines exist to make your life easier, and avoid writing the 5,000 lines of code needed to get a basic game up and running without an engine.

 

If your goal is to teach yourself low-level graphics programming, then by all means start from scratch. But if your goal is to build a game, then you are far better off using an engine from the outset.

Share this post


Link to post
Share on other sites

C++ is another one I'd consider but as a first time game project, maybe avoiding C++ would be better?

Why? Isn’t, “Doing a motivating new project in a new language,” the best way to learn a language?
Sure you have to spend 5 minutes making a Hello World first. And then off to games.

C++ is the industry standard. Take that for what you will based on what you plan to do industry-wise.


L. Spiro

Share this post


Link to post
Share on other sites

 

C++ is another one I'd consider but as a first time game project, maybe avoiding C++ would be better?

Why? Isn’t, “Doing a motivating new project in a new language,” the best way to learn a language?
Sure you have to spend 5 minutes making a Hello World first. And then off to games.

C++ is the industry standard. Take that for what you will based on what you plan to do industry-wise.


L. Spiro

 

Lol are you serious?

Share this post


Link to post
Share on other sites

Lol are you serious?

Did he not clearly say he has programming experience?

I was literally describing my personal experience, based off the fact that I also had prior experience programming, so yes, I am serious, and since I literally did it it is clearly quite possible (read: normal).


L. Spiro

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!