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

0 Members and 2 Guests are viewing this topic.

Offline mapar007

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 550
  • Rating: +28/-5
  • The Great Mata Mata
    • View Profile
Re: Hnefatafl: The Viking Board Game (download on page 4)
« Reply #90 on: April 09, 2010, 03:35:50 am »
pronunciation is [hn'єfatafl] I think, you can practically read it as if it were phonetic notation. I'm not an old-norse expert, but I've heard some modern Norwegian. (got a norwegian-speaking friend)

Offline jsj795

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1105
  • Rating: +84/-3
    • View Profile
Re: Hnefatafl: The Viking Board Game (download on page 4)
« Reply #91 on: April 12, 2010, 11:58:40 pm »
Finally... I got some progress on AI. The attacker can *sometimes* eat white piece. There are still a lot of debugging to do, because there are times when attacker doesn't move at all (which is illegal btw).
The thing is that, it is kind of slow :( It takes around 10 seconds for AI to think and move, but I only implemented like 1/4th of the whole, functioning AI. I guess debugging and working with it might show me some optimization... This AI program takes about 2000 bytes.
Hopefully, I can get functional yet not so slow AI by the end of the week :P
* jsj795 goes back to work


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 Zera

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 737
  • Rating: +82/-7
  • Monochrome Artisan
    • View Profile
Re: Hnefatafl: The Viking Board Game (download on page 4)
« Reply #92 on: April 13, 2010, 12:16:05 am »
Good job. :) I was kind of wondering what happened since the last update. :P

10 seconds isn't too bad. Hopefully, optimization will tone it down a few seconds, though.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Hnefatafl: The Viking Board Game (download on page 4)
« Reply #93 on: April 13, 2010, 12:33:43 am »
Nice to see progress. I hope there's a workaround for the slow AI. It doesn't seem too bad, though. Do you think there could be ways to do it in a faster way even if it sacrified file size? In TI-BASIC, sometimes it's better to optimize for speed rather than size. In a space shooter, if you need to display 12 ships every frame, never do:

Code: [Select]
For(A,1,3:For(B,1,4:Output(A,B,"M
End:End

Do this instead:
Code: [Select]
Output(1,1,"M
Output(1,2,"M
Output(1,3,"M
Output(1,4,"M
Output(2,1,"M
Output(2,2,"M
Output(2,3,"M
Output(2,4,"M
Output(3,1,"M
Output(3,2,"M
Output(3,3,"M
Output(3,4,"M

You'll waste about 70 bytes by doing this, but the speed gain will be considerable. You'll almost get half a frame back because For( loops slow things down so much.

Offline jsj795

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1105
  • Rating: +84/-3
    • View Profile
Re: Hnefatafl: The Viking Board Game (download on page 4)
« Reply #94 on: April 13, 2010, 12:42:10 am »
Hmmm. I do use For group, but if I didn't, it would be extra 1000 bytes at least X.X
I might try it tho, if I can optimize them. However, first things first, I'm gonna try to implement all aspects of AI, including not making stupid choices like moving into position where you will be eaten, defender AI, making different choices based on the custom rules, etc. Now that I got the basic attacker engine, I think I will be able to do these more easier.


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 jsj795

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1105
  • Rating: +84/-3
    • View Profile
Re: Hnefatafl: The Viking Board Game (download on page 4)
« Reply #95 on: April 14, 2010, 01:37:55 am »
Okay, I implemented an attacker AI. It's still not complete, but it is doable, although it takes some time for AI to think (around 20 seconds or so, depending on legal moves that it can make)
There are probably tons of bugs, like what you see at the end of the screen shot (it's 4 minutes long -_-;; most of the screen shot is AI thinking  :P )
Shieldwall not yet implemented, victory condition not yet implemented (well, it does check for victory, but I haven't yet wrote the code to tell you that you won or lost, and ends the game), Defender AI not yet implemented, etc. There are bunch...
The Attacker AI is mediocre at best, because it doesn't search the whole board for the good position. It only searches few areas, so sometimes it misses a real obvious moves (like surrounding the king to win).

Oh, btw, when you try to quit the game, it will give label error, because currently the program is split into many subprograms to make my life easier coding. So if you want to quit the game, just press 'on'.

Otherwise, I think it's pretty good. If there's any kind of bug that you find, it would help me a lot if you can tell me^^

Since the file names seem to be already used, download the game
in TI group file
in zip file
« Last Edit: April 14, 2010, 01:41:59 am by jsj795 »


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 Zera

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 737
  • Rating: +82/-7
  • Monochrome Artisan
    • View Profile
Re: Hnefatafl: The Viking Board Game (download on page 4)
« Reply #96 on: April 14, 2010, 02:15:15 am »
There's a bit of a quirk in the rules: When black moved to 4F, the white piece against the throne wasn't captured. It should have been.

Any piece positioned against the throne (regardless of whether the king is occupying it or not) is captured when an opposing piece positions itself to the opposite side.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Hnefatafl: The Viking Board Game (download on page 4)
« Reply #97 on: April 14, 2010, 02:17:23 am »
This looks very nice. If it wasn't for the slow AI speed and the game beginning sprite loading, it could almost be mistaken as an ASM game.

I will try it when I get some time :)

Offline jsj795

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1105
  • Rating: +84/-3
    • View Profile
Re: Hnefatafl: The Viking Board Game (download on page 4)
« Reply #98 on: April 14, 2010, 10:25:52 am »
There's a bit of a quirk in the rules: When black moved to 4F, the white piece against the throne wasn't captured. It should have been.

Any piece positioned against the throne (regardless of whether the king is occupying it or not) is captured when an opposing piece positions itself to the opposite side.

Yeah, I know about the rule. I was aware of this, and I have to fix the capturing. I fixed some more bugs, and looking for speed optimization. Hopefully the AI can get down to around 10 seconds


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: Hnefatafl: The Viking Board Game (download on page 4)
« Reply #99 on: April 14, 2010, 10:42:26 am »
Since the file names seem to be already used, download the game

I usually postfix my file names with the date so I don't hit that problem.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Hnefatafl: The Viking Board Game (download on page 4)
« Reply #100 on: April 14, 2010, 12:29:36 pm »
I just add 2, 3, 4 and so on depending of the version. Just click your file, rename it, then choose it to upload. Not too hard.

Offline jsj795

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1105
  • Rating: +84/-3
    • View Profile
Re: Hnefatafl: The Viking Board Game (download on page 4)
« Reply #101 on: April 14, 2010, 01:15:58 pm »
I did that, but somehow, it didn't let me upload. It was like, Hnefatafl zip file 1
but still, i couldn't, and I don't think I can change the name of the 8xg file, else doesn't it get corrupted?


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 DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Hnefatafl: The Viking Board Game (download on page 4)
« Reply #102 on: April 14, 2010, 01:40:04 pm »
strange, then you need to reformat your computer x.x cuz it's a problem on your end.

Offline jsj795

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1105
  • Rating: +84/-3
    • View Profile
Re: Hnefatafl: The Viking Board Game (download on page 4)
« Reply #103 on: April 16, 2010, 01:59:56 pm »
I haven't been working on this from last update. I had bunch of tests from school, including Calculus, English, Biology, etc. So I was busy writing math programs for Calculus (downloading programs from ticalc and modifying them to fit into my use) and studying English and Bio. I will resume working on this starting from today.


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 DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Hnefatafl: The Viking Board Game (download on page 4)
« Reply #104 on: April 16, 2010, 06:14:28 pm »
I hope you have success in your exams. Can't wait to see updates on this, factory and TLM when you finished exams :)