Author Topic: Things that make me go HUMMMH  (Read 3911 times)

TheLaw

  • Regular
  • **
  • Posts: 96
    • View Profile
Things that make me go HUMMMH
« on: 2008-11-21, 05:58:18 PM »
Here goes another one of my dumb questions. When I saw this kit was done in c# I was excited. At that point I assumed the system requirements would call for visual c# 2008. Then I saw you only needed .NET 1.1 (or something). Then I was less happy 'cause I figured the code would be interpreted. Then I was happy again when I found out it's really being compiled to machine code. Then I got confused, 'cause I had no idea that the .NET framework had a c# compiler in it. Then I found out that behind the scenes the kit is spitting out more source files from our plans, and making a visual c# project file that can be loaded into c# express. So finally my question: Since I know nothing about .NET, is visual c# a better compiler? Would it produce better .EXE's? I know it's a great editor with debugging, but I'm curious about the compiler. NOTE also I'm new to c#. I'm a c++ guy.
I fought the law and TheLaw won...!

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Things that make me go HUMMMH
« Reply #1 on: 2008-11-22, 11:08:23 AM »
I'm reasonably certain that SGDK2 and Visual C# Express use the same compiler built into the framework.  And I can't remember if I incorporated code into SGDK 2.1 to take advantage of this (I may not have because I wanted it to be backward compatible with .NET 2.0), but the current version of the framework can even compile the project given just the .vcproj file, which is much simpler than what you had to do before if you didn't have Visual Studio (had to manually list all the files and how to compile them).

Yes, the fact that .NET can compile and run code at runtime was one of the main factors that influenced me to rewrite SGDK and to do it in .NET.  It's a very powerful and fun feature.  That's how I can find out what functions are available in the user-written code -- compile it and ask it what it's got.

Edit: Now I remember what I did.  In 2.1, the batch file that compiles the SGDK2 IDE itself takes advantage of the framework's ability to compile a .vcproj file.  So if you want to re-compile the SGDK 2.1 IDE, it's very simple even without Visual Studio.  But the code in SGDK that compiles the game project still does it the same as it always did.  Still, it uses the same compiler, it's just collecting more of the information for compiling manually.
« Last Edit: 2008-11-22, 11:11:29 AM by bluemonkmn »