Shop OBEX P1 Docs P2 Docs Learn Events
PROJECT: Monopoly — Parallax Forums

PROJECT: Monopoly

Spork FrogSpork Frog Posts: 212
edited 2010-01-23 15:53 in Propeller 1
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
«1

Comments

  • CardboardGuruCardboardGuru Posts: 443
    edited 2007-11-21 01:55
    Great idea! I like Monopoly.

    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
  • Spork FrogSpork Frog Posts: 212
    edited 2007-11-21 01:59
    Ah, yes, but we can do better than 2-color rectangles. I did a possible mockup of the board (see attathced.) I'm thinking 256x192, 2bpp with 16x16 palletted groups of pixels.

    I thought about HDMF before, and it really does seem to fit the bill.
  • CardboardGuruCardboardGuru Posts: 443
    edited 2007-11-21 02:10
    You need an extra property down each side!

    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
  • Spork FrogSpork Frog Posts: 212
    edited 2007-11-21 20:27
    I was originally thinking bitmap and sprites, but thinking, I realize that tiles would work just fine. 8x8 probably, to accommodate for text.

    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.
  • AndreLAndreL Posts: 1,004
    edited 2007-11-22 02:29
    tiles will be fine, it would be nice to show the players move and slide across, but you can always add that. The SD expansion card will be done soon, so count on that being available for hydra owners.

    Andre'
  • Spork FrogSpork Frog Posts: 212
    edited 2007-11-22 03:36
    Sounds good to me.

    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.
  • BaggersBaggers Posts: 3,019
    edited 2007-11-22 13:38
    Looks great so far Spork Frog [noparse]:)[/noparse]

    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.
  • Spork FrogSpork Frog Posts: 212
    edited 2007-11-22 14:27
    I was more thinking Spectrum would be nice, but tile-based driver could be better. Either could work in the end, I think.
  • CardboardGuruCardboardGuru Posts: 443
    edited 2007-11-22 14:40
    Are you aware that Monopoly is different in different countries? The street names are localised and the currency sign. Maybe some other stuff?
    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
  • Spork FrogSpork Frog Posts: 212
    edited 2007-11-22 15:20
    I was planning on having all of the board space names, values, Chance and Community Chest cards having their data stored in a separate file, read in real time from an SD card or from RAM. I'll also most likely be doing a board editor.

    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
  • JT CookJT Cook Posts: 487
    edited 2007-11-22 16:34
    The board looks pretty good! I think a tile display would still·be better because you have a lot of repeated spaces and a lot of empty spaces.

    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.
  • BaggersBaggers Posts: 3,019
    edited 2007-11-22 18:30
    Yeah, that's true Spork, I have a TV driver that could plug JT Cooks drivers into it, It even handles PAL and NTSC modes.

    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.
  • Spork FrogSpork Frog Posts: 212
    edited 2007-11-22 19:00
    That's why I was originally thinking 4color pallettes.

    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.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2007-11-22 19:13
    Awesome game board!! Did this with paint?? (One of my favorite utilities)

    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
  • CardboardGuruCardboardGuru Posts: 443
    edited 2007-11-22 19:31
    Spork Frog said...
    Do you know if the board itself stays the same? I'd be curious to know.

    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
  • ColeyColey Posts: 1,110
    edited 2007-11-22 19:46
    The ZX Spectrum version of this great game had a novel psuedo 3D display, it worked really well....


    Monopoly.gif


    Jeff, what you need is a sprite based BASIC then you wouldn't have to worry about the board..... devil.gif

    why not bang on Baggers' door I'm sure he will have something up his sleeve.....

    Coley
  • Spork FrogSpork Frog Posts: 212
    edited 2007-11-22 20:57
    @Oldbitcollector: Yup, nothing but Paint and a few hours of work.

    @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.
  • Spork FrogSpork Frog Posts: 212
    edited 2007-11-22 22:38
    Did some more work on paper, and came up with this:

    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
  • BaggersBaggers Posts: 3,019
    edited 2007-11-23 12:56
    Cool, you seem to have it all under control, I shall look forward to playing it [noparse]:)[/noparse]

    PS, Thanks for simon, my daughter enjoys playing it cheers.

    Baggers.
  • Spork FrogSpork Frog Posts: 212
    edited 2007-11-24 00:12
    Quick update: The graphics driver is nearly done, and will be released seperately soon. Same specs as before. Just need to add colors to it.
  • BaggersBaggers Posts: 3,019
    edited 2007-11-24 15:12
    nice one [noparse]:)[/noparse] can't wait to see it in action.
  • Spork FrogSpork Frog Posts: 212
    edited 2007-11-25 22:17
    Video driver is done! I need to write some documentation for it yet, then I'll release it. Only 575 longs (2.3KB) used so far!

    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
    285 x 214 - 19K
  • Spork FrogSpork Frog Posts: 212
    edited 2007-11-27 23:05
    The graphics on the board are now almost done, leading up to a possible WIP release soon.

    Up to just about 3.1k used so far.
    570 x 428 - 68K
  • BaggersBaggers Posts: 3,019
    edited 2007-11-27 23:18
    looks great so far Spork Frog [noparse]:)[/noparse]
  • Spork FrogSpork Frog Posts: 212
    edited 2007-12-01 19:09
    Monopoly WIP release 0.01

    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
  • CardboardGuruCardboardGuru Posts: 443
    edited 2007-12-02 13:18
    Nice start Spork Frog!

    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
  • Spork FrogSpork Frog Posts: 212
    edited 2007-12-02 14:15
    I was thinking of replacing the center of the board with the property details, leaving 14x14 characters for property info. Maybe even replacing the whole board, depending on how it's going to look. I actually originally had the board shifted all the way to the left and was going to do some information displays (cash on hand etc) over there, but then realized that 8 characters of space isn't really enough to do much of anything, so I just centered the board.
  • Spork FrogSpork Frog Posts: 212
    edited 2007-12-26 23:06
    Development has resumed, after being put on because of other commitments and the holidays.

    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.
  • BaggersBaggers Posts: 3,019
    edited 2007-12-27 09:00
    cool, can't wait to see the next release [noparse]:D[/noparse] it's lookin good Spork Frog
  • Spork FrogSpork Frog Posts: 212
    edited 2007-12-29 02:24
    WIP Release 0.02

    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.
Sign In or Register to comment.