2014-10-02 15:21:34

I am a newbie to game development and I was wondering is it possible to create an audio game using JavaScript language?

2014-10-02 16:16:32

Yes and no.
If you want to, you can.  There are lots and lots of frameworks that allow you to embed Javascript.  But you need to write a host for it.  There might be something already done that the sighted use, but the only thing I'm aware of is one of the inaccessible game engines we can't use (I think Unity, but can't remember).  Doing this and "I'm a new programmer" are two statements that do not mix well.  If you really want to try, you're probably interested in V8.
And don't be fooled by web audio.  It's not as amazing as it looks, mostly because half the browsers don't fully support it and the rest have lots of bugs still.  In 4 or 5 years when Webaudio is everywhere, logging on to a web site might be viable.  But it's not, quite.
The thing to remember, though, is that javascript is all about the web.  You can find lots and lots of stuff for making a game in Javascript, but that presumes that it's going to run in a web browser.  We're almost at the point of that being a fine thing, but you're going to want and need Aria, at least if the web page isn't supposed to act like one.  Since every single screen reader including NVDA has major Aria bugs, this is...difficult.  If you forego audio and just want some sort of adventure game or something, you could probably cobble something together, but it'd probably be pretty ugly without proper setup: you'd typically run something like that through something like Django or Node.js, and that's probably not something you want to do.
So I'm going with yes, but the effort to do so makes it basically meaningless and you should probably consider another language.

My Blog
Twitter: @ajhicks1992

2014-10-02 18:41:52

I made most of my games in Javascript before I realized that my comfortable little IE6 on an optimized XP professional machine was not standard enough or permanent enough to support it.

The biggest problem: audio. Audio support in Javascript is abismal and nothing resembling cross platform.
I always used the embedded media player with IE. Don't do this. It was incredibly convenient under the conditions in which I picked it up, but those conditions were luticrously ideal for exactly that. Your audience will not have those conditions.
Modern Javascript audio? If you can get it to work, please let me know.

However, Javascript worked very well for me in terms of learning loads of useful basics, and some of the things the web browser can be made to do. I would not discourage trying to develop Javascript games; just acknowledge that they're probably going to be mostly text-based.

...

*Considers trying to beat IE whatever-version-we're-on-now into running my games from 2006* *Decides it is not worth the frustration*

看過來!
"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-03 11:53:43

Hi there. thanks for the reply. The game that I'm about to develop will be a puzzle genre. It will consist of players listening to 4 sounds and identify what the four sounds have in common. It works exactly as the sighted game "4 pictures 1 word" but instead of pictures, sounds are used. But I am having difficulty in choosing the language to develop the game. JavaScript was my initial plan but after testing some games that uses JavaScript I found that the audio is the big problem in those games. Is C++ a better choice for the game that I'm about to develop?

2014-10-03 12:38:41

C++ is probably overkill.
It depends on what you want the user experience to be. Is there a game window? Is there visible text? Will it use Sapi/screen reader output? Will the player choose from a list, or enter a word in a prompt?

For this sort of thing, I might recommend BGT, but it has very little in terms of visual output (just alert, input_box and question, which are similar to Javascript's alert, prompt and confirm).
Python maybe, but distribution would be troublesome.

看過來!
"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-03 12:55:52

There will be a game window but there won't be any visible text..The user's experience will only be consist of audio and entering keywords and numbers from the keyboard. I have thought of BGT but I will be doing this game in terms of my academic project and BGT doesn't need programming language whereas I need to use an object oriented programming language to fulfill the academic qualification.

2014-10-03 15:13:24

BGT is Angelscript, which is in fact object oriented.  javascript is not, technically; it doesn't meet all the checkboxes.
Python distribution is no big deal if you aren't worried about DRM.  CAE, I'm sorry this keeps biting you, and I'm not sure what to say.  Py2exe is easy so long as you're not using zipped eggs and Python 2; the version for Python 3 fixed this problem.  If you do have to use Python 2, Cx_freeze professes to fix it.  Your experience with Python distribution is not typical, though it may be a barrier to new programmers.  I'm not sure what parts of Py2exe you are finding unclear.  It's pretty clear to me.
If you only care about Windows, C# is probably not a bad choice.  I've heard good things about SlimDX, or you could even just use XNA (it's no longer actively developed, but would meet your use case no problem).  C++ isn't exactly overkill, but it is a lot of extra complexity for nothing.

My Blog
Twitter: @ajhicks1992

2014-10-03 16:02:12

Py2exe isn't a problem of itself; it's rather that the additional filesize of all the dependencies would be a bit much for a project of this size.

看過來!
"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-03 18:57:13

Size is important, but I don't think that important.  2 or 3 meg isn't a big deal.
Everyone in the first world won't have a problem with 2 or 3 megs.  The game is not going to be wildly popular or commercial, as this is academic.  I'm not sure how many sounds are involved here, but having a small executable package may not be a real concern.  As the game grows, the program's size as compared to the size of art resources and level maps and such will shrink; if Swamp were to be rewritten in Python, it's size might maybe grow by half a percent.
There are also ways to shrink the ap, but this is a case-by-case basis.  Even so there's other options that one can use in the first place.  I will say that Pyglet looks like it solves most of the Pygame audio is hard problems and most of the o god here come the keypress if statement problems, however.

My Blog
Twitter: @ajhicks1992

2014-10-05 07:19:09 (edited by sunnyadam 2014-10-19 11:13:38)

ntel® System Studio is a comprehensive and integrated tool suite that provides developers with advanced system tools and technologies to help accelerate the delivery of the next generation power efficient, high performance, and reliable embedded and mobile devices.

Team Building Sydney

Intel® System Studio 2014 now allows you to develop for embedded & mobile Android* and Tizen* IVI systems, added cross development from Windows* hosts, and provides expanded JTAG debug support for all IA platforms. The new agent based UEFI debug helps the system developers to accelerate time-to-market and strengthen reliability of these increasingly complex embedded and mobile systems. Eclipse* integration and cross-build capabilities allows for faster system development with Intel® System Studio 2014.

2014-10-06 10:04:51

python is what you want.
If you only wish to support safari, Firefox and Chrome, use HTML5's audio player and javascript. They work... OK... together. It is nothing like working with python though.
I did try and create a prototype for a game using javascript, html and css, but it was a little ugly.
Python is really the easiest to make distribution packages for, for something like this pyinstaller would make one small .exe file for windows, and I'm not sure, but I think mac and linux can both run the script out of the box.

2014-10-07 13:21:39

I'm thinking of doing the game now in BGT (Angelscript) as I feel it will be easier to develop the game in academically wise. Is there anything I need to be aware using BGT?

2014-10-07 15:27:42

Only that you won't have any graphics or UI.

My Blog
Twitter: @ajhicks1992

2014-10-08 13:25:34

Right, that is what I want. I don't want any graphics or UI, just plain audio interacting with the players.