Author Topic: Hnefatafl: The Viking Board Game (download on page 7)  (Read 30268 times)

0 Members and 1 Guest are viewing this topic.

Offline Zera

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 737
  • Rating: +82/-7
  • Monochrome Artisan
    • View Profile
Hnefatafl: The Viking Board Game (download on page 7)
« on: March 26, 2010, 05:39:26 pm »
I was thinking about an off-topic thread I started a short while back about A.I. cheating in computerized board games. The game in question was Hnefatafl. A lot of people showed interest in playing the game; although there really aren't many (maybe one or two) computer renditions of it available. Actual boards are also hard to find in this day and age, given the historic context of the game.

I was curious if anyone might be interested in coding a fairly simple version for calulators using BASIC. (or possibly using xLib, Celtic, or even Axe) Since I know quite a lot about the game, I could put together the necessary assets, along with detailed descriptions of the rules and all available moves. As a basis for comparisson of coding difficulty: The game is not strategically as complex as Chess, but the logic in how the rules and moves would be coded could be a bit more difficult. Hnefatafl pieces have very basic movements, but there are so many different ways to capture a piece. This very often depends on the arrangement of several pieces relative to sections of the board itself. (with certain tiles of the board having special properties of their own) Secondly, there are two different objectives of play, depending on which side is played: One side is tasked with simply escaping the board, while the other is tasked with preventing escape, or capturing / cornering all opposing pieces. It's very different from games like Checkers or Chess, which provide you with similar pieces and equal forces. In Hnefatafl, the defending army is always outnumbered. Regardless of which objective is played, completely wiping out the opposing side will still result in victory either way.

I could also propose some strategies that the A.I. would use. Defining a flexible computer logic for this might not be possible. It would probably be necessary to define very deterministic strategies and moves the A.I. would deploy when it examines the placement of opponent pieces on the board. Randomized moves most certainly would not work. The A.I. would just be crushed.

It would be necessary to provide a text file with the game detailing these rules. I think trying to cram all the necessary text assets into the actual game would kill a lot of memory. I could draw-up a suitable document, along with images to show examples of movements and captures.

One other thing: Would it be possible to use any grays? This would make the board and piece designs vastly easier to draw. The board is not your standard checkered ordeal. I have to make several tiles look unique, as well as distinguishing both forces, and the king's piece. An 11x11 board is most certainly going to require that each tile be 4x4 px. (unless uncommon resolutions are allowed; like 5x5, 6x6, etc. - that would definitely help) In monochrome, there won't be eough leniency to distinguish everything.

Working concept: (still in progress)

« Last Edit: April 18, 2010, 02:27:07 pm by Zera »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Proposal for interested BASIC coders
« Reply #1 on: March 26, 2010, 07:00:03 pm »
unfortunately, it is impossible to use grays as background in BASIC. Notice how in your Tromino concept I got rid of all grays behind sprites and scores. That's how limited BASIC and libs is. Sprite masking is just too slow to support decent grayscale , not to mention hard to work with with gray background x.x. The only possible gray is either:

1) if only two sprite maximum that can move around has grayscale  (or just one if it's 4 level gs)

2) if only the screen areas that never gets updated has grayscale

It looks interesting, though

Offline jsj795

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1105
  • Rating: +84/-3
    • View Profile
Re: Proposal for interested BASIC coders
« Reply #2 on: March 26, 2010, 07:37:06 pm »
Can't you make it monochromatic, and make 1 player white with black outline, and the other filled-in black?


Spoiler For funny life mathematics:
1. ROMANCE MATHEMATICS
Smart man + smart woman = romance
Smart man + dumb woman = affair
Dumb man + smart woman = marriage
Dumb man + dumb woman = pregnancy
2. OFFICE ARITHMETIC
Smart boss + smart employee = profit
Smart boss + dumb employee = production
Dumb boss + smart employee = promotion
Dumb boss + dumb employee = overtime
3. SHOPPING MATH
A man will pay $2 for a $1 item he needs.
A woman will pay $1 for a $2 item that she doesn't need.
4. GENERAL EQUATIONS & STATISTICS
A woman worries about the future until she gets a husband.
A man never worries about the future until he gets a wife.
A successful man is one who makes more money than his wife can spend.
A successful woman is one who can find such a man.
5. HAPPINESS
To be happy with a man, you must understand him a lot and love him a little.
To be happy with a woman, you must love her a lot and not try to understand her at all.
6. LONGEVITY
Married men live longer than single men do, but married men are a lot more willing to die.
7. PROPENSITY TO CHANGE
A woman marries a man expecting he will change, but he doesn't.
A man marries a woman expecting that she won't change, and she does.
8. DISCUSSION TECHNIQUE
A woman has the last word in any argument.
Anything a man says after that is the beginning of a new argument.

Girls = Time * Money (Girls are a combination of time and money)
Time = Money (Time is money)
Girls = Money squared (So, girls are money squared)
Money = sqrt(Evil) (Money is also the root of all evil)
Girls = sqrt(Evil) squared (So, girls are the root of all evil squared)
Girls = Evil (Thus, girls are evil)
*Girls=Evil credit goes to Compynerd255*

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Proposal for interested BASIC coders
« Reply #3 on: March 26, 2010, 07:47:46 pm »
Ya, that is kinda what I was thinking. I don't see a real need for grayscale. Just sayin'.
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline jsj795

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1105
  • Rating: +84/-3
    • View Profile
Re: Proposal for interested BASIC coders
« Reply #4 on: March 26, 2010, 07:51:13 pm »
Oh, and may be I would like to try to code this. I would need to learn how to play first though.
If the board is 11x11, then you might be able to make the sprites 5x5, since the vertical screen will only be 55 pixels.


Spoiler For funny life mathematics:
1. ROMANCE MATHEMATICS
Smart man + smart woman = romance
Smart man + dumb woman = affair
Dumb man + smart woman = marriage
Dumb man + dumb woman = pregnancy
2. OFFICE ARITHMETIC
Smart boss + smart employee = profit
Smart boss + dumb employee = production
Dumb boss + smart employee = promotion
Dumb boss + dumb employee = overtime
3. SHOPPING MATH
A man will pay $2 for a $1 item he needs.
A woman will pay $1 for a $2 item that she doesn't need.
4. GENERAL EQUATIONS & STATISTICS
A woman worries about the future until she gets a husband.
A man never worries about the future until he gets a wife.
A successful man is one who makes more money than his wife can spend.
A successful woman is one who can find such a man.
5. HAPPINESS
To be happy with a man, you must understand him a lot and love him a little.
To be happy with a woman, you must love her a lot and not try to understand her at all.
6. LONGEVITY
Married men live longer than single men do, but married men are a lot more willing to die.
7. PROPENSITY TO CHANGE
A woman marries a man expecting he will change, but he doesn't.
A man marries a woman expecting that she won't change, and she does.
8. DISCUSSION TECHNIQUE
A woman has the last word in any argument.
Anything a man says after that is the beginning of a new argument.

Girls = Time * Money (Girls are a combination of time and money)
Time = Money (Time is money)
Girls = Money squared (So, girls are money squared)
Money = sqrt(Evil) (Money is also the root of all evil)
Girls = sqrt(Evil) squared (So, girls are the root of all evil squared)
Girls = Evil (Thus, girls are evil)
*Girls=Evil credit goes to Compynerd255*

SirCmpwn

  • Guest
Re: Proposal for interested BASIC coders
« Reply #5 on: March 26, 2010, 07:58:30 pm »
OFF TOPIC

Quote from: jsj795
When few people are crazy, we call it psychopath.
When many people are crazy, we call it religion.
Agreed.

Offline Zera

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 737
  • Rating: +82/-7
  • Monochrome Artisan
    • View Profile
Re: Proposal for interested BASIC coders
« Reply #6 on: March 26, 2010, 08:00:30 pm »
This is a revised idea using monochrome and 4x4 tiles:



Off-topic @ above: Please don't hi-jack project threads into moral, philosophical or religious debates. It will most definitely derail the discussion, and I will have to go through the needless hassle of starting a new thread just to draw focus back to the original subject.
« Last Edit: March 26, 2010, 08:07:38 pm by Zera »

Offline Gale

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 115
  • Rating: +1/-0
  • Ti-84+ Silver Edition
    • View Profile
Re: Proposal for interested BASIC coders
« Reply #7 on: March 26, 2010, 08:00:34 pm »
OFF TOPIC

Quote from: jsj795
When few people are crazy, we call it psychopath.
When many people are crazy, we call it religion.
Agreed.
yeah, really off topic.

but i think grayscale is needed, because note the darker-grey kings in the corners
remember me as a time of day...

Offline {AP}

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 981
  • Rating: +74/-3
  • I am Webmaster!
    • View Profile
    • Removed From Game
Re: Proposal for interested BASIC coders
« Reply #8 on: March 26, 2010, 08:03:56 pm »
Zera, I'm willing to give this a try. Let me know how I can contact you to get all the information I need.
Also, I haven't messed with AI much, so I'll probably need some help (at least on concepts) there.

Anyone else can give this program a shot too, just in case I can't finish it. ;P

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Proposal for interested BASIC coders
« Reply #9 on: March 26, 2010, 08:06:33 pm »
I like 4x4 version but I would prefer a 8x8 monochrome one I think

Also we need to avoid extremly off-topic posts indeed x.x. I usually just create a new topic for it in Randomness or put it as side comment to an off-topic post in reply to the person concerned
« Last Edit: March 26, 2010, 08:07:42 pm by DJ Omnimaga »

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Proposal for interested BASIC coders
« Reply #10 on: March 26, 2010, 08:07:36 pm »
It is tempting but I just don't think I'm experienced enough to try this. But for the problem Gale said all you would need to do is make sure its a different kind of sprite I think. That should make it so the "darker-grey kings" are there.
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline {AP}

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 981
  • Rating: +74/-3
  • I am Webmaster!
    • View Profile
    • Removed From Game
Re: Proposal for interested BASIC coders
« Reply #11 on: March 26, 2010, 08:09:44 pm »
I like 4x4 version but I would prefer a 8x8 monochrome one I think

Only problem with that is the board it 11x11 which means that we'd have to make the board scrollable. (which is doable but can be quite annoying) =(
« Last Edit: March 26, 2010, 08:11:42 pm by {AP} »

Offline Zera

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 737
  • Rating: +82/-7
  • Monochrome Artisan
    • View Profile
Re: Proposal for interested BASIC coders
« Reply #12 on: March 26, 2010, 08:12:03 pm »
An 8x8 version would be great, but the entire board wouldn't fit on a single screen. I'm not sure that would work too well. The player really needs the ability to ascetain the entire board at once.

The 4x4 idea I have so far seems okay. You can discern all the different pieces. The only trouble now is creating the unique board tiles. That's difficult in monochrome - even if I used 5x5 tiles.

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Proposal for interested BASIC coders
« Reply #13 on: March 26, 2010, 08:14:00 pm »
Is that last screenshot 4x4? It doesn't look it but I could be wrong, I don't know.
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline Zera

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 737
  • Rating: +82/-7
  • Monochrome Artisan
    • View Profile
Re: Proposal for interested BASIC coders
« Reply #14 on: March 26, 2010, 08:16:47 pm »
Are tile resolutions like 5x5 feasible? I've always believed they had to be multiples of 4 or 8.

Is that last screenshot 4x4? It doesn't look it but I could be wrong, I don't know.

The pieces are. There is some border along the outside of the grid, as well as 4x8 text tiles.