GPWiki.org
GPWiki.org
It is currently Thu Jun 20, 2013 11:59 am

All times are UTC




Post new topic Reply to topic  [ 187 posts ]  Go to page Previous  1 ... 6, 7, 8, 9, 10  Next
Author Message
 Post subject:
PostPosted: Tue Jan 02, 2007 5:35 pm 
Paraskavedekatriaphobic

Joined: Sat Aug 27, 2005 12:24 pm
Posts: 1325
Location: aaaaaaaaaaaaaa
Machaira wrote:
T-1 wrote:
Machaira wrote:
tools for creating data (items, quests, conversations, etc.), level designs (could even be on grid paper at this point), NPC creation (data wise - stats, skills, items, etc).

if this is XNA and open source, I see no reason to put that stuff in data files, just make them "hardcoded" (not really though, it's open source) separate subclasses like the Unreal Engine.

Huh?!? It being XNA and open source has nothing to do with data. Stuff like this should not be in compiled code.

why not?

The point of separating it out is to allow modification, isn't it? If it's open source and in a language that has a free compiler available then I don't see why it shouldn't be in source.
An item editor, npc editor, etc. all take plenty of time and energy to code, in addition to having to code the game to load up the data files. It all seems rather pointless to me.

_________________
aaaaaaaaaaaaaaaaaaa


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 02, 2007 5:56 pm 
King Code Monkey
User avatar

Joined: Wed Sep 01, 2004 3:05 pm
Posts: 11200
Location: Abingdon, MD
T-1 wrote:
Machaira wrote:
T-1 wrote:
Machaira wrote:
tools for creating data (items, quests, conversations, etc.), level designs (could even be on grid paper at this point), NPC creation (data wise - stats, skills, items, etc).

if this is XNA and open source, I see no reason to put that stuff in data files, just make them "hardcoded" (not really though, it's open source) separate subclasses like the Unreal Engine.

Huh?!? It being XNA and open source has nothing to do with data. Stuff like this should not be in compiled code.

why not?

Mainly because every time you change 1 character of data you have to recompile the project. That's stupid. The data is going to have to be tweaked during testing so will change often.

T-1 wrote:
The point of separating it out is to allow modification, isn't it? If it's open source and in a language that has a free compiler available then I don't see why it shouldn't be in source.
An item editor, npc editor, etc. all take plenty of time and energy to code, in addition to having to code the game to load up the data files. It all seems rather pointless to me.

Well, you could do it by hand, but that's very error-prone. With serialization loading and saving data is a couple of lines of code.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 02, 2007 8:02 pm 
Jive Turkey
User avatar

Joined: Mon Aug 15, 2005 6:20 pm
Posts: 614
Location: Illinois, USA
Trust me, Machaira's right. I've often gone well out of my way to load stuff from a file just so I can tinker with it faster. It makes a difference in overall quality of the game.

_________________
"You are what you eat." –A cannibal


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 02, 2007 8:37 pm 
King Code Monkey
User avatar

Joined: Wed Sep 01, 2004 3:05 pm
Posts: 11200
Location: Abingdon, MD
There's a huge difference in the data requirements between a shooter (Unreal engine) and an RPG. In the former you can hardcode data since there's not that much. In an RPG there's orders or magnitude more data. It just doesn't make sense.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 02, 2007 10:23 pm 
Babirusa
User avatar

Joined: Thu Aug 19, 2004 2:55 pm
Posts: 9241
Location: The Netherlands
Machaira wrote:
There's a huge difference in the data requirements between a shooter (Unreal engine) and an RPG. In the former you can hardcode data since there's not that much. In an RPG there's orders or magnitude more data. It just doesn't make sense.


you haven't recompiled unrealscript, I see. I wonder how many times Epic recompiled the bas actor class because it has hard coded stuff in it... :rolleyes

_________________
Serious game developer

http://www.persistentrealities.com
http://www.persistentrealities.com/vbfibre
http://www.ambiances.nl


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 02, 2007 11:07 pm 
Paraskavedekatriaphobic

Joined: Sat Aug 27, 2005 12:24 pm
Posts: 1325
Location: aaaaaaaaaaaaaa
Machaira wrote:
There's a huge difference in the data requirements between a shooter (Unreal engine) and an RPG. In the former you can hardcode data since there's not that much. In an RPG there's orders or magnitude more data. It just doesn't make sense.

Are you aware of how many games run the Unreal Engine? Are you aware of how many of those games are not FPSes, but RPGs? Deus Ex and Mass Effect come to mind on first hand, and there are others.

Almar Joling wrote:
you haven't recompiled unrealscript, I see. I wonder how many times Epic recompiled the bas actor class because it has hard coded stuff in it... :rolleyes

100% of everything requires recompilation.

Mr. Awesome wrote:
Trust me, Machaira's right. I've often gone well out of my way to load stuff from a file just so I can tinker with it faster. It makes a difference in overall quality of the game.

It'd take more time to have to load up an item editor than to just hit the compile button.

_________________
aaaaaaaaaaaaaaaaaaa


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 12:17 am 
King Code Monkey
User avatar

Joined: Wed Sep 01, 2004 3:05 pm
Posts: 11200
Location: Abingdon, MD
T-1 wrote:
Machaira wrote:
There's a huge difference in the data requirements between a shooter (Unreal engine) and an RPG. In the former you can hardcode data since there's not that much. In an RPG there's orders or magnitude more data. It just doesn't make sense.

Are you aware of how many games run the Unreal Engine? Are you aware of how many of those games are not FPSes, but RPGs? Deus Ex and Mass Effect come to mind on first hand, and there are others.

And how many of them have all the data hard-coded? I wasn't talking so much about the engine as the genre.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 1:08 am 
Paraskavedekatriaphobic

Joined: Sat Aug 27, 2005 12:24 pm
Posts: 1325
Location: aaaaaaaaaaaaaa
Machaira wrote:
And how many of them have all the data hard-coded?

all of them.

_________________
aaaaaaaaaaaaaaaaaaa


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 1:36 am 
Jive Turkey
User avatar

Joined: Mon Aug 15, 2005 6:20 pm
Posts: 614
Location: Illinois, USA
T-1 wrote:
Mr. Awesome wrote:
Trust me, Machaira's right. I've often gone well out of my way to load stuff from a file just so I can tinker with it faster. It makes a difference in overall quality of the game.

It'd take more time to have to load up an item editor than to just hit the compile button.
\
Sure, if you just hit the compile button once. ;)

But now you guys are talking about scripting I think, which if it is separated from the engine is a very good idea.

_________________
"You are what you eat." –A cannibal


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 3:34 am 
Super Donkey Monkey Wrestler

Joined: Wed Oct 20, 2004 8:15 pm
Posts: 951
Location: Saskatchewan
Open source is a good reason to separate data from code because everybody can see your code and they will laugh at your hardcoding :lol.

_________________
Ryan

"What difference does it make to the dead, the orphans, and the homeless, whether the mad destruction is wrought under the name of totalitarianism or the holy name of liberty and democracy?" - Gandhi


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 6:06 am 
King Code Monkey
User avatar

Joined: Wed Sep 01, 2004 3:05 pm
Posts: 11200
Location: Abingdon, MD
T-1 wrote:
Machaira wrote:
And how many of them have all the data hard-coded?

all of them.

Wow! You got ahold of Mass Effect's source code. Sweet! Share with us. :) I gotta call B.S. on this one. ;) :lol


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 12:20 pm 
Game Programming Guru

Joined: Thu Jun 08, 2006 7:48 pm
Posts: 1248
Location: Scotland
sik0fewl wrote:
Open source is a good reason to separate data from code because everybody can see your code and they will laugh at your hardcoding :lol.


:lol :lol It's so true.

I would like to think if I finished something I'd make it open source, but I really wouldn't because the code would be embarrassing. :O :lol


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 1:54 pm 
Babirusa
User avatar

Joined: Thu Aug 19, 2004 2:55 pm
Posts: 9241
Location: The Netherlands
I believe most game developers use Excel sheets. Atleast ,that's what I read on Gamaustra a while ago ;).

_________________
Serious game developer

http://www.persistentrealities.com
http://www.persistentrealities.com/vbfibre
http://www.ambiances.nl


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 2:30 pm 
Paraskavedekatriaphobic

Joined: Sat Aug 27, 2005 12:24 pm
Posts: 1325
Location: aaaaaaaaaaaaaa
Machaira wrote:
T-1 wrote:
Machaira wrote:
And how many of them have all the data hard-coded?

all of them.

Wow! You got ahold of Mass Effect's source code. Sweet! Share with us. :) I gotta call B.S. on this one. ;) :lol

It's pretty safe to assume this since it is unreal engine, considering that every one game that came before it using that engine did that .

_________________
aaaaaaaaaaaaaaaaaaa


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 2:41 pm 
King Code Monkey
User avatar

Joined: Wed Sep 01, 2004 3:05 pm
Posts: 11200
Location: Abingdon, MD
You know what happens when you assume, right? ;) :lol How do you know that every Unreal engine game hard-coded data?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 5:54 pm 
Babirusa
User avatar

Joined: Thu Aug 19, 2004 2:55 pm
Posts: 9241
Location: The Netherlands
Machaira wrote:
You know what happens when you assume, right? ;) :lol How do you know that every Unreal engine game hard-coded data?


Cause you can just open UnrealEd and see nearly everything?

Code:
function PickDestination()
   {
      local inventory Inv, BestInv;
      local float Bestweight, NewWeight, DroppedDist;
      local actor BestPath;
      local decoration Dec;
      local NavigationPoint N;
      local int i;
      local bool bTriedToPick, bLockedAndLoaded, bNearPoint;
      local byte TeamPriority;
      local Pawn P;

      bCanTranslocate = ( Level.Game.IsA('DeathMatchPlus') && DeathMatchPlus(Level.Game).CanTranslocate(self) );
      if ( Level.Game.IsA('TeamGamePlus') )
      {
         if ( (Orders == 'FreeLance') && !bStayFreelance
             &&   (Orders != BotReplicationInfo(PlayerReplicationInfo).RealOrders) )
            SetOrders(BotReplicationInfo(PlayerReplicationInfo).RealOrders, BotReplicationInfo(PlayerReplicationInfo).RealOrderGiver, true);
         if ( FRand() < 0.5 )
            bStayFreelance = false;
         LastAttractCheck = Level.TimeSeconds - 0.1;
         if ( TeamGamePlus(Level.Game).FindSpecialAttractionFor(self) )
         {
            if ( IsInState('Roaming') )
            {
               TeamPriority = TeamGamePlus(Level.Game).PriorityObjective(self);
               if ( TeamPriority > 16 )
               {
                  PickLocalInventory(160, 1.8);
                  return;
               }
               else if ( TeamPriority > 1 )
               {
                  PickLocalInventory(200, 1);
                  return;
               }
               else if ( TeamPriority > 0 )
               {
                  PickLocalInventory(280, 0.55);
                  return;
               }
               PickLocalInventory(400, 0.5);
            }
            return;
         }
      }
      bLockedAndLoaded = ( (Weapon.AIRating > 0.4) && (Health > 60) );

      if (  Orders == 'Follow' )
      {
         if ( Pawn(OrderObject) == None )
            SetOrders('FreeLance', None);
         else if ( (Pawn(OrderObject).Health > 0) )
         {
            bNearPoint = CloseToPointMan(Pawn(OrderObject));
            if ( !bNearPoint )
            {
               if ( !bLockedAndLoaded )
               {
                  bTriedToPick = true;
                  if ( PickLocalInventory(600, 0) )
                     return;

                  if ( !OrderObject.IsA('PlayerPawn') )
                  {
                     BestWeight = 0;
                     BestPath = FindBestInventoryPath(BestWeight, !bNovice && (skill >= 2));
                     if ( BestPath != None )
                     {
                        MoveTarget = BestPath;
                        return;
                     }
                  }
               }            
               if ( ActorReachable(OrderObject) )
                  MoveTarget = OrderObject;
               else
                  MoveTarget = FindPathToward(OrderObject);
               if ( (MoveTarget != None) && (VSize(Location - MoveTarget.Location) > 2 * CollisionRadius) )
                  return;
               if ( (VSize(OrderObject.Location - Location) < 1600) && LineOfSightTo(OrderObject) )
                  bNearPoint = true;
               if ( bVerbose )
                  log(self$" found no path to "$OrderObject);
            }
            else if ( !bInitLifeMessage && (Pawn(OrderObject).Health > 0)
                     && (VSize(Location - OrderObject.Location) < 500) )
            {
               bInitLifeMessage = true;
               SendTeamMessage(Pawn(OrderObject).PlayerReplicationInfo, 'OTHER', 3, 10);
            }
         }
      }
      if ( (Orders == 'Defend') && bLockedAndLoaded )
      {
         if ( PickLocalInventory(300, 0.55) )
            return;
         if ( FindAmbushSpot() )
            return;
         if ( !LineOfSightTo(OrderObject) )
         {
            MoveTarget = FindPathToward(OrderObject);
            if ( MoveTarget != None )
               return;
         }
         else if ( !bInitLifeMessage )
         {
            bInitLifeMessage = true;
            SendTeamMessage(None, 'OTHER', 9, 10);
         }
      }

      if ( (Orders == 'Hold') && bLockedAndLoaded && !LineOfSightTo(OrderObject) )
      {
         GotoState('Hold');
         return;
      }

      if ( !bTriedToPick && PickLocalInventory(600, 0) )
         return;

      if ( (Orders == 'Hold') && bLockedAndLoaded )
      {
         if ( VSize(Location - OrderObject.Location) < 20 )
            GotoState('Holding');
         else
            GotoState('Hold');
         return;
      }

      if ( ((Orders == 'Follow') && (bNearPoint || (Level.Game.IsA('TeamGamePlus') && TeamGamePlus(Level.Game).WaitForPoint(self))))
         || ((Orders == 'Defend') && bLockedAndLoaded && LineOfSightTo(OrderObject)) )
      {
         if ( FRand() < 0.35 )
            GotoState('Wandering');
         else
         {
            CampTime = 0.8;
            GotoState('Roaming', 'Camp');
         }
         return;
      }

      if ( (OrderObject != None) && !OrderObject.IsA('Ambushpoint') )
         bWantsToCamp = false;
      else if ( (Weapon.AIRating > 0.5) && (Health > 90) && !Region.Zone.bWaterZone )
      {
         bWantsToCamp = ( bWantsToCamp || (FRand() < CampingRate * FMin(1.0, Level.TimeSeconds - LastCampCheck)) );
         LastCampCheck = Level.TimeSeconds;
      }
      else
         bWantsToCamp = false;

      if ( bWantsToCamp && FindAmbushSpot() )
         return;

      // if none found, check for decorations with inventory
      if ( !bNoShootDecor )
         foreach visiblecollidingactors(class'Decoration', Dec, 500,,true)
            if ( Dec.Contents != None )
            {
               bNoShootDecor = true;
               Target = Dec;
               GotoState('Roaming', 'ShootDecoration');
               return;
            }

      bNoShootDecor = false;
      BestWeight = 0;

      // look for long distance inventory
      BestPath = FindBestInventoryPath(BestWeight, !bNovice && (skill >= 2));
      //log("roam to"@BestPath);
      //log("---------------------------------");
      if ( BestPath != None )
      {
         MoveTarget = BestPath;
         return;
      }

      // nothing around - maybe just wait a little
      if ( (FRand() < 0.35) && bNovice
         && (!Level.Game.IsA('DeathMatchPlus') || !DeathMatchPlus(Level.Game).OneOnOne())  )
      {
         GoalString = " Nothing cool, so camp ";
         CampTime = 3.5 + FRand() - skill;
         GotoState('Roaming', 'Camp');
      }

      // if roamed to ambush point, stay there maybe
      if ( (AmbushPoint(RoamTarget) != None)
         && (VSize(Location - RoamTarget.Location) < 2 * CollisionRadius)
         && (FRand() < 0.4) )
      {
         CampTime = 4.0;
         GotoState('Roaming', 'LongCamp');
         return;
      }

      // hunt player
      if ( (!bNovice || (Level.Game.IsA('DeathMatchPlus') && DeathMatchPlus(Level.Game).OneOnOne()))
         && (Weapon.AIRating > 0.5) && (Health > 60) )
      {
         if ( (PlayerPawn(RoamTarget) != None) && !LineOfSightTo(RoamTarget) )
         {
            BestPath = FindPathToward(RoamTarget);
            if ( BestPath != None )
            {
               MoveTarget = BestPath;
               return;
            }
         }
         else
         {
            // high skill bots go hunt player
            for ( P=Level.PawnList; P!=None; P=P.NextPawn )
               if ( P.bIsPlayer && P.IsA('PlayerPawn')
                  && ((VSize(P.Location - Location) > 1500) || !LineOfSightTo(P)) )
               {
                  BestPath = FindPathToward(P);
                  if ( BestPath != None )
                  {
                     RoamTarget = P;
                     MoveTarget = BestPath;
                     return;
                  }
               }
         }
         bWantsToCamp = true; // don't camp if couldn't go to player
      }
      
      // look for ambush spot if didn't already try
      if ( !bWantsToCamp && FindAmbushSpot() )
      {
         RoamTarget = AmbushSpot;
         return;
      }
      
      // find a roamtarget
      if ( RoamTarget == None )
      {
         i = 0;
         for ( N=Level.NavigationPointList; N!=None; N=N.NextNavigationPoint )
            if ( N.IsA('InventorySpot') )
            {
               i++;
               if ( (RoamTarget == None) || (Rand(i) == 0) )
                  RoamTarget = N;
            }
      }   

      // roam around
      if ( RoamTarget != None )
      {
         if ( ActorReachable(RoamTarget) )
         {
            MoveTarget = RoamTarget;
            RoamTarget = None;
            if ( VSize(MoveTarget.Location - Location) > 2 * CollisionRadius )
               return;
         }
         else
         {
            BestPath = FindPathToward(RoamTarget);
            if ( BestPath != None )
            {
               MoveTarget = BestPath;
               return;
            }
            else
               RoamTarget = None;
         }
      }
                                    
       // wander or camp
      if ( FRand() < 0.35 )
         GotoState('Wandering');
      else
      {
         GoalString = " Nothing cool, so camp ";
         CampTime = 3.5 + FRand() - skill;
         GotoState('Roaming', 'Camp');
      }
   }

_________________
Serious game developer

http://www.persistentrealities.com
http://www.persistentrealities.com/vbfibre
http://www.ambiances.nl


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 6:46 pm 
King Code Monkey
User avatar

Joined: Wed Sep 01, 2004 3:05 pm
Posts: 11200
Location: Abingdon, MD
That's UT, right? That's not what I'm talking about. Show me all the conversation text in Deus Ex hard-coded for example.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 9:13 pm 
Jive Turkey
User avatar

Joined: Mon Aug 15, 2005 6:20 pm
Posts: 614
Location: Illinois, USA
But isn't that actually a script, interpreted at runtime? That's totally different than hardcoding the data into the executable.

_________________
"You are what you eat." –A cannibal


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 9:26 pm 
Babirusa
User avatar

Joined: Thu Aug 19, 2004 2:55 pm
Posts: 9241
Location: The Netherlands
Mr. Awesome wrote:
But isn't that actually a script, interpreted at runtime? That's totally different than hardcoding the data into the executable.


UT exists of some native DLL's and the rest is compiled from UnrealScript.

I do not have Dues Ex, I'm afraid.

_________________
Serious game developer

http://www.persistentrealities.com
http://www.persistentrealities.com/vbfibre
http://www.ambiances.nl


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 9:39 pm 
Jive Turkey
User avatar

Joined: Mon Aug 15, 2005 6:20 pm
Posts: 614
Location: Illinois, USA
Almar Joling wrote:
Mr. Awesome wrote:
But isn't that actually a script, interpreted at runtime? That's totally different than hardcoding the data into the executable.


UT exists of some native DLL's and the rest is compiled from UnrealScript.

I see. So the advantage of UnrealScript is that it allows you to change the game without having to recompile the core engine, but you do still have to recompile the scripts.

In the case of PC, you guys might want to move your "hardcoding" to a script perhaps, I know Boost.Python allows easy scripting with Python, and Lua is another good language that you guys have some familiarity with. Keep in mind that not everything can be hardcoded easily; a lot of times you'll need an editor to get the best results (ie levels, though thats a rather extreme example).

_________________
"You are what you eat." –A cannibal


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 187 posts ]  Go to page Previous  1 ... 6, 7, 8, 9, 10  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group