26

@25, totally agree. And while I know that Python (an interpreted language) is slower than C++ (a compiled one) their speed is almost equal. Sure, its not quite there, because Python interprets your code, but its nearly there. For audio games, or even very complex audio games that BGT is incapable of producing, Python works perfectly fine. C++ is for those adventurers who want to explore and learn the advanced (and most powerful) way of developing games or software systems or who want power and absolutely maximum speed on their side. But both languages are extremely well suited to various roles; MUDs, for example, were developed in C and C++ not because they needed to be close to the metal but because (the more likely scenario) they had access to direct sockets in BSD and Linux, and access to features not directly available in Python at the time the code was written. Keep in mind that most MUD codebases were written before Python, some after (Dawn of Time, for example, had its latest version, 1.69R, released in 2004, which was around Python 2.1 or something around that version).

"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

27

Ethin, Do you know the good games in Python? I believe that it is impossible or very difficult to develop a game in Python, for example like Redspot.

Thumbs up

28

I refute the claim that Python is intrinsicly too slow to develop games with.

Good games using Python include parts of Civilization IV, Eve (stackless) and from our own little corner of the gaming community, SoundRTS. It's not unheard of. Granted, you're all talking about server implementations and mentioning client side games, so it's an apples to oranges scenario.

As for performance, well, dynamically typed languages, such as Python, JavaScript, etc, will be outperformed by statically typed compiled languages like C++ and C#. That's just the nature of not being able to have the compiler allocating its memory ahead of time because it knows what's coming and such like. That being said, this isn't a massive performance hit. More of the slowdown you'd see is from the particular runtime you'd use with Python. CPython, most people's default, is slightly slower because of the way it runs. It has pros and cons to the way it runs, and you can speed it up, perhaps with Psycho, etc. However, there are other implementations too, IronPython is worth a mention, as it is comparable in speed to C#, as they both run on the .NET framework. So the gains I'd say aren't a deal breaker, at least not for me. And when you throw in language features such as generators, list comprehensions and the general ease of use, I'd consider it a price worth paying. Full disclosure, if I had to align with any language, I'd pick C#. But I have a soft spot for Python.

But enough about Python

If you're looking at writing a server application, it sounds like you do want to write some kind of socket server, C++, C# or NodeJS will be your best bets here, in my opinion at least. C# can be used with .NET Core, meaning no dependency on the .NET Framework, even at distribution time. NodeJS isn't something we've really discussed here, but it's a fair option. Finally, C++ will do it, and if written well, will probably outperform most other implementations, though easy it is to write that kind of well written implementation in C++ as opposed to say C# is questionable.

It sounds like you've made your mind up to go with C++. It's not my area of expertese, I've done little bits of it. There is no shortcut if you want to do it with that. Libs will help, absolutely use the hell out of them. But really, it's just going to be a lot of learning and trial and error if you want to use a low level language like this. I'm sure you have your reasons. Good luck!

Thumbs up

29

of course it is possible to write a game like redspot in C++ (as bgt itself is written in c++) and redspot is written in bgt
but, things like memory management and other stuff is required though you can use smart pointers to do them for you
i recommend you learn the language, then try making a simple game and then try bigger projects (write and test them part by part)
also if you have any questions, i am here to help

bitcoin address: 1LyQ3hziMC2DTnCtgM3V1zfuZ73P3CYT9P

Thumbs up +1

30

@jonikster, You seem like your picking at straws here. Redspot could probably be developed in Python with a much greater level of functionality than it currently has. My point is perfectly provable since I and a few friends have already got most of the framework down for an FPS engine... in Python... with vehicles, armor, and more. If you think RS couldn't be developed in Python than you've clearly never fully programmed in it. Python can do quite a lot of things you think it can't do when you try to do them. Sure, it can be frustrating sometimes, but its very fun and relaxing to sit and code in the language. (Then again, Java, C#, and C++ are definitely fun to program in too.) In fact, I recently wrote an HTTP-based Multi-factor authentication (MFA) REST API in Python that has absolutely no dependencies other than flask and Pyotp. It has no database whatsoever; it relies on the client to manage secrets, and it does all the back-end stuff that the client *should not* be doing (i.e. generating MFA tokens). I've pasted the code below to prove to you my point. This isn't a game, but it can be definitely integrated into one (as I'm considering doing).
Here we go...

from flask import *
import pyotp, json
app = Flask(__name__)
@app.route("/")
def api_index():
 return json.dumps ("Keytype required.")

@app.route("/totp")
def api_totp_index():
    return json.dumps("Usage mode missing.")

@app.route("/totp/keygen")
def api_totp_keygen():
    return json.dumps({"mode": 0, "secret": pyotp.random_base32()})

@app.route("/totp/verify")
def api_totp_verify():
    if not "secret" in request.args or not "code" in request.args:
        return json.dumps({"error": 6277, "message": "Secret or code unspecified"})
    else:
        totp = pyotp.TOTP(request.args["secret"])
        if totp.verify(int(request.args["code"])):
            return json.dumps({"mode": 0, "code": request.args["code"], "verified": True})
        else:
            return json.dumps({"mode": 0, "code": request.args["code"], "verified": False})

@app.route("/hotp")
def api_hotp_index():
    return json.dumps("Usage mode missing.")

@app.route("/hotp/keygen")
def api_hotp_keygen():
    return json.dumps({"mode": 1, "secret": pyotp.random_base32()})

@app.route("/hotp/verify")
def api_hotp_verify():
    if not "secret" in request.args or not "code" in request.args or not "position" in request.args:
        return json.dumps({"error": 6278, "message": "Secret, code, or position unspecified"})
    else:
        hotp = pyotp.HOTP(request.args["secret"])
        if hotp.verify(int(request.args["code"]), int(request.args["position"])):
            return json.dumps({"mode": 1, "code": request.args["code"], "verified": True})
        else:
            return json.dumps({"mode": 1, "code": request.args["code"], "verified": False})

if __name__=="__main__":
    app.run()

Enjoy learning from that! smile At first I had to do some research, as I've never used flask (and was primarily interested in REST APIs, not in websites), but after some digging I got it to work.

"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

31

ironcross32 wrote:

I'm almost thinking BGT hurt the scene more than it helped.

Agree.

Thumbs up

32

@ironcross32
The behavior you describe actually is not all that uncommon with other engines like RPG Maker, Game Maker, Unity, or even Starcraft mods. Those communities can put out some amazing games, and simultaneously a metric ton of ones that subjectively aren't. People in those communities often come from wildly different demographics with different interests, some casual, some wanting to learn and making mistakes as they go, others just to mess around. Its always been a matter of digging for the gems, those really amazing games through all the noise, or discoverability as its often referred to. The real issue may not be with BGT itself or its community perse, but that its only BGT, there being vanishingly few engines, resources, or tools available to help with the development process in the audio gaming community compared to whats available in the mainstream, which I think is something that still needs working on.

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

Thumbs up

33

truecraig, You are talking about Python. Are you familiar with the practice? You are talking about theory.
Yes, there is pypy, cython, but did you use it? I can say that no, because you would know that not all libraries are available in pypy and cython.
SoundRTS, did you play this game? Have you seen how bad this is with performance?
C++ low-level programming language? Perhaps, for the development of system software, you are right. But who makes you use low-level designs.
C++ is a high-level programming language that can use low-level constructs.

Thumbs up

34

visualstudio, Great big plus!
I still choose between C++ and C#. And I realized that in order to determine the choice, I need to develop some kind of project that solves one problem in C++ and C#.
What do you think. Is this the right decision?
I advise the author of the topic the same thing.

Thumbs up

35

Ethin, You know that I'm not a professional in programming. I judge about Python not from its use, but from the results. What was developed in Python.
I would like as I wrote in the previous message to implement 1 project in C++, C# and Python, and make my choice.

Thumbs up

36

Dude can you please chill with the multiposts, its really annoying when you do like 3-5 in a row, you can make each point in one single post by putting a blank line in between so people know its something else. IF you did that on any other forum, you'd be getting bitched at hard core by both the mods and the other users.

The bipeds think this place belongs to them, how cute.

Thumbs up

37

guys, if i made a few projects in bgt, do you think i would be able to make some thing in c#?
i don't say that i am verry good at programming, but i am willing to give this a shot. i have stayed with bgt for quite a long time, and i am tired of making some thing and windows defender flags it as a virus.

best regards
never give up on what ever you are doing.

Thumbs up

38

ironcross32, usually in Russian forums respond to each individual message, but if you are against, I will respond with one message.
ashleygrobler04, If you switch from BGT to programming languages, then C# is the best choice. Because it has a similar syntax. irrKlang almost like Sound_pool, the timers in NET are almost the same as in BGT.

Thumbs up

39

guys, tdv is written in C#
i have to say, i prefer C++ as it is not depend on the .net (although you can develop applications on it based on the .net framework) using clr stuff
the problem for learning C++ for some of the people is pointers
also some others have problem with inheritance and virtual functions

bitcoin address: 1LyQ3hziMC2DTnCtgM3V1zfuZ73P3CYT9P

Thumbs up

40

visualstudio, I have problems with pointers. But I believe that if I understand this, it will be a powerful tool. Do you think I'm right?

Thumbs up

41

jonikster wrote:

Ethin, You know that I'm not a professional in programming. I judge about Python not from its use, but from the results. What was developed in Python.
I would like as I wrote in the previous message to implement 1 project in C++, C# and Python, and make my choice.

Results? On what basis do you generate these "results"? You seem to be under the impression that all languages should be equal in speed and power, or something like this. You are not a professional programmer but clearly you do not know what your talking about either. You really think Python is slow? Then tell me: Why do we have projects that run on microcontrollers? A quick google search for "famous open-source projects in Python" brings up https://github.com/trending/python, and from that page we can see projects for computer vision, machine learning toolkits, facial recognition, ODR, CUDA GPU-based mathematics, IT automation, etc. So, if Python is slow, why have all these projects been developed? Clearly, 99 percent of developers disagree with you. tongue

"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

42

I am verry dis a pointed.
i should not start with bgt in the first place.
i gave c# a try, and i made a few things, but that is to say only with windows forms or winforms or what ever it is called
[graphic] sad[/graphic]

best regards
never give up on what ever you are doing.

Thumbs up

43

If all you saw was c++ programs that ran slow and were inefficient you would think that c++ would be slow and not suitable to do what you might want to do. the same can be said for any language: python, c#, c, assembly, etc.  Program efficiency depends on many factors. If you try and run a modern video game on a netbook or a chrome-book, assuming the software was compatible, you would say, "This game programmed in (insert sucky programming language here) is awful." Well, duh, you ran it on a system that wasn't powerful enough. similarly, if you try and use a program that requires lots of network bandwidth but you only have a 1mbps downstream connection, you might blame the pore performance on the app or the language, but in fact its your connection. All of this to say evaluating an app's performance requires several factors and isn't based on one thing.

another note on  the inefficiency of languages. Any fool can write a program. It takes time and skill to write an efficient program. I feel like this might be a quote from someone, but i'm to lazy to go look it up. The majority of blind Programmers jump right into BGT with a basic understanding of math, a moderate understanding of computers, and think they are hot stuff. A majority of these people do not come from a formal background of a computers science degree. In a computer science degree you will learn the standard efficient algorithms, algorithm optimization, and program debugging. While not impossible to learn on your own from the internet, there is a reason job requirements don't say, "If you learned how to program on your own, we'll higher you. come right in." By not knowing these things, your programs are going to be much lower quality. The higher level languages like python can help you with some of these things, but you can only make up for so much. if you right an algorithm that runs at o(n^2), that is going to be slow in any language.

I don’t believe in fighting unnecessarily.  But if something is worth fighting for, then its always a fight worth winning.
check me out on Twitter and on GitHub

Thumbs up +1

44 (edited by Ethin 2018-04-27 18:29:50)

43 has a point. Also, I forgot to add (and I'm too lazy to edit) that another factor of performance is the way you've written it. Any language can be slow if you write your program badly enough. If you write a program and overuse threads, improperly use resources, etc., your program will be slow. You can't just blame everything on the language; 99 percent of the time, if not nearly 100 percent of the time, its your fault; the language has nothing to do with it. If you know the algorithm your trying to use, or are very good at writing algorithms, and you write an algorithm that you hope is efficient and it turns out not to be as efficient as you thought... well, that's not much of a problem, is it? Speed isn't everything, you know.

"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

45

I wasn't going to jump into this thread, but the last 2 posts are heading in the direction I would have gone so I'll add a tiny bit.  smile

In the countless "this language or that language" threads that pop up on here, I think the same common mistake flows through them all.  It's a way of looking at the problem differently than is done in other subjects, and I'm not entirely sure why.

I can already tell my example may not "hit home" quite how I want, ROFL, but lets assume we're talking to a young kid who wants to purchase a set of markers for drawing.  Cheap Crayola markers are easy to grab at the store and use, but someone speaks up and says that serious artists only use Prismacolor brand.  Another jumps in and speaks in favor of Blick studio markers, citing examples of fantastic artwork they've seen them used on.  Back and forth everyone goes, comparing examples of fantastic pieces of art, and examples of crap that could have been drawn by young children.

In this colored marker example, as a group we would all quickly realize it was crazy to go about it in this way.  An amazing piece of art relies very little on the brand of markers used to draw it.  A skilled artist will have a preference, and some markers will make certain tasks easier or harder to do, but in no way will a brand of marker make a bad artist good.  The differences between the brands are something that only the skilled artists are even going to notice.  To a novice or casual drawer of notebook doodles, a red marker is just a red marker.  They simply do not have the expertise to unlock the differences one marker may have over another.

This example could translate into musical instruments.  Hmm, in this community perhaps I should have led with this instead of colored markers.  Aprone what were you thinking?!  big_smile  I don't know guitar brands, but a quick internet search showed a lot of hate for a brand named Squier.  So lets say we have someone, just starting to learn how to play the guitar, trying to decide between buying a Squier or a Gibson.  Similar to the previous example, people chime in and try to recommend a guitar based on what was used in different songs they listen to on the radio, and whether or not those songs were good or bad.

There is a cost difference between the 2 guitar brands, and in programming we could consider learning curve and development time using that language to be their cost difference.  Even if the cost were ignored, will this new guitar player play better songs if he picks the right one?  Will it be any less torture for his family while he plucks away in his room, following along in his "Learn to play the guitar in 31 days" book?  Many years down the road he may be one of the small few who gains enough skill that he can unlock and actually benefit from the differences between guitar brands.  The average player is either not going to notice a difference, or it's going to be a psychological one.

The vast majority of programmers never get good enough to unlock the true power of their respective programming languages.  They claim they do, because any programmer will tell you they are essentially god.  Even people with practically No programming ability will throw around every buzz word and phrase they can get from wikipedia to seem like experts online.  Like the markers and the guitar, giving a programming novice a different language is not going to improve the quality of their work.  If it does it will be by sheer accident, not because one tool was actually superior to the other (in general terms).  Time and time again we hear about how powerful and fast C, C++, and C# is as a language, but I would shocked if even 1 person from all of those such conversations, started learning one of those languages and got their skills high enough to use any of that aforementioned power/speed.

It's basically a room full of people so stuck on picking out the right colored markers and guitar brand, that they don't realize they won't grow up to be famous artists or musicians anyway.  That sounds terrible, but we look at the examples of the tiny tiny few who make it to the top, and then assume we can get there with the same tools.  Those tools are specialized for the people way up there, and for us regular people (or especially for people just starting out), the differences don't mean much.  The differences are worn like a badge of honor more than anything else.  It's status symbol crap, like people who have to convince themselves and everyone else that their overpriced jeans are superior because of the fancy company logo on the pocket.

ROFL, I have to include a side example that I just remembered.  I remember when I was in high school a few kids on the swim team shaved off their eyebrows.  They looked like complete idiots, but they were convinced that it would give them better times in the pool.  Well of course it's been shown that shaving off hair cuts down on the drag from the water, but unless you're one of the select few swimming in the olympics, that difference isn't going to matter.  A kid in a high school swimming pool is not going to benefit from shaving 0.01 seconds off of his lap time!  ROFL!  A handful of us just could not explain this to these kids, who were so stuck on their idea of being faster, that they had lost reality of why it didn't apply to them.  Programming language conversations, to me, are basically talking to kids that shaved off their eyebrows to swim faster.

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

Thumbs up +2

46

If I'm interested in Python. Can I try this for games?
I agree with Jonikster. In Python, I didn't see good games. Whereas in C++ and C# it is.

Sorry my english.

Thumbs up

47

I used to consider Python for game development. I would like to earn money by programming, and in Python it's easiest to find a job. But when I looked at SoundRTS, Undead Assoult, the new Deathmatch, I realized that it's better not worth it.
Do you think that it's in vain and I should try Python?

Thumbs up

48

For me, programming languages are just tools. You use them at the right
time.
For example, will you write a script to list a directory and rename the
files in it in C++? Well you could, but if I were you I would use shell
script or Python that have better suited libraries for this task.
Using Aprone's analogy, you can not use a guitar to play a drum solo.
Well I have seen very talented people do it, but it's hard. The guitar
has its purpose and the drum has their purpose too.
The important things you need to learn are the algorithms and the way a
computer thinks. When I'm programming I think the computer is my best friend, and I try to
express what It needs to do in a clear way. When you are starting,
you need to develop a friendship with your computer, so that you can
learn how it does things, how you can communicate with it better, well the things
you would do with a real friend. When you finally do
that (which will take a lot of time) you will see what I said here.
This is the same thing when you are learning to play an instrument. You
need to make a friendship with it, so you two can speak the same
language and work together.
Ah, one last thing I forgot to add. This may sound strange, but code
with love and fun in mind, and you will have a better chance of
succeedding. Make small projects. Don't say to yourself when you are
starting "Ah, I will make the best audiogame, a GTA like game or an online
FPS with lots of players". Take note of these ideas and work in small
projects. Eventually, when you get the required knowledge, you will get
as well enough maturity to plan and create your big project.
Hope this helped a bit, and sorry for the English errors.

Thumbs up

49

about python and C++ and C# and basicly programming languages:
for performance issue, we have lots of apps that are written in C++ and they are really slow because of their programmers
now, think of a software written in C++ which crashes: (i'm not completely talking about performance issue)
what can be the problem of it? a compiler bug? an issue for example like null pointer access? it can be anything!
if thats a compiler bug, the code can be changed and the compiler will generate the right code for you (even it can be an optimization issue)!
so, performance isn't depend on the language
even optimization can influence the performance
it is true with python, lua, and other programming languages as well
it depends how you program on them, how your system is capable, and many many factors like threads etc
another point is, think that a pianist plays piano with a steinway piano
now, should we say that others like for example yamaha or fazioly are bad?
of course we cant!
in my idea, comparing programming languages are like comparing apples with oranges as each of them exist for their own goals

bitcoin address: 1LyQ3hziMC2DTnCtgM3V1zfuZ73P3CYT9P

Thumbs up

50

thggamer, I realized that you think that different games need different languages.
I would like to develop a game like GTA, but I'm afraid that I will not have enough Python.
visualstudio, if we talk about C++ and C#, I'm more inclined to C++, because it's not tied to NET.
C++ can be associated with Python. But I'm repelled by pointers. I can not understand this. I know how it is used. But why...
I would like to solve the same problem in different programming languages and make my choice.
But I'm afraid that I will not be able to implement GTA or Call Of Duty in Python.

Thumbs up