Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by bea

Hi! I'm trying to test my impact game on ejecta, but ... I'm not sure how to set index.js on ejecta. I have this code:

var w = window.innerWidth;

var h = window.innerHeight;

var w2 = w/2;

var h2 = h/2;



var canvas = document.getElementById('canvas');

canvas.width = w;

canvas.height = h;

ejecta.require('lib/impact/impact.js');

ejecta.require('lib/game/main.js');

How I can run my game?
Thanks!

1 decade ago by dominic

Your code looks alright. In fact, you don't even need most of it; this will suffice:

ejecta.require('lib/impact/impact.js');
ejecta.require('lib/game/main.js');

What are you seeing? Do you have any error messages in your console?

Also, have a look at the Integrating Impact Games article.
Page 1 of 1
« first « previous next › last »