2014-10-03 16:29:10

Hello all,

I'm going to start to work with audiogames at the college but before, I need to know:

You know any framework or api used to develop audiogames, but the bgt language?

Any language will be welcome.

Thank you all!

2014-10-03 18:59:37

In Python, Pyglet or Pygame are your options.  It looks like Pyglet has easier sound.  Dedicated frameworks are pretty uncommon, and I believe that BGT is the only one.  Options in other languages: SlimDX (maybe misremembering the name, C#), XNA (C#), SDL (C++, Python, others), LWJGL (Java, but lightweight is really untrue because Java), the list goes on.

My Blog
Twitter: @ajhicks1992

2014-10-04 06:50:22

PureBASIC is a really good programming language for developing games. DMPA and SR are developed in PB, and I find it very usable. Don't want to declare MessageBox(), just use the macro MessageBox_() instead. PB gives you full access to the windows API and all of its functions, pluse a hole a lot more.

"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.
My Github

2014-10-05 22:02:53 (edited by visualstudio 2014-10-05 22:03:56)

you can use SFML, windows API, directX, OpenAL, libsndfile, SDL, allegro, audiere, ClanLib, eNet, flac, plib, poco, QuantLib, zig
you can get them from my dropbox folder:
https://www.dropbox.com/sh/tn52rmvdmcwn … B9AWa?dl=0
please note, these are for C and C++

2014-10-06 03:30:13

Use the windows API to develop a game? Not in my book. A simple 3d window would take at least 450-500 lines of code. So a full, complete audio game would probably be around 25000 to 100000 lines of code if you only used the windows API and DirectX.
SFML is a pain in the ass to get going, and its nearly impossible to always have VS integrate everything automatically. Don't use it unless you want to live in a coding nightmare.
OpenAL is just a sound library and not great. Try FMod.
Libsndfile, again, is just a sound file library.
SDL: I've never used it before.
Allegro: Another pain in the ass to set up. Another coding nightmare.
I've never used the others that Visualstudio mentioned. I still like PureBASIC. That will be my number one game programming language unless something manages to outdo it in functionality and speed.

"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.
My Github

2014-10-06 04:25:03

C/C++ will outdo Purebasic for execution speed, simply because they benefit from over 30 years of research into optimizing compilers and at least a million dollars of invested money.  Given the architecture of the modern microprocessor, C/C++ compilers will actually generate assembly that is faster than anything you can write yourself.  Let me take this time to again remind everyone that execution speed is literally not a factor anymore, however.
Anything in C++ is going to be what you would classify as a setup nightmare.  This is both a  particular shortcoming of windows and not such an easy thing to do in the first place.  Ironically, this is one thing that Linux typically makes very easy.  Allegro and SFML are both on my "particularly bad" list, by which I mean that I couldn't ever get either to work in the first place (I've not touched Allegro in 5+ years).
I can say with a great deal of confidence that an object-oriented programming language with garbage collection is the fastest option.  This argument has been had before, I'm not going to do it again here.  Mostly because I've finally realized that unless you bother learning and developing a game in one, you won't ever believe me anyway.  That is, the people who can be convinced don't need convincing.  I'm just going to say that, if you Google it, you're going to find that most people share this viewpoint for projects where performance is not critical.  performance is not critical for any Audiogame save perhaps MMOs, but I don't believe that it matters there (MMOs=intelligent architecture, not fast language.  Fast language just shaves off a bit of the needed intelligence, and then you find that actually you needed that intelligent architecture and need to implement it in a language that makes you manually manage memory).
A full, complete Audiogame only using the Windows API and DirectX would be around 5000-15000 lines.  500 of this would be reimplementation of the keyboard handling logic via any of several various methods, 1000 of this would be audio handling code possibly including a basic custom mixer, and the rest would be pretty standard game logic.  The major contributions to code size here would actually be saving and loading resources (I'm assuming C/C++, so no easy serialization).  Basic collision checks for a game that does not involve rotation and only uses boxes is about 30 lines.  Basic collision checks for a game that does allow rotation and only uses boxes would be about 150 lines, assuming only the Windos API and DirectX plus the prerequisite knowledge of the mathematics.  This code would include the needed matrix multiplication and formulation code, as well as the inverse computation (which is trivial because it's a rotation matrix).  the biggest challenge to such an undertaking is twofold: the Windows API is huge, and the languages in which it might be reasonable to place this limitation upon oneself require that your code spend a ton of time error checking (no exceptions or logging, so if(x == error) everywhere) and managing memory (it's not uncommon to free an allocated pointer at 3 or 4 different places in a function).  A good example of a sighted game that comes close to doing this is Cube, which is 7 kloc as I recall.  I'm not sure that that number includes Enet.

My Blog
Twitter: @ajhicks1992

2014-10-15 23:26:53

Speaking only about an Audio Game, I think Java is one of the best choices, you really can do a single final file which will run on Windows, Linux and Mac without any changes. I think the awesome thing is that you can download the same file for all these 3 operating systems. I am curious, why there are no audio games in Java. Maybe I don’t know about them...

Emanuel Boboiu
Errare humanum est, sed perseverare... diabolicum.
For other games and programs, visit android.pontes.ro or scripts.pontes.ro!

2014-10-16 05:17:32

or, you can implement your libraries from scrach
how?
use other libraries and implement your own

2014-10-16 05:55:16

Manu, as someone who has tried to actually develop a cross-platform  audio game in Java I'll just say that Java doesn't work as advertised. What I mean by that is while I could make a decent game in Java I'd have all kinds of problems getting it to work on more than one Java runtime environment. I'd have the game running perfectly fine on the Java runtime for Windows, take it over to Linux, and have the game crashing all over the place using the identical Java runtime for Linux. I never could figure out why that was the case, and I ended up giving up on the project before releasing anything to the public.

Felipevr, I mainly develop all of my games in C++ these days either using DirectX for Windows or SDL for Linux and Mac OS. SDL, the Simple Direct Media Layer, is a decent API if you just want basic audio, input, and networking support. A lot depends here on how advanced an API you want, what platform or platforms you will be developing for, and what features you need.

If you are primarily focused on developing games for Windows I think C# .NET with SlimDX does make a pretty good combo. SlimDX will give you quick and easy access to DirectX while giving you the complete power and ease of use of the .NET Framework. I used it myself in the beginning, and only switched to C++ because I was looking into more cross-platform solutions.

Sincerely,
Thomas Ward
USA Games Interactive
http://www.usagamesinteractive.com

2014-10-16 06:20:10

I can also speak against Java.  I know that CAE had similar experiences to Tward.  You're also talking about requiring end users to download and install a 200 MB runtime which isn't so popular nowadays.  Especially among the blind wherein swing is typically a horrible, horrible thing.  I've got things to say against the java language and I finally know how to say them, but it's the size of a blog post and I don't think most of this crowd would care anyway.  It's my opinion you should, but the things I see with Java can only be seen at the point wherein the language being used for the project has become a triviality (disclaimer: not true if crossing programming paradigms).
I'd suggest against C++ unless you already know it.  C++ will bite you really, really hard if you don't know what you're doing, and the performance overhead of other languages is laughable for this problem.  Ironically, C++ can be one of the best cross-platform languages, but only for certain problems and only if you know what you're doing.  There's an underlying theme here: C++ works if you know what you're doing.  If you don't, well, there are easier things.  Like pulling your teeth out with a dull spoon.

My Blog
Twitter: @ajhicks1992

2014-10-16 12:40:49

Yes, I agree totally about Java. Not only will someone have to download a large runtime environment, but games will probably require several extra non-standard components as well such as Jinput for input, Joal for OpenAL support, and any other third-party libraries you choose to use in your game. By the time the end user ends up getting Java installed, any third-party components installed, etc he or she has just downloaded and installed a fair amount of software just to run your product. That's assuming it will run error free on any and all target environments which I haven't personally discovered to be the case.

As for C++ I don't have much to add to what Camlorn had to say because he is basically right. If you know C++ well then you can do wonderful stuff with it. If you don't know it, are a novice, then it will be rough going. I guess I can count myself fortunate that I have been programming in C++ since 1999 so using it for audio games was fairly easy for me personally to do, but for a novice there are much easier solutions available for a newbie.

Sincerely,
Thomas Ward
USA Games Interactive
http://www.usagamesinteractive.com

2014-10-16 13:13:58

Yeah. I ported my java games to BGT just so they would work fine on multiple *windows* computers.
Java is cross platform in the same sense as just about any other language, which is to say, not really.

看過來!
"If you want utopia but reality gives you Lovecraft, you don't give up, you carve your utopia out of the corpses of dead gods."
MaxAngor wrote:
    George... Don't do that.

2014-10-16 16:51:49

java isnt good for audio games, because every persen who wants to run your audio game requires to install the JDK runtime witch i dont recommend
python is good for starting point, but if you want to create better games, you must use C++ with a game library that you like and you can program with it

2014-10-16 19:55:09

What functionality do I gain by going to C++ that I can't get in Python or just about any other interpreted language with a C FFI?  Python and just about everything else I can think of can access SDL directly, so I fail to understand what is gained.  In the very unlikely event that you need something, you can write only that small subset in C and call it.  This has happened only once (hint: Libaudioverse).
As for cross-platform: not being able to run Java programs on multiple Windows machines is a problem.  But I have yet to see a system that's truly cross-platform without any effort.  Cross-platform bites, bites hard, and doesn't let go.  Looking for the magic cross-platform bullet is like looking for the holy grail-it simply isn't going to happen.

My Blog
Twitter: @ajhicks1992

2014-10-17 00:58:38

It is true I didn't an action game in Java, but a simple dice simulator with sounds, background sounds worked fine on all three platforms.
I didn't an entire game in Java, even I thought some time ago to port there my Backgammon game, but I use Java now for android where I am developing a GameZone, a casino simulator with many games, pawnshop and others. Now I can say I like Java, but when I tried it just to make a JAR file to test it on all major platforms and a T9 dictionary simulator as a project for university as a final exam to my Java course, I didn't like it.
At least it is very standardized, it's easy to understand a code written by another programmer, there are many obvious rules to follow when writing code, this way making an understandable code.
As I saw here in my City where are many big companies like HP, Siemens and many others, Java is the most required programming languages, I saw in all universities here that Java is the language for which they spend most time to learn.

Emanuel Boboiu
Errare humanum est, sed perseverare... diabolicum.
For other games and programs, visit android.pontes.ro or scripts.pontes.ro!

2014-10-17 05:13:44

Java is good for business applications, but games not so much.
The Java Sound API is terrible. You'd need something like JOAL or FMODEX. Never mind that Windows appears to hate the concept of case-sensitive filenames.

看過來!
"If you want utopia but reality gives you Lovecraft, you don't give up, you carve your utopia out of the corpses of dead gods."
MaxAngor wrote:
    George... Don't do that.

2014-10-17 08:48:19

actually, java is very very easy to learn
because of this, some of the developers use java
but for games, java isnt recommended

2014-10-17 14:50:15

java is an odd thing.
Firstly, Android is a special case in all ways.  When you build your platform from the ground up in Java, Java becomes easy to use on it.  Windows is interesting in that there are different editions of the runtime and, when last I looked, I couldn't figure out which ones actually had the sound libraries.  If you wanted to do a game in java, I'd look at LWJGL.  But that raises a million packaging concerns that aren't so easy, and we can't forget that wonderful runtime.  Minecraft did it and managed to sell millions of copies, so it is possible.
Java is also one of the most widely wanted languages, but I'd argue that programmers who know other things are more highly paid.  I'd be very curious to see data.  It's true that Java is simple, but that doesn't cover it.
Java is a jail and you are the criminal bad programmer.  Java forces you to be a good programmer by making you be Java, irregardless of if there's a better way to express the problem in question.  Every good programmer I know (i.e. has a job, has written code, has done projects of very large size and, in one case, partially owns a company) hates java.  It's true that code is forced to be comprehensible, but that doesn't mean the programmer writing it is a good programmer nor that the method of expression is the best.  Java has only just now begun to add features that have been widely regarded as good for many, many years: among them support for limited multiple inheritance (common pattern for collections libraries), first-class functions (good for just about anything that isn't CPU bound), and a bunch of other things that stem from these.
As a concrete example of Java's jailness, however, consider the getter and the setter.  It is true that these *can* be good practice, but you don't always want or need them.  It's 9 or so lines of code per variable that you would otherwise not have to write for your internal class pairs that never see anything but their partner.  Java even forces code layout to an extent that I've not yet seen anywhere else.  I look at this and I look at checked exceptions.  And when I put them together, I can't help but feel that a major point of Java is making you think by requiring you to write more code.  We've literally begun fixing this by putting code generators in our IDE which, unlike for other languages, is almost needed to be productive.  Not to mention the anti-patterns you have to do to get around checked exceptions for that ten line script (hint: sometimes, it's 10 or more lines that check errors and do nothing at all, but it won't compile without them).
I'd also say that I've seen no evidence of Java being super popular at universities, at least here in the U.S. It's used, but other things are taught.  I know that it used to be, but not so much anymore I think.  The truth is that, unless the job advertisement wants specific technology experience, you know Java if you know literally any other programming language with the concept of the class.

My Blog
Twitter: @ajhicks1992

2014-10-18 15:03:04

in my idea, instead of using java, use C#
but for C#, your users must install .net framework

2014-10-18 16:31:49

Visualstudio, the nice thing about C# and other .NET languages is every version of Windows from Vista onward comes with the base .NET Framework. If someone wants to insure their C# application will run on all pre-installed frameworks they can choose to compile using the 2.0 or 3.0 .NET Framework thus insuring compatibility with Vista, Windows 7, Windows 8, and Windows 8.1. Thus unless a developer specifically intends to use say .NET Framework 4.0 the only thing that may need to be installed is extra dependencies like SlimDX which isn't as bad as installing the full framework.

That said, any runtime languages have the same basic problem in that weather a developer chooses .NET, Java, etc some dependencies are going to be required. The only way to avoid that is to compile a native executable for the platform using a language like C++ and using common core libraries one can reasonably be sure will be installed on every machine. So while C++ is more ideal in that there is a lot less stuff to install it is not as easy as one of the .NET languages or Java to develop with. So one has to decide if they prefer ease of use over having to install several MB of dependencies along with their product.

Sincerely,
Thomas Ward
USA Games Interactive
http://www.usagamesinteractive.com

2014-10-18 17:15:17

tward, i've like your idea about C#, but the best thing for creating audio game is C++ with a good library
windows has .net framework 3.0 but if your application uses 3.5 or any later version of .net framework, the user must install it
and, with .net framework, you'll write less lines of code, but with C++, you have control of everything such as memory, hardware, etc

2014-10-18 17:15:44

C# is a better choice, though.  Almost everyone has the .net frameworks nowadays.  It even runs on Linux and Mac, if you try hard enough.  Also, C# has a much, much more sane FFI than Java.  Java requires 15 line C++ functions for every C function you want to call or use of a 3rd party library called JNA.  It's painful, to say the least.  The only problem I raelly have with C# is that, because of the VS integration, you've got no command line debugger.  Stepping through your code isn't always needed, but it can be a godsend when nothing else will do.

My Blog
Twitter: @ajhicks1992

2014-10-19 09:39:20

Visualstudio, that is true, but in the end I think the choice of weather or not to use a language like C# .NET verses C++ comes down to ease of use more than any consideration of installing any necessary dependencies for most developers.

First, .NET is becoming far more mainstream these days, and chances are high that end users will already have the necessary components and frameworks in stalled. Just in the audio games community alone we have had a number of games come out over the last few years that are written using .NET based languages such as Rail Racer, Entombed, Tactical Battles, 3D Velocity, and so on. Consequently the more games that comes onto the audio games market using .NET the more people who will already have said components and frameworks installed anyway.

The situation is quite different from say ten years ago when I released my first game, Final Conflict, where everyone was running Windows XP, and most users didn't have .NET 1.0 let alone any later version. These days
the situation is quite different with end users running XP, Vista, Windows 7, and Windows 8.x, and many of them have some version of .NET installed. Especially those running newer Windows operating systems  like Windows 7 and Windows 8. So worrying about installing .NET isn't quite the issue it was just a decade ago.

Second, there are many advantages in using C# .NET or VB .NET over C++. The main one is ease of use. The .NET Framework contains thousands of classes using a fully implemented object oriented design meaning it takes less code, time, and effort to develop any peace of software given that there is lots of pre-existing code right there for the taking.

There are classes in .NET to perform many tasks like serialization, handle the Windows registry, and various things that are not trivial in C++, but are fairly simple to perform in .NET languages thanks to the ready made classes. It is not just that it cuts down on the amount of code required to do those things, but it simplifies it in the process as well.

Third, .NET is fairly easy to use COM based components like SAPI 5 which isn't so simple to do in C++. When I wrote some games in  .NET I was able to get SAPI 5 up and running with minimal effort in .NET, but found it was considerably harder to do in C++.

Finally, thanks to Mono and the availability of other open source .NET components for Mac and Linux it is a much better option for doing cross-platform development than is Java. I discovered it was fairly simple to build accessible graphical user interfaces using the GTK+ wrapper for Mono on Linux and the standard Windows Forms on Windows without requiring another dependency like the Java Access Bridge required for graphical Java applications.

I actually did develop a very simple test game using SDL .NET and C# which compiled and ran on Linux and Windows without any serious modifications. While I think SDL leaves one with much to be desired the fact of the matter is it is possible to do cross-platform development with .NET and the options these days are numerous. Far more feasible now than they were ten years ago.

Sincerely,
Thomas Ward
USA Games Interactive
http://www.usagamesinteractive.com

2014-10-19 11:41:39

ok, but i have to say:
.net is very easy to use and everybody i think have installed it
and mono is another port of it for linux and mac and it also has a port for windows
and i also have to mention, sometimes in .net, you dont need to write code, you can design with VS IDE
boath JAWS and NVDA support VS IDE's interface

2014-10-19 15:59:21

The VS IDE will not help with a game in any way.
Also, the VS IDE is a choose your hell adventure game.  Each one has unique, shall we say, challenges.  2012 is particularly bad, 2013 is a little bit better.  But saying they're supported is like saying QT is supported-technically it is, but no one actually wants to use it.

My Blog
Twitter: @ajhicks1992