Announcement

Collapse
No announcement yet.

UTPawn in IOS Game

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

    UTPawn in IOS Game

    I've been working on a new game, utilizing the UTPawn within the IOS. First thing first, it works. I've used it before a hundred times to test out concepts. But here is the issue i am having now.

    For some reason, when you double jump, it works a few times, then it crashes. The log is huge, and has like 18 lines. Some of the things i am noticing are "MeshPassProcessing" or things dealing with lighting.

    The other thing i am having issues with is that it is a platformer. Once he falls off the edge, it goes into this falling death. Thats fine, but once you hit the screen or a button, where you would usually respawn, nothing happens, you regain control but you arent in control of the pawn any longer.

    #2
    ok, well in order to fix the death part, i just put a bunch of trigger volumes which will teleport the player to the nearest check point.

    As far as the jump so far no answers. For now, i just put the delay on the button for a couple of seconds and it seems to work for now. Double jump would be nice though.....

    Comment


      #3
      Originally posted by OmegaBlue36 View Post
      ok, well in order to fix the death part, i just put a bunch of trigger volumes which will teleport the player to the nearest check point.

      As far as the jump so far no answers. For now, i just put the delay on the button for a couple of seconds and it seems to work for now. Double jump would be nice though.....
      Just out of curiosity, have you actually had this running on an iphone or ipad?
      Or are you just using emulate mobile settings ?

      If the latter, then you might be disappointed!

      Comment


        #4
        No, i had it running on my Ipod touch. I did a first person view, with the gun, then a third person view with the actual robot pawn. It was just very strange that when i jumped, nothing. But the double jump caused all kinds of problems. Not sure why. The only reason i was really worried about it in the first place was to quick concept some games, but i'm thinking the mobile pawn way is the best way, at least with this i can get the animations i want instead of using the default UDK ones.

        BTW, it was the Aug 08 Beta i was using.

        Comment


          #5
          Originally posted by OmegaBlue36 View Post
          No, i had it running on my Ipod touch. I did a first person view, with the gun, then a third person view with the actual robot pawn. It was just very strange that when i jumped, nothing. But the double jump caused all kinds of problems. Not sure why. The only reason i was really worried about it in the first place was to quick concept some games, but i'm thinking the mobile pawn way is the best way, at least with this i can get the animations i want instead of using the default UDK ones.

          BTW, it was the Aug 08 Beta i was using.
          -

          August 08, don't you mean August 2011?

          Yeah I deployed a mini game to iphone with the UTPawn and had no end of problems with it so now I'm sticking with placeable pawns for the moment because of they can have fully customised animations...

          Tutorials for UDK PC and iOS
          http://www.youtube.com/user/lexluthornumber1

          Comment


            #6
            **** china, i can't access youtube . chinese documentation is few.

            Comment


              #7
              Aug 11, yeah. I never figured out why it was doing that, but i decided to go with a mobile placable pawn anyways.

              Comment


                #8
                Originally posted by Lexluthor1 View Post

                Yeah I deployed a mini game to iphone with the UTPawn and had no end of problems with it so now I'm sticking with placeable pawns for the moment because of they can have fully customised animations...
                What type of problems were you having. I'm still messing with this, but i was able to get custom characters, but the problem is when the bots shoot me, it crashes. When i shoot them nothing. We should share notes and see if together we can make it work. I like the whole jazz setup with custom anims, but right now, i just want to be able to shoot and get shot without any issues.

                Comment


                  #9
                  Which game class are you extending? UTGame or SimpleGame?

                  I'm using an extension of UTPawn for my player pawn in a game class extending SimpleGame, and aside from having to override the occasional UTPawn function to avoid calls to objects that exist in a UTGame but don't exist in a SimpleGame I've had no problem with the pawn jumps (or double jumps) in the August 2011 build.

                  Comment


                    #10
                    I was extending UTGame. The problem i found was that it was calling for material instances and what not, which do not exist on mobile platform, causing it to crash. I have looked through the UTPawn code and began pulling out peices that i think need to come out, but i havent found them all just yet. Perhaps i will change to simple game, then try to extend the pawn.

                    How did you delete the call functions? If you can, could you send me your extended UTPawn code? PM maybe.

                    Comment


                      #11
                      My code is a bit twisted and convoluted at the moment, but I'll give you a quick example. For my game I needed to override the TakeFallingDamage function to remove falling damage altogether, but leave the sound effects and such. The UTPawn code has a lot UT specific references that will cause errors at runtime.

                      Code:
                      simulated function TakeFallingDamage()
                      {
                      	local UTPlayerController UTPC;
                      
                      	Super.TakeFallingDamage();
                      
                      	if (Velocity.Z < -0.5 * MaxFallSpeed)
                      	{
                      		UTPC = UTPlayerController(Controller);
                      		if(UTPC != None && LocalPlayer(UTPC.Player) != None)
                      		{
                      			UTPC.ClientPlayForceFeedbackWaveform(FallingDamageWaveForm);
                      		}
                      	}
                      }
                      Hardly any of that looks like the code I wanted, so I stepped up another level and took the code straight from Pawn. Pawn's TakeFallDamage function has no UT specific references, and makes a single call to TakeDamage, so I took the whole function and replaced the TakeDamage with a call to MakeNoise. I make no super.TakeFallDamage calls, so the UTPawn specific code gets skipped altogether.

                      Code:
                      function simulated TakeFallingDamage()
                      {
                      	local float EffectiveSpeed;
                      
                      	if (Velocity.Z < -0.5 * MaxFallSpeed)
                      	{
                      		if ( Role == ROLE_Authority )
                      		{
                      			MakeNoise(1.0);
                      			if (Velocity.Z < -1 * MaxFallSpeed)
                      			{
                      				EffectiveSpeed = Velocity.Z;
                      				if (TouchingWaterVolume())
                      				{
                      					EffectiveSpeed += 100;
                      				}
                      				if (EffectiveSpeed < -1 * MaxFallSpeed)
                      				{
                      					MakeNoise(0.7);
                      				}
                      				}
                      		}
                      	}
                      	else if (Velocity.Z < -1.4 * JumpZ)
                      		MakeNoise(0.5);
                      	else if ( Velocity.Z < -0.8 * JumpZ )
                      		MakeNoise(0.2);
                      }

                      Comment


                        #12
                        I've gone through the UTPawn way to many times. I can't seem to find what i need. for now, I created my own Pawn, based of UDKPawn and my own Camera class.

                        MyPawn:
                        Code:
                        class MyPawn extends UDKPawn;
                        
                        var DynamicLightEnvironmentComponent LightEnvironment;
                        
                        defaultproperties
                        {
                           WalkingPct=+0.4
                           CrouchedPct=+0.4
                           BaseEyeHeight=38.0
                           EyeHeight=38.0
                           GroundSpeed=440.0
                           AirSpeed=440.0
                           WaterSpeed=220.0
                           AccelRate=2048.0
                           JumpZ=322.0
                           CrouchHeight=29.0
                           CrouchRadius=21.0
                           WalkableFloorZ=0.78
                           
                           Components.Remove(Sprite)
                        
                           Begin Object Class=DynamicLightEnvironmentComponent Name=MyLightEnvironment
                              bSynthesizeSHLight=TRUE
                              bIsCharacterLightEnvironment=TRUE
                              bUseBooleanEnvironmentShadowing=FALSE
                           End Object
                           Components.Add(MyLightEnvironment)
                           LightEnvironment=MyLightEnvironment
                        
                           Begin Object Class=SkeletalMeshComponent Name=WPawnSkeletalMeshComponent
                               //Your Mesh Properties
                              SkeletalMesh=SkeletalMesh'CH_LIAM_Cathode.Mesh.SK_CH_LIAM_Cathode'
                              AnimTreeTemplate=AnimTree'CH_AnimHuman_Tree.AT_CH_Human'
                              PhysicsAsset=PhysicsAsset'CH_AnimCorrupt.Mesh.SK_CH_Corrupt_Male_Physics'
                              AnimSets(0)=AnimSet'CH_AnimHuman.Anims.K_AnimHuman_BaseMale'
                              Translation=(Z=8.0)
                              Scale=1.075
                              
                        	//General Mesh Properties
                              bCacheAnimSequenceNodes=FALSE
                              AlwaysLoadOnClient=true
                              AlwaysLoadOnServer=true
                              bOwnerNoSee=false
                              CastShadow=true
                              BlockRigidBody=TRUE
                              bUpdateSkelWhenNotRendered=false
                              bIgnoreControllersWhenNotRendered=TRUE
                              bUpdateKinematicBonesFromAnimation=true
                              bCastDynamicShadow=true
                              RBChannel=RBCC_Untitled3
                              RBCollideWithChannels=(Untitled3=true)
                              LightEnvironment=MyLightEnvironment
                              bOverrideAttachmentOwnerVisibility=false
                              bAcceptsDynamicDecals=FALSE
                              bHasPhysicsAssetInstance=true
                              TickGroup=TG_PreAsyncWork
                              MinDistFactorForKinematicUpdate=0.2
                              bChartDistanceFactor=true
                              RBDominanceGroup=20
                              bUseOnePassLightingOnTranslucency=TRUE
                              bPerBoneMotionBlur=true
                           End Object
                           Mesh=WPawnSkeletalMeshComponent
                           Components.Add(WPawnSkeletalMeshComponent)
                           WeaponAttachmentSocketName=WeaponPoint
                        
                        	InventoryManagerClass=class'UTInventoryManager'
                        
                        	MeleeRange=+20.0
                        	bMuffledHearing=true
                        
                        	Buoyancy=+000.99000000
                        	UnderWaterTime=+00020.000000
                        	bCanStrafe=True
                        	bCanSwim=true
                        	RotationRate=(Pitch=20000,Yaw=20000,Roll=20000)
                        	AirControl=+0.35
                        	bCanCrouch=true
                        	bCanClimbLadders=True
                        	bCanPickupInventory=True
                        	SightRadius=+12000.0   
                        
                              Begin Object Name=CollisionCylinder
                              CollisionRadius=+0021.000000
                              CollisionHeight=+0044.000000
                           End Object
                           CylinderComponent=CollisionCylinder
                        
                        
                        }
                        My Gametype extends UDKGame. With SimpleGame, the pawn doesn't seem to show. Now my issue is having weapons. I cant seem to get them to become visible. The great thing about this method is that i am not having to deal with any of the post process or calls to functions not supported on mobile.

                        Comment


                          #13
                          Originally posted by OmegaBlue36 View Post
                          What type of problems were you having. I'm still messing with this, but i was able to get custom characters, but the problem is when the bots shoot me, it crashes. When i shoot them nothing. We should share notes and see if together we can make it work. I like the whole jazz setup with custom anims, but right now, i just want to be able to shoot and get shot without any issues.
                          Its largely to do with bone influences I think on the UTPawn...Some not really supported by iOS...Then a whole host of other problems because of the nature of the class system for UTPawn and links in with team play and various other things!

                          I can't go into specifics because there were just too many issues..

                          My advice would be to avoid UTPawn and traditional bots and set-up your own system maybe using Placeable pawns and crowd agents as enemies because they can be controlled much easier and require no additional scripting...



                          Seek And Destroy Games
                          Tutorials for UDK PC and iOS
                          http://www.youtube.com/user/lexluthornumber1

                          Comment


                            #14
                            Yeah, i am starting to realize that. I have been able to get the pawn working, but what i would really like is to be able to push out a tps with a mobile placable pawn, with aiming connected to the camera.

                            I was able to extend UDKGame, extend UT pawn, but override it to run my own skeletal mesh and leave out all the effects, then created my own inventory, weapons and what not, but then when i play it.....its just a mess. It ran, but it was firstperson/thirdperson and i was looking 'through' the mesh!!!
                            I hope Epic decides to figure out how to make this work. The thing is i've seen the Desert Zombie trailer and i keep trying to figure out how they did it.

                            I'm pretty sure that saw a camera tutorial that someone modified to change the LookStick mimic fps aiming.

                            Comment


                              #15
                              Originally posted by OmegaBlue36 View Post
                              Yeah, i am starting to realize that. I have been able to get the pawn working, but what i would really like is to be able to push out a tps with a mobile placable pawn, with aiming connected to the camera.

                              I was able to extend UDKGame, extend UT pawn, but override it to run my own skeletal mesh and leave out all the effects, then created my own inventory, weapons and what not, but then when i play it.....its just a mess. It ran, but it was firstperson/thirdperson and i was looking 'through' the mesh!!!
                              I hope Epic decides to figure out how to make this work. The thing is i've seen the Desert Zombie trailer and i keep trying to figure out how they did it.

                              I'm pretty sure that saw a camera tutorial that someone modified to change the LookStick mimic fps aiming.



                              They could of scripted it completely..

                              If you look at 'Dungeon Defenders' by Trendy Games Jeremy Steiglitz scripted the entire game....



                              Seek And Destroy Games
                              Tutorials for UDK PC and iOS
                              http://www.youtube.com/user/lexluthornumber1

                              Comment

                              Working...
                              X