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

7 years ago by Gamma

I saw once a game that made such a system the game was posted here on Impact forums and the game was called http://impactjs.com/forums/games/bob-wip Bob] and each time you went to a different area, or the beginning for that matter you'd see a black screen with a title before you enter each level. How would I do that?

Also, does anyone here know how to put an image in the loader, say, if you want to put a company logo before the game loads. I like that effect. Thank you all in advance.

7 years ago by coreysnyder

For the black screen with a title, you can just add some code to your game's draw method where you draw a black image the full width & height of your game. Then below that put in code where you draw in the font with the text you want to show.

Psuedo code:
if(this.isStartOfLevel){
   Draw black image (preferably 50% opacity)
   Draw text "Starting Level 1"
}

You could put it on a timeout in your init to hide it after so many milli-seconds.
##
init: function(){
this.isStartOfLevel = true;
var that = this;
setTimeout(function(){ that.isStartOfLevel = false; }, 1000);
}

As far as the image in the loader, you could grab dominic's loader plugin he posted in the code section. I don't think it would be tough to replace his logo with yours there.

7 years ago by Gamma

Thank you for the tip. I understand how to make the title screen now. The only problem that I had replacing Dominics logo was that he has his logo animated while mine is static, I tried to remove the code containing the meteor logo and replace it with an image in the draw method, but I kept getting errors so I just stopped, yet I really would like to implement it.

Also I wanted to know, do all of you rely on reading the docs on the site or do you guys use your javascript knowledge. I'm still learning the language, I've been getting use to it ever since I've been exposed to this engine, but I could never understand how so many know how to implement their own code.

7 years ago by Jerczu

Go to piontofimpact.com I wrote a tut for that.
Page 1 of 1
« first « previous next › last »