Git Product home page Git Product logo

tafl's People

Contributors

apotapov avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

tafl's Issues

Polish: Clean Up Screens, Menus & Effects

For alpha launch...

  • More enticing Main Screen
  • Better animation for piece capture [P2]
  • Improve all the menu elements (iOS 7 style or not?) [P2]
  • Improve settings screen [P2]

Design Help

Design Help Screens to teach about the game

Implement hostile squres

  • Corner squares and center square are hostile
  • A king can be captured against the side of the board as well

AI: AI doesn't recognize winning move

Repro:

  1. Play to board configuration below or to a point when King can obviously win.
    Result:
    Computer cannot see winning move within depth=4, and instead of blocking, it makes another move instead. In this scenario (see image below), when I press undo several times in a row, it still doesn't see it. At other times, in the past it will see it sometimes when I press Undo.

Frequency:
This happens once about every two games I play. I see the computer sometimes ignore the obvious good move, and it may be the same bug. If so, then I notice about it 2-3 times per game.

image

Speed Tafl (like Speed Chess)

I think this could make the game more fun and stop people from over-thinking. In case you never played Speed Chess, each player gets X min on the clock. Y.Y seconds are subtracted for each player's move. A player wins either if he wins the game or if the other player runs out of time first.

AI: Separate AI into Three Subgames

  1. Opening Subgame
  2. Corner Conrol Subgame. Enter condition: At least 3 pieces in all corners, regardless of color.
  3. Barricaded Game. Enter condition: All corners are barricaded by Black.

Alpha: Deployable to Phone

  • Android
  • iPhone [P2]
  • User-friendly way for Alpha users to download, install and run app on latest two versions of Android. If for iPhone on iOS 7 and iOS 6.
  • Ideally, only available to alpha testers, but if it's available to public, then ok, too.

Two battles to a match?

Several places mentioned that two battles need to be played, one with each side to determine the match. Might be a good way to balance...

Sound

Need sound effects for:

  • Splash screen
  • Music for menu?
  • Button clicks
  • Start of game
  • Piece move
  • Capture

Fix the HUD layout on Android

The hud is a little out of whack on Android.

Need to figure out a way to adjust font depending on the screen resolution. Also take care of landscape and portrait mode. For now we will force the users to use portrait.

AI: Implement Barricaded Subgame

"Middle Game" starts when Black has completely or nearly formed all barricades around the four corners.

Black: Form cordons, if possible, and squeeze the mobility and reduce the number of white pieces until King is captured. Meanwhile, do not let white get into formations to force a draw, and let white pierce through any barricade(s) or cordons it has created.

White: Pierce through Black's cordons and barricades. Preserve enough pieces to force a draw while dwindling number of Black pieces, so it must force a draw or break open its flanks. Also, get into formations to preserve number of pieces.

Implement undo

I think we should have the ability to undo as a learning tool. Perhaps only for the beginner mode.

Implement Check and Check-Mate

Notify when the player is in check or in check mate.

According to : http://www.irminsul.org/arc/002sg.html

If the King has a clear approach to any edge square, the Blue player announces, "Raichi," or check. If the King has a clear approach to two exit squares, which is unblockable, he announces, "Tuichi," and wins the game since the move can't be blocked in one play.

Performance: Memory management

Looks like there are some issues with memory allocation during game play.

Garbage collector is going crazy especially in the beginning of the game:

01-22 22:20:41.070: D/dalvikvm(1558): GC_FOR_ALLOC freed 168K, 20% free 3233K/4016K, paused 4ms, total 4ms
01-22 22:20:41.166: D/dalvikvm(1558): GC_FOR_ALLOC freed 407K, 19% free 3268K/4016K, paused 2ms, total 2ms
01-22 22:20:42.130: D/dalvikvm(1558): GC_FOR_ALLOC freed 371K, 16% free 3409K/4016K, paused 2ms, total 2ms
01-22 22:20:42.898: D/dalvikvm(1558): GC_FOR_ALLOC freed 390K, 15% free 3441K/4016K, paused 4ms, total 5ms
01-22 22:20:42.898: I/dalvikvm-heap(1558): Grow heap (frag case) to 3.544MB for 72791-byte allocation
01-22 22:20:42.902: D/dalvikvm(1558): GC_FOR_ALLOC freed <1K, 15% free 3512K/4088K, paused 3ms, total 3ms
01-22 22:20:43.258: I/FPSLogger(1558): fps: 56
01-22 22:20:43.274: D/dalvikvm(1558): GC_FOR_ALLOC freed 335K, 15% free 3482K/4088K, paused 3ms, total 3ms
01-22 22:20:43.274: I/dalvikvm-heap(1558): Grow heap (frag case) to 3.592MB for 80012-byte allocation
01-22 22:20:43.278: D/dalvikvm(1558): GC_FOR_ALLOC freed <1K, 15% free 3560K/4168K, paused 5ms, total 5ms
01-22 22:20:43.286: D/dalvikvm(1558): GC_FOR_ALLOC freed 27K, 15% free 3573K/4168K, paused 2ms, total 2ms
01-22 22:20:43.314: I/dalvikvm-heap(1558): Grow heap (frag case) to 3.680MB for 80012-byte allocation
01-22 22:20:43.338: D/dalvikvm(1558): GC_FOR_ALLOC freed <1K, 15% free 3651K/4248K, paused 27ms, total 27ms
01-22 22:20:43.350: D/dalvikvm(1558): GC_FOR_ALLOC freed 21K, 14% free 3672K/4248K, paused 2ms, total 2ms
01-22 22:20:43.350: I/dalvikvm-heap(1558): Grow heap (frag case) to 3.778MB for 80012-byte allocation
01-22 22:20:43.354: D/dalvikvm(1558): GC_FOR_ALLOC freed 0K, 14% free 3751K/4328K, paused 2ms, total 2ms
01-22 22:20:44.270: I/FPSLogger(1558): fps: 37
01-22 22:20:45.274: I/FPSLogger(1558): fps: 56
01-22 22:20:45.854: D/dalvikvm(1558): GC_FOR_ALLOC freed 154K, 8% free 3987K/4328K, paused 3ms, total 3ms
01-22 22:20:45.854: D/dalvikvm(1558): GC_FOR_ALLOC freed <1K, 8% free 4261K/4608K, paused 2ms, total 2ms
01-22 22:20:45.894: D/dalvikvm(1558): GC_FOR_ALLOC freed 1K, 7% free 4576K/4888K, paused 4ms, total 4ms
01-22 22:20:45.914: D/dalvikvm(1558): GC_FOR_ALLOC freed 2K, 6% free 4938K/5248K, paused 2ms, total 2ms
01-22 22:20:46.278: I/FPSLogger(1558): fps: 58
01-22 22:20:47.306: D/dalvikvm(1558): GC_FOR_ALLOC freed 151K, 5% free 5493K/5764K, paused 6ms, total 6ms

Need to prune for new memory allocation during the game play and get rid of it.

Adapt official Fetlar Hnefatafl rules

Hnefatafl World championships are held annually on an island of Feltlar.

Here's the official website: http://www.fetlar.org/hnefatafl-world-championship

From the website:

Fetlar Rules

The latest version of the rules for Hnefatafl developed by the Fetlar Hnefatafl Panel can be downloaded here in pdf format. Please note that these rules were developed for use by an 11 x 11 square board. These rules were those in force on 03-08-2013. Any updates to the rules will be posted on this page.

Here's the link to the PDF: http://www.fetlar.org/assets/files/hnefatafl/rules2013visual.pdf

I also have it saved in the project's doc directory: https://github.com/apotapov/tafl/tree/master/docs

Game: Add ability to drag pieces

Should have the ability to drag a piece to a spot on the board.

The piece gets placed when the click/touch is released.

If the piece is released over a non-legal square, return the piece to original position.

It would be nice to make the piece "snap-to-cell" to reduce the mistakes.

Game: Timer is broken on Android

I'm using a modifiable string to avoid creating a new object for the time displayed at the top of the screen during game play. Unfortunately, Strings seem to be implemented differently on Android, and they cannot be modified in place.

I'll do some research about how to do this without creating a new object every time.

Maybe take out the timer completely?

AI: Hints

For beginner mode we should get the AI to generate hints for the player. It would be cool to have those hints give explanation as well.

Fix a bug with capturing

After the refactoring there are some issues with capturing regular pieces against the castle square.

The king can be captured with 2 pieces right now and it doesn't end the game.

Implement a draw

The defending player has the ability to force a draw by surrounding the king such that it cannot be captured but move back and forth forever.

Menu: User Instructions

Simple version of user instruction. 3-5 screens (phone sized images) to explain the game.

Note: no interactive tutorial

Create basic graphics for the game

Need graphics for:

  • Splash screen
    -- Company name
  • Menus
    -- Background
    -- Buttons
  • Game
    -- White piece
    -- Black piece
    -- King
    -- Board
    -- Heads up display (HUD)
    -- In game menu

Need to purchase a font for the text.

Sound

Need sound effects for:

  • Splash screen
  • Music for menu?
  • Button clicks
  • Start of game
  • Piece move
  • Capture

AI: Vulnerability Penalty for Material Balance

Do what the JS implementation did for a heuristic one-move lookahead for material balance. We should try it. It's one of the easiest "look ahead" heuristics.

If a piece can be capturable by opponent (as the board is now (called "null move")), then subtract 20-30% off Material Value for that piece. For example, if piece would have value = 10, and it can be captured by opponent on one side, it's value = 10 - 2. If it can be captured on 2 sides, then it's value = 10 - 2 - 2.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.