2020-06-27 08:01:33

Ok, hello everyone.
So, i'm trying to make a sound play, but play in a way that when you move, the sound moves with you, not just plays the hole sound at one tile and then once ou move, it just goes away, and others wouldn't be able to hear the sound you caused if they were coming towards you, say reloading but you wouldn't know because even if you got close enough, the sound would be in another area. How would be the best way to do this?
now, for the bigger part of this topic.
So, a friend of mine who is sighted wants to help me code audio games for you lovely folks on the interwebs. He says that I should move away from bgt, and i've been thinking about this for awhile. I wanted to try and find something that is kind of close to BGT in how code seperation or identification works, either with the braces/brackets, same way to comment (same in most places) things like that that would make the transition easier to deal with. Does anyone here have any suggestions? for simplicity and less learning curve but still simple/easy to use and better than bgt, whould you go more towards one of these three. c/c++ (wichever is recomended), Java, or python. I've heard praises about python but the differences of how code is seperated, and the huge cintax differences i've seen in open source things i've seen for it in audiogame wise, has been a lot different, and i'm not really good at learning form manuals or online articles unless its simple things like how to do something in a program, or how to fix an error i'm having, you know? The smaller things, not entire coding languages that can do so much. I learn better from open sourced projects, but just how they look and the indentation that would drive me up the wall with indention tones and constantly knowing how other people indent things when i don't want to would drive me crazy, and that would be a lot of turning on and off of the same setting over and over again that I wouldn't be a big fan, and I don't want to try something taht i kind of already know i'm not a big fan of, but if its really so high praised over the other two, i'll give it a shot. Please, give suggestions on the 2nd question, and please give an answer to the top question of this post as soon as you can, as this has bugged me. I've seen others do it, i just don't know how.

2020-06-27 08:20:00

You don't want C++. As I just said on another thread, it takes years of C++ to be competent in it.

If you're going to work with a sighted coder, you will need to indent irregardless of the language.  I'm not saying that's a strong reason to use Python, but it is actually much harder for a sighted person to learn to read code without indentation, than it is for us to learn to deal with indenting.  That may seem counterintuitive at first, but we get much more practice at remembering things that sighted people don't get, and when you take tools away from sighted people, they can't just adapt to work like us.

If your partner is as experienced as you it doesn't matter, but if they know more find out what they know and use that.  Otherwise the web is a good option, It's easy for a sighted person who's going to maybe want graphics, there's tons of newbie tutorials, it's got an at least okay audio option in WebAudio, it runs on all the platforms.

My Blog
Twitter: @ajhicks1992

2020-06-27 16:16:55

C and C++ are going to be a lot harder than BGT. So will Java, though for entirely different reasons. If you want something semi-easy, Python is your best bet.

2020-06-27 16:53:45

ok, thank you for your responces. Any tips of making a sound play with  a moving player when its something that is done on the server?

2020-06-27 18:19:16 (edited by amerikranian 2020-06-27 18:20:35)

You want a tip?
Delete the unauthorized code you possess and don't touch networking for a good while. If an actual answer was to be provided, it would in all likelihood go over your head.
I am not trying to be rude here, but seeing your previous topics and the questions you asked doesn't fill me with a lot of inspiration as to my answers actually helping you, at least in this field.

2020-06-27 18:39:33

well, sorry for trying to fix something. And for your information as it currently goes, i am going to be working on with 2 friends of mine to rewrite the game in Python, therefor me not even needing it orusing it until a full fledged version is able to be released. I want to fix this issue thats been bugging me and the other people who've played it and one of the things that both me and anyone who's played it wanted to happen and the fact that i'm like, i've seen others play a sound but make it stay with the players movement or whatever, how could i do that? And your like nah, fuck what you've done, and have to tlak down to me like i'm 4 and not 14, and that i don't try, when if its something i want to try hard on you'd be surprised. You might be older and have more experience, hence why i came here with the question as there are people hre that are much more experienced than me by a long shot, and not just in one coding language or IT field but multiple. If you do give in answer and it goes over my head, or i don't understand, then yeah your right, and I was the one who asked for an answer and an answer i got. But if you do give an answer, i know how to do it, and i do do it? Then that woul dmake me all the happier. So, thanks for being yourself i guess.

2020-06-27 18:46:55

The problem with your plan of rewriting the game in Python is the fact that BGT simplifies networking by a lot. Networking is difficult, to say the least.
Also, I am sorry. I don't put much faith in you when you clearly have stated that you're an extreme newbie when it comes to coding. You are touching something which has literally an entire field dedicated to it. There is a thread on this page that asks a question about socket programming in Python, if you would like to take a look at what exactly you're signing yourself up for. Camlorn also wrote some reasons as to why networking is so complicated and difficult to get right if you want to scroll through his posts. I have not seen any projects from you. I have seen evidence, a lot of it, that you use unauthorized code in whatever you work on. I am sorry that you don't inspire me when you will say "I'll try". You may, in BGT, but step into Python, and you will see exactly how much was hidden from you in that realm.
Could I have expressed myself in a more gentle fashion? Probably, but I don't like wasting words.

2020-06-27 19:27:23 (edited by Lucas1 2020-06-27 19:27:43)

If you really want to rewrite whatever stolen code you're working from in Python, you'll either figure out how to do something like that and be able to do it without asking us, or you'll require our help so much that we might as well write the game for you.

2020-06-27 19:30:05

@6, if you want to programme in python you've gotta learn to google. She'll give you all her answers and knowledge. Yule also have to learn that a good chunk of folls in this room have professional daily jobs working as programmers for top notch companies, so they'll give you the hard, complexed, truly computer sciences answer, and even simplified they won't do the field any justice, nor give you the tools to equip yourself for programming. Amerikranian has a good point. Practice first, then come back to us in a couple months when you're comfortable with a new language.

Cheers.

You ain't done nothin' if you ain't been cancelled
_____
I'm working on a playthrough series of the space 4X game Aurora4x. Find it here

2020-06-27 20:37:05

at1
use moving_sound serverside. you can find it maybe in bgt includes folder

2020-06-27 23:29:39

i tried downloading the bgt includes kit (yes its in there) but GitHub is not liking me today and not showing the cloan or download button i am used to. I go to carter tims git hub and i click on the bgt includes kit, and when it opens that repo it doesn't show a buton to download, cloan, or even go to any releases. What am I doing wrong. I've been able ot get files from gitHub before, so i'm very confused.

2020-06-27 23:41:36

Yeah, GitHub fucked it's interface up badly. I don't know how to download zips at the current moment.
I agree with Amerikranian on this matter though. Given your past and seeing as you literally said "Oh yeah guys I totally like have this stolen source code but I'm re-writing the game in a different language and I'm totally not going to use this stolen code for anything ha ha ha.".

2020-06-28 00:44:58

oh yes so funny tai

2020-06-28 01:04:08 (edited by Rastislav Kish 2020-06-28 01:10:04)

Hi folks,
hmm, okay, I don't want to dictate you your posts guys, but might I just suggest, what about calming down and concentrating on the question?
@1: As for the first question, on your place, I would make a change in type of message, that is send during a reload.
I.E. if the server is currently just sending a command to play a sound on specific location, I would instead design it in a way, that steps of players have player id attached, and these player action events would be then paired to them.
Thus after receiving a player reload event, the client can attach the sound to player and move it as necessary.
When you count it, you have added bytes of player id in steps event, but at the same time you can release floor type and coordinates in the reload event, so it's even more efficient than just sending around PlaySound commands.

Also don't worry about networking in other languages. Yes, networking is complicated, no doubts about that, but there are many very good wrappers out there, which will help you on the way.
For example, SFML has a very nice udp wrapper, there are also eNet wrappers for warious languages (eNet is the networking library used by BGT) and programming languages themselves are often packed up with their own weapons to deal with this.
I have just recently worked with Python's TCP sockets and it's a piece of cake, no kidding. It didn't help me in the end though, as I found out, that you can't start TcP connections from JavaScript, so I needed to look around for a websockets library, but it was definitely nice.
I have found a ws solution as well, which works just as expected.

There are really many options to choose from.

As for programming language, what about C#?
It's modern, supported by Microsoft, it's very similar to BGT in syntax, it's object oriented, it has automatic memory management (no need for pointers and cleaning objects), it compiles to .exe (no need of special packing), it's crossplatform (in Asp.net core and Mono version), it has popular gaming libraries and it's there for quite a while, since 1995 if I remember right, so there is a really huge community and material behind it.
JavaScript would be an option as well, although I wouldn't recommend it for beginners. There are some syntactic weirdnesses, such as the way of declaring properties and there is no encapsulation at all in the language, so knowing what you're doing is often a necessity to make an usable code.
Plus you need to keep in mind, that you're running in browser and not on system with luxuries such as harddrive and filesystem, syntax in these cases can get even weirder, than in normal code.
So, it's subjective of course, but I would recommend some rather desktop based compiled language, such as C#.

Also, when I see benchmarks, with n-body problem taking python about 830 seconds, which can be solved by compiled programs in about 20 secs,
http://benchmarksgame.wildervanck.eu/
http://benchmarksgame.wildervanck.eu/python.html
I wouldn't recommend Python to beginners as well. smile
I'm not one of those guys, who find a benchmark, and then argue with it, even if reality is completely different, I have run into this problem myself, under quite umpleasant circumstances.
I'm not saying, that Python can't do better, it simply wasn't designed to run computations like this.
The performance can be significantly improved by cythoning the code, or by supplying Rust or C++ libraries to do the heavy part, like Tensorflow does. This is the modern way, in which Python is used, as an elegant wrapper for powerful tools.
But doing so requires some background in the language and general programming skills, so again, not suitable for beginners.

that's my opinion at least.

Best regards

Rastislav

2020-06-28 01:36:55

@14
I can't tell you how much it annoys me to see people going "Python isn't for newbies because it's slow".  I have lots of problems with Python, just like with many other tools I use, but telling new programmers that Python is problematic because it's slow leaves everyone with entirely the wrong idea, and I wish people would stop, especially if we're going to try to make the point with mostly hypothetical np-hard problems with no applicability to the topic at hand.

There's only two reasons that slowness of a programming language matters to a newbie.  The first is if they don't know how to implement algorithms efficiently, in which case it won't matter because even the fast languages won't help.  The second is when they've gotten far enough that just using Cython is easy, or even switching languages.  This is a self-solving problem in other words--by the time it's actually the fault of the programming language and not of poor programming practices, you know what to do about it.  But that said, using Cython is as easy as using the C# compiler from the command line, or whatever, so it's not like it's actually hard to do as you're making it out to be.  I learned it in an hour for Synthizer, literally, by the time someone needs it, *if* someone needs it, they can probably learn it in an afternoon.

By all means don't use Python.  I don't care, honestly, whether people use Python or not.  I can make arguments against Python, and if I ever actually get as far as my MMO for the blind I probably won't be using it myself.  But I do care when I see incredibly bad arguments against it.  Let's actually make good arguments against things, please, or make the speed argument when audiogames as a whole are actually good enough that thinking about speed is a concern.

Also, don't be so quick to say that things like C# don't require special packaging.  They don't at first.  They do as soon as you need to use dlls.  Yeah it's a bit easier than Python.  But it doesn't stay free.

And finally, tons and tons of new programmers handle JS fine.  It's even got classes built in now, it's not like it's still 2012.  They say they're trying to work with a sighted programmer.  Therefore not dismissing the platform that's probably the easiest platform to get cool graphics going on short of inaccessible things like Unity is perhaps advised.

My Blog
Twitter: @ajhicks1992

2020-06-28 13:44:24

Hello,
@15: as I said in my previous post, no, this problem is not purely theoretical.
Especially not for beginners. Back in days, when I was beginning with neural networks, I've studied basic feedforward nns.
Because I wanted to see, what's happening inside a neural network, along the traditional matrix based computations, I have developed my own framework based on small objects communicating with each other, so it was clearly trackable, which part of nn is doing what.
It was not designed to be fast, but readable, in sense of what's happening.
Now, following your arguments, this system would work slowly no matter what programming language was used, because... it's simply slow. And in theory, you're right about that.
But... in Slovak language, we say, that it isn't slow as slow (\nie je pomalé ako pomalé). I have no idea, how to translate it to English, but it basically means, that under the one word, more practical scenarios can actually happen.
And this is exactly the case. I have implemented my system in both Python and C#. Yes, it was significantly slower than matrix computations, just as expected.
But while in C# I waited for the solution 5 min, in Python, I waited several hours!!!
And that is a problem, a huge problem, especially taking in the fact, that the whole think didn't work!
I needed to experiment with it to find out, what's wrong with it, but good luck with experiments, if you need to wait few hours before getting a single result.
I have designed my own matrix library in order to find out, whether it's my interpretation, what's causing the problems, and my matrix solution, in Python, took about a hour to run, just because a dot method containing three loops, which Python wasn't able to consume. The same thing in C# took just few seconds to run, but that didn't help me, as the only working network Ive had was with numpy, so I needed to stick with python.

So no, this isn't just theoretical N-body problem not applicable in reality, I have used it just as an objective measure. The problem is real and especially actual for beginners.
Yes, inefficient algorithms will be slower than the best optimised algorithms, but while in C# or other compiled language the performance hit will be hardly noticeable if at all, in Python, you're going to get it in full size.
And explain to beginners, how to optimize the thing, when they had hard times to create it in first place.

As for cythonizing, it's not hard for skilled programmers, I have learned the necessary basics in about 30 minutes, counting in the time for experiments.
But it would be significantly harder to learn it correctly for newbies, there are lots of alien words there, if you're marking everything, which don't harmonise with Python philosophy at all.
The goal of cython is not to use cython as the primary language, if it was so, then Python wouldn't exist and we would use Cython.
But we don't, because Cython was designed to support Python, not to replace it. Python is good at what it's doing.
But again, explain it to someone, who don't know neither Python nor Cython and has probably no deeper imagination about what've re trying to avoid by using Python like syntaxes.
I apologize to author of the question, if this isn't his case, I'm talking now about beginners in general.

One time, my friend asked me to teach him programming. He was a kid and in the same time, I was teaching him computer basics, such as how to open an application, how to open a webpage etc.
I have smiled: "Yes, I can teach you, but first, you need to go through this. Okay?"

As for .net packaging, I don't see anything troublesome with it, even if using external assemblies. I have wrote few of them myself, for example my BgtKit, supporting my games and everything worked just fine. All you need to do is to make sure they'll stand along the .exe file.
You can make an installer and if you don't want to mess with innosetup, you can simply zip the whole thing and it will simply work after extracting.
That goes for .net assemblies as well as native dlls, I've used them in many projects, ranking from Windows apps, through Android apks to extensions for VisualStudio and I've never had problems with them.

For comparison, explaining Java which class is main and how to find it is weird even with pure .class files, actually packaging them to .jar file is another process, which requires either to design a bat file to do it, or to use your ide's exporting tools.
Packaging .apk file is even more complicated than packaging .jar archive, as you need not just to package, but also sign the whole thing.
Of course, ides usually simplify these tasks, so they can be automated, however as it's not you who's doing the thing, you need to always find a way to tell your ide, how to package everything correctly and that can be... kind of complicated. smile
For example, I was trying to convince VisualStudio for few days to package a native .so library into correct location in .apk file, for various processor architectures. No luck, I ended up writing a native dependency into the .csproj file, I didn't find a way how to do it from the interface.

Yeah, and packaging python is another story. When I found out with my Python application, that I'll need to install 32-bit python in order to compile a 32-bit pyinstaller package, which I needed after a whole week of customizing my app for people with 32-bit systems - recompiling native dependencies, reorganizing the directory structure, building the logic to choose a correct library to load, I've rewritten the whole thing to C# in few hours, and the problem was solved. I've saved about 50 MB, the app was faster and compatible with both architectures.
This of course was possible only because the app was rather small, so I could recode it in reasonable time, for bigger projects I would install a side version of Python. I didn't want to say by this, that python apps can't be packaged, they definitely can, but the process can be bit tricky, when compared to other languages.

So, that's how I see things. Don't take me wrong, Python is a great and powerful language, which I frequently use, especially for machinelearning purposes.
I just wouldn't recommend it to beginning programmers. Scientists yes, as they usually don't want to build more complex things and if they do, they most likely already have some background, but to someone who wants to code in first place, I see C#, Java or other statically typed language as a better starting point.

Best regards

Rastislav

2020-06-28 14:00:56

@14  to add @15's  point, I will also add that your claim that JS has no encapsulation at all is completely false as well. JS is now used for writing backend code as well and for this they surely wouldn't be able to use old JS because it would be an absolute nightmare.

if you want to do any serious non-trivial JS program like an audiogame, then you would be using node.js, which adds the concept of modules, which gives you encapsulation. Along with that you have other tools like Babel, webpack, and typescript, which give you the ability to write modern, module based code with a strong type system, and some dead code elmination, which compiles to JS that is compatible even with old browsers. For any non-trivial project nobody actually writes the JS that will run in the browser directly, instead they use node.js and various tools and then the JS that is actually sent to thebrowser is the compilation target.

2020-06-28 17:00:13

@16
I'm thinking that you not speaking English well may have caused you to miss some of my point.

Also, writing your own matrix processing library for machine learning in C# is the worst idea I've ever heard.  You should have just used tensorflow or numpy or something.

And "My neural network was too slow, therefore this isn't hypothetical and Python is bad for games" is also a really bad argument.  Neural networks and things like it consume thousands to millions of times the processing power that a game needs.  Using this as your example suggests that you don't understand how games work.

Python packaging is a bit lame, yes.  But whatever you're doing is far enough from games that I can say with a high degree of confidence that people don't need to care about building their own native dependencies.  Yes, you have to build two versions of the app.  But as long as whatever you need is on pypi, it's fine, you just pip install it.

C# has the same 32 vs 64 bit problem as soon as you start talking about native dependencies as well.

It feels a lot like you're complaining about tools that you never bothered to fully understand, because you never bothered to fully understand them.  As I said, I can criticize Python.  Not being statically typed is a good point even.  I don't like that the most obvious way to serialize things is insecure by default.  I don't like some of the language syntax.  But you come across as someone who has very particular requirements, who left Python because it didn't meet your requirements before you finished learning it, and who thinks that problems writing neural networks are applicable to games.  Frankly, most of this site doesn't even have the math to understand neural networks.

But look.  Let me put it this way.  Audiogames run fine with O(n^2) collision detection algorithms, because no one here knows how to do better.  Speed is only a concern once someone actually gets as far as doing a full MMO or something.  The closest we have to that is Swamp which is so buggy that your inventory duplicates itself every time you log off, so it's not like that will happen anytime soon.  We also have SoundRTS in Python, which after a little bit of tweaking now handles thousands of units on a map, including pathfinding for them and everything.  And to be clear, tweaking here just meant replacing lists with sets, it doesn't use a native dependency or cython or anything like that.

I still think that JS is probably the best option given the question being asked here, and that a sighted person is involved.  C# is fine as far as it goes, though I don't like the IDE lock-in and I wish people would take me more seriously when I talk about what happened in 2010 when we all just stopped being able to use Visual Studio at all for a few years.  Lots of sighted games are written in Java.  We have an audiogame written in Dart.  There's lots and lots of options.  But your arguments against Python aren't good arguments, and they're the kinds of things that send new programmers down very bad roads, where they care about performance from the beginning, instead of in literally a couple years when they're doing some sort of big ambitious game.  I have seen too many people get hung up on this and never get anywhere because it's paralyzing to think that the languaeg you picked might be too slow or something.  It's how you end up with new programmers who think C++ are a great idea, and who won't hear anything to the contrary.  Then they go "Wow, C++ is complicated, guess I can't program" and give up.

My Blog
Twitter: @ajhicks1992

2020-06-28 19:26:25

LMAO I think you fail to understand that Audioggames, and possibly the ones the OP will write won't  need as much power as a nero network. Also, python is quite possibly the best newbie language. Outside the indentations the sintax is one of the easiest to learn. I think for what the OP is doing, python/pygame should be suited for his needs.

You ain't done nothin' if you ain't been cancelled
_____
I'm working on a playthrough series of the space 4X game Aurora4x. Find it here

2020-06-28 19:57:18

so, no includes kit. Thanks!
lol.
I love how someone said "go look in the bgt kit!" then i'm like, "Github's being a meow, i can't!" and then someone else agrees and i'm like "anyone have it on dropbox, google drive, or on a website or can put it there?" and then the next 4 or 5 posts are people arguing and comparing audio games like rs or tk (fps games, of my preferred genre of game) to a neural network, two completely different things.

2020-06-28 20:50:32

@20
Install git. Learn enough git to clone the repository. You'll need to know it if you're going to collaborate with a sighted dev anyway.  Problem solved.

But if I'm not answering your questions specifically that's because you literally flat out admitted that what you want to do is to rewrite stolen code in another programming language as a defense to people calling you out on stealing code on the thread where such callouts happened.  That's both unethical and idiotic, I couldn't believe what I was reading when you did that, and in terms of me being diplomatic and/or others around here wanting to help you, you just blew it big time.

My Blog
Twitter: @ajhicks1992

2020-06-28 21:23:41

@16, as someone who works with neural networks and machine learning:
first, I've trained a neural network containing 3 hidden layours, taking input of 140000x100 tensor (not sure completely about it's shape), and with a BCE loss (which classified the data as zero and ones) in 10 epochs in an our and half or so using scikit-learn (just for experimentation).
another bigg issue that you have is that neural networks (specially recurrent neural networks or rnn for short) require lots and lots of small computations, which is done on GPU, not on CPU (this is why libraries like tensorflow, pytorch, mxnet etc exist).
as for the games:
let me point out that toontown was written in python with panda3d.

2020-06-28 22:56:06

Just want to point out that rastislav is one of the developers of eurofly, so surely has some understanding of how games work

2020-06-28 23:01:34

I'd also like to remind you the difference between a fully featured, accessible, flight simulator/accessible atlas versus a   visual version of redspot.

You ain't done nothin' if you ain't been cancelled
_____
I'm working on a playthrough series of the space 4X game Aurora4x. Find it here

2020-06-29 01:21:42 (edited by defender 2020-06-29 01:24:03)

Damn, programmers sound like arrogant assholes even when their right.
Especially when their right...
How did this culture of helping people while passive aggressively insulting them become so prevalent among coders?  Maybe it's because programming used to be a cool kids club, and suddenly now everyone is interested in it and jumping the gun all over the place, that would be frustrating.  It probably carries on this way now because current coders got verbally smacked around by the previous generation and that generation got smacked around by the pre mass communication O G's.
I suppose nerds of all stripes can be vicious and unforgiving towards n00bs, but it's still odd to see computer geeks and math dorks treating each other like oil dike workers treat greenhorns.