1

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 +3

2

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

Thumbs up

3

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

Thumbs up

4

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

Regards
T-m

Thumbs up

5

*laughs*

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

Thumbs up

6

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

7

@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

8 (edited by defender 2018-09-24 02: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

9

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

10

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.

Impressing girls is harder than chewing stones, so better chew stones and get your teeth strengthened first, otherwise you might end up shattering them!
email: My Email Id
why not give my post a thumbs up if you like it, thumbs ups are free of cost, after all.

Thumbs up

11

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

12

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?

Impressing girls is harder than chewing stones, so better chew stones and get your teeth strengthened first, otherwise you might end up shattering them!
email: My Email Id
why not give my post a thumbs up if you like it, thumbs ups are free of cost, after all.

Thumbs up

13

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

14

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.

Impressing girls is harder than chewing stones, so better chew stones and get your teeth strengthened first, otherwise you might end up shattering them!
email: My Email Id
why not give my post a thumbs up if you like it, thumbs ups are free of cost, after all.

Thumbs up

15

@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

16

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

Thumbs up

17

@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

18

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

Thumbs up