Sliding Tile Game
Author |
Message |
corriep
|
Posted: Sun Mar 08, 2009 3:27 pm Post subject: Sliding Tile Game |
|
|
Basic game I made, everyone has played one version or another of this game.
Instructions :
The target image will show on the screen and it will start scrambling.
Press the space-bar to stop it.
Click on the tiles to swap them with the free space.
Have fun!
Description: |
|
Download |
Filename: |
Sliding Tile.t |
Filesize: |
5.29 KB |
Downloaded: |
251 Time(s) |
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
A.J
|
Posted: Sun Mar 08, 2009 4:53 pm Post subject: Re: Sliding Tile Game |
|
|
Do you mind providing us with the pictures also?
|
|
|
|
|
|
corriep
|
Posted: Sun Mar 08, 2009 4:56 pm Post subject: Re: Sliding Tile Game |
|
|
Ya that probably could have helped, heres the whole thing in zip file.
It works with any image at 400x400 pixels
Description: |
Heres the program and the pic in a .zip |
|
Download |
Filename: |
Sliding Tile.zip |
Filesize: |
32.21 KB |
Downloaded: |
114 Time(s) |
|
|
|
|
|
|
copthesaint
|
Posted: Sun Mar 08, 2009 7:07 pm Post subject: RE:Sliding Tile Game |
|
|
Error line 54/ White.Jpg is not created successfully Forgot to include the other picture too...
|
|
|
|
|
|
corriep
|
Posted: Sun Mar 08, 2009 7:18 pm Post subject: Re: Sliding Tile Game |
|
|
Ok I am a noob. 3rd times the charm?
And that white.jpg was a completely blank image, the only reason I used it was for consistency and laziness!
Description: |
|
Download |
Filename: |
Sliding Tile.zip |
Filesize: |
33.3 KB |
Downloaded: |
171 Time(s) |
|
|
|
|
|
|
A.J
|
Posted: Sun Mar 08, 2009 9:55 pm Post subject: RE:Sliding Tile Game |
|
|
Still doesn't work....line 54 Error
I think this doesn't work because your tile(i).pic wasn't initializes properly.....look into your initialize procedure and debug (i.e. output debug messages).
EDIT : I found your mistake. At line 41, the Pic.New command requires (a, b) to be the bottom left point of the picture, and (c, d) to be the top right point of the picture. Right now, (a, b) is the top left point and (c, d) is the bottom right point. And furthermore, you didn't calculate the coordinates of the tile(i) correctly. You want the 16 tile(i).x and tile(i).y to evenly split up the whole picture. For that, you have to make sure that you are splitting up the picture correctly. Output the 'x' and 'y' values of the tile(i) and check if they are splitting up the picture, or if the are out of bounds.
EDIT 2 : NEVERMIND!!! I got it to work. Just change what I said earlier (the (a, b, c, d) to (a, d, c, b)) and then change the dimension of the window to 401*401 instead of 400 * 400 in line 6. Since some of the tile(i).pic accesses the point on 400, you have to make the boundary 1 bigger. Cool program, I like it
|
|
|
|
|
|
hossack
|
Posted: Wed Mar 11, 2009 7:57 am Post subject: RE:Sliding Tile Game |
|
|
This is a cool game
|
|
|
|
|
|
|
|