Awesome-Game-Team / Awesome-Game

An Awesome Game
GNU General Public License v3.0
8 stars 9 forks source link

New way of loading backgrounds #36

Closed metalx1000 closed 8 years ago

metalx1000 commented 8 years ago

So, I made a very simple second level map for testing. New maps can be loaded at this point with a url variable. The game will load map "0" if no map is specified.

So, you can load the game like this: http://filmsbykris.com/scripts/Awesome-Game/ Or give it a map to load like this: http://filmsbykris.com/scripts/Awesome-Game/?map=1

Maps can be named whatever you want. But I think for the official game we should label maps numerically starting with 0 (in case we use arrays in some way in the future). So, when we add an "exit level" object at the end of each level we can have it go to the next level just by adding 1 to the current level number.

We need to add the background image to the map file some how so it loads the correct background from for each level (you'll see the current background for the new level doesn't work right since it's a vertical level).

@jimfrize when you get a chance a new background image would be great. This one should be simple, repeating sky pattern of some sort.

Also, please note the new tmx map files I created. I've relabeled the "playerStart" position to "player" and "tileSet" to "tiles".

metalx1000 commented 8 years ago

Although you don't see much of a change in the game, I've completely rewrote how the background image is loaded and added a cloud layer option (both move at different speeds to give more of a 3D feel).

Both can be loaded into a map by adding an object to the object layer and changing the name property to "clouds" or "background" and then giving it a "type" of the file name.

Example, background of "sky" will load the "sky" image ("sky.gif").

Look at the tiled files for the existing levels. If you have any questions let me know.

@jimfrize I created a cloud layer image based on the clouds from the background you created. I would love to see some other cloud layer images if you have any ideas. Thanks!