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 FabienM

Hi,
I have a big image (600*400px) that I want as background for my game.
How can I do it in the editor ?

it seems simple but I don't know how to do that ? do I have to cut my image ?

thx
Fabien

1 decade ago by Hareesun

You should check the Drop source fom your download page. That game has a static background image. The example doesn't show how to do this in the Weltmeister though as its currently not possible, unless you use an image as a tileset and move the layer behind your main. :)

1 decade ago by Heiko

As Hareesun mentioned. You can load the image via Weltmeister. Specify 100x100 tiles using your background image as the tileset image. Then you can draw 6x4 tiles to recreate your original background.

e.g.
If your image is 400x320 you can set tilesize to 80x80, and then draw 5x4 tiles to create your background.

I had to create smaller tiles to get my image resolution to work
- if your image ends up being broken up into 20x20 tiles it will take quite a while to recreate it in weltmeister.
- thus I created my tile data in excel, and then pasted result into level file, then reloaded into weltmeister.

Obviously you can load background image in code - but I prefer to be able to see it in weltmeister.

1 decade ago by FabienM

thanks all
I have created a layout with a tile size of 200, then I have 6 tiles to create.

Fabien

1 decade ago by paulh

just draw it as a background image in your game code.

1 decade ago by KenD

I accomplished this by creating an ig.Image in my game class, setting clearColor to null, then overriding the game's draw() method like this:

	draw: function() {
		this.sky.draw(0,0);
		this.parent();
	}
Page 1 of 1
« first « previous next › last »