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

Starting from basics?

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

  • Starting from basics?

    Are there any guides out there if I want to start from the very top of the tree. Like GameInfo, Pawn, PlayerController?
    All the tutorials I see expand from UT.

    Before you go and say that it's easier to just implement UT classes, the reason why I'm using the kit is more for learning and less for doing my own game. I'm reading the UT classes, but I find it hard to learn unless I'm doing this my own way..

    Also, anyone knows when Vol3 of mastering unreal is coming out?

  • #2
    Seconded (also free bump )

    Comment


    • #3
      To start from the basics, you will need something in the lines of:

      A subclass of the UDKGame class. This is your basic gametype
      A subclass of the UDKPawn class. This is your basic representation of the player character.
      a subclass of the UDKPlayerController class. This is how you control your pawn (e.g. parses all input)

      (optionally) a subclass of the UDKHud class. This is your basic Hud.

      If you want to have a multiplayer game, you will need 2 more classes which are GameReplicationInfo subclasses and PlayerRepliationInfo subclasses.


      This should give you a starting point into the game.

      Comment


      • #4
        Thank you for your replies.

        Wattos, I was hoping on a guide similar to those of UTGame, UTPawn, but involving UDKPawn, UDKGame.
        I still do not know how to properly extend from those classes. My pawn is always invisible, and he can't hold any weapons, and all sorts of problems :S
        But thank you for your reply ^_^

        Comment


        • #5
          Your pawn is invisible and don't have any weapon because you need to implement that by yourself, it's a generic class, from that you can great any game you want, shooter, racing or RTS. I may suggest to look at the UTGame files as a guide line for doing that.

          Comment


          • #6
            BasicsGame

            BasicGame.uc
            Code:
            class BasicsGame extends GameInfo;
            
            
            defaultproperties
            {
            
               DefaultPawnClass=class'BasicsPawn'
               PlayerControllerClass=class'BasicsGame.BasicsPlayerController'
               bDelayedStart=false
            
            }
            BasicsPawn.uc
            Code:
            class BasicsPawn extends UDKPawn;
            
            var DynamicLightEnvironmentComponent PawnLightEnvironment; // Used to add light to pawn
            
            defaultproperties
            {
              //Object to create light for Pawn
              Begin Object Class=DynamicLightEnvironmentComponent Name=BasicsPawnLightEnvironment
              bSynthesizeSHLight=true
              End Object
              Components.Add(BasicsPawnLightEnvironment)
              PawnLightEnvironment=BasicsPawnLightEnvironment
            
            
              // Object to create SkeletalMesh
              Begin Object Class=SkeletalMeshComponent Name=BasicsPawnSkeletalMeshComponent
              bOwnerNoSee=false
              CastShadow=true
              LightEnvironment=BasicsPawnLightEnvironment
              SkeletalMesh=SkeletalMesh'CH_IronGuard_Male.Mesh.SK_CH_IronGuard_MaleA'
              AnimSets(0)=AnimSet'CH_AnimHuman.Anims.K_AnimHuman_BaseMale'
              AnimTreeTemplate=AnimTree'CH_AnimHuman_Tree.AT_CH_Human'
              End Object
              Mesh=BasicsPawnSkeletalMeshComponent
              Components.Add(BasicsPawnSkeletalMeshComponent)
            
              //Add Collission to pawn
              Begin Object Name=CollisionCylinder
              CollisionRadius=+0021.000000
              CollisionHeight=+0044.000000
              End Object
              CylinderComponent=CollisionCylinder
            }
            BasicsPlayerController
            Code:
            class BasicsPlayerController extends UDKPlayerController;
            
            
            
            defaultproperties
            {
            
              InputClass=class'BasicsGame.BasicsPlayerInput'
              CameraClass=class'BasicsGame.BasicsCamera'
            
            
            }
            BasicsCamera.uc
            Code:
            class BasicsCamera extends Camera;
            
            var vector  BasicsCameraLocOffset;
            var rotator BasicsCameraRotOffset;
            
            
            //Used to force camera into thirdperson view
            function UpdateViewTarget(out TViewTarget OutVT, float DeltaTime)
            {
                     local vector		BasicsLoc;
                     local rotator		BasicsRot;
            
            
                    if (PCOwner != None)
                    {
            
                     BasicsLoc = OutVT.Target.Location;         //Get and store location of target
                     BasicsRot = OutVT.Target.Rotation;         //Get and store rotation of target
            
                     BasicsLoc += BasicsCameraLocOffset >> BasicsRot;   //Allow camera to follow behind target
            
            
                     OutVT.POV.Location = BasicsLoc;              //Set camera location
                     OutVT.POV.Rotation = BasicsRot + BasicsCameraRotOffset; //Set camera rotation
            
                    }
                    else
                    Super.UpdateViewTarget(OutVT, DeltaTime);    //revert to default updateviewtarget if not playercontroller
            
            
            
            }
            
            defaultproperties
            {
              
              BasicsCameraLocOffset=(X=-60,Y=10,Z=40)           // offset for Camera location
              BasicsCameraRotOffset=(Pitch=-3500, Yaw=0, Roll=0) // offset for Camera rotation view
              DefaultFOV=80.0f   // Field of View
            
            }
            BasicsPlayerInput.uc
            Code:
            class BasicsPlayerInput extends UDKPlayerInput within BasicsPlayerController;
            The End

            Comment


            • #7
              thats awesome bonyback
              a great starter script for experimental things too
              bookmarked

              Comment


              • #8
                You don't really need a custom PlayerReplicationInfo and GameReplicationInfo, unless there is specific information for those that you'll need to replicate, that aren't already covered by what's there.

                There's probably not much reason to have your own Input either, for most people.

                Comment


                • #9
                  any tutorials about PlayerReplicationInfo and GameReplicationInfo around?
                  or whats the basic idea behind it?

                  sorry to hijack the thread a bit but its something i cant figure out by looking at script

                  Comment


                  • #10
                    A bit of a statement about the WHY of PRI and GRI first:

                    GameInfo only exists on servers. PlayerController only exists on the client that they belong to, and Pawns do not exist (in normal configurations) at all times on each client. SO, data that network clients need to know about, that you might store in GameInfo, PlayerController, or Pawn, cannot be kept track of reliably on network clients.

                    SO, GameReplicationInfo is a single object spawned to all clients, that is used to hold information about the game that is in play, and PlayerReplicationInfo is used to hold information about the players. They are replicated to all clients, a single GameReplicationInfo, and one instanced PlayerReplicationInfo for each Player that is connected.

                    Comment


                    • #11
                      ok thanks
                      its just for multiplayer

                      so extending from ut stuff, i dont need to wory about pawn location and death and that kind of thing.
                      but if theres some 'custom' thing that other players need to know about it goes in player replication.
                      is that right?

                      game replication seems a bit spaz, doubling up for the sake of it, why not just use the normal game script?

                      Comment


                      • #12
                        In that case, because your Game never exists on the clients, your Controllers only ever exist on the clients that they belong to, and your Pawns and whatever else, only exists when they are actually in view.

                        Comment


                        • #13
                          Hey guys! Thank you all for your replies! Didn't expect to get so many

                          @Bonyback
                          You really helped me here! Now that I have the basics down, I can try and expand into weapons and custom moves on my own It's just what I needed.

                          @Blade
                          I never quite really understood player and game replication but now I have some idea thanks to you.

                          @tegleg
                          Get off my property! Jk I actually wondered about those as well as you can see above.

                          Comment


                          • #14
                            Awesome replies everyone especially BonyBack, was facing the same problem. Thanks a lot
                            Cheers

                            Comment

                            Working...
                            X