Monopoly

A forum where you can announce your awesome project(s).

Moderator: MaxCoderz Staff

User avatar
Timendus
Calc King
Posts: 1729
Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:

Post by Timendus »

Wow, that's a name I haven't heard for a long time :P
Welcome back!
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
chickendude
Extreme Poster
Posts: 340
Joined: Fri 07 Jul, 2006 2:39 pm

Post by chickendude »

Thanks, everyone! I found my copy of monopoly on my computer, all parts integrated; the only problem is that it doesn't use the newer, more graphically friend tilemap routine/board that I believe Calvin drew for me. So last night I worked on updating that new program, and it started to get pretty long (1500+ lines). My computer is terribly slow (to give you a hint, I updated my computer's OS to Windows 98 when it came out). Now I'm breaking the program down into different files and then hopefully it'll soon be coterminous with the old one.

Hah, I realize that /\ may not make sense, but to my credit I did stay up til about 4 in the morning working on it. :)

I'll keep you updated.

Oh and I'm going to try to download those programs you all suggested onto a disk to put on my computer to check out. Thanks again for the suggestions :)
Patori
Maxcoderz Staff
Posts: 1479
Joined: Sat 18 Dec, 2004 3:51 am
Location: Toledo, Ohio, USA

Post by Patori »

Hey chickendude! Long time no see since the calcsoft days ;) Can't wait to see monopoly finally finished!!!
Currently coming up with a new signature idea... since my forum avatar changer was killed by an upgrade...
User avatar
tr1p1ea
Maxcoderz Staff
Posts: 4141
Joined: Thu 16 Dec, 2004 10:06 pm
Location: I cant seem to get out of this cryogenic chamber!
Contact:

Post by tr1p1ea »

I was wondering if you had considered grayscale for this project?
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
CompWiz
Calc King
Posts: 1950
Joined: Thu 13 Oct, 2005 1:54 pm
Location: UB

Post by CompWiz »

hmm, that would be neat. But how long would it take to implement and get all the new sprites made?
In Memory of the Maxcoderz Trophy Image
chickendude
Extreme Poster
Posts: 340
Joined: Fri 07 Jul, 2006 2:39 pm

Post by chickendude »

Well, I hadn't really planned on using grayscale. I've been rather out of the loop these days and I'm afraid it would just take too long to convert everything over. I'm also not huge on the jump in memory size, but I guess if someone wants to help me out and there's a great deal of want for grayscale, I might consider it.

As far as the sprites, I've only drawn the hat (as far as pieces go). But the entire board would need to be redone. And I would need someone to test it all, as I don't have a calculator of my own.
CompWiz
Calc King
Posts: 1950
Joined: Thu 13 Oct, 2005 1:54 pm
Location: UB

Post by CompWiz »

Just emulate it with PindurTI. It emulates the screen and all timings almost perfectly, including flawless grayscale.

And I agree, greyscale isn't really neccesary. It probably wouldn't add a whole lot for monopoly. But hey, if someone wants to draw up all the graphics in greyscale, it probably wouldn't be all that hard to do. Still, getting out an actual product is better than adding features and never getting something out. If it's almost finished, just stick with black and white, and get a product out.
In Memory of the Maxcoderz Trophy Image
threefingeredguy
Calc King
Posts: 2195
Joined: Sun 27 Mar, 2005 4:06 am
Location: sleeping
Contact:

Post by threefingeredguy »

Monopoly doesn't require much processor power, so it is a very good candidate for grayscale.
Image
chickendude
Extreme Poster
Posts: 340
Joined: Fri 07 Jul, 2006 2:39 pm

Post by chickendude »

Yea, it really isn't processor heavy so grayscale wouldn't really affect the gameplay, I'm just not terribly fond of all of the extra memory space it would take.

But if you all feel like it would help the game out a bit despite the extra size cost and someone can help me convert the current graphics over, I have no problem implementing it.

Also, on Sunday I sat down and got a lot done for monopoly. All of the separate files that I had are united and functional, and I even rewrote the main program to utilize the new tilemap routine and tilemap (of course, this was a culmination of the three or so days I've worked on it). All that's left is to fix up some erroneous glitches in the dice routine and to fix up the animation routine for the player pieces and I'm ready to move forward!

I'm trying to decide how to keep track of each player's position on the map and how to determine if a player is on what piece and the consequences of landing on it (paying a fee, asking to buy it, chance/community chest cards, go to jail, etc.).

I'm considering using 4 or so bytes, where each bit represents a property (a 1 would mean it was purchased, and a 0 would mean it was available for purchase). Something along those lines. Does anyone have any other suggestions, something maybe more efficient?
User avatar
benryves
Maxcoderz Staff
Posts: 3087
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

I'd just use two bytes for each property on the board. One byte would hold the owner player's ID, or zero if the property was unsold. I'd reserve the most significant bit of that byte as a flag to denote whether the property was mortgaged or not. The other byte would hold the number of properties built on it (0..4, then 5 for a hotel).

I'm not sure how many properties there are on a board, but if I guess 60 that's only 120 bytes.
chickendude
Extreme Poster
Posts: 340
Joined: Fri 07 Jul, 2006 2:39 pm

Post by chickendude »

I think it's closer to 30 or 35. But I like that. And I could fit that into one byte. 3 bits for the hotels/motel and whether the property was sold, 3 for the player id, one for mortgage, one extra.
Unless it would take more room to work with that data. I'll stick with your way for now. At least until I've finished and I get upset at how unnecessarily large my program is.

Also, I just realized that having an AI/computer players is essentially a necessity for this kind of program, since you're not always going to be able to have another person to play a full game with. I guess I'll have to save files, one for a oneplayer mode and one for a multiplayer mode.

But I know nothing about artificial intelligences or even monopoly strategies, but I'll definitely need to incorporate one.
CompWiz
Calc King
Posts: 1950
Joined: Thu 13 Oct, 2005 1:54 pm
Location: UB

Post by CompWiz »

there is a monopoly game for the 83 calcs on ticalc.org(it's in asm) that has only multiplayer. While I had it on my calc, I only used it a couple times because of that. An AI would add a lot to a monopoly game.
In Memory of the Maxcoderz Trophy Image
User avatar
benryves
Maxcoderz Staff
Posts: 3087
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

chickendude wrote:Unless it would take more room to work with that data. I'll stick with your way for now. At least until I've finished and I get upset at how unnecessarily large my program is.
I didn't know how many players there were, so I left it open. If there are only 8, fine, easy enough to squash into a single byte. :)
Also, I just realized that having an AI/computer players is essentially a necessity for this kind of program, since you're not always going to be able to have another person to play a full game with. I guess I'll have to save files, one for a oneplayer mode and one for a multiplayer mode.
The way I've differentiated in the past is to only code the game one way, and then have two different 'turn' mechanisms. For example, in a Connect 4 game, you would go around in a loop - asking for a column number to put the piece in (let's say the function was called GetPieceColumn). That function would then split - if the currenty player was AI, it would do the AI routine then return the column. Otherwise, it would let the user choose a column manually, then return that value. That way, each player can be flagged as 'AI' or 'Human', and the game just needs to cycle through each player in a loop. You could then easily extend this to even supporting a third type, 'Link'. ;)
CompWiz
Calc King
Posts: 1950
Joined: Thu 13 Oct, 2005 1:54 pm
Location: UB

Post by CompWiz »

yeah, link play would be nice for this game, any plenty fast enough. Maybe you can even use Timendus's clap so that you can connect more than 2 calcs at a time. :)
In Memory of the Maxcoderz Trophy Image
chickendude
Extreme Poster
Posts: 340
Joined: Fri 07 Jul, 2006 2:39 pm

Post by chickendude »

That makes sense :)

But about making the actual AI, how did you go about that in your Connect 4-type game?
A random number, to not be as predictable as some games, but I'd have to take into account: the amount of money the computer has, whether it has any other properties of the same color, how many properties it has, how far into the game they are, etc. and gauge the range of the random number on that.

I like that link idea, as very little data would need to be transferred and, apart from the actual link routine, would hardly take up any space. :) I'm excited, I'm starting to work on new routines and such that weren't already written when I picked it back up.

Oh, and one last thing. Well, it's twopart:
First, my tilemap as it sits has this HUGE space of blank tiles in the center. I'm not sure how many bytes it is, but it's quite a few. Is there any way around this? I guess I could scratch whole tilemap idea and just use four large sprites.

The second part is, if there's no feasible way around that, what types of compression could I use? (Keep in mind, speed isn't any sort of problem--it's plenty fast as it sits)
Post Reply