2018-09-23 13:35:05

As one following these fora more or less on the sidelines for some time, I have noticed a very common question phrased in many different ways: What language should I choose?

The result of asking this question will most likely be a lot of people giving the response that the language they use, is the right one. If you keep reading and you’re so lucky that no flame war Is started you can pick exactly the language you actually would have liked, but the chance is that you did not get any useful feedback.

So why do I write this text? Am I not just as biased? And here the answer is of course a big “Yes”. However, I dare to pretend that I at least have some knowledge based on my education and work as a software engineer.

So, to be up front with my own bias I will breafly talk about my own journey of languages. I started out in web development and back then It came down to either ASP or PHP. I did not like the PHP guys, so ASP it was. I know, very rational. From there it whent to Visual Basic .NET and later C# (C-Sharp) which I have held to for years with the sporadic look into languages such as F#, C, Go a bit of Python, and of course Java.

Now you know where I come from language wise, but before I start to describe why my pick is so much better than all the rest I will put up some points to keep in mind when you have to pick a language for your future game.

The first and most important point: Pick a language that you actually would like to use. If you e.g. pick C#, but hate it for whatever reason the chance is that you will never get very far.

Second, pick a language that is established and well used. By doing so you can get much more help and speed up development by using third party libraries. Developing everything on your own is not worth it and it is not fun to develop your own basic data structure before you can implement the next cool feature in your game.

Third, Audiogames.net is not your place to go when you need help with a specific problem not related to audio gaming. Go to Stackoverflow and google. They are your greatest resources and even though I have developed for years I use them daily. In short, learn to use google!

Fourth, If people starts talking about performance, ignore them. They probably do not know what they are talking about. Most languages can be used for game development unless it is a huge and complex game which you will not develop until you  have years of experience anyway.

There is of course many points which could be added, but these are those I believe are the most important. So now, let’s get started with some of the languages.

Language: C# (C-Sharp)
Now, if you have read all the above you will not be surprised that I think this is the best pick. So, why is this so great? You can develop pretty much everything in this language to what ever platform you would like. There are lots of frameworks and libraries out there supporting everything from Data-mining, web development  to hard core game development, e.g. take a look at Unity, which is a high level framework / platform or at Monogame, a framework that is a lot simpler to get started with and let you develop your own game engine. The language is widely used and is itself still highly developed on. All of this makes it easy and quick to get a new game going.

Language: BGT
Why is this language here? Because it is great for those who just want to develop a small and simple game. There is no reason to pull down the heavy stuff from the shelf like C# and C++ if what you want to develop can be done with a few hundred lines of BGT. It is easy to learn and you can get great results with its very limited resources. However, if you want to develop a large game with networking and 3D sound BGT will hit a wall

Language: Python
This is a very versatile language and it is easy to get started with due to its dynamic typing. This means as a new developer you do not have to consider the type of your variables Just as often as with a strongly typed one such as C#, Java and C. However, this can also become a liability when your game starts to grow in complexity since it can be hard to find bugs.

A benefit of Pythons approachability is that a lot of people knows it and you can find many libraries out there, also, you do not have to learn about wird characters everywhere and put semicolons after most lines which can be very annoying and look somewhat irrational when you do not know the reasons behind it.

Language: C / C++
First, C++ is more or less build straight upon C, so I will talk about these two as one (Anyway, no one in their right mind would develop a game in just C). I will not recommend this to any new developer since the learning curve will be close to straight up. This is HARD. However, if you get the hang of this you can develop some great and very complex stuff. You can find support and libraries for pretty much everything, but I warn you, even as a professional, I would not develop anything in this unless I absolutely had to.

Language: Javascript / Type-script
The smart boy in the yard. With this, you can do everything and probably also rather quickly. The problem starts when you want to find a bug or the complexity starts growing, which often is rather sooner than later. However, a very great benefit is, that everyone can run your game since every browser out there supports it. A good way to alleviate some of the problems Javascript inherently has is to use a language called Type-script which is turned into Javascript when compiled.

Just like BGT, Java- and Type-script can solve a lot of the challenges faced when developing a small game, just be aware that when the code base starts growing you might want to go look somewhere else, even though these two do not have the same limitations as BGT when it comes down to libraries.

Language: All the rest.
Remember that there is more than hundred languages out there, and mentioning everyone is impossible. One such as Java is very close to C# and the older Visual Basic languages is just fine, even for complex games, but I do not think that many new developers would pick this since the field of programming languages have moved a lot since back then.

A language like Go is still rather new even though it starts growing in the game development community, it is still very small. Also, it had some issues with garbage collection which made the game lag at times and I do not know if they have fixed this yet.

The language Rust is basicly a replacement for C and unless you are a professional with a very specific need you would not develop a game in it.

At the end I will recommend that you consider making your game or parts of it open source by uploading it to Github, by doing so other people can look and learn by your code and so can you with theirs. There is no reason to reinvent the wheel if someone already have done it. I am aware that this can be a hard decision and there can be a lot of good reasons, but at the end you make it easier for people to develop great things by doing so, including yourself.

I hope this can help some people out there and if you have feedback it is very welcome! smile

Thumbs up +6

2018-09-23 13:55:08

I agree with all what has been said here. Even though I believe unity is not really accessible for us.  Since I've never went  in to it, can't really confirm.

If you want to get in touch with me you can follow me on Twitter
have a nice day.
Paul

2018-09-23 14:14:32

Hi there. Thanks for all the great info you shared with us. You said everything about C# but not a fiew things.
C# can be decompiled really easy. Even if you obfescate your code, I heard you can still decompile it with some tools out there. Of course everything in any programming language can be decompiled after all, But the hardness and complexity is what matters.
C# is relyed on dot net. So this brings some problems like if someone doesn't have the required dot net version on their system, and stuff like this.
I've been developing with C# as a newbie for a fiew months, Then I took python because of the reasons I mentioned here plus this one: C# has great libraries like direct sound, Open tk, Manogame, and unity which isn't accessible. But all of these are so complex except manogame, And all i needed to manogame do for me was handling key presses which i was already doing by using windows.input and PresentationCore although i'm not very sure about windows.input, Could be windows.forms.input. And setting up and using sounds in direct sound is a true pain, At least it was, for me. But now in python I just can play a sound, position it in maximum 7 lines. And now we get to the thing you said above that people really like their own choices haha. No. I said this all to ask you in the end, How did you, or possibly how do you deal with all those things I said about C#. I'm really interested to know. Well knowing two programming languages never killed anyone and i think it won't kill me neither. Thanks for reading my long text of grammar errors big_smile.

Add me on skype: kianoosh.shakeri2
Or follow me on twitter @kianoosh shakeri

2018-09-23 16:53:33

BGT is the best for games and this forum is for game related things.

Regards
T-m

Thumbs up

2018-09-23 18:32:27

*laughs*

If you want to get in touch with me you can follow me on Twitter
have a nice day.
Paul

2018-09-23 22:56:01

Greetings. You got me curious sir about C++. Is it with the development speed you'd prefer to use it when necessary or is because of its complexity? since i'm learning C++ and just your recommendation got me curious.
regards

You crushed my soul under your powerful fangs in cold blood. You torn it up, bit into it, slapped it too hard till it came apart, with each piece flying in every direction. You get to be happy now! or maybe, there's a little bit of humanity left in you?

Thumbs up

2018-09-24 00:06:28

@kianoosh: Some good points.
About obfuscation I believe this is somewhat overrated, if people really want to crack the application they probably achieve it anyway and then you have just wasted a lot of time. You have to consider why you would like them not to read your code. If your game is a single-player game then who will they cheat if they manage to manipulate some flows? Nobody but themselves and most people realize it is rather boring to be invincible with unlimited resources for long. If it is a multiplayer game the important logic is, or at least should be, on your server and whenever a server receives data from a client it should be validated. If your concern is getting payed for your hard work consider changing your payment model. There is a good reason more and more companies change their payment to a by-monthly payment, maybe for small perks or for being able to signing in to their account. If this is not an option then at least use a private-public key to produce your license-codes so nobody can produce a key-generator.

If you are afraid of being ripped off then take a look around at the forum and see how people react to so called clones. smile

When it comes down to which version of .NET the user has installed you are straight on. It can be a total bitch and you have to consider your target audience. However, most people have access to a Windows machine for games and here you can rely on what is installed in either Windows 7 or 10 by default. You can also decide if you really want to spend x amount of time to increase your potential audience by y amount, e.g. do you want to support Windows 7 with no service packs? Probably not since they will be so full of malware that any decent game will kill the machine for good, however, targeting the latest version of Windows 10 will probably limit a bit too much, it all comes down to which compromises you are willing to take and be honest about them, remember it is your time spent on a in or decrease development time.

About the code for sound you can take two approaches with Monogame, the first is by using their Content Pipeline tool which packs the sounds (And graphics) into one file which you then can pick and choose from. However, when I make my small games (And no, I have not released any) I use a file stream since it allows me to make people (my friends) pick their own sound files if they wish so.

Here are some sample code
using (var fs = File.OpenRead("Content/Navigate.wav"))
                _se = SoundEffect.FromStream(fs);

            _sei = _se.CreateInstance();
            _sei.IsLooped = true;
            _sei.Play();

Be aware that I have defined the variables as fields so I can dispose of them correctly when the game is closed.

@gonzalez2016s.alovver
I prefer to only use C++ in rare situations since I have to consider many details to avoid errors and potential leaks. Also I have to do more things by hand and what I have gained is only a tiny bit better performance compared to a lot more time spend. Of course there is situations that calls for C++ and what it can bring to the table, but I just don’t get there very often (For me that is next to never)

I hope this helped. smile

Thumbs up +1

2018-09-24 03:07:57 (edited by defender 2018-09-24 03:08:25)

Can't you detect if the .net version needed is missing and just tell the user and ask them for permission to launch the proper .net installer? just download it from ms or package it.
I think I've seen games doing that.

This... -- Is CNN'.
Well Ted, it sure looks like there's been uh, quite a bit of violence around here
"aaoh, that violence was terrible'!"
Yeah it was, pretty bad.

Thumbs up

2018-09-24 04:43:27

There's a few different ways of going about it.

The first, and undeniably simplest, would be to add each version as a supported runtime in the config for your project, then when starting check to see if the proper version/features are available.
The second would work by creating a bootstrapper in another language, preferably C/C++ due to the small size, and checking availability then running the app. While you create that launcher, why not implement additional features/obfuscation that would be much harder to tamper with?

Thumbs up

2018-09-24 05:47:14

In python, how do we go on packing our sounds in one file? And, for now, I am using OpenAL sound lib(learning to use it anyway tongue ) but if later on if I decide to go on FMOD, will it be better? I have heard that in C# FMOD is the best sound lib and with python bindings you can make it work for your python codes as well. I didn't dive deep into fmod because nobody uses it and if I start learning and asking questions here I wouldn't get any useful responses here.

Deep in our hearts is a capacity of infinite good or infinite evil. What path we choose is up to us.
In the end, we all have to meet the same fate-the oblivion of nonexistance, an event horizon from where not even thought can emerge...

Thumbs up

2018-09-24 06:08:57

Typically assets are stored in compressed formats like renamed zip files, with added passwords for security if desired. Optionally you can also pack them inside your applications binary.

-BrushTone v1.3.3: Accessible Paint Tool
-AudiMesh3D v1.0.0: Accessible 3D Model Viewer

Thumbs up

2018-09-24 06:19:08

Oh no. That'll make my application binary too big. So, after I store my sounds in a compressed zip file, I change it's extension after adding a password? That's it?

Deep in our hearts is a capacity of infinite good or infinite evil. What path we choose is up to us.
In the end, we all have to meet the same fate-the oblivion of nonexistance, an event horizon from where not even thought can emerge...

Thumbs up

2018-09-24 06:39:43

I use FMOD, and know how to use it. So there's at least one person who uses it. Also, just saying... asking "what language is better" or "which language should I Choose" isn't  a wise idea.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.

Thumbs up

2018-09-24 08:56:01

Woe that's great! Can you send in instructions about how to install it in python, and it's documentation? I'll look it out.

Deep in our hearts is a capacity of infinite good or infinite evil. What path we choose is up to us.
In the end, we all have to meet the same fate-the oblivion of nonexistance, an event horizon from where not even thought can emerge...

Thumbs up

2018-09-24 23:07:21

@14, FMOD does not have a Python API. I doubt it ever will. And, frankly, I don't think you could write a well-written FMOD API in Python anyway. As for its docs, fmod.io is the place to go.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.

Thumbs up

2018-09-25 13:23:58

It does. PyfmodeX. It is a nice one though i still don't know how to position sounds with it, Actually i didn't try it ever heh but it looks complete.
At post 7 thank you for your answer

Add me on skype: kianoosh.shakeri2
Or follow me on twitter @kianoosh shakeri

2018-09-26 01:04:30

@16, Pyfmodex is bindings to the fMODX library. FMOD and FMODX are not identical. FMODX was deprocated -- you now should use FMOD.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.

Thumbs up

2018-09-26 12:48:15

Weird, But it uses fmod and fmod64.dll not that fmodex.dll thing. At least i could import it and put those libraries next to my script and worked fine

Add me on skype: kianoosh.shakeri2
Or follow me on twitter @kianoosh shakeri

2018-11-02 07:09:44

thanks for do this post.
have a lot of great suggestions and things about very great languaje.
Thanks for doing it :3

So...
anione knows a good wrapper of fmod for c#?

Thumbs up

2018-11-02 08:25:38

Hello.
My post will not be a surprise for most of those present in this topic. There were a lot of my topics on choosing programming languages on this forum.
Chripa, I thank you for this topic.
If talk about me, my problem is as follows:
I'm interested in not only the development of audio games. I'm interested in the development of desktop, web applications, robotics, etc. For me, it would be ideal to find a programming language that could help me in everything.
About C/C++. I'm interested in the development of MUD games. Unfortunately, many MUD engines, MUD games were developed in C/C++.
C is a simple programming language, but this is difficult to solve problems. In the Russian world there is an open source MUD game, work on which was started in the early 2000s. It was based on the MUD Circlemud engine that C used. Over time, this was rewritten in C++, Boost, Python, and other things were added.
I don't think that my little knowledge will be enough for such work.
So far I am learning C++. But I understand that to develop good projects you need to study this programming language for several years. For this reason, I'm looking for other solutions.
About C# and Java. I heard a negative opinion about java in this forum. But 1 of Americans audio game developers told me that Java is more promising than C#, but C# considers it better for audio games.
Now I choose between Java and Python. In any case, I will learn Java, but I have to choose the main programming language.
Yesterday I was interested in the Go programming language, and I think about it.
In any case, now I take this not as seriously as before. I am familiar with the system administrator who recently told me about the method of choice that he read from a book on cybernetics. This method is called "The Ballad of the Bandit."
As I remember, the point is that the gangster has 2 pistols, and he needs to choose the one that gives less misfire. How to choose the right one?
At the beginning of the book, they say that checking each of the pistols is a bad idea, and mathematical arguments are given.
The proposed idea. Take any of the pistols, and if this pistol misfires, take another.
I'm sorry for my english.
Thanks.

Thumbs up

2018-11-02 14:55:10

@jonikster, the problem with your post -- from what I understand -- is you want a language that does everything you could possible want to do. The issue is that your scope is far too broad. There is no one-fits-all programming language. Your not going to find a programming language that can do everything you can possibly want to do (languages like C++ can get close, but the more complicated of a project you want to make, the more code you will need). The lesson many of us have tried to impress upon you is to plan your projects out first. Forget what you want them to do in 2 months, plan them out now. But plan only one! If you plan five, or six, or nine, or thirteen, or twenty eight of them, your not going to get anything done! Put those on the back burner, as they say, forget about them. Perhaps log them somewhere, take a note of their existence, but don't attempt to start them all at once. Once you have your first project planned out, start looking at various programming language options. Use sites like RosettaCode and Google as well as other sites that you'll find along the way to help you. Don't rely on this forum to provide all the answers.
Once you've found a programming language that you believe will suit your project, learn it, if needed. Practice it. Write a few programs that do a lot of things (i.e. multithreading/concurrency). This stuff you will need; it may seem useless to you, but you will find yourself using all of these concepts in your actual project. Once that's done, start programming your project. Feel free to scrap multiple versions; that's fine, we all make irrecoverable mistakes. But don't skip and jump and hop around like you've been doing; if you do, you will live a constant life of confusion purely because you will be adrift, unable to know what to do.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.

Thumbs up +2

2018-11-02 15:24:26

Ethin, Good. For example, I'm most interested in the development of MUD games.
And how can I make the right choice, if for this I can use C, C++, Java, Python, JS and even Go!

Thumbs up

2018-11-02 16:00:53

@jonikster, I can't answer that. The right choice depends on you and what you feel the best programming language would be for your situation. Historically it has been C, but there have been more MUDs written in javascript and go (as well as others) these days. Its all up to you. No matter which language you choose, I wish you luck!

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.

Thumbs up +1

2018-11-03 06:25:32

hi,
about fmod, it could be wrapped with ctypes (if it is a c Library)
but my idea:
1. IL code (which c#, vb .net use) by itself can be decompiled easily even the variable names can be retrieved (unless it is obfuscated)
although if they are obfuscated, people can deobfuscate/decompile them as well!
the fact that if something could be read by computers could be read by human beings as well is true, but you should consider security as well!.
2. regarding python, i advise people to learn it due to its cross platform support, vast amount of libraries etc
3. regarding c/c++, you can do everything in them, except that they are low-level and you should write up some codes which could be done automatically for you in higher-level languages like python/c#
but, if you learn to code in them, you can achieve great results like very fast execution etc (since their code are compiled into assembly then into machine code and they'll be linked into executable)
4. regarding java:
if you want to develop something for android, go for it.

bitcoin address: 1LyQ3hziMC2DTnCtgM3V1zfuZ73P3CYT9P

2018-11-03 06:57:54

visualstudio, About Java. I'd like to develop on Android. I don't trust C# in this. For this reason, when I chose between C# and Java, I chose Java.

Thumbs up