Best Language for Game Programming

need suggestions and thoughts.

  • (2 Pages)
  • +
  • 1
  • 2

23 Replies - 18477 Views - Last Post: 16 May 2011 - 06:11 PM Rate Topic: -----

#1 richmund12  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 38
  • Joined: 10-October 09

Best Language for Game Programming

Posted 25 November 2010 - 03:54 PM

Hi all,

I'm on to game programming now. What I'm doing now is customizing/editing existing games to my liking. Like a private server.

So far I've been exposed to Ragnarok Online and Flyff. So far, I'm just editing those .txt,.inc files to customize the server. Been exposed to MSSQL, C++ (for database managements. Just the basics), and PHP for web registrations.

Been able to add items, change rates, change item properties, add NPCs, (some simple stuff). I know I can do more than this, I'd like to go further, so, I want to know your suggestions as to what language(s) should I focus more.

I'm a fresh BS Information Technology graduate and have learned C,JAVA,VB6,VB.NET,C#.NET,PHP,DB2(MySQL Database management) @ school. Basically, I know simple programming. ^_^

Thanks,

Is This A Good Question/Topic? 0
  • +

Replies To: Best Language for Game Programming

#2 Kilorn  Icon User is offline

  • XNArchitect
  • member icon



Reputation: 1356
  • View blog
  • Posts: 3,528
  • Joined: 03-May 10

Re: Best Language for Game Programming

Posted 25 November 2010 - 04:15 PM

There isn't really a "best" language for game programming. The professional industry mostly uses C++ due to it's long history and the sheer abundance of resources online for the language. C# is slightly less popular than C++, but has some great benefits with the use of XNA. Python was the language of choice for CCP when they developed Eve Online, so apparently it works really well for game programming. There are tons of codebases online for text-based games written in an abundance of different languages, but most that I have seen derive from the MERC codebase which uses C. The best advice anyone can give you on this topic is to go with the language that you currently feel most comfortable with. If you're just starting to learn programming, then C++ is going to be a bit harder to learn than other languages due to it's low level nature. C# is a higher level language and is much easier to learn to begin with. I've heard the argument that C++ is the language of the past and C# is the future for games, but it all boils down to what people feel most comfortable with. If you've already been exposed to C#, it might be a good idea to check out XNA, which is my personal favorite game programming platform. One major benefit to XNA is the ability to develop games for the XBOX360 and the Windows Phone 7 and start selling your games. This gives you a relatively easy way to break into the industry as an independent developer while you build a portfolio to show to potential employers.
Was This Post Helpful? 2
  • +
  • -

#3 baavgai  Icon User is online

  • Dreaming Coder
  • member icon

Reputation: 5831
  • View blog
  • Posts: 12,683
  • Joined: 16-October 07

Re: Best Language for Game Programming

Posted 25 November 2010 - 04:15 PM

Depends on what you want to do.

C/C++: Client executable, no interpreter/vm required.

VB.NET,C#.NET: Client executable, interpreted, best for windows.

JAVA: Client or server side, interpreted, theoretically OS independent.

PHP: Primarily web server side, interpreted, best for browser based games.

DB2: Along with other database engines, data stores are not usually a primary game design consideration.

VB6: NEVER! Really, don't do this. Don't touch it, remove it from you vocabulary. It's deader that DOS. Leave the corpse lie.
Was This Post Helpful? 2
  • +
  • -

#4 Kilorn  Icon User is offline

  • XNArchitect
  • member icon



Reputation: 1356
  • View blog
  • Posts: 3,528
  • Joined: 03-May 10

Re: Best Language for Game Programming

Posted 25 November 2010 - 04:17 PM

View Postbaavgai, on 25 November 2010 - 06:15 PM, said:

VB6: NEVER! Really, don't do this. Don't touch it, remove it from you vocabulary. It's deader that DOS. Leave the corpse lie.


Very wise man.
Was This Post Helpful? 0
  • +
  • -

#5 richmund12  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 38
  • Joined: 10-October 09

Re: Best Language for Game Programming

Posted 25 November 2010 - 04:31 PM

View PostKilorn, on 25 November 2010 - 03:15 PM, said:

There isn't really a "best" language for game programming. The professional industry mostly uses C++ due to it's long history and the sheer abundance of resources online for the language. C# is slightly less popular than C++, but has some great benefits with the use of XNA. Python was the language of choice for CCP when they developed Eve Online, so apparently it works really well for game programming. There are tons of codebases online for text-based games written in an abundance of different languages, but most that I have seen derive from the MERC codebase which uses C. The best advice anyone can give you on this topic is to go with the language that you currently feel most comfortable with. If you're just starting to learn programming, then C++ is going to be a bit harder to learn than other languages due to it's low level nature. C# is a higher level language and is much easier to learn to begin with. I've heard the argument that C++ is the language of the past and C# is the future for games, but it all boils down to what people feel most comfortable with. If you've already been exposed to C#, it might be a good idea to check out XNA, which is my personal favorite game programming platform. One major benefit to XNA is the ability to develop games for the XBOX360 and the Windows Phone 7 and start selling your games. This gives you a relatively easy way to break into the industry as an independent developer while you build a portfolio to show to potential employers.



Thanks, I guess I should go for C# then. I'd also like to buy a good book that I could follow through. Do you have any suggestions? I only learned the basics from school. ^_^ thanks, again.

View Postbaavgai, on 25 November 2010 - 03:15 PM, said:

Depends on what you want to do.

C/C++: Client executable, no interpreter/vm required.

VB.NET,C#.NET: Client executable, interpreted, best for windows.

JAVA: Client or server side, interpreted, theoretically OS independent.

PHP: Primarily web server side, interpreted, best for browser based games.

DB2: Along with other database engines, data stores are not usually a primary game design consideration.

VB6: NEVER! Really, don't do this. Don't touch it, remove it from you vocabulary. It's deader that DOS. Leave the corpse lie.


Thanks!! Sadly, VB6 is what I have more experience than other language. >.< This is what we used for our thesis. haha Anyway, I know it's not suited for game programming. hehe Thanks. Do you have any book/author you would recommend? ^_^
Was This Post Helpful? 0
  • +
  • -

#6 SixOfEleven  Icon User is offline

  • using Caffeine;
  • member icon

Reputation: 945
  • View blog
  • Posts: 6,342
  • Joined: 18-October 08

Re: Best Language for Game Programming

Posted 25 November 2010 - 04:35 PM

Really the wrong forum for this question. It would be better off in the Game Programming forum.
Was This Post Helpful? 0
  • +
  • -

#7 richmund12  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 38
  • Joined: 10-October 09

Re: Best Language for Game Programming

Posted 25 November 2010 - 04:38 PM

View PostSixOfEleven, on 25 November 2010 - 03:35 PM, said:

Really the wrong forum for this question. It would be better off in the Game Programming forum.


Sorry, could you move this there? ^_^ Thanks hehe.
Was This Post Helpful? 0
  • +
  • -

#8 SixOfEleven  Icon User is offline

  • using Caffeine;
  • member icon

Reputation: 945
  • View blog
  • Posts: 6,342
  • Joined: 18-October 08

Re: Best Language for Game Programming

Posted 25 November 2010 - 04:46 PM

Already done. :)

I would be another to say consider using C# with XNA. If you're developing for Windows, or other Microsoft platforms that are supported by the XNA Framework, it is really a nice alternative.

C++ is also a good option and there are a number of SDKs/APIs/Libraries for game programming. stayscrisp has a number of excellent tutorials for working with SDL here on DIC. They are linked in his signature. Even if you decide not to use C++ and SDL they would be well worth the read. He's got some pretty impressive insight when it comes to game programming.
Was This Post Helpful? 1
  • +
  • -

#9 Kilorn  Icon User is offline

  • XNArchitect
  • member icon



Reputation: 1356
  • View blog
  • Posts: 3,528
  • Joined: 03-May 10

Re: Best Language for Game Programming

Posted 25 November 2010 - 05:00 PM

There are a ton of good XNA books out there, and if I'm not mistaken, there's a couple threads discussing books in the XNA threads that you can check out. There are also numerous tutorial sites for XNA spread around the internet, a great one being linked in SixOfEleven's signature. His blog is definitely worth a read in my opinion, and don't forget to check out the App Hub. Under the Education tab at the top of the page you'll find all sorts of samples and other articles to help you out.
Was This Post Helpful? 1
  • +
  • -

#10 richmund12  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 38
  • Joined: 10-October 09

Re: Best Language for Game Programming

Posted 25 November 2010 - 05:02 PM

Thanks! Imma start reading now. ^__^
Was This Post Helpful? 0
  • +
  • -

#11 Nikitin  Icon User is offline

  • D.I.C Regular

Reputation: 56
  • View blog
  • Posts: 264
  • Joined: 02-August 10

Re: Best Language for Game Programming

Posted 25 November 2010 - 05:26 PM

Python is a good language for game programming.


http://www.pygame.org
Was This Post Helpful? 0
  • +
  • -

#12 anonymous26  Icon User is offline

  • D.I.C Lover

Reputation: 0
  • View blog
  • Posts: 3,638
  • Joined: 26-November 10

Re: Best Language for Game Programming

Posted 26 November 2010 - 04:41 PM

View Postrichmund12, on 25 November 2010 - 02:54 PM, said:

Hi all,

I'm on to game programming now. What I'm doing now is customizing/editing existing games to my liking. Like a private server.

So far I've been exposed to Ragnarok Online and Flyff. So far, I'm just editing those .txt,.inc files to customize the server. Been exposed to MSSQL, C++ (for database managements. Just the basics), and PHP for web registrations.

Been able to add items, change rates, change item properties, add NPCs, (some simple stuff). I know I can do more than this, I'd like to go further, so, I want to know your suggestions as to what language(s) should I focus more.

I'm a fresh BS Information Technology graduate and have learned C,JAVA,VB6,VB.NET,C#.NET,PHP,DB2(MySQL Database management) @ school. Basically, I know simple programming. ^_^

Thanks,

Contrary to popular belief there is a 'best programming language' for professional game development and it's C++. In a non-pro environment you will find C# or any other language for that matter. The reason why we go for C++ over others is a variety of reasons:

1. C++ is cross-platform; we write games on all the major consoles in C++.
2. C++ is an OOP language; such a feature is critical in keeping the very complex code for a game organized. It also allows us to implement Design Patterns, for instance we will use a 'Singleton' that ensures that there is only one object representing a world in a games, or maybe only one player in a single player game. Alternatively, we will use a 'Factory' to create instances of repeating objects in a world like exploding barrels, boxes or whatever.
3. C++ has excellent low level functionality; we can get practically to the hardware to optimize game performance through C++'s syntax and compiled code at a relatively high level.

Next comes the other aspect of game development where C++ itself would either be cumbersome or overkill. Have you ever noticed in a game when you enter a room by a door or some other portal that objects and 'enemies' spawn, and maybe the sound effects/music change as well? This is because you have set off a trigger to cause such a sequence of events to happen. C++ code doesn't initiate the trigger but causes the events that follow to happen. The triggers themselves are controlled by a scripting language like Lua or Python, so in addition to learning C++ I would also strongly recommend that a scripting language also be learned.
Was This Post Helpful? 0
  • +
  • -

#13 baavgai  Icon User is online

  • Dreaming Coder
  • member icon

Reputation: 5831
  • View blog
  • Posts: 12,683
  • Joined: 16-October 07

Re: Best Language for Game Programming

Posted 27 November 2010 - 11:02 AM

C++ is an excellent general purpose language. It does offer cross platform, OO, and low level functionality. It is not the "best" language. There is no best language. To state uncategorically that there is a best language reveals profound ignorance.

C++ is actually a multi paradigm language. The way it handles OO is loose and that low level access means that you can shoot yourself in the foot with a bazooka rather than a pistol. Cross platform isn't intrinsic, either. You generally have to work at it.

Yes, C++ is commonly used in production houses aiming at multiple platforms. Plain old C is probably used just as often for this and it's hard to rank C++ the winner in the power programmer cross platform category. Of course, multi platform means multi platform support and many shops are content to stick with one.

Let's say we know we're developing for Windows. What's the best language? There's still none, but C++ isn't going to buy you that much. You're talking to the Windows API and any Windows language can do that. Speed is not a big deal; your bottleneck is in graphics and all of that MUST go through DirectX.

For a Windows game I'd use a .NET language, C#, and perhaps XNA. I feel that these choices offer the swiftest development cycle and the best use of programmer time and effort. If I had an army of C programmers and legacy OpenGL code to leverage I might feel differently. It all depends on the goals, requirements, resources, and environment.

There is no best language! ( Someone find Martyr2's link. I gave up, but it's good. :P )
Was This Post Helpful? 0
  • +
  • -

#14 anonymous26  Icon User is offline

  • D.I.C Lover

Reputation: 0
  • View blog
  • Posts: 3,638
  • Joined: 26-November 10

Re: Best Language for Game Programming

Posted 27 November 2010 - 12:17 PM

View Postbaavgai, on 27 November 2010 - 05:02 PM, said:

C++ is an excellent general purpose language. It does offer cross platform, OO, and low level functionality. It is not the "best" language. There is no best language. To state uncategorically that there is a best language reveals profound ignorance.


Aw, that's hardly fair. The facts speak for themselves! If it wasn't the 'best language' it wouldn't be the most widely used, and generally the best choice for writing games.

View Postbaavgai, on 27 November 2010 - 05:02 PM, said:

C++ is actually a multi paradigm language. The way it handles OO is loose and that low level access means that you can shoot yourself in the foot with a bazooka rather than a pistol. Cross platform isn't intrinsic, either. You generally have to work at it.


As the saying goes: "with power comes responsibility". Because you can shoot yourself in the foot because of the power of C++ doesn't make the language bad, it makes the programmer bad if they botch things up. :)

View Postbaavgai, on 27 November 2010 - 05:02 PM, said:

Yes, C++ is commonly used in production houses aiming at multiple platforms. Plain old C is probably used just as often for this and it's hard to rank C++ the winner in the power programmer cross platform category. Of course, multi platform means multi platform support and many shops are content to stick with one.


Not sure where you're going with this.

View Postbaavgai, on 27 November 2010 - 05:02 PM, said:

Let's say we know we're developing for Windows. What's the best language? There's still none, but C++ isn't going to buy you that much. You're talking to the Windows API and any Windows language can do that. Speed is not a big deal; your bottleneck is in graphics and all of that MUST go through DirectX.


No true. The best language is the one where the most refined binaries can be built for the platform, and given the very high level of efficient programming that C++ offers, unless you are going to write your games in assembler the mind boggles as you how you can argue any point that goes against C++.

Secondly, not all graphics have to go through DirectX if an in-house SDK is created that manages the graphics routines that DirectX otherwise would. Depending on how the system is locked down though, some aspects may be reliant on DirectX given that it is a core runtime environment on the Windows platform.

View Postbaavgai, on 27 November 2010 - 05:02 PM, said:

For a Windows game I'd use a .NET language, C#, and perhaps XNA. I feel that these choices offer the swiftest development cycle and the best use of programmer time and effort. If I had an army of C programmers and legacy OpenGL code to leverage I might feel differently. It all depends on the goals, requirements, resources, and environment.


Fair point, but in the real professional world of game development, also programmer time and effort is critical to project success, we also have to work around the limitations of specific platforms and use the tools that most efficiently utilize those resources. The extra layer of the .NET Framework over building source directly for the platform only adds extra bulk to the finished release binaries. You want only the code require to describe functionality that is small and concise as possible.

View Postbaavgai, on 27 November 2010 - 05:02 PM, said:

There is no best language! ( Someone find Martyr2's link. I gave up, but it's good. :P )


Let agree to disagree on that score. :)
Was This Post Helpful? 0
  • +
  • -

#15 stayscrisp  Icon User is offline

  • フカユ
  • member icon

Reputation: 999
  • View blog
  • Posts: 4,177
  • Joined: 14-February 08

Re: Best Language for Game Programming

Posted 27 November 2010 - 12:36 PM

I have found C++ to be a great language to develop games in but I wouldn't go so far as to say its the best language to develop games in. I guess it depends on what kind of game you are trying to develop, an arcade type game (SHMUPS and the like) could be developed, most likely, in half the time using C# as opposed to C++.

@ Your design pattern argument is flawed as is your OOP argument, both of these are usually either to stick to using a language such as C#.

I am definitely not disagreeing with you that C++ is a powerful language to develop games with but I don't think it's as black and white as you state.

This post has been edited by stayscrisp: 27 November 2010 - 12:39 PM

Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2