Stone Mill

Apprentice
Posts: 16
Joined: 2010.02
Post: #1
[Image: Stone_Mill.png]

Source code: Github

Note: I haven't submitted this to udg so if this post breaks any rules delete it...
The reasons for that are rather simple, I don't really have 10$ to spend on something I'm not sure I'll get working.

Description:
Classic Nine men's morris with a optional twist, once tiles can jump they leave behind a ghost stone that disappears after the next turn.

I was progressing nicely till it got to the game logic and then I got stuck. I can't figure out how to detect when a mill has been closed. (I could do a brute force recursive coordinate check after every move but I'd rather not do that.) Annoyed
So if anyone has any ideas on how to do that I'd appreciate it.

McSpider
Quote this message in a reply
Member
Posts: 144
Joined: 2009.11
Post: #2
Quote:I was progressing nicely till it got to the game logic and then I got stuck. I can't figure out how to detect when a mill has been closed. (I could do a brute force recursive coordinate check after every move but I'd rather not do that.)
So if anyone has any ideas on how to do that I'd appreciate it.

I'd suggest brute-forcing it initially; after that you might be able to find a heuristic that you can use to optimise the situation.

I'd suggest entering uDG anyways. It gives you a great motivation to get things working. ("Gotta make that $10 count!") Perhaps I'm the only person that does strange things to create artificial motivations for myself, but if it works for you, it can be well-worth it.

Additionally, any uDG entry is a great résumé item.

Your screenshot looks lovely, and the game plays well on this iMac; I'm excited to see what you can do with that concept. It looks really polished already, so it may be that over the course of uDG you can significantly improve the gameplay or UI (eg. using Core Animation or something, larger game boards, a kind of tutorial, etc).

Everyone's favourite forum lurker!
https://github.com/NSError
Quote this message in a reply
Apprentice
Posts: 16
Joined: 2010.02
Post: #3
(Jul 14, 2011 07:29 AM)cmiller Wrote:  I'd suggest brute-forcing it initially; after that you might be able to find a heuristic that you can use to optimise the situation.

Thanks for the feedback, I'll try and implement a simple brute force check this afternoon then.

(Jul 14, 2011 07:29 AM)cmiller Wrote:  Your screenshot looks lovely, and the game plays well on this iMac; I'm excited to see what you can do with that concept. It looks really polished already, so it may be that over the course of uDG you can significantly improve the gameplay or UI (eg. using Core Animation or something, larger game boards, a kind of tutorial, etc).

I'm better at designing things than programming them, but I'm working on improving that. I also planned on using CA to animate moves etc, provided I can figure it out. Smile


Edit: I've entered it in the udg contest but I must be blind. I can't figure out how to pay the entry fee neither where to download the "uDevGames 2011 Read Me.pdf".

McSpider
Quote this message in a reply
Member
Posts: 338
Joined: 2004.07
Post: #4
Glad you decided to enter!! Smile

In previous years, the entry fee wasn't due until much later in the contest, so I imagine that hasn't changed for 2011.

Also seconding brute force checks in general for the contest. They're ugly, and they're never optimal, but a huge percent of the time, they're fast ENOUGH, and they're usually trivial to implement, allowing you to spend more time on gameplay and features. I love em. Wink

Justin Ficarrotta
http://www.justinfic.com
"It is better to be The Man than to work for The Man." - Alexander Seropian
Quote this message in a reply
Apprentice
Posts: 16
Joined: 2010.02
Post: #5
(Jul 14, 2011 04:14 PM)JustinFic Wrote:  Glad you decided to enter!! Smile
Thanks Grin

(Jul 14, 2011 04:14 PM)JustinFic Wrote:  In previous years, the entry fee wasn't due until much later in the contest, so I imagine that hasn't changed for 2011.
Okay, so I'll just wait till they want the money. Rasp

(Jul 14, 2011 04:14 PM)JustinFic Wrote:  Also seconding brute force checks in general for the contest. They're ugly, and they're never optimal, but a huge percent of the time, they're fast ENOUGH, and they're usually trivial to implement, allowing you to spend more time on gameplay and features. I love em. Wink

I've started work on the check function, but it isn't quite as easy as I imagined. Since I'd like to make it modular enough to work with different board types, but its definitely easier to program than heuristics.

McSpider
Quote this message in a reply
Moderator
Posts: 916
Joined: 2002.10
Post: #6
(Jul 14, 2011 04:40 PM)McSpider Wrote:  Okay, so I'll just wait till they want the money. Rasp

http://www.udevgames.com/rules
Quote:Each team must pay the $10 USD entry/bandwidth fee by October 2, 2011 at 11:59 PM GMT. (This requirement may be dropped from the contest. See FAQ #3)
Quote this message in a reply
Apprentice
Posts: 16
Joined: 2010.02
Post: #7
(Jul 14, 2011 10:08 PM)skyhawk Wrote:  
(Jul 14, 2011 04:40 PM)McSpider Wrote:  Okay, so I'll just wait till they want the money. Rasp

http://www.udevgames.com/rules
Quote:Each team must pay the $10 USD entry/bandwidth fee by October 2, 2011 at 11:59 PM GMT. (This requirement may be dropped from the contest. See FAQ #3)
I read that, but I forgot about FAQ #3. Rolleyes

It should have proper mill detection now, after doing several noob mistakes (like using continue instead of break).
You should also be able to remove opponent stones after closing a mill, although it doesn't yet check if they're in a mill.

McSpider
Quote this message in a reply
Apprentice
Posts: 16
Joined: 2010.02
Post: #8
Though I'd post a small progress update.
Binary: http://cl.ly/9DtR

Changes:
• Sounds. (sfxrX & amadeus Grin)
• Random AI (that can play against itself).
• Different boards.

Things I need to change.
• The game time keeps running when the game pauses.
• AI should recognize possible threats and closable mills.

I hope I can improve the AI, but since I have a summer job I won't be able to program as much as I'd like too. Annoyed
But at-least I get paid, which I don't do for programing. : )

I have also started playing around with core animation but I haven't figured out the best way to manage and create/destroy all the stones. The CA code is in the source, although currently it only draws the board. (when its enabled)

McSpider
Quote this message in a reply
Apprentice
Posts: 16
Joined: 2010.02
Post: #9
Earlier today my computers graphic card failed, leaving me stuck without a usable computer. Mad Sad
I might get the computer fixed/replaced but most likely not before the uDevGames coding deadline.

Which means I can't fix the bugs and get the game into a presentable state, so I have withdrawn my entry for now.

McSpider
Quote this message in a reply
Nibbie
Posts: 3
Joined: 2011.12
Post: #10
wow nice thanks Grin
Quote this message in a reply
Post Reply