Group: Moderator
Posts: 1231
Joined: 11-June 03
From: Belleville, IL
Member No.: 43348
Xbox Version: v1.1
360 version: v2 (zephyr)
I was actually just looking at a version on source forge that has the puzzle files in xml format and everything, I hope you could do it, that game is awsome...
Group: Moderator
Posts: 1787
Joined: 14-April 03
From: Southern California
Member No.: 32293
Xbox Version: v1.0
360 version: v1 (xenon)
So I got that SokoSolve app. Pretty cool
I've been testing some gosub's for just displaying the boards. I ran into a small problem though. Not all boards have the same number of rows and columns.
So if if one puzzle is 10x10 and I use 36x36 tiles you'll see the whole thing. Where as if it's 20x20 with 36x36 tiles it'll get cutoff the screen.
I did come up with a solution to it. You can rescale the puzzle board at runtime. Make a big one smaller or a small one bigger if you need or want to.
And to top it off the whole board gets centered onscreen to regardless of the row and column count's.
Here's some of the magic:
CODE
:CenterCoordinates Set ScreenCenterX %((ScreenWidth-(Columns*TileSize))/2)% Set ScreenCenterY %((ScreenHeight-(Rows*TileSize))/2)% Return
:ScreenSize Set ScreenLeft 0 Set ScreenTop 0 Set ScreenWidth 640 Set ScreenHeight 480 Return
Group: Head Moderator
Posts: 1827
Joined: 3-January 03
Member No.: 16298
Xbox Version: v1.1
360 version: unknown
QUOTE (flattspott @ Jun 27 2004, 03:37 AM)
So I got that SokoSolve app. Pretty cool
I've been testing some gosub's for just displaying the boards. I ran into a small problem though. Not all boards have the same number of rows and columns.
So if if one puzzle is 10x10 and I use 36x36 tiles you'll see the whole thing. Where as if it's 20x20 with 36x36 tiles it'll get cutoff the screen.
I did come up with a solution to it. You can rescale the puzzle board at runtime. Make a big one smaller or a small one bigger if you need or want to.
And to top it off the whole board gets centered onscreen to regardless of the row and column count's.
Here's some of the magic:
CODE
:CenterCoordinates Set ScreenCenterX %((ScreenWidth-(Columns*TileSize))/2)% Set ScreenCenterY %((ScreenHeight-(Rows*TileSize))/2)% Return
:ScreenSize Set ScreenLeft 0 Set ScreenTop 0 Set ScreenWidth 640 Set ScreenHeight 480 Return
Cool, you could also make it auto-fit-to-screen (if it already isn't)