GAME PROGRAMMING: WHICH LANGUAGES DO YOU PREFER?

Posts

Pages: 1
Hello, I am mappel6, a rising indie developer currently working on a couple of projects.

Now, getting right to business, I know some of you out there at least have some experience with programming languages. For some of the games I am working on, I am dabbling in some programming languages to see which one is the best for me. I'll list here which programming languages/frameworks/whatever I have been using for these.

DarkBASIC
C#
XNA
C++
Java
Ruby(in conjunction with trial version RMXP)
Trial version RMVX
RM2k3
RM2k

While these are not all programming languages (referencing the RPG Makers I listed), I am wondering a few things. 1: Which of these have you used, and 2: Which of these are the most powerful or easiest in use for game development. I am awaiting what everyone has to say.

~mappel6
Dragon-Elf Games
I rather like JavaScript for game programming. The fluid type system it has is quite nice for making games with.
Squirrel is nice, too. It's really pretty similar to JS, but fixes a few fundamental flaws JS has.
C++ is absolutely miserable for making games. I usually only use it when games are concerned to modify or add to the engine.
From the few programming languages I've used, Java is my favorite so far, though I know that my opinion may change in the future. I'm going to learn Ruby as soon as I have more free time, for reasons that should be pretty fucking obvious here of all places, and that may become my new favorite. May also go teach myself Javascript later on.

By the way...
author=FlyingJester
C++ is absolutely miserable for making games.

Heh. My experiences with C++ aren't too happy either. It seems like C and Java got drunk in Vegas one night and C++ was the result. But even so, almost every game studio seems to use C++. If it's so "miserable", why is it so popular?
Hmm, well I'm an Rm2k3 veteran, couldn't call it much of a script language or advice it to anybody to learn (newcommers are better off with ruby etc), but good use and experience with it learned me some knowlage about dataflow and architecture.

I also know how to edit the default systems in RmXP through the Ruby script, I never attempted to create a full custom script though, it's something that is on my to do list =).

I wish to learn javascript. With the html 5 <canvas> method one would be able to make games and that's really something I would like to learn. It seems pretty handy for casual webbuilding too. Since game design is miles away from my profession I really have to make choices regarding in which of the languages I will put time and effort to learn them. That said javascript seems like a good choise =).
slash
APATHY IS FOR COWARDS
4158
I make most of my games nowadays in Unity using C# to script. I didn't know how to program at all two years ago but I forced myself to teach... myself and now I wouldn't go back. You get so much freedom!

But then again for making RPGs you have to set up databases, which is not an easy task.
I wouldn't call most of what I know a language.

I found myself pretty awkward at Rpg Maker XP when I tried it. VX Ace also, despite it being a pretty easy code (the battle part was frustrating, because you had to work with areas, rather than just drawing a zone of monsters).

I'm really good with 2k3, I've made more than a few custom menus and worked with alot of strange codes to get things to work even in battle. But yea, that's not really a code.

I've also tried C++ because it was the code I grew up with. I got the second half of KazString done, but I had to be force-fed alot of information through tutorials. I can't figure out alot of the config processes either, meaning another code that should just be a matter of loading against the configuration, isn't working for some reason.

Sailerius
did someone say angels
3214
There's nothing quite like C# with XNA/Monogame. Great language, great library, great toolchain.
khazga
Perpetual Nuisance Machine
1000
+1 for C# using the XNA/Monogame framework.

But during the gap between using RPGMaker and XNA, I dabbled in an obscure 2D/3D game language called BlitzBasic.
I'm a software engineering professional and I've used about a couple dozen different languages throughout my studies, career, and hobby projects. The answer to "which language do you prefer" strongly depends on the type of project that I am working on. The reason why there are so many languages is that each have their own strengths and weaknesses, making them better suited for different types of applications and target systems.

I'll give my brief opinion on the languages that I know about.

C++
Very powerful, but also very difficult to learn how to use well. This language is "closer to the hardware" and as a result can extract maximum performance from the system as long as you know what you are doing. I wouldn't recommend this language to anyone who doesn't wish to invest a significant amount of time in understanding computer science concepts.

Java
Great for making applications that can run across a variety of platforms. You really don't need to do much to make Java programs run on Windows, OS X, Linux, or whatever. The garbage collector also makes it impossible for you to accidentally introduce segmentation faults or similar types of run-time errors, making the code somewhat more robust. However, performance suffers as a result, but for simple games this shouldn't matter.

Ruby
Ruby is a scripting language, not a systems language, and thus you don't even need to compile it to run your programs. I've only used it a little bit, but it seemed similar to Python, but had some very cool features that made it easier to write certain pieces of code. The problem with scripting languages like Ruby is that the performance never matches a systems language like C++ or Java.

C#
The only language on the list that I haven't used. I stay away from this one because it is embedded in the Windows world and I don't like any language that is biased toward one particular operating system or the other (yes, I realize there is Mono and that C# applications can run on non-Windows systems). I have heard great things about the language though, and it seems like it's sort of "in between" C++ and Java to me, in terms of potential for performance and easy-to-use.


author=CyberDagger
author=FlyingJester
C++ is absolutely miserable for making games.

Heh. My experiences with C++ aren't too happy either. It seems like C and Java got drunk in Vegas one night and C++ was the result. But even so, almost every game studio seems to use C++. If it's so "miserable", why is it so popular?


I've been using C++ in game development for 8 years and I disagree that it is miserable to use. It is probably miserable if you don't have a really solid understanding of the language, design paradigms, and a firm understanding of computer systems as a whole. The reason why game studios use C++ is because it produces the highest performing code. You can write C in C++ programs, and furthermore you can insert assembly instructions inside your C++ code if you need to. If you're a AAA studio making cutting edge games, you need to extract all the performance that you can. But if you're simply making mobile apps or puzzle games, you could easily get away with using a language that doesn't perform as well, but is easier to use.

The reason I use C++ is because I already had a firm understanding of computer science and the language itself when I started my project. But my project could just as easily be written in Java or Ruby and probably work the same, as we don't have any super-high performance requirements for my game. Although since we wrote our own engine from scratch rather than use an existing one, or using toolsets like XNA, it's a lot more sensible because you always want your engine to run strong and perform well.



In summary, if you are wanting to learn a language to write a game, you need to ask yourself these questions:

- How much does performance matter? (e.g. am I making an immersive 3D MMORPG, or a simple 2D action game)
- Do I have a firm understanding of how computer systems work, and if not am I willing to invest some serious time studying to learn this?
- Is my goal to starting writing a game ASAP, or do I want to really study and master a language before I begin writing games?

Based on your original post, I would recommend you stick with an easier language like Ruby. There's no reason to go hardcore C++ unless you're looking to get into the gaming industry as a developer or you're working on some serious next-gen type game or engine.
I'm not saying that C++ has no place in game making. But I wouldn't want to use C++ and not have at least some sort of scripting. Not only are a lot of scripting languages fast (certainly fast enough), but that's what they are there for. There's power in C/C++, but that's not needed at every level of design. I rather enjoy writing systems in C++ (I am still writing a game engine in it), but I wouldn't want to write an entire game in it. Not that it can't be done, just that I wouldn't want to.

Plus, many engines (proprietary or not) use the power of C++ and C libraries and give the controls to some other language.

As far as assembly mixed with C or C++: the compiler is smarter than everyone and anyone. No one can consistently write assembly better, faster, or more efficient than a compiler can generate it. And it's so incredibly easy to shoot yourself in the foot with assembly (if you're eyeing the assembler keyword, you've already loaded the gun), that it's just not worth it. There are easier ways to get better performance, much easier ways. I've been told that by pros, and I've experienced it myself, and I've seen people disbelieve and then be smote down to the ground.

If you really absolutely want ultimate power, Fortran, to this day, is still faster than C or C++. And it supports external linkage with C, for use in C and C++ programs. And it has greater parallel execution support built in, automatically.

What I'd really like to do is write games in Mercury. But that's not going to be a realistic option ever.
I mainly use ika, as my engine, which uses Python scripting. I like python very much, for game scripting.
My first scripting language was actually ruby, but I found, that ruby was a bit slower than python (or the software rendering of rpg maker crippled the performance), maybe the latter...

About lower level languages: C++ may seem overcomplicated for a newbie, but it is sometimes necessary. Today's interpreted languages are approx. 30-100x times slower, than C/C++, and if one wants to create a more complex game (heavy action combat, lots of pathfinding), it's the only way to go (for the engine, not the game logic)... The other path would be java. It's slower than C++ in general (around 2x,3x times) but that should be enough (you don't want to make the next starcraft, or elder scrolls game, don't you?:D)
Though I havn't tried too many different languages, I prefer c# and xna for how they setup accesibility in classes (for instance: get and set). Xna because if focuses deeply for game developement for both 2d and 3d environments. One downfall though is that it mostly works for windows devices, so maybe java might be better in that field.
LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
My MUD runs in Pike, which is very similar in syntax to C++, but is interpretted in realtime instead of compiled, and has a number of extra tricks. For example, you can mix functional programming with procedural and object-oriented programming. It's actually extremely versatile. I usually like it, but occasionally it's a headache specifically because you can do so many things with it, and I still don't know all those things. The fact that the game has had over 50 different coders work on it over the years, many of whom had no previous programming experience at all, makes me question whether this language was really a good choice.

The only other language I've used in game design is Ruby, in conjunction with RPG Maker XP/VX Ace. It was easy to pick up, at least. I learned how to do everything Ruby can do that is used in RPG Maker scripting in a couple hours, having never worked with a scripting language before. Of course, that was only, like, maybe two things. It doesn't have a lot of complex capabilities. Fortunately, that makes scripts that are written by other people and posted online very easy to understand.

I'm not sure whether the slowness of simple things like updating text and animations on the screen is caused by Ruby or RPG Maker. I suspect it's RPG Maker, though. The graphics modules are probably only hidden to keep people from being able to mock Enterbrain for the way they're coded.
Pages: 1