parkm / oldbpm

A JavaScript game where you shoot at bubbles.
0 stars 1 forks source link

Initialization and Deployment #10

Closed parkm closed 10 years ago

parkm commented 10 years ago

We need to plan on how one actually starts the game. Think of it being hosted on a website. What would be the simplest way of getting the game to work.

For example on oldbpm we had to do <script src="bpm.js"></script> <script>BPM(someArgumentIforgot)</script> <canvas></canvas> <- the game canvas

If we reduce the amount of html we use as much as possible it'll probably make it a lot easier for someone to integrate this in their website.

So with oldbpm we had to create a canvas html element, it'd probably be easier to just do that via JavaScript. If we use Pixi it'll do that for us.

How will this work with require.js after it is compiled?

dgpt commented 10 years ago

We'll just have it start the game loop when loaded. I think we talked about this in person, but r.js should compile to one file or multiple files. Either way, we just need one script tag. We can programatically insert the game container, but it should be recommended to create one that we can fill with the game.

The most preferred way to host the game on a site would be to use an iframe.