Monopoly
Moderator: MaxCoderz Staff
Wow, that's a name I haven't heard for a long time
Welcome back!
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
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
-
- Extreme Poster
- Posts: 340
- Joined: Fri 07 Jul, 2006 2:39 pm
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
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
-
- Extreme Poster
- Posts: 340
- Joined: Fri 07 Jul, 2006 2:39 pm
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.
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.
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.
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
-
- Calc King
- Posts: 2195
- Joined: Sun 27 Mar, 2005 4:06 am
- Location: sleeping
- Contact:
-
- Extreme Poster
- Posts: 340
- Joined: Fri 07 Jul, 2006 2:39 pm
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?
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?
- benryves
- Maxcoderz Staff
- Posts: 3089
- Joined: Thu 16 Dec, 2004 10:06 pm
- Location: Croydon, England
- Contact:
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.
I'm not sure how many properties there are on a board, but if I guess 60 that's only 120 bytes.
-
- Extreme Poster
- Posts: 340
- Joined: Fri 07 Jul, 2006 2:39 pm
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.
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.
- benryves
- Maxcoderz Staff
- Posts: 3089
- Joined: Thu 16 Dec, 2004 10:06 pm
- Location: Croydon, England
- Contact:
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.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.
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'.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.
-
- Extreme Poster
- Posts: 340
- Joined: Fri 07 Jul, 2006 2:39 pm
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)
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)