Open Solitaire - Open Source Classic Solitaire Game (Now Released)

I’ve been working on this for a few weeks now. This game took me about 3x longer to get working than I had expected it to, but I have finally squashed all the bugs.

Download source code or binaries here (updated link):

If anyone wants to add features, or refactor the code to turn it into an official MonoGame demo project or something let me know :slight_smile:

This is my first video game and I mostly picked Solitaire because the official Microsoft Win10 version was busted and it has fairly straightforward rules and game mechanics. I don’t know if my code is good or sucks, I haven’t really done much in the way of Object-Oriented programming but I’m totally open to criticism like how to make my code better, how to do things more efficiently, etc.

1 Like

I got a friend who i bet will play this if i drop it on his computer.

1 Like

lol, I just planned this on paper a few days ago… What are the odds?

I always had this little dream of making a game my mum would play. Shed be so proud :wink:

I was kind of hoping it wouldn’t take weeks though… But things always mushroom, don’t they?

I should really check out your code… Is it commented and neat?

Well, when you’re a n00b to gamedev like I am it takes a bit longer to figure out what you’re doing :wink:

I’ve been refactoring and commenting as I go but idk if I would consider it “neat” quite yet…but feel free to peruse the code and leave feedback. If my code is shit somewhere, please call me out on it so I can improve. That being said, my first priority is getting everything working the way I want it to, then optimizing, refactoring, and commenting once I know that I’m not going to re-write the code again, LOL. I am considering merging the Slot and Stack classes to simplify the code a bit.

I am trying to release a simple card engine with my MonoGame.Ruge project. I have ideas about making commercial multi-player card game so you can play hearts or go fish or w/e with your friends, so I’m trying to create a engine that would take care of generic card game GUI stuff that frankly is a pain in the ass to implement, that way I can mostly just focus on the gameplay rules.

cool---- One thought I had a while back, was not implementing any rules… Like with real cards…

Just provide a virtual deck, and some operations, like shuffle, cut, put into piles, draw a card, etc…

So for solitaire, you could stack the cards any way you want, like real ones, and its up to you to be honest and abide by the rules

To allow for any game, not just the pre-programmed ones…

But I never got around to checking it out… Dont even know if its possible, fun, or practical…

Well, I finally have what seems to be a bug-free version of my game.

Unfortunately I’m a bit sleep-deprived and apparently screwed something up with my github repo so my commit didn’t merge properly and and now the source code is in a broken state but I’ll try to fix it after I get some sleep.

Awesome :slight_smile: So the link has a working download, or what? -Just the github not working?

Something broke when I committed my files and it merged with an older build instead of saving the latest, and unfortunately I updated my local repo from the broken merged version and all I could roll back to was the previous day’s build. So it was a bit of a mess. But actually I got everything sorted out today. Moral of the story is if I do a ton of work locally I’m going to rar up a backup of my source folder before committing to github.

Anyway it should be fine now; if you want to play with the source go for it :wink:

Neato… And not to be an ass, but would you happen to have a zip or rar download? Im so tired from work, I cant figure out github or code at this moment… Otherwise its cool, I’ll just check it out when I respawn :slight_smile:

Yeah no problem, uploading the files here:
https://hathor.itch.io/open-solitaire-classic

Oh, sorry, didnt see the pricing stuff untill now! I wont ask for special privileges when it comes to money and stuff :slight_smile: I’ll compile it when I regain my health, no fuss!

I was feeling kinda weird yesterday going on 3 hours of sleep, but I got some good sleep and am a bit more alert. So I just set the itch page to be paid-optional so you can download the binaries for free.

Hi again! Finally got around to playing your game!

Its excellent!
It played with no problems. Everything worked as expected. The movement of the cards, the subtle sounds, and the cards themselves, it all came together very well…

No clunky interface, all very clean.

took me 3 tries to win… I’m used to drawing 3 cards at a time. The 2 variants make for very different games.

1 Like

I’m glad you enjoyed it :slight_smile: Feel free to download the source code if you want to see how I did it. I’m going to release some tutorials soon to explain my processes and to get people up and running.

I created this fully functional prototype game in a couple of hours by making a few easy tweaks to the card engine (most of the work was creating the assets, lol):

Nice! I will definitely be going over the tutorials…!

I’m currently making a card game myself, so it will be really helpful to see how you implemented the Stacks, the Drag&Drop (which you apparently called “DragonDrop”, pretty funny if you think about it) and the animations.
It’s no problem if I use some of the code, right?

EDIT: Btw, I saw that someone suggested that you implement a compression system for your card stacks if they get too large (to prevent going off-screen). If you don’t have one already, I thought off a solution for this because I need it myself:

  • Have a MaxOffset Property (so that the cards are still stacked normally before it gets too big)
  • Calculate Offset (for vertical stacking) like: MIN( MaxOffset, (Max_Height_of_Stack - Height_of_one_card) / Number_of_cards)

I already implemented a Crunch solution with my engine. I’m working on documentation, tutorial, etc. I’m probably going to turn it into a Udemy course since it’s costing me money out of pocket to do all this stuff, and I need to recoup some of my investment somehow.

http://ruge.metasmug.com/doc/class_mono_game_1_1_ruge_1_1_card_engine_1_1_stack.html

@SoundGoddess The prototype game video you showed, is it still the same game, but just laid out differently?

Also thanks for sharing the source code - love to see how you did the drag and drop stuff - I’m looking at doing a rpg type game and need to implement this sort of thing to drag items from inventory to a stash etc.

Can’t wait for your tutorials, let us all know when / where they are available.

Great work!

1 Like

Yeah that prototype is a solitaire-style game but I’ve decided my next game will be based on the Rummikub concept since I’m wroking on multi-player stuff now. I went ahead and released my code to public domain. I started working on updating my dragon drop stuff to work with touch screen as well but it isn’t finished yet.

Never heard of this, will have to go and google it now :slightly_smiling:
Thanks for releasing the code to Public Domain.

1 Like