Announcement

Collapse
No announcement yet.

starting the UDK in client mode (noob question)

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

    starting the UDK in client mode (noob question)

    Hi!
    So I just started with this UDK thing, and let me tell you I can't believe how awesome it is! A professional game engine almost completely free for amateurs like me to fiddle with... Awesome!

    So, here's the first problem I stumbled upon: I've downloaded latest UDK and started learning UnrealScript with this tutorial: http://udn.epicgames.com/Three/Devel...ptProject.html

    It seems terribly outdated, but I thought I can cope with that. I've created classes they wanted me to and stuff, but now I don't know how to test them :|
    The tutorial covers this in its Testing section, but I don't understand it.
    In most cases the application is tested by starting the UDK in client mode with a given launch URL
    What client mode? Where should I write the URL? I'm confused :C
    Does anyone know what do they mean? How should I test my classes? Thanks in advance

    #2
    I believe client mode is just launching the game and testing in general. It's not running on any kind of server so it's technically only a client. There is a way to launch a server from front end and connect to that but this was a lot easier with the older front ends that launched both the server and the game as a client already connected to it. I'm not sure if you can do that anymore.

    Be warned however, that I personally saw different results testing this way than when I actually joined another player who was hosting the game. Basically a lot of scripts that appeared to work when connected to a front end server did not work when connected to a real one. How that's possible or why it's like that is beyond me because it makes testing things extremely tiresome and difficult, especially when having to upload a build to somebody, waiting for them to download it, install it, launch it, start it and then have you go in to realize that line shouldn't = 1, but 0. Now let's do all of that again and test if it's going to work with 2...takes forever for minor tweaking and tests to try and find the issue so it's not a truly great way to test the game anyway.

    If you're just testing general code and not if it's going to work online, then just launch the game through the editor and pick play on PC. It's 'about' the same thing unless you're testing dynamic content loading, which having the editor open keeps it in memory so the way to test that is to package a bulid and install it and run that. Doing that locally doesn't really take that much time.

    These are just my experiences and I'm sure I'm doing a whole host of things incorrectly and I'm sincerely hoping somebody can come on and straighten me out here because it will save me these headaches.

    Comment


      #3
      Wow somebody actually replied! Thanks man, I got scared I'll be left unanswered!
      It seems I've expressed myself unclearly though. My problem is actually much simpler.
      Originally posted by Hitpawz View Post
      If you're just testing general code and not if it's going to work online, then just launch the game through the editor and pick play on PC.
      Exactly what I'm clueless about. How do I run a map with my code in it? The tutorial explained this, but I didn't make much out of it :C I already pasted the CluOne classes in my Development\Src directory.
      (There's only two classes: one extends GameInfo and the other one extends PlayerController)

      Comment


        #4
        You need to configure some ini files to make sure the game knows that you want to use your script. First make sure to exit the game and editor.

        (disclaimer: I have not done the tutorial you are talking about)

        in UDKGame\Config:

        in DefaultEngine.ini:

        [UnrealEd.EditorEngine]
        +ModEditPackages=MyGame (after the other lines, where MyGame is the folder of your scripts, such as CluOne or whatever it was called)

        in DefaultGame.ini
        [Engine.GameInfo]
        DefaultGame=MyGame.MyGameInfo (reference to your class that extends GameInfo; i.e. your gametype)
        PlayerControllerClassName=MyGame.MyPlayerControlle r
        +DefaultMapPrefixes= (Prefix=”MG”,bUsesCommonPackage=FALSE,GameType=”My Game.MyGameInfo”) (you can also add this to decide a prefix for you map files to determine game type, in this case "MG-")

        Delete UDKEngine.ini and UDKGame.ini, they will be regenerated from the Default files you just changed.

        Ok now start the UnrealFrontend.exe program from binaries folder or start menu. Do a full recompile. If you have no script errors it should compile (check the last few lines of output to confirm it got compiled). If you start a correctly prefixed level from the editor it should work.

        Comment


          #5
          It means "give it the map name to start with". "udk mapname" or "udk mapname?game=gamepackage.gameclassname" and such

          Comment


            #6
            Thanks a lot Crozz! Everything works perfectly now
            But if I may: I don't get these parts:

            Originally posted by Crozz View Post
            +DefaultMapPrefixes= (Prefix=”MG”,bUsesCommonPackage=FALSE,GameType=”My Game.MyGameInfo”)
            and
            Originally posted by Crozz View Post
            If you start a correctly prefixed level from the editor it should work.
            So I've added the line (I was supposed to add it, not to re-write anything, right?). What did it do?
            I.E. what is a map prefix and how do I specify it?

            Comment


              #7
              Map prefix is what defines the gamemode the map will run in, and how to specifiy it... that's what the first quote is.

              Comment


                #8
                You see how all the deathmatch maps are named "DM-Mapname"? The prefix is what's before the - in the mapname.

                Comment


                  #9
                  So I just name my map MG-MyMap, and it will automatically reckognize it?

                  Comment


                    #10
                    If you set it up in the .ini right, then yes

                    Comment


                      #11
                      Do you mean this line:
                      +DefaultMapPrefixes= (Prefix=”MG”,bUsesCommonPackage=FALSE,GameType=”My Game.MyGameInfo”)
                      ?
                      Because if yes - then it doesn't work :S I saved my map as MG-myMap.udk, but when I test it, GameMode seems to stay as specified in:

                      [Engine.GameInfo]
                      DefaultGame=


                      You sure I'm not supposed to change it anywhere else?
                      Or should I test it from somewhere else than editor?

                      Comment


                        #12
                        IIRC, the editor always runs the default gamemode, and not the map's gamemode.

                        Comment


                          #13
                          Ah that explains everything!
                          Thanks for the help once again

                          Comment

                          Working...
                          X