Announcement

Collapse

The Infinity Blade Forums Have Moved

We've launched brand new Infinity Blade forums with improved features and revamped layout. We've also included a complete archive of the previous posts. Come check out the new Infinity Blade forums.
See more
See less

Use Visual Studio 2008 with nFringe and UDK

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Use Visual Studio 2008 with nFringe and UDK

    Originally posted by 280Z28 View Post
    The tutorial at the beginning of this thread is currently completely wrong for nFringe 1.1.10+. I've posted a much simpler set of instructions on our wiki:

    http://wiki.pixelminegames.com/index...pt:UdkProjects
    I removed the old tutorial since it was for earlier versions of the UDK and nFringe and seemed to be causing confusion. Hopefully that link will stay current for new versions of nFringe and UDK since I haven't been keeping up to date with it lately.

  • #2
    Thanks for this i was having some issues using nfringe.

    Comment


    • #3
      Interesting, that's pretty much the same as I was writing for an UDN document, except that I got stuck with nFringe at "create project".

      Here's last night's version of the document I was working on: http://udn.epicgames.com/Three/Devel...ptProject.html

      Comment


      • #4
        Cool, that UDN document was exactly the type of information I was looking for a few days ago. I couldn't find very much so I just tried to figure it out using what I could find and lots of trial and error. Please, feel free to add anything I wrote here to that UDN doc to make it more complete.

        Also, if visual studio won't create a project make sure the folder you are trying to create the project in does NOT already exist.

        Comment


        • #5
          Originally posted by SneakyToB View Post
          Why Visual Studio?
          Using Visual Studio with nFringe makes coding unrealscript much easier, mostly because of getting a "Go to definition" link by right clicking in the code, syntax highlighting, and intellisense which shows what functions can be called from various objects.

          Background
          This will explain how I got it working because it wasn't very straight forward, at least not to me.

          To begin, this tutorial will assume you have already installed Visual Studio 2008 (this should work in the free Express edition but I have not tried it). You also need to have installed nFringe by following the instructions. Obviously, you need to have installed UDK as well and make sure you run the UDK game demo at least once before following this tutorial so the config files get generated.

          Next, this tutorial expands on the UDK Programming Tutorial but sets it up to work with Visual Studio. So be sure to download the SuperFunGame.uc sample source code.

          Setup
          1. Create the project in Visual Studio
          • Create a new project of type "UnrealScript" and select "UnrealEngine 3 Licensee Project"
          • Name: enter "SuperFunProject" or whatever you would like the package to be called.
          • Location: pick C:\UDK\UDK-2009-11\Development\Src
          • Uncheck "Create Directory for solution"
          • On the solution drop down leave it on "Create new Solution"
          • Finally, click OK to create the project

          2. Configure the project
          • Right click on the project in the Solution Explorer and click Properties
          • Under General -> Game -> Target Game pick “UnrealEngine 3 Mod” from the drop down menu (this is needed because you can’t set the “Reference Source Path” when using the “UnrealEngine 3 Licensee Project” type.
          • Under General -> Script Compiler -> UCC Path pick: C:\UDK\UDK-2009-11\Binaries\Win32\UDK.exe
          • Under General -> Script Compiler -> Reference Source Path pick: C:\UDK\UDK-2009-11\Development\Src
          • Under Build -> Script Outputs check “Manual set UCC output directory” and set the path to C:\UDK\UDK-2009-11\UTGame\Script
          • Under Debug -> Start Action -> Start Game Executable set the path to C:\UDK\UDK-2009-11\Binaries\Win32\UDK.exe
          • Check “Enable unpublished mods”
          • With the project selected in Solution Explorer, right click, and select Add -> New Folder. Type “Classes” and hit enter. Now any new classes you make should be added under the Classes folder. To follow this tutorial, add "SuperFunGame.uc" which you downloaded above. Right click on "Classes" and select "Add existing item" (make sure you copied it to your Classes folder first in Explorer) then select "SuperFunGame.uc"
          • Finally, close the solution (MUST exit Visual Studio) and then reopen it. This adds all the Reference Source files which is the UDK source code. It also allows Intellisense to work correctly.

          3. Build the project
          • Add an existing file (as a link) to your project from C:\UDK\UDK-2009-11\UTGame\Config\UTEngine.ini. Click the arrow to the right of Add and select "Add as a link". This way it won't copy the file to your project directory.
          • Edit the file and search for “ModEditPackages=” and make sure your mod name package is included there. Add a line: "ModEditPackages=SuperFunGame" if you are following this tutorial (now save and close UTEngine.ini).
          • Make sure the Output window is open in Visual Studio. Now you should be able to build using Visual Studio (press F6) or pick Build -> Build Solution from the menu. You will probably get an error about not being able to find the .NET Framework SDK but you can just ignore it.
          • Check your C:\UDK\UDK-2009-11\UTGame\Script folder for the output of the .u file for the package you just compiled. In this case, there should be a SuperFunGame.u file at that location.
          • Finally, if you see the .u file in there for the package you just build, then you are ready to test it out.

          4. Run the project
          • Under the project properties -> Debug -> Start Action, check “Load map at startup” and type "dm-deck" or whatever map is available
          • Check “Start with specified game type” and type the "ModPackage.Class" such as "SuperFunGame.SuperFunGame"
          • Check “Enable unpublished mods”
          • Check “Open log window at position” and position it wherever
          • Run your project by pressing F5 inside Visual Studio
          • Visual Studio will pop up an information bubble saying that pixel mine doesn’t allow the free non-commercial nFringe to attach to UE3. But it can still be used to run the code and/or look at the log console or output.
          There are corrections on this.

          The quickest way to get this right is instead of naming your project as SuperFunProject as indicated in step 1, name it SuperFunGame. Otherwise, you have to do these corrections:
          Step 3.2: ModEditPackages=SuperFunGame should be ModEditPackages=SuperFunProject
          Step 4.2: SuperFunGame.SuperFunGame should be SuperFunProject.SuperFunGame

          I hope this helps.

          Comment


          • #6
            Thank you, Death4Hire. I just edited my post above in step 1 to say create a project named "SuperFunGame" instead of "SuperFunProject".

            Comment


            • #7
              Originally posted by SneakyToB View Post
              Also, if visual studio won't create a project make sure the folder you are trying to create the project in does NOT already exist.
              I was doing that, but I keep getting an error message that it can not copy the project file from a temp directory. Anyway, I have yet to bother Pixel Mine about this.

              Comment


              • #8
                Can you debug/Step through unrealscript code with nFringe?
                I'm using WOTgreal now, it works great but a bit slow when edit large script file, and lack of any debugger integration with UDK.

                Comment


                • #9
                  Then it's not far behind nFringe Debugging doesn't work in UDK, it was purposely locked to UT3.

                  Comment


                  • #10
                    Well I have VS2008 and nFringe setup and my project is compiling fine, so many thanks for this thread!

                    My question is... Is there anyway of working on scripts within VS2008 at the same time as working in UDK?

                    I mean, when I compile the solution within VS2008 I get a build error when the core compiles as the UDK is open. When coding I do tend to build and test constantly which means closing and opening UDK every few minutes.

                    Maybe I've missed something obvious or am a total noon!

                    Regards,
                    Matt.

                    Comment


                    • #11
                      I'm glad this thread was useful for you, fallingbrickwork.

                      To answer your question it doesn't look like what you are trying to do is possible even if you compile using the UDK make system and bypass Visual Studio. To recompile the scripts it has to overwrite the existing ones (.u files), which it can't do because they are currently in-use and opened by the UDK editor (if you are running it). So, it looks like the only way around this is to close the UDK editor every time you compile the scripts.

                      Comment


                      • #12
                        Hi

                        So got every thing going with nFring up to the pointto do the build solution.
                        Im using the new beta2 BTw.

                        For some reason it is not generating the .u file.

                        Ive down all the above as the tutorial (following this TUT:
                        http://www.dl.deathtouchstudios.com/...ldEnvironment/

                        THe build says its successful and displays this:
                        MyGame -> D:\UDK\UDK-2009-11-2\Development\Src\MyGame\MyGame\Unpublished\Cooked PC\Script\MyGame.u

                        (Note the double MyGame\Mygame ...strange?)

                        However the MyGame.u never gets made or copied to the UTgame\scripts folder I had specified:
                        D:\UDK\UDK-2009-11-2\UTGame\Script

                        Any ideas? Any one tried with beta2?

                        Its not because IM using a "non-commercial" version of nFringe is it? I'd imagine most people use that?

                        Thanks heaps

                        -LW

                        Comment


                        • #13
                          Anybody knows how to step in into unrealscript and debug with VS ? I know it was advertised somewhere for UDK.

                          Comment


                          • #14
                            Originally posted by roychr View Post
                            Anybody knows how to step in into unrealscript and debug with VS ? I know it was advertised somewhere for UDK.
                            At the moment you can't without a commercial nFringe licence.

                            Comment


                            • #15
                              Originally posted by LordsWarrior View Post
                              For some reason it is not generating the .u file.
                              ...
                              Same, I did a search in my whole UDK folder No superfunproject.u file anywhere.

                              The build output anounce that :
                              SuperFunProject -> L:\UDK\Development\Src\SuperFunProject\Unpublished \CookedPC\Script\SuperFunProject.u
                              I specified that in the build setup :
                              L:\UDK\UTGame\Script
                              (note : I installed udk without the "\udk-2009-11-2\")

                              Comment

                              Working...
                              X