NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Add-ons (3rd party plugins, utilities and skins) Old Stuff (Legacy) GB-PVR Support (legacy) v
« Previous 1 … 1110 1111 1112 1113 1114 … 1231 Next »
Solitare Plugin.

 
  • 0 Vote(s) - 0 Average
Solitare Plugin.
Pioneer4x4
Offline

Posting Freak

Posts: 926
Threads: 50
Joined: Jan 2005
#1
2005-01-29, 04:51 PM
My wife or I will frequently fire up solitare. One thing I have noticed is that the shuffle routine doesn't seem thorough. I will frequently have as the last cards in the deck, 4-A of spades, once I had 8-A of spades, all in order. I was wondering what the shuffle logic was. I really like the interface, and I use GB-PVR almost exclusively via my MVP.
Sometimes, I use the net radio and solitare simutaniously works great.
One other thing, the 5s, and 6s, look too similar from across the room, even on my 36". Is that a font that is user selectable?
3x MVPs (not used anymore)
XBMC
Hauppauge 150 via SVideo
Comcast Digital Cable
Motorola HD Cable box channel changed via Firewire
Vista Home Premium with RDP hack
AMD Athalon 64 5000+
340gig sata, plus 80SATA+3x160IDE Drives in XP machine for storage.
jasonf
Offline

Member

Posts: 121
Threads: 7
Joined: Oct 2004
#2
2005-01-29, 05:51 PM
I don't hang out in the Support forum often, so it's kind of a fluke that I saw your posting! But, I'll answer your questions:

Shuffling:

The deck is shuffled a random number of times (less than 250) using the following algorithm for each shuffling:

1. Split the card into 2 piles by:
a. Draw between 1-5 cards, place onto pile 1
b. Draw between 1-5 cards, place onto pile 2
c. Repeat until there's no more cards

2. Place stack 2 onto stack 1. This becomes the new deck.

When I wrote it, it seemed good enough, but if there's a problem with cards consistantly ending up on the top or bottom, then maybe I need to add a cut of the deck to each shuffle to help further randomize the behavior.

Font:

The cards themselves are separate images, not something that I'm drawing using fonts, etc. I was looking for something that looked like real playing cards, but were small at the same time (the screen resolution is 720x480, so screen real-estate is a precious commodity). I'll look into this, though, because I also want to change how the face-down cards are stacked--(there's no reason why they need to be overlapped as much as face-up cards in each column).
JasonF
Pioneer4x4
Offline

Posting Freak

Posts: 926
Threads: 50
Joined: Jan 2005
#3
2005-01-29, 06:36 PM
Thanks for the reply. Back in high school, I wrote a draw poke game in basic. (TRS-80 basic..... guess what year)
I had problems with the shuffle. That was only a 2mhz computer.
What I ended up doing was start with an array of all 52 cards, pick a random number from 1-52, move that card to a new array.
Then, move the last card into its spot.
then pick a randum number from 1-51.....
You only have to make one pass, and it's shuffled.

I tried the pick 2 and swap, but unless you let it run many times, (like a minute on the trs-80) you would still have blocks of cards untouched.

If it doesn't make sense, I'll be glad to explain it better.

P.S. any chance on an undo button? I don't know how many times I dealt 3 new cards accidentaly.
3x MVPs (not used anymore)
XBMC
Hauppauge 150 via SVideo
Comcast Digital Cable
Motorola HD Cable box channel changed via Firewire
Vista Home Premium with RDP hack
AMD Athalon 64 5000+
340gig sata, plus 80SATA+3x160IDE Drives in XP machine for storage.
jasonf
Offline

Member

Posts: 121
Threads: 7
Joined: Oct 2004
#4
2005-01-29, 11:31 PM
Trash-80.... hmm, you didn't mention the level/model, but it would put it around 1980, give or take. Wink I cut my BASIC teeth on a Level II before moving to Commodores...

I agree that the randomization probably needs improved. I found a similar algorithm to what you described that would be easy to implement.
JasonF
Pioneer4x4
Offline

Posting Freak

Posts: 926
Threads: 50
Joined: Jan 2005
#5
2005-01-29, 11:41 PM
1980/1981. Ah, my senior year.....

Mainly Model IIIs. I still have my Model III. It was 16K, cassette, I added 32K, dual disk drives, uLabs HiRes graphics. It has the 4 suit symbols in its extended character set, that is what gave me the idea for the poker game.

Like I said, I really like the plugin, I would like to see more of the same. It is neat having a TV with just the MVP sitting on it, and no cable box or VCR. I figured out I was using 36" JVC TV, MVP, about 50' of cat5 total, router, 2ghz P4 machine, just to simulate a $1 deck of cards...... Nothing like technology simplifying your life!

Once I get off of my arse, I will try to make a plugin. I have made some putzy apps for myself in VB, so I hope I can fight my way through it.

As for the cards, can you make it so the deck is "skinnable"? Or maybe a custom back on them? Like it looks for a "Deck.jpg" and if it is present, it uses that for the image?
3x MVPs (not used anymore)
XBMC
Hauppauge 150 via SVideo
Comcast Digital Cable
Motorola HD Cable box channel changed via Firewire
Vista Home Premium with RDP hack
AMD Athalon 64 5000+
340gig sata, plus 80SATA+3x160IDE Drives in XP machine for storage.
jasonf
Offline

Member

Posts: 121
Threads: 7
Joined: Oct 2004
#6
2005-02-04, 03:32 AM
I got a few free hours and made some mods to the plugin:

http://www.bladerhq.com/pmwiki/pmwiki.ph.../Solitaire

I implemented a better shuffling routine, made some display enhancements, and also offer a way to externalize the card image files.
JasonF
Pioneer4x4
Offline

Posting Freak

Posts: 926
Threads: 50
Joined: Jan 2005
#7
2005-02-04, 11:56 AM
Great, I'll try it tonight. (Actually, I'll try it at work.)
3x MVPs (not used anymore)
XBMC
Hauppauge 150 via SVideo
Comcast Digital Cable
Motorola HD Cable box channel changed via Firewire
Vista Home Premium with RDP hack
AMD Athalon 64 5000+
340gig sata, plus 80SATA+3x160IDE Drives in XP machine for storage.
Pioneer4x4
Offline

Posting Freak

Posts: 926
Threads: 50
Joined: Jan 2005
#8
2005-02-04, 01:58 PM
Looks good, I haven't tried it other than looking at it. Can the image for the card back be changed? I did't see that in the images.
3x MVPs (not used anymore)
XBMC
Hauppauge 150 via SVideo
Comcast Digital Cable
Motorola HD Cable box channel changed via Firewire
Vista Home Premium with RDP hack
AMD Athalon 64 5000+
340gig sata, plus 80SATA+3x160IDE Drives in XP machine for storage.
jasonf
Offline

Member

Posts: 121
Threads: 7
Joined: Oct 2004
#9
2005-02-04, 03:08 PM
(reply repeated here for completeness)

It will look for a file named "back.gif" if you have external card images enabled. If it doesn't find "back.gif" (or any other card image that it's looking for), it will default to the embedded resource image file.
JasonF
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  What LCD Plugin or Utility to use these days? Snooze 66 23,610 2011-04-06, 02:51 AM
Last Post: Snooze
  Analog HD Recording Plugin To Record 16:9 Widescreen BTJustice 18 6,605 2010-09-12, 05:14 AM
Last Post: johnsonx42
  Where is "enable multidec plugin support" tcmy95 2 1,676 2009-12-06, 10:58 PM
Last Post: tcmy95
  1.3.11 Slick Plugin Specific Backgrounds don't load crlorentzen 1 1,392 2009-08-29, 03:23 AM
Last Post: crlorentzen
  How to add a plugin to the selction list DRL 2 1,734 2009-08-27, 05:19 AM
Last Post: DRL
  1.3.7 - Crash in Settings plugin JavaWiz 3 2,031 2009-08-24, 06:06 PM
Last Post: gEd
  Video Plugin - Looking for Suggestions Kevina 6 3,314 2009-08-20, 04:00 AM
Last Post: Kevina
  CONFIG: Error Loading Plugin List LewE 26 6,432 2009-06-17, 09:57 PM
Last Post: LewE
  Small "incremental update" bug in recordings plugin Sheik Yerbouti 8 3,071 2009-05-31, 08:35 PM
Last Post: mvallevand
  Can not view channels after remove TV Listings Plugin SUPERMAN40 7 2,505 2009-04-11, 11:47 PM
Last Post: HtV

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode