It is currently 27 Apr 2024, 17:07
   
Text Size

Another Random MTG Project

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Re: Another Random MTG Project

Postby frwololo » 06 Jul 2009, 01:00

I agree with Rob.
For a starter, C# has garbage collection. This probably makes it way easier to program than C++.
It has better type enforcement which is less flexible but avoids stupid mistakes. A bool is a bool and can't magically become an int
The .Net framework gives access to a lot of libraries, so saying that C++ has better library coverage is probably not true

To sum this up, I'd say C# is more modern, easier to learn, and probably cleaner in terms of OO programming since it's been created with OO in mind from the start.
If it wasn't relying on .Net which still has poor support on linux (mono?), I'd say C# is a better choice than C++ most of the time nowadays.

@Gando: I'd be happy to get examples of Web Apps written in C#. To me php, perl, ruby and python get the share of the lion on the Web.

Regarding some comments above regarding the "flexibility" of their engine, may I remember everyone here that we all had to start at some point?

and back on topic: yes, MageKing17 is (always) abrasive, and yes, GandoTheBard is (always) easily offended :mrgreen:
frwololo
DEVELOPER
 
Posts: 265
Joined: 21 Jun 2008, 04:33
Has thanked: 0 time
Been thanked: 3 times

Re: Another Random MTG Project

Postby GandoTheBard » 06 Jul 2009, 01:38

frwololo wrote:I agree with Rob.
For a starter, C# has garbage collection. This probably makes it way easier to program than C++.
It has better type enforcement which is less flexible but avoids stupid mistakes. A bool is a bool and can't magically become an int
The .Net framework gives access to a lot of libraries, so saying that C++ has better library coverage is probably not true

To sum this up, I'd say C# is more modern, easier to learn, and probably cleaner in terms of OO programming since it's been created with OO in mind from the start.
If it wasn't relying on .Net which still has poor support on linux (mono?), I'd say C# is a better choice than C++ most of the time nowadays.

@Gando: I'd be happy to get examples of Web Apps written in C#. To me php, perl, ruby and python get the share of the lion on the Web.

Regarding some comments above regarding the "flexibility" of their engine, may I remember everyone here that we all had to start at some point?

and back on topic: yes, MageKing17 is (always) abrasive, and yes, GandoTheBard is (always) easily offended :mrgreen:
LOL. Always is almost as long a time as Never.

Not sure I agree about the garbage collection being a good thing. One of things about learning to program for me was learning how to do that stuff (not that I remember any of that now, or much of anything related to programming for that matter). Cutting it out seems like cutting corners. Inflexible typing is both good and bad. I think these things reflect style and know how rather than better or worse. It might be true that C# is cleaner with Objected Oriented programming. Probably is. As far as I know .net is only supported really on the windows platform. Not sure I agree about .net having better libraries than C++ but since .net is microsofts baby I can see it potentially having a wider variety if not higher quality.

RE: samples, the only thing I can point to of the top of my head is some software a friend worked on for several years that worked as a content management system for a large corporation. But since I don't have a url I can't really point at that either. :) And I said I know very little about C# so it wasn't that I was saying C# is worse than C++ but questioning why it would be better when C++ is more viable across platforms.
visit my personal homepage here: http://outofthebrokensky.com

Listen to my podcast with famed AJ_Impy "Freed from the Real" on http://puremtgo.com
User avatar
GandoTheBard
Tester
 
Posts: 1043
Joined: 06 Sep 2008, 18:43
Has thanked: 0 time
Been thanked: 0 time

Re: Another Random MTG Project

Postby Incantus » 06 Jul 2009, 02:19

Wow, I leave the country and my slightly tongue in cheek comment blows up in my face.

Gando - sorry, I didn't mean to be condescending. Unfortunately, my first comment about python was supoosed to be followed by a ;), but i see now that it seems to missing. All I meant to imply was that people often don't realize how powerful dynamic languages like python and perl can be (and C# moreso than C++), often consigning them to simple "scripting" languages. Just ask telengard, who first prototyped Dreamblade
in python, and then because speed issues (for the AI) reimplemented the same design in C++ and saw a huge increase in size of his codebase. Anyway, sorry to cause such an issue.
Incantus
DEVELOPER
 
Posts: 267
Joined: 29 May 2008, 15:53
Has thanked: 0 time
Been thanked: 3 times

Re: Another Random MTG Project

Postby GandoTheBard » 06 Jul 2009, 02:36

Incantus wrote:Wow, I leave the country and my slightly tongue in cheek comment blows up in my face.

Gando - sorry, I didn't mean to be condescending. Unfortunately, my first comment about python was supoosed to be followed by a ;), but i see now that it seems to missing. All I meant to imply was that people often don't realize how powerful dynamic languages like python and perl can be (and C# moreso than C++), often consigning them to simple "scripting" languages. Just ask telengard, who first prototyped Dreamblade
in python, and then because speed issues (for the AI) reimplemented the same design in C++ and saw a huge increase in size of his codebase. Anyway, sorry to cause such an issue.
Not a problem. As I stated initially I wasn't sure where you were coming from. Thanks for clearing that up. I agree that scripting languages can be quite powerful. My server uses a very sophisticated email filter written entirely in perl. Not what I imagined perl for when I first heard about it. Hey I've written several game engines in js which is as scripting as a language gets. I guess I just don't associate C# as the superior language and .net in general seems weaker than using say Java for example. C++ has its many pitfalls so I get not wanting to deal with it. Weird typing issues for example. What I really wanted was a good reason why the developer used C# over so many other options. It seemed to me to be the wrong tool for the job.
visit my personal homepage here: http://outofthebrokensky.com

Listen to my podcast with famed AJ_Impy "Freed from the Real" on http://puremtgo.com
User avatar
GandoTheBard
Tester
 
Posts: 1043
Joined: 06 Sep 2008, 18:43
Has thanked: 0 time
Been thanked: 0 time

Re: Another Random MTG Project

Postby zerker2000 » 06 Jul 2009, 03:30

Incantus wrote:Unfortunately, my first comment about python was supoosed to be followed by a ;), but i see now that it seems to missing.
Ah yes, my second point(that I forgot to put in above): if you can't manage to convey your "tone" by choice of words, adding smilies might help (suppresses instinct to type a :P...oops it still got through).
O forest, hold thy wand'ring son
Though fears assail the door.
O foliage, cloak thy ravaged one
In vestments cut for war.


--Eladamri, the Seed of Freyalise
zerker2000
Programmer
 
Posts: 569
Joined: 09 May 2009, 21:40
Location: South Pasadena, CA
Has thanked: 0 time
Been thanked: 0 time

Re: Another Random MTG Project

Postby MageKing17 » 06 Jul 2009, 20:56

Incantus wrote:Wow, I leave the country and my slightly tongue in cheek comment blows up in my face.
More like it blew up in my face. ;)

Having spent the past few half an hour trying to get a relatively simple C++ program to compile (and actually succeeding, which is completely new for me ;)), I am thoroughly grateful for the incredible flexibility of Python. The idea of trying to so much as duplicate (let alone expand upon) our current progress in Incantus in C++ is enough to give me the chills.
User avatar
MageKing17
Programmer
 
Posts: 473
Joined: 12 Jun 2008, 20:40
Has thanked: 5 times
Been thanked: 9 times

Re: Another Random MTG Project

Postby Rob Cashwalker » 07 Jul 2009, 02:21

Look, ultimately it's as Rares says often - the best language for any given project is your personal language. We all have one language that we are the most comfortable with. As programmers, we can all relate to common concepts, and hack our way through other languages... if we HAD to.

I'm the most intimately familiar with VB6. When I started mapping out a series of objects that could potentially represent a magic game, I did so in VB. If my boss were so inclined, he'd write it in C++. I only know enough C/C++ to understand our product source code, and make minor changes. Conversely, he asks me for advice on VB matters.

For open-source projects where there are going to be a multitude of coders, then the only participants can be people who are comfortable in the given language. There may exist a "perfect" language that would allow super simple design and card coding using a Magical Parsing Engine(TM) (pun intended). But if only a handful of people in the world REALLY know the language, then the project will never get off the ground.

C# is well-suited to the technical requirements of a magic game, and has a well-established user base. Whether we like it or not it's going to be supported for years to come. Macs are more and more Windows-compliant, so who knows, it may become cross-platform sooner than you think. At what cost, is anyone's guess....
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times

Re: Another Random MTG Project

Postby GandoTheBard » 07 Jul 2009, 04:29

As per usual Rob you make several valid points. Particularly about linguistic comfort zones. At one time I was fairly comfortable in C++ then I realized I needed to learn how to apply it to Windows once my DOS machine stopped working. That made me lose interest (well there was an interval of about 4-5 years where I had NO computer at all) and I started learning about web coding languages. HTML, DHTML, CSS, ASP, JS, were the new things I was learning...I tried delving into .net when that came out. I did pretty well for a novice making some nice mechanisms and interplays between pages and data but realized halfway through the project I was working on that I hated aspx. Again comfort zone. I've written things in js that people normally write in vbscript or perl etc just because js is so much easier for me than the alternatives. Interestingly though I have only minimally used Ajax effectively because I am not that comfortable with XML even though I think it is a superior data organization language (if thats even a legitimate term). So yeah I get it, we deal with what we know and do the doggie paddle through the rough stuff. The other point about support is also true. It is likely that Windows based programming will be more and more portable to linux and OSX as those OSes adapt and add support for windows applications. It just jars a bit that C# is the favorite now.
visit my personal homepage here: http://outofthebrokensky.com

Listen to my podcast with famed AJ_Impy "Freed from the Real" on http://puremtgo.com
User avatar
GandoTheBard
Tester
 
Posts: 1043
Joined: 06 Sep 2008, 18:43
Has thanked: 0 time
Been thanked: 0 time

Re: Another Random MTG Project

Postby BlackMamba » 07 Jul 2009, 12:49

Just to add a point:

C# (the langage itself) and the .Net framework (the rest of the base libraries) have been standardized by Microsoft. See http://www.ecma-international.org/publications/standards/Ecma-334.htm and http://www.ecma-international.org/publications/standards/Ecma-335.htm. Those standards can be implemented by anyone. Microsoft provides an implementation for Windows. But Mono (http://mono-project.com/Main_Page) is also a multiplatform open source implementation that is getting a lot of success. It runs on pretty much every modern hardware piece you can think of (including IPhone, PS3...). It even implements the System.Windows.Forms namespace, which is pretty tightly bound to win32 APIs in the MS implementation. They don't (yet) provide a WPF/WCF implementation, but it wouldn't surprise me if they did one day. Mox would then run on Mac and Linux :)

So, the "C# is only on windows" point is becoming less and less relevant these days.
BlackMamba
 
Posts: 23
Joined: 17 Sep 2008, 01:24
Has thanked: 0 time
Been thanked: 0 time

Re: Another Random MTG Project

Postby Rob Cashwalker » 07 Jul 2009, 14:20

WOOT! =D> For once, they did something right!
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times

Re: Another Random MTG Project

Postby Snacko » 07 Jul 2009, 17:35

Sorry to burst your bubble but WPF / WCF won't be ported to mono any time soon as none of the developers has any interest in it (see http://www.mono-project.com/WPF).

But overall C# as a language is standardised and portable, however the libraries are not Windows.* on linux is lacking sometimes. The same could be said about python or java as you can use system locked (lin or win) libraries in python or in java you can plug some unmanaged C code to make it non portable.

Also I could see the point that C# is windows only as MS pushes WPF/WCF and this won't be portable any time soon.
Snacko
DEVELOPER
 
Posts: 826
Joined: 29 May 2008, 19:35
Has thanked: 4 times
Been thanked: 74 times

Re: Another Random MTG Project

Postby MageKing17 » 07 Jul 2009, 18:09

My most "comfortable" language is TI-BASIC, but that doesn't mean I'm likely to use it for anything on the PC. :P

After having spent the past few days knee-deep in C++, I've reinforced a conclusion I'd come to much earlier... if you want a program done fast (to test a design), write it in Python. If you want it to run fast, write it in C++ (or a comparable language).

I have no experience with C#, but going off pure intuition, i'd imagine it's probably a fair trade between flexibility and power. The more dynamic the language, the easier it is to write something as convoluted as Magic, but the less raw power you have available. Which isn't terribly important in a turn-based game like Magic, of course, but even Incantus becomes unplayable if you have hundreds of counters or tokens.
User avatar
MageKing17
Programmer
 
Posts: 473
Joined: 12 Jun 2008, 20:40
Has thanked: 5 times
Been thanked: 9 times

Re: Another Random MTG Project

Postby BlackMamba » 07 Jul 2009, 22:14

Sorry to burst your bubble but WPF / WCF won't be ported to mono any time soon as none of the developers has any interest in it (see http://www.mono-project.com/WPF).
It says they don't have plans for that right now, but I'm convinced it will come. Mono already provides an equivalent of Silverlight (Moonlight), which is a (quite big) subset of WPF (they share Xaml, Dependency properties, thread dispatching, basic rendering API). Going the full way is then not such a far fetched idea. We'll see :) Right now, I have no interest in being available on other platforms than windows anyway!
BlackMamba
 
Posts: 23
Joined: 17 Sep 2008, 01:24
Has thanked: 0 time
Been thanked: 0 time

Re: Another Random MTG Project

Postby frwololo » 08 Jul 2009, 00:28

MageKing17 wrote:The more dynamic the language, the easier it is to write something as convoluted as Magic, but the less raw power you have available. Which isn't terribly important in a turn-based game like Magic, of course
It is when you have 20MB Ram and a 333MHz CPU :mrgreen:
frwololo
DEVELOPER
 
Posts: 265
Joined: 21 Jun 2008, 04:33
Has thanked: 0 time
Been thanked: 3 times

Re: Another Random MTG Project

Postby MageKing17 » 08 Jul 2009, 20:12

frwololo wrote:
MageKing17 wrote:The more dynamic the language, the easier it is to write something as convoluted as Magic, but the less raw power you have available. Which isn't terribly important in a turn-based game like Magic, of course
It is when you have 20MB Ram and a 333MHz CPU :mrgreen:
I was, of course, referring to the usage of modern PCs, where my computer barely noticed what must have been a 300% increase in the amount of time it took to process a timestep.

Of course, when there are hundreds of tokens or counters out, it chokes and dies. :P There are downsides to a 3D UI.
User avatar
MageKing17
Programmer
 
Posts: 473
Joined: 12 Jun 2008, 20:40
Has thanked: 5 times
Been thanked: 9 times

Previous

Return to Forge

Who is online

Users browsing this forum: No registered users and 210 guests


Who is online

In total there are 210 users online :: 0 registered, 0 hidden and 210 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 210 guests

Login Form