2018-12-10 14:59:23

Hello,
Do you guys recommend using iron python? I've tested the BPCSharedComponent.dll with it and it works, which means any other C# lib will work just fine. Wont this be nearly perfect for making audio games if the power and simplicity of python is combined with C#'s libraries which weren't available in python otherwise?

Thumbs up

2018-12-10 19:12:18

pythonnet is good as well (i'm using it in my python environment)
you may install it into your python environment by using

pip install pythonnet

then import it like

import clr

then import any python code and add reference to them like the following:

import clr
clr.AddReference("System");
from System import String

then when you compile it using something like pyinstaller, it doesn't compile to IL assembly and it won't be decompiled using .net decompilers, but with the advantage of using .net runtime libraries
iron python compiles to .net assembly

bitcoin address: 1LyQ3hziMC2DTnCtgM3V1zfuZ73P3CYT9P

2018-12-11 04:27:30

Pythonnet took a bit of querky workaround (and finally me just installing it via git+) to actually get it to install.

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

Thumbs up

2018-12-11 05:16:20

but the great fact about it is that when compiled into exe, it will not be a clr app which easily could be decompiled.

bitcoin address: 1LyQ3hziMC2DTnCtgM3V1zfuZ73P3CYT9P

2018-12-11 07:13:27 (edited by Ethin 2018-12-11 07:13:59)

Yes, but it will be a Python app that will easily be decompiled either by just locating its temp extraction directory or managing to freeze execution and pull code from a dump . Really, Python is no more secure in that regard than .NET is (and .NET is probably more secure since you can actually obfuscate your code).

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

Thumbs up

2018-12-11 12:10:25

Hi,
At Ethin how did you manage to install it? I installed the wheel module and also tried installing from git directly but it didn't work?

Thumbs up

2018-12-11 20:27:21

@106, I honestly don't know how it worked. I have a ton of packages from pip that I don't think you'd need, but yes, you do need the wheel package. Not really sure though exactly what others you need though.

"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-03-09 20:34:14

Hi, i want to use iron python. but i am not sure on the documentation of the bpc shared component.dll to see the functions...

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

2019-03-12 22:10:34

Oriol, you may have heard something like this before, but BGT is good, so why do you even need to switch. I agree that JS is bad, but why did you switch? But if you really want a cross-platform language, try C++, although I don't know if it is as easy to install a keyhook as in BGT.

Best regards
T-m

Thumbs up

2019-03-13 03:04:01

BGT is not good

I don't care if you pay the bills, if you can produce your deed or your lease,
If you have a cat, the cat owns your crib.
Sorry about that, I don't make the rules, the cats do.
For multi-cat residences, one cat owns the other cats, *and* your crib, dang, eh?

Thumbs up

2019-03-13 13:06:20

My my, we again came down to the level of BGT-bashing without arguments did we?
Fact is: Oriol wants to go away from BGT and JS. Both have their pros and cons, but they don't matter, since Oriol stated that he wants to use Python, so no reason to discuss this any further.
Best Regards.
Hijacker

Thumbs up +1

2019-03-13 17:52:32

Who said js is bad?
I enjoy using js a lot.
I was looking into python alternatives, but I'm sticking to js for now.
Python is another great choice, but js does all I need, except maybe sound encryption, but I could probalby find a way around that.

Thumbs up

2019-03-14 22:54:00

I myself have been thinking of picking up Python, So here's my question before I undertake learning another language.  With all of the talk of no longer supported or updated libraries that I've seen in this thread, and no modern alternatives to them, I want to make sure that this isn't going to go the way of BGT, where basically everything is abandoned and we're just left in the lurch.  Is there a better language other than Python that actually keeps their libraries up to date?  My question is, if Python is so popular, why are all of these libraries being abandoned and not updated?

Thumbs up

2019-03-14 23:08:45

Oh they aren't, the thing just is that people tend to stick to the libraries they know instead of moving to new alternatives, such as pybass which is pretty damn old, sound_lib which is too, accessible_output2 and so on. Also, most of the screen reader libraries out there have several flaws, like tolk not being an actual python package and thus requires to fiddle around with its dlls. If people would instead seek for some more modern alternatives or even implement a new one, or enhance existing packages to enhance the user experience like tolk for example, things wouldn't go this way smile.
I myself mentioned Bass4Py several times, which is a nice cython-based wrapper for BASS, even though its not yet entirely complete, one or two more hands helping with its development could get it finished pretty fast and thus create a new competitor for the market, but instead people simple continue to use the old but well known wrappers.
Best Regards.
Hijacker

Thumbs up

2019-03-14 23:12:32 (edited by Ethin 2019-03-14 23:21:27)

@tmstuff000, have you ever programmed in C++? I'll tell you right now that its not something you can just pick up in a month like you can Python. C++ has far more intricacies than Python does, and some weird/unusual things as well (auto type deduction can get wonky results with things like std::vector<bool>::reference, for example). Please take your own advice and try to learn C++ and tell us about your success. I love C++, I do indeed; but I would never subject someone who wants to make a simple audio game to the headaches and confusion C++ can bring without them actually ready to take on that task. In fact, C++ seems like a bit of overkill for an audio game. A very complex one, sure, it would work, but it definitely isn't simple. I have an app (mainly written in C) that I made just to fiddle around, allowing you to press joystick keys and it would vibrate your joystick and move an oscillator around the stereo field. It had joystick feature detection too but either way, its about.... 400 lines of C code or so? Granted, I could've simplified that by a bit with C++, but that wasn't the goal of my experiment. Didn't help that I was using a binary tree though... big_smile C++ is ultimately a powerful -- a very powerful -- language. But it is also a very dangerous language. Python will protect you from [most] of the dangers that lower-level programming offers, but C++ will not. C++ will quite happily let you drown yourself (metaphorically) in vulnerabilities, buffer overflows, extremely confusing compilation errors, and more, without a second metaphroical thought. Go ahead and learn it if you like, but when you actually want to make something with it, learn how to do things safely before you embark on your mission.
@113, yeah, Python does (usually) keep libraries up to date. I don't have a library that's out of date in my collection of.... 299 libraries.

"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-03-15 03:02:06 (edited by JLove 2019-03-15 03:05:40)

@114, Are there actual newer, modern libraries that work?  Is there a reason why people are sticking to the older ones?  Is there nothing newer offered?  @115, I've seen several things in this thread saying this or that is old, not being updated, or discontinued, hence the question.

Thumbs up

2019-03-15 05:40:55

@116
Python as a whole is rather healthy, exceedingly so in fact, so you have no need to worry about it disappearing tomorrow, or even in the next decade most likely. For some context there are currently more than 113,000 packages available through PyPi alone, with many more being added and updated all the time. In the case of Pybass and bass4py, both are built on top of the same underlying BASS library, and there are other alternative sound libraries like OpenAL, Libaudioverse, etc. floating around. Libraries like sound_lib and accessible_output2 were part of the continuum website and aren't really maintained anymore, being rather niche to begin with. Of those two accessible_output2 was one of the few cross platform TTS libraries available, which is unfortunate but not really a problem directly tied with python specifically, and its not like there aren't work arounds.

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

Thumbs up

2019-03-15 06:25:53

so, if sound_lib and accessible_output2 aren't being maintained anymore, are there newer ones that are?  I guess that's my point.  When packages are discontinued and no longer supported, do new ones take their place, or is there just a void then.

Thumbs up

2019-03-15 07:27:21

It depends, that could be asked of any programming language really. It depends on incentives and need, private companies can create their own libraries, and communities and developers can make their own open source alternatives, with people coming and going to maintain them as they want, its a very fluid thing that can depend in large part on a languages popularity and utility. Sometimes there can be a void, but depending on the requirements solutions will be found, or created. Programming is all about problem solving afterall, and some day you may find yourself looking for alternatives, maintaining a library yourself, or creating a solution to a problem that doesn't yet exist.

As for sound_lib, there are a few alternatives available, many of which are probably better, and while there are few cross platform TTS libraries, its not the end of the universe. You can still write platform dependant TTS code or use pre-recorded audio, its just less convenient. This isn't to say people aren't also actively looking into better solutions with machine learning or voice synthesis, you may have heard of Lyrebird or Googles WaveNet library for example. I'm sure there are plenty of people interested in those developments.

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

Thumbs up

2019-03-15 17:46:42

So maybe my questions will make me seem like an idiot, but I'll ask them anyway.  As the name of this topic suggests, if I want to start to learn Python, what resources are the best for achieving that goal?  Googling "python tutorial" gives a ton of results, but how do I know which ones are legitimately good and which ones are crap?  In terms of audiogame development, since that's what I'd use it for, which tutorials and/or other resources would best help with learning how to set up and manipulate sound correctly.  Also, in terms of audiogame development, which libraries/engines would be best for this, and which ones are documented well, maintained and updated,  and have active communities in case of questions?  There appear to be several to choose from based on what I have found on Google.  Pygame, Pyglet, Ren’Py, Arcade, Cocos2d, Panda3d, probably others that I haven't seen.

Thumbs up

2019-03-15 23:41:32 (edited by magurp244 2019-03-15 23:48:07)

There are a number of free books available, such as [Dive Into Python], [How To Think Like A Computer Scientist], or the [Python Practice Book]. In general though the basics of python are fairly straight forward, loops, if statements, variables, etc. so even "crap" sources can provide at least some useful information.

As for audio, its difficult to point to any particular tutorial on that, as there are a variaty of libraries around with their own functions and methods, although you may find my [OpenAL Examples] useful for getting started. If you have any questions feel free to ask. Much of the books i've already mentioned only cover the core basics of the language, so if you plan on getting into game development you'll need some additional libraries for handling things like windows, key input, and such. Most tend to choose between Pygame or Pyglet, there are others but they can be a bit troublesome to deal with. Its also worth noting that both Pygame and Pyglet have their own audio functions, if you feel like starting out with those.

Your choice of library should also be determined based on what you plan on doing, Pygame is largely for 2D applications, Pyglet can handle both 2D and 3D, Ren'Py is mostly for text based games, and Panda3D is a 3D engine based framework. I've haven't played much with cocos2D or Arcade so can't offer much advice on them.

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

Thumbs up

Yesterday 01:07:15

python's not a bad choice. Besides, you can always learn a new programming language later with much more ease after your first one. Learning C next to python might be beneficial later, since python is relatively slow compared to C. Python can import C code though (I'm simplifying this), so if you ever need super fast performance for example when coding a huge 3d map system C might help. THen again, python has a near limitless amount of libraries already made, so you might not have to code this yourself. But you should focus on learning the basics first before going on about if a language is useful for a specific task. It's better to just learn something and later discover another tool might have a few advantages and learning it afterwards, rather than obsessing over which programming language to use and not getting anywhere in the mean time.

Roel
golfing in the kitchen

Thumbs up

Yesterday 13:14:57

O wow. Leave it to me to write up a lengthy reply to another topic, and then post it into the wrong topic.. Never mind...

Roel
golfing in the kitchen

Thumbs up