2019-01-05 01:58:50

Hi guys.
There will be a lot of text. I don't have very good English, for this reason I ask you to forgive me.
When BGT came along, I was just starting to learn programming. I can say that I have tried many languages, but I stopped at PHP, because it allows me to work in my country.
Of course, I tried BGT.
Now I can say that this is a very good choice for offline games.
My experiments with BGT led me to network. And I realized that when sending a large amount of data begins, BGT doesn't work correctly.
I saw the Crazy Party, which was developed on BGT. It doesn't require a large number of requests, for this reason, it works well.
I saw STW, which was also developed on BGT. It works well.
But I saw the redspot. I see the firefight. I see poor network performance in BGT when sending a large number of requests. For example, when firing a machine gun.
For this reason, I decided to use other programming languages.
What was my choice? C++. For some reason I thought it was the perfect choice for me.
When I got to pointers, my brains began to melt. I realized that I would spend a lot of time not on the algorithm of the game, but on the mechanics of the game.
Does anyone remember un interview with BGT developer and Blastbay founder Philip Bennefall?
He said that one of the goals for which BGT was created was so that when developing audio games one could think more about the algorithm, the logic of the game than about the mechanics of the game.
I would like to get this result.
After C++, I began to look at C#, Java and Python.
I was confused.
Now I understand that Java is not my choice, because Java will be paid soon. It remains to choose between C # and Python.
On the one hand, I would really like to make friends with Python. Why?
First, it's a simple programming language. Recently, I read an article about Python productivity.
Secondly, Python has a large number of libraries. These libraries allow you to create many things without going beyond a single programming language.
I dreamed that I would be like Google and many other developers who use Python wherever possible. But I hurried!
In Python, I found bad things in my opinion:
First of all. Did you play SoundRTS? Why is this game so slow? And this game was developed in Python!
Secondly. When I started learning Pyglet, I encountered the problems of the complexity of object-oriented programming and decorators. In addition, there are generators in Python, which also cause difficulties.
When I met games like Entombed and Three-D-Velocity, I decided to learn C#.
I liked C#. True. I could create applications with a GUI without wasting a lot of time.
When Kianoosh studied C#, he shared examples. I have seen working with the keyboard through Windows.Forms. But I realized that this is not good, because it causes difficulties if I need to use key handling in different methods, because key handling through Windows.Forms occurs in events.
I thought that my knowledge in C# was enough so that I could start developing games. But when I looked at the Three-D-Velocity code, I was shocked. I don't understand anything!
The last stage for today is my search for network programming.
I have not received information from Python, but I learned that the network in C# works more efficiently and more efficiently than in Java.
You remember, recently, on the forum, the guy with the nickname Jonikster wrote about Sockets and Twisted in Python.
After BGT, my network complexity causes in Python too.
When I looked at it in C#, it seemed to me easier than in Python.
Guys. I have only 2 questions.
How should I choose between C# and Python?
How do I start the right way?
Thanks!

Thumbs up +1

2019-01-05 02:04:04

Stop! Stop! Please, don't ask questions like this. All you'll do is incite flamewars and arguments.

"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

2019-01-05 02:33:29 (edited by cartertemm 2019-01-05 02:35:47)

I think your looking at this the wrong way, avoiding possibilities because they look too hard. In BGT, everything is layed out and given to you. In other languages this isn't the case. You'll be forced to find a solution that works. This might, nevermind will, require getting your hands dirty if you ever wish to be successful. Not much in our world is just, easy. If it were, everyone and their less talented friend would be churning out new content by the day.

Here I see the BGT trap that's taken over parts of this community.

I'll leave you with some comments. for starters, I've been programming in python for years now. It's been perfectly fine for my needs. If you decide to go that route, I'd be more than happy to help you out. Python, really isn't all that slow. The ones who insist on this fact are just inexperienced, as it's usually the implementation more than anything. You can't look at other games and say they're slow or bad so must be the language in question. Don't discard a language because X or Y game or library doesn't work well, seriously. Just grab something, play with it, use it, master it. Stop questioning so much. Please don't head down the pondering path this way. You could either learn a language and code in it, or spend that time wondering what language to learn and use for coding. Up to you, really. Either way, you have my opinion and that's python.

Thumbs up +2

2019-01-05 02:47:59

Nikita,
Python is simpler than C#, and that's a fact!

Thumbs up

2019-01-05 02:59:12 (edited by Ethin 2019-01-05 03:02:11)

@jonikster, says the person who cannot, for the life of him, ever decide what programming language to use for any project.
Carter is correct though. Don't question so much. Find a language that clicks; don't listen to those who claim that "Python is slow" or "C++ is hard" or "C# is more complex" or "Python is simpler". Most of the people who say those kinds of things either don't have experience with the languages in question, or they don't know what their talking about. The speed of a language requires benchmarking, and benchmarking is incredibly, incredibly unreliable and untrustworthy.

"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

2019-01-05 03:21:29

Hi.
Your overthinking this. Everything I read in that post sounds like you are giving up when things get a little hot. You will never succeed at programming if you do things this way. If you really want to do programming, pick one language and stick with that until you understand what you are doing and can do things without thinking too much.
As far as worrying about whether a language is slow or if you can't understand something, work at it until you can understand a particular thing. And don't base your decision on how other people's games and apps run. Maybe sound rts is slow because it was coded badly or maybe it's something else entirely. If you wrote something similar in python it might run faster than sound rts or it might be even slower.
If you ask ten different programmers which language is the best you will get ten different answers every time. What do you think about c# or python? Which one best suits your needs? These are the questions you need to ask and answer yourself.
Hth.

Guitarman.
What has been created in the laws of nature holds true in the laws of magic as well. Where there is light, there is darkness,  and where there is life, there is also death.
Aerodyne: first of the wizard order

Thumbs up +1

2019-01-05 10:44:51

How do you choose the right language between csharp and python? Choose the one with which you are confortable with, the one you prefer, and stick with it. There is not a right or wrong choice. I could recommend you python but that's  only because I've been using it. Maybe you could study csharp and then you would be the one to recommend me that language.
How do you start? Read tutorials, practice, mess with code, ask for help when stuck in something.

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

2019-01-05 12:03:44

Hey @1, i'd personally not recommend you thinking python is slow only cause sound rts, maybe sound rts has bad code optimizations, cause think about it, it was developing for 11years, correct me if i'm wrong.

flawless victory!

2019-01-05 12:51:13

What's the best language to use?
That's easy. Ready for my answer?
The one you feel the most comfortable with.
There is no right or wrong way to do things. There are ways that are quote unquote better. But there is no wrong way to do something.
If people want to use BGT, let them use BGT.
If people want to use C Sharp, Python, visual basic dot net, ruby, node.js? Let them.
If people want to eat cake? Let them.

This community is too small for people who think they know it all and really don't to be telling others what they should and shouldn't use or what is quote unquote easy.

If people are going to give opinions on a language, , here's the best way to do it.


Hey Franky. I'm so glad to hear you want to join the wonderful and wumbulous world of programming. I am disappointed to hear you've chosen to use BGT as it contains a few pit falls to be aware of.
1. Antiviruses seem to have a major issue with executables, so this is something you will need to be ready for.
2. You will find that things like dictionaries are not as extendable as you'd like them to be.
3. You'll find certain convenience functions like foreach don't exist. If you don't know what this even means then don't worry about it. Just be willing to expand your horizons eventually with a more robust language.


Hey Franky. Welcome to the slippery world of Python. Grabbing this snake by the tail isn't easy, but here's a few things you'll need to keep in mind. Both good and bad.
1. Python is interpreted. In plain english this means that Python doesn't compile like BGT does, so there is no error checking until  runtime. Spelled a variable name wrong? Get ready for Python to traceback when your code runs. This is extra fun when your application is already out in the wild, and users report errors you have to quickly fix. I have lived this.
2. Python has tons and tons of packages written for it. Need a Python package to generate a random Game of Thrones name? You can do that. Need a Python package that talks to the amazon AWS API? You can do that.
3. Unless you know what you're doing, a Python package can easily be decompiled and have it's sourcecode retrieved.
4. if you plan ahead, your apps can run cross-platform.

I swear if I see another post like.
"OMG you use BGT it's dumb and you're dumb."
Or.
"Hahahaha Python is for losers it's too hard you're stupid for using it."
I will scream. If this community wants more games it needs to be willing to embrace developers regardless of the language they use. And for all that is holy. Stop using words like easy and hard. They are not measurements. What is easy for me might be hard for you and vice versa.

I'd be happy to sit down and write up something on the pros and cons of Python Vs. BGT, but I feel like this has been done already. If this is something that interests others, please let me know.

My name is Inigo Montoya. You killed my space bar. Prepare to die!

http://l-works.net

2019-01-05 13:19:11

Liam, but what do you think of other programming languages, such as C++ or C#?

Thumbs up

2019-01-05 13:27:22

I don't know enough about them to say. They were never things I dived too deeply in to. there are times I wish I had however. Maybe one day.

My name is Inigo Montoya. You killed my space bar. Prepare to die!

http://l-works.net

2019-01-05 17:50:45

Nikita:
I speak my opinion.
I worked with Python and I can say that it is a good language for this.
But for me, C# is the best programming language in audio games.
This is convenient, in addition, you can develop audio games for Android, which you cannot do with Python.

Thumbs up

2019-01-05 17:59:08

so theoretically you actually can make android apps in Python. I haven't done a ton of research in to this, but it's apparently very possible.
IOS on the other hand? Ooph.

for IOS and android development Rubymotion or something similar might be a good bet.

My name is Inigo Montoya. You killed my space bar. Prepare to die!

http://l-works.net

2019-01-05 19:05:39

Liam,
The best for Android is Kotlin. I don't know how Python or Xamarin works, But I heard that Xamarin works better.
But I talked about monogame.

Thumbs up

2019-01-05 19:14:24

At post1, You might want to check out munawar's BPC shared component dll library for C#, It has a tun of good things such as a nice key handler and a sound manager.
But generally what I chose for game development is python. CSharp is cool, But I chose python because I feel better with it. Well another reason could be the complexity of decompiling python executables in compared to CSharp, Specially when you protect your python code with cython. Python isn't slow, Nor CSharp is. What I can guess is that you haven't been in the world of programming enough to figure out that there are a lot of ways to do networking in python or in cSharp. I recommend you googling about networking libraries for python or cSharp. For instance, Python has got twisted and podSixNet for networking, and I'm sure a bunch of other libraries. CSharp has it's system.net, And ENet library which you can get from nuget manager, and again i'm sure other libraries are around for networking in CSharp. I've been using python and cSharp for enough to figure out, If you put enough effert to any of them, You can get in a line with both of them real quick, Specially if you know PHP or BGT.

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

2019-01-05 19:36:30

Liam, thumbs up for your post #9.  Very well said sir!

- Aprone
Please try out my games and programs:
Aprone's software

Thumbs up +1

2019-01-05 20:19:55

If games are slow, it can also just be badly designed. For example, if you have a machine gun which fires 80 times a second, you can either send 80 network events every second or send one on event and one off event with a timestamp and calculate things from there. If a specific game is slow you cannot conclude that every game written in that language will be slow.

Roel
golfing in the kitchen

Thumbs up

2019-01-05 21:01:28

hi,
first things first:
1. python is not slow by itself, it is the implementation that can make it slow.
even your code in c++ can become slow, and this only and only is your implementation
although python is interpreted, but thats not a good reason to say it is slow.
lua is interpreted as well, and it is used extensively in games.
2. what should i choose?
the answer is choose whatever you wish.
if you are comfterble with c#, go ahead and pick it up.
if you chose bgt, go ahead as well.
although you can take pros and cons into consideration, but the last decision is yours
3. i've chose bgt. then what?
no matter, although anti virus softwares flag it as a virus (due to it's bytecode appended into the end of the executable), and it has a workaround as well (add it into exclusion list), and it is not developed anymore, and of course you can't get any help other than this community, but it is easy to learn and it uses AngelScript which has a c-style syntax which makes it easier to learn languages like c++ and c# easier (not completely, but that will help).
4. i've chose c#. then what?
good decision. since you have more choices, and you have more control as well. in edition, you have threads which if you use it without knowing of what you are doing, you will crash your application.
also it has more tutorials, you can ask questions in stackoverflow, + additional libraries, huge user base etc
5. i've chose vb .net then what?
good decision (refer to c#, since they both use .net)
but, instead of having a c-style syntax, it has basic syntax which might seem easier to learn for some of the people (personally i love c-style syntax)
6. java
if you want to work on android, java might be your best choice, although we have kotlin which is new in this world and it is going to replace java.
kotlin compiles your code into java's bytecode, which then can be executed by java runtime.
also, i don't know of any way that you can compile your java code into windows executable
7. c/c++
this one is low level, you should take care of memory (but smart pointers can help you a lot), you can write drivers, it is compiled into native code, this is not cross platform although it can be, but it should be compiled for all the platforms, and you should every platform on your code, you can program microcontrollers with it, etc
c++ is the c, with object orianted and many other features added to it.
8. python
unlike those languages that we've talked, this one is dynamicly typed which means, you can assign for example "a" into a class, and then you can assign it into another type.
but in languages like c++, when a variable is declared, it's type is the same throughout the execution of the entire program.
most of the people do deep learning in python, although the libraries like tensorflow, mxnet etc are written in c++ and they are used in python, it is cross platform, has lots of libraries, easy to learn, (it's syntax is not like c), less crashes than c++ (since it has garbage collector etc), etc
8. lua
like python, this one is dynamicly typed. it is used extensively in games and game engines (love2d etc use that), but it has a downside:
classes, arrys, structs etc are all tables, which might seem confusing
also it is used in build tools like premake, genie etc.

bitcoin address: 1LyQ3hziMC2DTnCtgM3V1zfuZ73P3CYT9P

2019-01-05 21:37:13

A couple of things. regarding 18's post.
BGT is not exactly abandoned, but development has been kept quiet. That's all I'll say here.
Also as of Python v 3.6 you can now statically type variables. It can be a life saver at times.
There are so many options out there for languages that it can be truly staggering.

My name is Inigo Montoya. You killed my space bar. Prepare to die!

http://l-works.net

2019-01-05 22:04:26

@18, you say:
1. python is not slow by itself, it is the implementation that can make it slow.
even your code in c++ can become slow, and this only and only is your implementation
although python is interpreted, but thats not a good reason to say it is slow.
This is a slightly incorrect statement. It is not just the implementation that is slow; it is the program code that can also make it slow. If you extensively misuse loops, your program will be slow, even if Pythons implementation is the fastest implementation in the world. So:
1. Python, C++, C#, D, Go, Java... their all ways of telling a computer what to do. Liam is right that we need to embrace other programming languages, no matter what they are. If someone wants to use assembly for their game? Fine. If someone wants to write C++ games but use assembly here and there to squeeze all the peformance they can out of the processor, and they event want to offload all the math to the GPU, fine.

"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

2019-01-05 22:09:11

visualstudio,
Thank you so much for your post.
Guy, you say a lot of useful things. And I'm very happy reading your messages.
I didn't think you were dealing with C# or Python. And I'm interested in your opinion.
If you choose between C# and Python, what would you choose?
You can write me on Skype. I'll be glad to know your opinion.
In Python, I have the same problems as the author of this topic. I don't understand decorators and some other things. Moreover, C syntax is close to me. Yes, C# syntax is simpler for me than Python.
On the choice of language for games, Ethin wrote above that I didn't make my choice. No, I made my choice for games, this is C#.
In any case, I continue to learn Python, because I need it for work.

Thumbs up

2019-01-05 22:29:06

@21
Use a random number generator. If it picks 1, use python. If it picks 2, use C#. And then don't look back and become proficiant in one language instead of pondering the choice for ages

Roel
golfing in the kitchen

Thumbs up +2

2019-01-06 13:27:05

i'd select c# as my best option

2019-01-06 16:44:11

Hi there,
@Nikita: completely wrong way of thinking imo. I have already mastered C# on Windows and Android and I have also some good knowledge on Python. I also know C++ and am now starting to learn JavaScript, which seems interesting too.
So I can give you answer using knowledge from both sides, C# and Python.
Do you know, what is the most funny when we're comparing c# and Python? It is fact, that nearly all libraries for both languages targeting game development were originally wrote in C++, and their implementations in C# or Python are just wrappers. big_smile
So whichever language you choose, you will end working with probably the same libraries.
Just implementations will be different.
So, my advice, choose one language and learn object oriented programming. if you do so, nothing will stop you from studying every possible library with good documentation or examples.
I personally would recommend C# to do this. Not because it is faster, cooler, blah, blah, blah, but because it has flags for nearly all oop operations like virtualizing, making method or class abstract, static etc. and then checks for example if you overridded all necessary methods in child classes and shows errors if you didn't. It also forces you to think object oriented, what is good too. Whatever you're doing in programming, always use classes and objects. Programming using functions only may look good in some cases, but believe me, it is a direct way to very very hot and spicy hell.
And that is regardless of programming language you're using.

Only true difference between Python and C# is that C# is statically, typed, Python dynamically. That is everything with all stuff hidden beiond.
I have been working on BgtKit, a multilanguage library bringing abilities of BGT to mainstream languages. It supports also C# and Python. I'm developing it for every language using its best libraries and concepts of writing code. And there were no things I wasn't able to reach in both languages. Except two, first is hrtf, which is very easy to implement in Python because of libaudioverse, but requires some struggling on C# side with Fmod, which i was lazy to do because I don't consider hrtf as a important feature.
And second is the ability of WPF, Windows Presentation Foundation, a gui system of C# to catch keyboard shortcuts without interfering with Jaws. This is something I am not able to understand after years. I've tried tons of libraries for Python and C++ - WxPhoenix, PyQt5, SFMl, SDL, I have tried also native functions of global keyboard handling like GetAsyncKeyState from user32.dll but none of them was able to colaborate with Jaws. Only WPF works without any problems.

So use whatever you like.
Still not able to choose? Then i can recommend you my method of choosing libraries to use for my projects, when there are multiple choices and their abilities are nearly equal. Select thatone with the most cool name. smile
Just pronounce... C Sharp... doesn't it sound amazing? big_smile

Best regards

Rastislav

Thumbs up +2

2019-01-06 17:07:34

@19, i mean, if you declare a type in c++, it will be the same type. you can't change it. if you declared an int16_t, you can't change it into char* later.
don't know if python became staticly typed.
@20, regarding what python, c#, lua and all do, you are right (they tell computer what should it do).
the thing that i was saying was that the code that you right will make your app slow (miss using loops, declaring so much variables on the fly and using them while you can use less number of variables), etc
@21, i won't recommend you any of these languages, since you should decide it for yourself. you choose, because you want to work with it not me.
but, i use python myself, because of deep learning, and, if i need .net libraries, they are available to me by using clr module.
however, c# is better if your only concern is working with clr modules (mine is not).
so, the decision is yours.
better to say, the programming languages are not comparable to each other, since they target different audience.

bitcoin address: 1LyQ3hziMC2DTnCtgM3V1zfuZ73P3CYT9P