Author Topic: nHearts  (Read 8042 times)

0 Members and 1 Guest are viewing this topic.

Offline ajorians

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 105
  • Rating: +47/-0
    • View Profile
nHearts
« on: October 25, 2014, 02:10:14 pm »
Hey Guys!

I really wanted to make the game Hearts.  I enjoyed playing it growing up.

So far I got a good part of the game down; in that it is pretty much fully playable!  I didn't make any of the A.I. for the other players yet.  Right now they just choose a random card of the cards that are possible to play.  But I do intend on making some algorithms such that the A.I. players put up some sort of a challenge.

There is a Jack of Diamond option where if you take the Jack of Diamonds it is a negative 10 points.  Yahoo Games has that option.  BTW the -10 is stored in the settings file so if you wanted to use nTxt to modify it to be -15 or +10 or whatever you could!  ;)

Below are some screenshots as well as a download (with source) if you'd like to give it a try.  And here is a YouTube link to see it in action:


Let me know what you think!  :)

And have an amazing day!

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: nHearts
« Reply #1 on: October 25, 2014, 04:59:27 pm »
Yeah, I love that game, glad to see it ported to the Nspire :D

However, when I try to compile it (you'll say that it's already compiled, yeah, but I was experimenting things), it says "Config.h:7:36: fatal error: ArchiveLib/ArchiveLib.h: No such file or directory".
Did you forget a file or am I doing something wrong ?
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: nHearts
« Reply #2 on: October 25, 2014, 05:34:53 pm »
Works for me when I compile all the libs beforehand :)

(Also, nice job, the graphics are pretty cool ! Although maybe an other background than the light brown one would be good ? :P)
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline ajorians

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 105
  • Rating: +47/-0
    • View Profile
Re: nHearts
« Reply #3 on: October 25, 2014, 06:32:28 pm »
Hi Guys,

Hayleia: I probably should work on that makefile!  I go under ArchiveLib and do a make; then go under CardLib and do a make; then go under HeartsLib and do a make.  Finally at src do a make.  Thanks Adriweb!  Yeah it isn't intuitive (yet).

I haven't tried this version: http://www.ticalc.org/archives/files/fileinfo/423/42341.html that exists on the Nspire.  I had intended on making my own.

Good suggestion Adriweb!  I was debating having the other players have "names" as well as show their current score during gameplay too.

Also I am thinking of whether to allow the user to close the game in the middle of a hand/game; and then could resume the game upon reopening the game.  It is something nice; the only downside is extra development time.  :)

Keep having fun!

Offline ajorians

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 105
  • Rating: +47/-0
    • View Profile
Re: nHearts
« Reply #4 on: December 09, 2014, 10:33:13 pm »
Hey Guys,

Here is an update!

I got decent A.I. players now.  If you are good a Hearts you'll probably find them fairly easy.  I had somebody test Hearts and they loved it that they played for hours so I'm feeling pretty good about that!

I added in achievements, options and bug fixes.  I updated the background during game play.  Also I have a score review that shows scores from each hand and you can scroll through that hands when there are more than 10 hands.

I'm feeling pretty good about this and will probably start my next project here shortly!  So let me know what you think!

And have a great day!

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: nHearts
« Reply #5 on: December 09, 2014, 11:29:24 pm »
Great work, this looks awesome. It's amazing how far nSpire games have come from just a few years ago.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

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: nHearts
« Reply #6 on: December 10, 2014, 12:04:16 am »
I didn't see this until now but this indeed looks impressive graphically. I should give it a try at some point.

Offline Eiyeron

  • Urist McEiyolobster
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1430
  • Rating: +130/-10
  • (-_(//));
    • View Profile
    • Rétro-Actif : Rétro/Prog/Blog
Re: nHearts
« Reply #7 on: December 10, 2014, 01:52:06 am »
You should switch your text on the background to white, it'll be easier to read. Or white with a black outline.

Offline ajorians

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 105
  • Rating: +47/-0
    • View Profile
Re: nHearts
« Reply #8 on: December 10, 2014, 06:36:40 am »
Thanks guys!

Eiyeron: Are you talking about on the menu screen where you choose "play", "achievements", "options" and "help"?  Or is it also with other areas in the program as well?

Have a great day!

Offline ajorians

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 105
  • Rating: +47/-0
    • View Profile
Re: nHearts
« Reply #9 on: December 31, 2014, 11:34:21 am »
Hey Guys,

Just a small update.  I added in a 3-player mode.  Under Options you can turn that on.  In 3-player mode each player gets 17 cards instead of 13.  And with a 52 card deck that means there is an extra card.  It is face down in the middle and whomever takes the first trick gets that card.  That card could be a Heart (even Queen of Spades) but I have it so it won't break Hearts.

There are many variations to Hearts as you can see on the Wikipedia page: http://en.wikipedia.org/wiki/Hearts#Variations but I've played 3-player Hearts before and liked it enough to add that.

Hope you all like it!  And have fun! :)