1 decade ago by jan
Hi all,
Sorry if this has been asked before (searched, didn't see anything), but what I'm trying to do is have the Impact engine one one place on my server's file system and have the games in another, so I don't have to have multiple copies of the engine, or pollute the /lib directory with all the game files. The reasoning behind this is because I want to have multiple games on a site that are loaded dynamically onto a game page.
So far, my directory structure is like so (individual files omitted for brevity):
root
- games
- - MyGame
- - - entities
- - - levels
- - - media
- lib
- - impact
- - plugins
(sorry for the goofy formatting)
When I try to load the game this way I get an error in Firebug's console stating:
I know this is because the Impact engine expects the game assets to be under the /lib directory - is there any way to override this?
*Note that I know my /media directory is set up differently, but this works when the /MyGame directory is located under /lib.
Thanks in advance!
Sorry if this has been asked before (searched, didn't see anything), but what I'm trying to do is have the Impact engine one one place on my server's file system and have the games in another, so I don't have to have multiple copies of the engine, or pollute the /lib directory with all the game files. The reasoning behind this is because I want to have multiple games on a site that are loaded dynamically onto a game page.
So far, my directory structure is like so (individual files omitted for brevity):
root
- games
- - MyGame
- - - entities
- - - levels
- - - media
- lib
- - impact
- - plugins
(sorry for the goofy formatting)
When I try to load the game this way I get an error in Firebug's console stating:
uncaught exception: Failed to load module games.MyGame.levels.test at lib/games/MyGame/levels/test.js required from MyGame.main
I know this is because the Impact engine expects the game assets to be under the /lib directory - is there any way to override this?
*Note that I know my /media directory is set up differently, but this works when the /MyGame directory is located under /lib.
Thanks in advance!