• Advertisement
  • Popular Tags

  • Popular Now

  • Advertisement
  • Similar Content

    • By eldwin11929
      We're looking for a Unity (C#) Programmer for our 2D Project. We're looking for a new lead programmer to continue with an existing project.
       
      Project is an open-world RTS, and is very close to a prototyping (playable) phase. Our existing lead, unfortunately, has no more time for the project, and thus we are in search of a new one who is interested.
       
      Game is purely fantasy based, and we'll be able to give you much more detailed info about the project as we begin to work you into it.
       
      You'll be working with our junior developer, who has been here since the beginning.
       
      Primary skills needed are just being able to work within Unity. But skills within XML are also a plus.
       
      Our list of major goals we'd need you to do is minimal, yet still fairly extensive:
      -Edit our current Pathfinding system to account for a few extra features.
      -Setup our global map system. You’ll be working off an existing random node-map web generator and existing random map generation system and essentially linking the two together. This includes handling random spawns (which has already been semi-setup) unique to each node’s respective map.
      -Further implementation of an existing random spawning algorithm (used to spawn things like enemies randomly across the Map).
      -Making sure to Save and Record all respective aspects of what was mentioned above.
      -Handling our XML database- database is created, but we’ll need to be integrating it. This includes all various things from units to abilities and so forth. Will also need to handle implementing an object’s unique attributes we cannot take care of within XML.
      -Various Content Implementation (to be done once our XML has been integrated).
      -Various Saving and Recording of all respective aspects of the database info mentioned above.
      -Various Performance Enhancements.
      -Potential for various misc things, such as further UI work.
      -Setting up a Menu system.
       
      We have a considerable amount of things done already- however I must warn ahead of time we have quite a bit of unclean code, which may be fairly overwhelming for a new developer on the project.
       
      Let me know your rates per hour, and we'll see if we can work out a good deal between both of us. Royalties are also included.
       
      If interested, send an email to: eldwin11929@yahoo.com
       
      Thanks!
    • By jhocking
      My bestselling and highly recommended Unity book has been fully revised! Unity in Action, Second Edition teaches you to write and deploy games with the Unity game development platform. You'll master the Unity toolset from the ground up, adding the skills you need to go from application coder to game developer.

      Foreword by Jesse Schell, author of The Art of Game Design

      Don't take my word for it being good, look at the sky-high ratings on GoodReads.

      You can order the ebook directly from the publisher's site, or order the book on Amazon to get both the physical book and a coupon to download the ebook!
    • By ThunderTwonk
      Hello everyone, I am working on a game idea and since I am still in the process of learning C# and the features available in unity I was hoping some of you might be able to offer me a little insight on things in general for getting started.
      I guess the basic components of what I'm wanting to create would be a Multi-levels management/city builder/rpg.
      The goal is to provide a framework for players to interact with, build in and affect the world both from a 3rd person action RPG as well as a zoomed out 4x style view (This would be something unlocked through gameplay)
       
      As for my questions go I was wondering if anyone had resources that could help me learn.  I've been on youtube as well as enrolled in an online course for basic unity and C# and will continue those but if anyone has any words of advice, a place that has good information and tutorials etc.
       
      Thanks for your time.
    • By Cahit Karahan

       
      Hi, I'm new in this forum. It is honorable to see such communities exist. I would like to share my new game. I did for android with unity. I know the game is a little awkward , but you have to know that this game is from the time when Unity's name is Unity3D  I have made my first game when I was 12. Now I am 22.  I have taken a lot of experience in this process and I can make better games nowadays. I have published this game nowadays but actually this game is very old but also it is very special for me :))
      I have just wanted to retouch and share this game, because it has a very important place for me.
       
      DESCRIPTION FROM GOOGLE PLAY STORE

      It's a special free 3D horror adventure action game for the halloween. Fun with scary sound effects and musics, 3D realistic graphics, you will feel the horror in the deep of your heart. Use your reflex. Totally free adventure. Totally scary horror game. 

      Tamarra, she is a beast from our world. She needs to consume souls from innocent people to stay alive. Story begins, the old Elaris tribe had lost their everything because of this beast who lived in the well. Araknas was the most powerful warrior of the tribe. One day, Araknas's mother was killed by the servant beasts of Tamarra. That's how Araknas's journey to the well begins. Tamara's well is guarded by horrible beasts. Araknas has to pass all servant beasts until he reaches Tamarra.

      Even death at the end is worth the revenge. 
      Are you brave enough to jump into Tamarra's well?

      Survive from witch attacks, clown attacks and many scary creature.

      - Realistic 3D graphics.
      - Scary sounds.
      - Scary musics.
      - Best experience with headphones.
      - A demon cage where you can imprison all the demons one by one
      - The witches do not like help, but they love blood stone. Witch store where you can develop your abilities and get new abilities.
      - Countless beasts.
      - At the end of the well there is a hidden surprise for you.

      *We do not recommend this game to people with clown phobia, spider phobia, or panic attacks.*

      **!!!**Note : This game is an early-access game, we are upgrading new features every day, new beasts, new improvements, as an example online 1vs1 fall on the list, so stay on connect and follow Halloween : Horror Well on Google Play.**!!!**

    • By INFRA
      SCAN. DRILL. SURVIVE.   ISOLATED Release in May 1st 2018   https://store.steampowered.com/app/805950/Isolated/   A game by Jérémie Bertrand Music & Sound Design by Pierrick Querolle *** Our solar system has been invaded by strangers. For the purpose of a possible negotiation, a team of astronauts is sent to the moon. Alas, they are shot before even arriving on the scene. Only one astronaut survives the crash and his only goal will be to go home...   GAMEPLAY   Shoot enemy ships to avoid being invaded. Be precise in your movements, because it's better to lose a bit of life at the top than to lose it all at the bottom. Take out your drill to destroy the stones in your path. Validate your identity to cross the different laboratories. Reach the flag before losing your three lives.   And all that... at the same time! Will you be able to go home? If the answer is yes, how long will it take?
  • Advertisement
  • Advertisement
Sign in to follow this  

Unity Game Object Update Order

This topic is 667 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey guys, I wanted to get an opinion on how some of you guys handle game object update order. Do you guys just go through the list and say "screw dependencies" like Cryengine/Unity, or do you use dependency graphs like UE4/Killzone Engine. Thanks

Share this post


Link to post
Share on other sites
Advertisement

Well off of my the top of my head I can think of two dependencies that might be in an engine. Lets say you have a MovementComponent and a SkinnedMeshComponent. (My component model is similar to UE4 in that I have primitive components that have transforms (i.e SkinnedMeshComponent) and logic components , like MovementComponent). The movement components job is to update the SkinnedMeshComponents transform prior to animation evaluation. Because of this, the MovementComponent should run prior to the SkinnedMeshComponent. Another dependency is based on children. If one component, lets say a player, is on a vehicle.. the vehicle should update first.

Share this post


Link to post
Share on other sites

True dependencies are actually pretty rare in most game logic, in my experience. If your update code is highly order-dependent you might consider using different methods that aren't so fragile.

 

In this rare case I have to strongly disagree with Apoch unless I'm miss-reading the intentions here or I'm reading more into the question than he was..  Everything is about order and in fact the OP is incorrect about Unity, there is order control built in, you can tell the engine the order of execution you want.  Additionally, when it comes to the future with multi-core, without execution order control you simply can't effectively utilize current CPU's.  (Well, not that I know of 'effectively'.)  I don't disagree in that it *can* be fragile, but it is much like bad patterns in C++, you learn to avoid the parts that cause issues.

 

Having said that, let me rephrase it so the negatives have some context.  Unity has ordering in terms that you can control which 'components' execute before other components.  I think they call this the priority system or something like that.  The purpose in Unity seems to be making sure that an AI update component can complete making decisions before any movement is calculated in that frame.  This is fairly trivial common sense behavior I would think.  But, perhaps, what Apoch was suggesting is that this is 'system' level dependency and not individual object to object relationship dependency.  What I mean is that i always update AI before physics, I can apply impulses via the AI and have those acted on when physics updates, I never try to interleave AI and physics, this is *system* level dependency.  The other, bad, option is that I write a follow behavior that executes at the same time as the AI for the object I'm following, well, which one updates first changes the behavior of follow since I could be following last frame or next frame's position.  It's just bad news.

 

So, depending on the OP's intentions, dependency always matters.  It depends on where you apply it as to if it is a problem or not.

Share this post


Link to post
Share on other sites

Well the reason I don't want to do a hard coded version like

for( auto* MovementComponent ..)

{

 

}

for( auto* SkinnedMeshComponent)

{

 

}

is that in some cases, a skinned mesh component isn't being modified by a movementcomponent. Or there are hundreds of different scenarios, like maybe update this CrowdComponent, then update this movement component.. then do a post update of componentY and X. So I don't want a hardcoded scenario of spaghetti code and am leading more towards a generic approach like killzone/UE4. I understand how to build a well balanced dependency graph, I was just asking if anyone else actually does a dependency graph system, or if you guys just haven't found enough reasons to use one in a multithreaded environment

Share this post


Link to post
Share on other sites

I believe you may have misinterpretated what I stated AllEight . I understand that there is some type of dependency , like AI->Physics->GameObjects... etc. But I was speaking about the fact that Unity doesn't state that a parent game object will be updated prior to a child game object.

Share this post


Link to post
Share on other sites

Well the deal is that Killzone uses the dependency graph to thread it's entities. And this is a really terrible way to go about things, as most of the dependencies are honestly weak. Unreal uses the Dependency Graph to schedule tasks, but it's unrelated to the game logic. The Documentation even tells you that UE4 is single threaded, and is order independent. It will probably have use in any choreographed scene... but other wise... no.

 

Well off of my the top of my head I can think of two dependencies that might be in an engine. Lets say you have a MovementComponent and a SkinnedMeshComponent. (My component model is similar to UE4 in that I have primitive components that have transforms (i.e SkinnedMeshComponent) and logic components , like MovementComponent). The movement components job is to update the SkinnedMeshComponents transform prior to animation evaluation. Because of this, the MovementComponent should run prior to the SkinnedMeshComponent. Another dependency is based on children. If one component, lets say a player, is on a vehicle.. the vehicle should update first.

There is no dependency between the Movement and Skinned component. If you somehow got a dependency between the two, you're doing something terribly wrong. The skinned component, which I assumed is a skinned mesh, can be triggered by literally anything, and has no direct ties to anyone's system. Therefore, it's simply a message listener.

The only thing that a skinned component would honestly be dependent on, is the world transform of an object. A movement component should not be responsible for that, because that's part of any object that occupies a volume in space, whether it moves or not. This is why Unreal hard codes it into a number of their objects.

Edited by Tangletail

Share this post


Link to post
Share on other sites

I've actually looked into the task scheduler system for UE4 and at the beginning of the frame it goes through all registered FTickFunctions in a function like this


TArray<FTickFunction*> TicksThisFrame;


for(TickFunction* Function = Level->AllTickFunctions)
{
   for(FTickPrerequesite& TickPrequitie : Function->Prerequesites)
  { 
    //has already been registered for updating
     if(TickPrereq.UpdateFrame == Level->CurrentTickFrame)
      continue;

   //register this prerequesite first
      TickPrereq.Function->RegisterPrerequesites(TicksthisFrame);
  } 

   //now register this tick
   if(Function.UpdateFrame != Level->CurrentTick)
       TicksThisFrame.Push(Function);

  //update the cached frame
  Function.UpdateFrame = Level->CurrentTick;

}

So idk how it can't be related to game logic. The dependency between the skinned mesh component and the movement component exists because the movement component must modify the world transform of the skinned mesh component before the animation composite pass, where the skinned mesh component finally generates it's world space bone matrices. There are other dependencies that may exist in the engine, but this was just one I came up with, because UE4 has a similar system where the movement component is updated prior to the RootComponent so movement updates aren't a frame behind.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement