It is currently 16 Apr 2024, 11:56
   
Text Size

Dominion Source Code (updated Jan 3rd, 2012)

A version of Asmadi Games' game by jatill

Moderators: Huggybaby, CCGHQ Admins

Dominion Source Code (updated Jan 3rd, 2012)

Postby jatill » 22 Mar 2010, 12:11

My version was written using Visual Basic 6.

The source is freely available to use and modify, with the only condition being that you post any modifications (including the updated source) here, and keep my link to my other apps.

http://www.mediafire.com/file/c7iw043h3 ... n_code.zip
Last edited by jatill on 03 Jan 2012, 13:58, edited 6 times in total.
jatill
DEVELOPER
 
Posts: 2118
Joined: 24 Feb 2009, 16:35
Has thanked: 5 times
Been thanked: 17 times

Re: Dominion Source Code

Postby Bog Wraith » 22 Mar 2010, 14:05

Backed up this file as well!
'Twas in the bogs of Cannelbrae
My mate did meet an early grave
'Twas nothing left for us to save
In the peat-filled bogs of Cannelbrae.
User avatar
Bog Wraith
Global Mod 1 (Ret)
 
Posts: 1108
Joined: 28 May 2008, 22:40
Location: Shandalar
Has thanked: 425 times
Been thanked: 153 times

Re: Dominion Source Code (updated 4/1)

Postby pinkymadigan » 12 Apr 2010, 20:56

Out of curiosity, I tried to convert this up to .net (Express, 2008) and I receive an error regarding a missing key for Active-X controls. As I only really develop in .net (vb or C++ usually), I don't think I've ever run into this error before and a cursory google turned up inconclusive results. Any ideas? Or better yet, any chance you could convert the source up and post the converted source?
pinkymadigan
 
Posts: 36
Joined: 08 Apr 2010, 22:07
Has thanked: 1 time
Been thanked: 0 time

Re: Dominion Source Code (updated 4/1)

Postby jatill » 13 Apr 2010, 11:57

Is the .net software free, because I only have the old version. Is so, where do I find it?
jatill
DEVELOPER
 
Posts: 2118
Joined: 24 Feb 2009, 16:35
Has thanked: 5 times
Been thanked: 17 times

Re: Dominion Source Code (updated 4/1)

Postby pinkymadigan » 13 Apr 2010, 20:58

Looks like 2010 was just released, guess I'll be getting an update at work soon. The "express" edition is free. It's pretty powerful, but lacks a lot of things that a professional dev team would want (source control support/multi-project solutions/ bunch-of-other-things-goes here).

http://www.microsoft.com/express/windows/
pinkymadigan
 
Posts: 36
Joined: 08 Apr 2010, 22:07
Has thanked: 1 time
Been thanked: 0 time

Re: Dominion Source Code (updated 4/1)

Postby cteague3 » 23 Apr 2010, 07:52

Is it worth while creating a codeplex project out of this? It would be nice if we could do a team project for open development effort. I manage our TFS team project at work for our team development, and I understand that codeplex is supposed to allow the same type of team project continuous integration development, but I haven't tried it yet. I'm in the process of learning WPF applying MVVM pattern, along with the Prism pattern/practice. I've been coming up to speed with Expression Studio 3 at the same time. Is there any interest in attempting to do a version of your game in C# in this? I'm downloading VS2010 Ultimate, but can also grab the Express edition if necessary to be community friendly.
cteague3
 
Posts: 10
Joined: 23 Apr 2010, 06:04
Has thanked: 0 time
Been thanked: 0 time

Re: Dominion Source Code (updated 4/1)

Postby cteague3 » 23 Apr 2010, 08:01

Ok, just a quick follow-up. I logged into codeplex, and it appears to be pretty easy to create a project for team development. Here is the URL, but will require you to create an account first to login:
https://www.codeplex.com/site/project/create
What do you think? It says TFS based source control supports subversion clients, too, for what its worth...
cteague3
 
Posts: 10
Joined: 23 Apr 2010, 06:04
Has thanked: 0 time
Been thanked: 0 time

Re: Dominion Source Code (updated 4/1)

Postby cteague3 » 23 Apr 2010, 08:11

pinkymadigan wrote:Out of curiosity, I tried to convert this up to .net (Express, 2008) and I receive an error regarding a missing key for Active-X controls. As I only really develop in .net (vb or C++ usually), I don't think I've ever run into this error before and a cursory google turned up inconclusive results. Any ideas? Or better yet, any chance you could convert the source up and post the converted source?
I have a guess about this one. From what I understand with the Express editions (never used them myself), there is no interop support. ActiveX controls are COM based, so they are likely going to require interop. I wonder if we try to convert the code in VS2008 or VS2010 Pro or Ultimate, then figure out where the ActiveX references are, and hopefully find .NET replacements for the ActiveX code with .NET compatible versions, then go back into Express with the replacement code.

I haven't written any VB6 code in so long, I have forgotten what all may be referenced under the hood. The world is a mighty different place outside of the old VB Forms and even the .NET WinForms, now.
cteague3
 
Posts: 10
Joined: 23 Apr 2010, 06:04
Has thanked: 0 time
Been thanked: 0 time

Re: Dominion Source Code (updated 4/1)

Postby jatill » 23 Apr 2010, 13:10

Personally I'm not interested in setting up a project, but if you want to take the initiative, I'm not going to object. I just uploaded my latest code version.
jatill
DEVELOPER
 
Posts: 2118
Joined: 24 Feb 2009, 16:35
Has thanked: 5 times
Been thanked: 17 times

Re: Dominion Source Code (updated 4/23)

Postby Nullgeek » 25 Apr 2010, 03:45

I was also curious about converting this to .NET so I gave it a try. I also had an ActiveX exception but it was because I did not have VB6 installed. I installed VB6, got the project to run there and then converted. It went through just fine. There are some issues but nothing looks too difficult to fix to get to a starting point in .NET.

Uploaded the converted solution here: http://drop.io/Dominionvbnet

Enjoy!
Nullgeek
 
Posts: 3
Joined: 25 Apr 2010, 03:29
Has thanked: 0 time
Been thanked: 0 time

Re: Dominion Source Code (updated 4/23)

Postby cteague3 » 25 Apr 2010, 07:55

Awesome! I don't think I could have even found VB6 to install it... :-) MSDN doesn't have it available for download anymore. I'll take a look at it tomorrow sometime.
cteague3
 
Posts: 10
Joined: 23 Apr 2010, 06:04
Has thanked: 0 time
Been thanked: 0 time

Re: Dominion Source Code (updated 4/23)

Postby pinkymadigan » 26 Apr 2010, 11:44

Thanks Nullgeek. I'm about 75% through getting it in working shape again with .net standards, and then I'll have to figure out why the transparent labels are showing through to the form's surface instead of the image, but it is definitely a good starting point.

@Jatill - I believe a large number of reported errors are due to the hard coded array limits. I usually find the game crashing with a large number of cards and I see the limit to any one pile appears to be 100. Not sure what other data types are available in vb6 but aren't there any list equivalents that could be dynamic (lists, queues, stl lists, etc)?

If not, you should at least create the upper limit to hold the worst case scenario - one opponent goes down to a deck of just an ambassador, (12 max actions cards * 14 max pile size) + all money + all curses + all point cards = max array size. Obviously unlikely to happen but you should always program for the corner cases. Note I didn't subtract any cards for last province, etc as this gives you a bit of wiggle room for things like implementing black market, where cards come from the ether.
pinkymadigan
 
Posts: 36
Joined: 08 Apr 2010, 22:07
Has thanked: 1 time
Been thanked: 0 time

Re: Dominion Source Code (updated 4/23)

Postby jatill » 26 Apr 2010, 12:38

Should I want until you're done with the conversion to change my code (I'm assuming you started with the 4/23 version?) Is .net free to use? Thanks!
jatill
DEVELOPER
 
Posts: 2118
Joined: 24 Feb 2009, 16:35
Has thanked: 5 times
Been thanked: 17 times

Re: Dominion Source Code (updated 4/23)

Postby pinkymadigan » 26 Apr 2010, 20:52

.Net express is, and certainly has enough functionality to run the game. I don't know that anyone has any specific plans, but if someone wanted to set up a code repository I would definitely participate in a group project.

But I do not have any server space to host said project on myself.

As for waiting/updating, I don't think it would hurt to upkeep the vb6 version until a project gets it legs.
pinkymadigan
 
Posts: 36
Joined: 08 Apr 2010, 22:07
Has thanked: 1 time
Been thanked: 0 time

Re: Dominion Source Code (updated 4/23)

Postby cteague3 » 16 May 2010, 01:56

I created a codeplex project, and uploaded both the VisualStudio 6 - VB6 code and the VisualStudio 2008 - VB.NET code. I haven't made any changes to either, from what you guys made available to download.

http://dominiondotnet.codeplex.com/

If you would like developer access to the project, drop me a note and I'll add you, or maybe you can request thru codeplex, not sure. Also, the project has to be "published" within 30 days, or it is automatically deleted. I don't know if "published" includes having binaries available for download or not. I would suspect not.

I would like to port this code. It will take me a bit to get a handle on the code as it is, but I'm C# proficient. I do not personally intend on touching either of the VS6-VB6 or VS2008-VB.NET code branches I just uploaded. I will start a VS2010-C#-.NET4 solution and use it for the port. I'm in the process of learning WPF & the MVVM design pattern, which I would like to take the opportunity for this port. I'll upload my progress shortly, and let you guys know about it.
cteague3
 
Posts: 10
Joined: 23 Apr 2010, 06:04
Has thanked: 0 time
Been thanked: 0 time

Next

Return to Dominion

Who is online

Users browsing this forum: No registered users and 14 guests


Who is online

In total there are 14 users online :: 0 registered, 0 hidden and 14 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 14 guests

Login Form