Skip to Content
 

The ToSP Project (Dark Tower™ For The Web!)

7 replies [Last post]
Anonymous

[shameless_plug]

If anybody remembers the classic electronic boardgame Dark Tower™, I'm about to release ToSP-I (The Tower of Shadows Past) to the public on July 15th. This is the only (known) fully operational and browser playable clone of the game. :)

This version is written in php/MySQL/HTML and is FREE (GNU-GPL) for people to download and play on their website with other people. :)

If you're interested in the game, please visit the support site at http://www.dk-tower.com. :)

[/shameless_plug]
---
Now - I have a question - LOL

When I start working on the next version of the game, what is the best way to create a gameboard? I'm using an HTML Table with a background graphic, but depending on what resolution the player is using, it may or may not tile this graphic. I'd like to have a single graphic of the game board and have that sliced up for moving like I do in ToSP-I. I'm also in the planning stages of a web playable Talisman and the same question is for that too.

Thanks! :)

Brykovian
Brykovian's picture
Offline
Joined: 07/21/2008
The ToSP Project (Dark Tower™ For The Web!)

Assuming you want to keep it web-based, then I've seen references to php having some real-time graphics-building/displaying libraries available to it. I haven't done anything with that myself, but I see that there's a chapter on it in a book I've recently purchased (but haven't gotten very far in yet) called "Beginning PHP4" from Wrox.

If you don't particularily want to keep it a web-based game, then let me know and I can steer you toward some other resources.

-Bryk

Anonymous
The ToSP Project (Dark Tower™ For The Web!)

Thanks for the info :)

I'd like to keep my stuff web based - kind of like the old 'Doors' that we used to run when we ran BBS's.

I'll check out that books and I know about the libraries - just need to figger out what's available and if they can do what I need 'em too. :)

phpbbadmin
Offline
Joined: 04/23/2013
Gameboard

From a web designer point of view, I'd reccomend slicing the graphic up (this will allow it to load faster) and then access the graphic using an image map. Background graphics for a game board aren't going to work well for the reasons you stated. If you an image map, then you don't have to worry about the resolution of the players..

Hope that helps,
-Darke

FastLearner
Offline
Joined: 12/31/1969
The ToSP Project (Dark Tower™ For The Web!)

This can also all be done via CSS and very precisely. You can get good help with it at Tek-Tips in the HTML and CSS forum -- lots of good, helpful folks there: http://www.tek-tips.com/threadminder.cfm?SPID=215

Anonymous
The ToSP Project (Dark Tower™ For The Web!)

So what's the best way to slice up a 640x480 image into, say, 7 squares across by 6 down?

I'm learning to use Macromedia Studio MX and have also heard that ImageReady was pretty good too.

Thanks! :)

Anonymous
The ToSP Project (Dark Tower™ For The Web!)

I'd prefer the css route. If you chopped up the image and mapped it, you'd have to do a map for every image... not really all that big a deal, but it does add a few unecessary lines of code. Plus I just really like using css.

Using background images for the board would work just fine, so long as you're diligent in your code and make sure all the cell padding on the tables are correct (as in 0) and you outline the cell dimensions correctly. If you use percentages or let the browser automatically set up the table, you'll run into problems. With this, you can also use the contents of the tables to put additional objects like small images, or text or links, and you can use css to place objects anywhere over the table without worrying about their alignment within the table cells.

It can get kind of pain staking, and frustrating when you work for 20 minutes only to find out that you miscalculated the size of one cell and the whole thing looks imploded, but it should work. Then again I havn't coded a website in a while, so I may be forgetting something.

As far as chopping the image up. The only way I've ever done it is getting a program that will allow you to superimpose guidelines or grids on the image, then simply cut sections of it and paste them into a new image. You have to be accurate when you do this, so pay attention to the coordinates when you're cutting. I used Paint Shop Pro.

FastLearner
Offline
Joined: 12/31/1969
The ToSP Project (Dark Tower™ For The Web!)

For slicing up images Photoshop works very, very well. You simply use the slice tool to indicate where the separations are to be and then choose Save For Web -- the little checkbox (on by default if you have slices) tells Photoshop that rather than saving it as one big graphic it should cut it apart and save each slice as a separate file. The beauty of this is that the original file can still be edited at will and the next time you Save For Web it can use the very same slices (or, obviously, you can change them, too).

Syndicate content


forum | by Dr. Radut