Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / Board game advice please.

Author
Message
Killer Wolf
21
Years of Service
User Offline
Joined: 7th Sep 2004
Location:
Posted: 8th Sep 2004 04:06
Hi,
just joined so i hope i'm posting in the right place etc. Just wanting to know if what i'm planning as a game is possible...??

it's a board game for 2 players on a 24x24 square board. each player has several pieces that they can move as they wish depending on a role of 2 dice (ie if they rolled 8 they could move 1 piece 8 squares, 2 pieces 4 squares each, 1 piece 5 squares and another 3 etc etc).
Firstly, what would be the best way of doing the board? assembling it as individual square objects set up in an array perhaps, or can you draw a board as a bitmap/graphic and control the squares some other way?
secondly, moving the pieces - i was thinking of clicking on a peices, moving it via the cursor keys/num pad, then clicking the next piece etc - should this be easy or am i overlooking a simpler way?

thanks in advance. i'm ploughing through the "intro to" books etc so i might have more questions later on.

Cheers,
KW
medwayman
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: uk
Posted: 11th Sep 2004 06:53 Edited at: 12th Sep 2004 08:52
Hi and welcome to the forums

You could use a single image containing the whole board if you like, although if the board is much larger than the screen, then you are probably better off tiling smaller images. Personally I would tile every time.

Regardless of whether you tile or use a whole image you would still need the same data. Set up some arrays to hold each tile’s top left position on the screen. You can then use this data to do positioning/collision if tiling, and just collision if using a whole image.

Ok, here is a small example, although I would recommend looking in the code base or code snippets forum for better more complete examples.



For the movement, I would use mouse only. You could simply select the game piece with the mouse then click on the destination tile to complete the move. I don’t know about anyone else, but when I play board/puzzle games, I often like to put my feet up and sit back. I guess if you keep the keys to a minimum I could use my toes, but mouse only would be best . Just my opinion.

Good luck

Edited code: wrong number in for next loop. Missed off one row of tiles.

Based on Amiga PD game Squigs. Currently being re-written.

Tapewormz
23
Years of Service
User Offline
Joined: 15th Sep 2002
Location: Winnipeg, Mantoba, Canada
Posted: 12th Sep 2004 12:19
Make your board game in 3D. Much easier to move the camera around a 3d plane. Texture the plane with your game board.

Killer Wolf
21
Years of Service
User Offline
Joined: 7th Sep 2004
Location:
Posted: 15th Sep 2004 04:38
thanks for that

using the mouse - not sure how that would work, it would take a lot of fiddling to work out how many squares a piece had moved if i dragged it, rather than counting each time a key is pressed...

3d - damn, isn't that just way more complex tho? i'd have to come up w/ 3d pieces and then work out how to select them, wouldn't i? not sure about having one plane, it sounds easier to hold the squares in an array to deal w/ the stats of what pieces are there, if the square is occupied etc etc.

KW
//\oo/\\
medwayman
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: uk
Posted: 18th Sep 2004 06:26
Quote: "3d - damn, isn't that just way more complex tho?"


For something like a board game it should be just as easy to do in 3D as in 2D although I’ll leave it at that, as I don’t really use 3D these days.

Quote: "using the mouse - not sure how that would work, it would take a lot of fiddling to work out how many squares a piece had moved if i dragged it, rather than counting each time a key is pressed...
"


Each time the player presses a key you will have to look ahead to the next square and run checks to see if that square is already occupied (or whatever you need to look for) before moving the piece forward. It’s no different with clicking ahead. If the game piece is located at x-11,y-4 and the selected square is at x-15,y-4 then the piece needs to move 4 squares to the right, although rather than moving 4 squares in one go you would be best to move one square 4 times. So essentially you use pretty much the same code as you would with the single key press, accept you repeat it 4 times.

All that said, the last thing I want to do is over complicate things for you. Better to keep it simple and finish the game. You’ll learn much more that way and feel good too.

Based on Amiga PD game Squigs. Currently being re-written.

zircher
23
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 18th Sep 2004 06:59
One real big perk to using 3D playing peices and individual planes for squares is that you can use the pick object command to easily select things. An additional advantage to individual tiles is that you can have all sorts of special effects such as rotating individual tiles, selecting coloring and texturing, special effects such as zooming up a tile to make it easier to read, etc. I feel that making the game in 3D would give you a better look and more fun game play/presentation. For example, you could rotate the entire board just by moving the camera and telling to look at the middle. That way each player can see the board from their own position. If it was a game like Monopoly, as the board rotates they would see their own money and properties sitting in front of them.

While some of these effects might seem hard, but if you tackle each one individually and you'll find that they are fairly simple.
--
TAZ

"Do you think it is wise to provoke him?" "It's what I do." -- Stargate SG-1
Killer Wolf
21
Years of Service
User Offline
Joined: 7th Sep 2004
Location:
Posted: 20th Sep 2004 16:27
yeah, i was wanting to do 3D at first but i got kinda intimidated by it - i can do Photoshop stuff ok, but i've never tried 3D to any serious level. i'm thinking a 3D board would be pretty good, but populated w/ sprites which i could draw in PShop - if i then select a square w/ the mouse i can then read it's attributes to see which sprites are held there.

what's 3D like to design pieces? (edging into the 3d forum here i suppose). it'd be way beyond me, i think, to do people/characters, but i might be able to manage simple objects like chess pieces.

one other question - if i select a square, can i get it's info to appear onscreen in a pop-up window? i've not come across stuff like that in the stuff i'm reading yet,

thanks,
KW
//\oo/\\
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 20th Sep 2004 19:51
People don't really need to press a key to move each playing piece.

The centre of each square has its x/y position stored.
You animate the dice...
The piece moves on its own to the centre of each square the number of times on the dice.

medwayman
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: uk
Posted: 21st Sep 2004 04:22
I like 3D lots I just prefer 2D that said I think a board game would be better done in 3D. My one concern would have been selecting the tiles with the mouse, but if DBPro has a pick object command then that’s very cool

For the pop-up you could hold an image of the window minus any text, create an off screen bitmap, paste the image to the bitmap, use the text command to print the relevant information to the bitmap, then grab the image and apply it to a sprite or 3D plane. Of course you don’t have to use the text command, you could paste a flash bitmap font or whatever you have in mind.

Based on Amiga PD game Squigs. Currently being re-written.

Killer Wolf
21
Years of Service
User Offline
Joined: 7th Sep 2004
Location:
Posted: 23rd Sep 2004 19:04
Alright, having had a bit play w/ a coverdisc version of Poser, I’ve come to the conclusion that I suck a$$ at 3D modelling. So my sprite idea stands. Can someone tell me if this is doable please –
Set the 3d board up , camera position slightly above. Have a set of sprites showing the back view of the team closest and the front view of the opposite team, place them on the board using x-y-z or based on the squares’ attributes etc. when the cam changes position to the opposite side, redraw the sprites to a second set that shows the rear view of the second team and the front view of the first team. I take it that since I’m using sprites not 3d objects I’ll have to handle the scaling of the sprites myself.

Cheers, KW
//\oo/\\
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 24th Sep 2004 10:49
Yeah that's right, but use plains with the images textured on them instead of sprites if the camera is going to move around the board. If the camera stays still, you are OK.

Killer Wolf
21
Years of Service
User Offline
Joined: 7th Sep 2004
Location:
Posted: 27th Sep 2004 21:23 Edited at: 27th Sep 2004 21:26
plains! i never thought of that! cheers bud!
that should actually make things a lot easier shouldn't it? i can select them using the PICK OBJECT command or something, and since it's 3d i can do my bitmaps w/ the front and rear view side by side in one sprite and then if i texture the plain w/ it it should wrap around it....i hope. or i could use the MAKE BOX command instead i suppose.

thanks,
KW
//\oo/\\

Login to post a reply

Server time is: 2026-06-11 15:33:34
Your offset time is: 2026-06-11 15:33:34