oldrich-s / musicope

The Piano Game
MIT License
275 stars 73 forks source link

Dependency Problem #18

Closed tomhaste closed 9 years ago

tomhaste commented 9 years ago

Hi,

I'd really like to get this working as it would be great to use in my classroom as I could deploy a midi file for the class to practice each week. If I can manage to get it working, I'd like to help make a Google Drive storage option instead of Dropbox. :)

I'm getting a 'require is not defined' in line 2 of app.js. I've tried bringing in RequireJS but I'm just swinging blindly here.

Thanks!

oldrich-s commented 9 years ago

I see your point. Well, I removed Dropbox and changed to http://nwjs.io/ so it acts more like an ordinary game than a webside. The advantage is that you know that Web Midi API will work because it is activated when Node-Webkit starts. Also I did not have to deal with Dropbox and how to make it work etc. :).

Here you can download the full program as I have it on my HDD with binaries etc. Just hit play32.bat or play64.bat to run the game.

https://dl.dropboxusercontent.com/u/4571/musicope.zip

I use Visual Studio and TypeScript to develop the game. If you comment out the require lines in the beginning of app.ts you will get compile errors in the Visual Studio. If you follow the errors it will show you all the places where the game reads songs from files or save settings to files. You can then change these places to point to you webserver etc. to make the distribution of your midi songs easier. I will probably move all the HDD file operations to a single class when I have time to do it.

The help window while playing a song is also missing right now - this window shows you which keyboard keys you can use to move in the song, stop play, switch hands etc. I will include it soon.

I will also soon make an official binary package to run the game.

tomhaste commented 9 years ago

Thank you very much :+1: Ill have a tinker!

oldrich-s commented 9 years ago

Great, let me know if you run in to any issues. Just keep in mind that I wrote it in my spare time for my piano and needs :) So it is not by any means a professional product :)

oldrich-s commented 9 years ago

I have updated the code and released the first win-32 version. It can be downloaded in the release section. I have also extracted all io operations into io.ts file to make the change for you easier.