PROJECT: Monopoly
Spork Frog
Posts: 212
Looking around here, I'm a little surprised to see no one's implemented any board games of any sort. Therefore, I'm thinking about possibly doing a version of Monopoly for the Hydra.
It would most likely require an SD card to hold all of the data required, but since that seems to be common enough now, I don't think that should be an issue. At least a few people can get enjoyment out of it.
I'm thinking the Spectrum driver is a good place to start, with slight modification to do 2bpp instead of 1bpp. Sprites and text will have to be added as well, but I could probably do that as an add-on cog for the driver.
Bitmaps, board data, and music would all be stored on the SD card. Sprites and the current bitmap from the screen would have to be stored in RAM.
A rudimentary AI could be added, but that would have to be later.
The only real big challenge I currently see in my way is trading, especially for the AI with developing a formula for what is considered a "fair" trade.
I'm currently working on assembling the data files and I'm looking for input on the whole thing for feature requests, possible problems forseen already, etc.
Post Edited (Spork Frog) : 11/24/2007 12:08:14 AM GMT
It would most likely require an SD card to hold all of the data required, but since that seems to be common enough now, I don't think that should be an issue. At least a few people can get enjoyment out of it.
I'm thinking the Spectrum driver is a good place to start, with slight modification to do 2bpp instead of 1bpp. Sprites and text will have to be added as well, but I could probably do that as an add-on cog for the driver.
Bitmaps, board data, and music would all be stored on the SD card. Sprites and the current bitmap from the screen would have to be stored in RAM.
A rudimentary AI could be added, but that would have to be later.
The only real big challenge I currently see in my way is trading, especially for the AI with developing a formula for what is considered a "fair" trade.
I'm currently working on assembling the data files and I'm looking for input on the whole thing for feature requests, possible problems forseen already, etc.
Post Edited (Spork Frog) : 11/24/2007 12:08:14 AM GMT
Comments
Pretty well all of the 8-bit micros had versions of monopoly, so I can't imagine why it would need more than 32K RAM to do a version. The board is mostly line drawing and solid rectangles. The graphics are all 2 colours. Music can be done really compactly with Eric's HDMF driver.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Help to build the Propeller wiki - propeller.wikispaces.com
Prop Room Robotics - my web store for Roomba spare parts in the UK
I thought about HDMF before, and it really does seem to fit the bill.
Are you thinking of a bitmapped screen or tiles and sprites?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Help to build the Propeller wiki - propeller.wikispaces.com
Prop Room Robotics - my web store for Roomba spare parts in the UK
And I realized the extra property last night, when I pulled out an authentic Monopoly set.
I also devised a format for the board data file, requiring only 49 bytes per space, or 1960 bytes (490 longs) for the whole board.
Andre'
Only need about 5 or 6 tiles in the end to do a basic board layout, not counting the center text.
And I started again with the board design. It's amazing how versatile Paint can be if you know how to use it.
Andre' I think he's still on a spectrum display driver, which is bitmap'd the tiles are the ones used to store it compressed, so it doesn't take and extra 6912 bytes for the screen layout.
So he'll still be able to show the players move and slide across.
Correct me if I'm wrong Spork Frog.
It's be good to have them all defined together. Perhaps in a localization spin file, or at least in a single block of constants. Then people can get the authentic feel for their own country.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Help to build the Propeller wiki - propeller.wikispaces.com
Prop Room Robotics - my web store for Roomba spare parts in the UK
Do you know if the board itself stays the same? I'd be curious to know.
And finishing the board, I think I'm going to have to stay with bitmapped graphics, due to the relative complexity of the board.
Post Edited (Spork Frog) : 11/22/2007 3:25:23 PM GMT
If you don't find a display solution I am working on a tile/map editor, plus baggers has a TV driver that should be able to plug into my rendering code, so I may be able to help you out.
I was also thinking, the renderer side could be modified to handle 2colour background characters, to save even more memory.
PS, the board looks great, but won't work in a speccy mode because there's more than 2 colours per attribute.
I'm going to try and roll my own video driver first I think. If that doesn't end up working I'd be interested in seeing your driver.
Question: (Sorry if I steal this thread!)
Game programming is something I have "0" experience with, but would
like to learn. (In other words, the first game I finally get posted will
be a miracle)
IIUC, Your monopoly board will be loaded below the actually game pieces
themselves. Is it possible to load the game board with one COG, then
use something like a modified char8x8 to generate the characters and
run them out to video using another COG?
It can't possibly be that easy, but it sure would open the door a little
wider for game newbies if this is possible. A layered approach to a board
game would allow me a concentrate on the game-play and not worry
about the board itself once it's loaded.
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Buttons . . . check. Dials . . . check. Switches . . . check. Little colored lights . . . check.
— Calvin, of 'Calvin and Hobbes.
Post Edited (Oldbitcollector) : 11/22/2007 7:19:20 PM GMT
I think the basic layout, which are properties, and which are chance/community chest are the same for all versions.
But the colours of some of the colour sets vary slightly. So you might want to make that localisable too.
More info here including the US and UK boards:
http://en.wikipedia.org/wiki/Monopoly_(game)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Help to build the Propeller wiki - propeller.wikispaces.com
Prop Room Robotics - my web store for Roomba spare parts in the UK
Jeff, what you need is a sprite based BASIC then you wouldn't have to worry about the board.....
why not bang on Baggers' door I'm sure he will have something up his sleeve.....
Coley
@CardboardGuru: Ok, I was going to encode at the very least a color number into the datafile as well, so making the color specific shouldn't be that bad.
@Coley: Nice... but I like the way I have it now a little better.
In general, here's my ideas for the video driver:
8x8 tiles
2bpp encoding
For each tile, a 4-color pallette
Sprite functionality
However, I'm not sure about the timing on this, if there's enough time to read in a tile reference, the tile itself, and a pallette entry. We'll find out I guess; I can split that off if I really need to.
And Oldbitcollector, I know what you mean about not having to worry about the board. I was going to just write SPIN routines (or even a seperate object) to handle all the display stuff for me so in the end the only thing I really have to worry about is the game logic.
First off, no sprites (for now.) However, character movements could still be done through tile swapping.
256x192 overall screen resolution arranged as 8x8 tiles. Each tile can have its own bitmap and 4 colors out of a 16 color palette.
768 longs define the tilemap, arranged so that the lowest byte is a tile number, and bytes 2 and 3 are split each into 2 nibbles, referring to a color in the 16-color palette. Tiles each are made of 8 longs with 2 bit encoding.
This system allows keeping HUB operations to a minimum (2 per every tile per line.)
Post Edited (Spork Frog) : 11/22/2007 10:53:32 PM GMT
PS, Thanks for simon, my daughter enjoys playing it cheers.
Baggers.
So now, the real coding begins.
Those lines on the picture are the fault of my camera, not the driver. It's solid as a rock on my actual screen.
Post Edited (Spork Frog) : 11/25/2007 10:22:17 PM GMT
Up to just about 3.1k used so far.
This isn't quite a relase I guess, but I figured I'd post it anyway to have something to show for my progress.
The board graphics got simplified drastically and tile encoding was changed from 2 bits per pixel to 1 bit per pixel to reduce the amount of RAM used. I think it still looks acceptable, anyone else? It's just to give the idea of the board more than anything else.
I added dice rolling (via RealRandom) and token movement (the shoe, probably the only token available to the players for now). Now you can press A to roll the dice, and the token will slowly advance that many spaces around the edge of the board. Most of those routines need massive cleanup for efficiency, but for now they work.
EDIT: Archive removed. See below for latest release.
Post Edited (Spork Frog) : 12/29/2007 2:27:18 AM GMT
Where are the property cards going to go? Maybe display the dice on top of the board (where the dice are thrown on a real board) and shift the board to the left?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Help to build the Propeller wiki - propeller.wikispaces.com
Play Defender - Propeller version of the classic game
Prop Room Robotics - my web store for Roomba spare parts in the UK
I entered all of the data for each space on the board, with the whole table for all fourty spaces taking up only 1.9k bytes. Each descriptor contains the space name, cost, and various rent values. Next up will be buying, auctoins, and charging rent.
Once again this is nowhere near I wanted to have it for a "release", but I figured people might be interested in seeing it anyway.
I entered the data for all spaces on the boards as well as all of the "Chance" and "Community Chest" cards, with a random draw when a player lands on that space. These are all stored in a seperate .spin file, so localizatoin should be fairly straightforward when that happens. Graphical display is also almost complete, with a few effects on the cards left to code.
Next up will be player data tables and property tracking. I'm still toying with ideas of how many players to support; I think I'll stick to the original and classic 2 to 8 though.