Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Fractured State

Discussion in 'Works In Progress - Archive' started by KelsoMRK, Jun 26, 2012.

  1. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
    Fractured State is a Real Time Strategy game that chronicles a civil war in the fictitious nation of Laperia. Battles will take place largely in urban settings and make heavy use of cover mechanics. Our goal is move away from the actions-per-minute centric focuses of games like StarCraft 2 and the later Command and Conquer games.

    We're also making this game fully moddable. We're bypassing much of the Unity workflow and are instead loading almost all of our game data at run time. This means that anyone who wants to make content for our game will be able to do so in a relatively straight forward manner. The Mod Tools are built directly into the game and will allow users to create materials and preview them on models, create particle systems, as well as create new maps either for the base game or for their mods.

    We're on Greenlight!


    Vote for us!

    Assets

    Concept Art








     
    Last edited: Jul 26, 2016
    RavenOfCode and calmcarrots like this.
  2. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
    Since Todd did such a good job of cleansing the palette last week with some awesome architectural concept art I figured I would muck it up again with some programmer art that looks like it's straight out of a PowerPoint presentation from 1994. So, onward and upward!

    After spending so much time working on the Editor I wanted to finally start building some systems that will make their way into the final game. As I said, we've got some mechanics laid out on paper and I am really anxious to start implementing them and iterating on their designs - but a few housekeeping things needed to happen first. The one I decided to tackle initially was a framework for building 2-dimensional UI elements in the game. I started this with 2 main requirements: 1) it had to be moddable via the same XML patterns we've been using for everything else and 2) it had to perform as fast as possible. (Really this second requirement is cheating - performance is a requirement for almost everything, but I digress.)

    What I've come up with so far is a system that dynamically builds screen space mesh objects and skins them with textures based on the data in an XML file. Here's an image of what it looks like along with a snippet of XML in the corner:

    See? I told you - PowerPoint. Moving on...

    I implemented this with a second camera that renders on top of the world camera in Orthographic mode. The mesh objects are placed in screen space according to the coordinates in the XML file. A single texture is used so that every element can be drawn in a single draw call (performance!) and any element that is declared as a button is hooked up to receive left click events. The action node in the button data determines what type of thing that button does when it's clicked. In this example, the button moves the game to a screen called SkirmishMenu (not shown in the data file). The images block at the top declares all of the images that a screen can use. A unique material is created for each unique map entry and the system cuts the texture up and skins it onto the mesh objects appropriately based on that data. You can see the image I used to create these screens here.

    Here's a more "workflowy" shot showing the full XML dataset.


    Lastly - here's a shot of SkirmishMenu as it's implemented in the data you see above.


    You'll notice the rounded corners on that particular (awesomely rendered) button. The system supports full and partial transparency so layering things on top of each other is no issue at all.

    There is still a lot of work to be done on this, but I'm pleased with the result thus far. (Minus the art - I know! Get off my back will ya!) The text on the buttons is currently part of the actual image. In the future this will be expanded to allow for text to be displayed as bitmap fonts that can be overlaid onto UI elements. I'd also like to code up state-specific styles so that things like buttons and other interactive elements can give visual feedback that a mouse is hovering on them. However, this will allow me to at least mock in some basic menus to navigate around the game.

    My next step is to work out a process for publishing map files and loading them into the game. Hopefully at that point we can start to iterate on some design ideas and actually show you guys a game instead of pictures of terrain meshes and categorized prop lists!
     
  3. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
    On Friday Todd posted up some pretty awesome clothing concepts.

    A lower ranking officer in the Laperia (Industrialist) military.


    A factory foreman.


    Read his full post to hear his thoughts on some of the design principles and the refined use of facial hair here.
     
  4. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
    Another round of clothing concepts from Todd.






    Read his full post here!
     
  5. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
    I spent a week or so fixing a texture blending issue with our map publishing process. This involved writing a texture resizing method since Unity doesn't give you one out of the box. Read about the process in my blog post here.

    Todd also started working on some landscapes - although things ended up being more difficult than he thought (his background his figure painting mostly).







    Read his blog post here.
     
  6. deadfire52

    deadfire52

    Joined:
    Jun 15, 2011
    Posts:
    101
    INCREDIBLE!! I wish I could draw like that
     
  7. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
    Thanks, I'll pass that along to Todd. He is pretty awesome at what he does. :)
     
  8. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
    So, lately I've been working on some of the low-level systems for the game. My ultimate goal is to get a very basic combat prototype up and running in both singleplayer and multiplayer as soon as possible. We're getting to the point in our round table discussions where we have a lot of cool ideas about how the game is going to play so it's going to be important to get some of these things implemented so we can see what works and what doesn't.

    I started off with the most basic concept in any RTS game - issuing move orders. Player left clicks on a unit then right clicks on a spot on the map and the unit moves to that spot. While this basic bit of logic was simple to implement it didn't fit very well into the larger scope of the game. I scrapped what I had and tried to go a little deeper.

    The first thing I did was write a new control scheme for the camera. Originally I was using the same one as the Editor in the hopes of keeping some commonality there. This soon proved to be more hassle than it was worth with all kinds of branching logic in the code to determine whether we were playing the game or using the editor, if we had units selected, if we didn't - on and on. There's also some things the Editor camera can do that the Game camera cannot (zoom is a good example of this) and I was opening us up to a lot of hotkey collisions between the two applications. This is all resolved now and, unsurprisingly, the amount of redundant code between the two control schemes is minimal.

    From there I wrote a system that keeps track of all the units the player currently has selected. This was fairly trivial.

    At this point I had to decide how units were going to maintain state. State Machines aren't overly complex as far as patterns go (unless you want them to be) but I wanted a system that was flexible and worked well within Unity's component based system. I came up with these goals:
    • The system should be "passive" whenever possible. That means:
      • No polling (asking - are you done yet? are you done yet? are you done yet? every frame).
      • In conjunction with the first point - use triggers whenever possible.
    • The system should always try to get back to an Idle state.
    • The Idle state should essentially do nothing and rely on triggers or player actions
    • Each state should work independently of the unit. (In Unity terms - a state is not a MonoBehaviour that acts directly inside a unit, it simply interfaces with one).



    The Idle state and trigger bit might need some clarification. "Vision" in Fractured State is largely based around line of sight and not the traditional Fog of War method. What this means is that the entire map is revealed from the beginning of the game and whether or not the player can see an enemy unit is determine by if one of his units is within visual range of that enemy AND if that unit also has a clear line of sight to that enemy. Instead of polling each friendly unit every frame to check if any enemy units are in range we can set up a sphere trigger around the unit and use the OnTriggerEnter "event" (quotes because it's actually not an Event in the traditional sense, but we can think of it that way) to inform our unit that an enemy is within his sight range. This should save us some processing time on units that are sitting around not doing anything.

    In Unity, the Update method is called each frame as a mechanism for...updating...an object in the world. A lot of Unity State Machine patterns use Update in order to update the current State of the object as well. This works just fine but there might be times where we don't want to update the state every frame or, in the case of our Idle state, we don't want to update anything at all! We also might want to chain states together. Going back to the bullet point about trying to achieve an Idle state at all times, it would be nice if we could initiate that Idle state automatically when another state completed. Think of a Move state. When the unit reaches his destination (assuming he hasn't been ordered to attack something) then he should exit his Move state and enter his Idle state without the system knowing (or really caring for that matter). We can do this with Coroutines.

    Coroutines allow Unity to chunk (there's that word again) instructions out over a certain amount of time. Because all a Coroutine is is an IEnumerator type with some yield instructions thrown in we can use our State code to change a unit's behavior without having a big messy Update method with a bunch of if statements in it.

    So this:
    Code (csharp):
    1.  
    2. void Update()
    3. {
    4.     if (thisCondition)
    5.     {
    6.         // do something
    7.     }
    8.     else if (thatCondition)
    9.     {
    10.         // do something else
    11.     }
    12.     else if (anotherCondition)
    13.     {
    14.         // do another thing
    15.     }
    16. }
    17.  
    Or even a slightly cleaner but still not ideal version:
    Code (csharp):
    1.  
    2. void Update()
    3. {
    4.     myState.Update();
    5. }
    6.  
    Can be completely decoupled and remove the need for an Update method at all. So our state code completely controls what our unit does while in that state and the unit code just facilitates the hook into the engine.
    Some state code:
    Code (csharp):
    1.  
    2. public IEnumerator Do()
    3. {
    4.     while (!CloseEnough())
    5.     {
    6.         // move unit closer to target
    7.         yield return null
    8.     }
    9. }
    10.  
    And the Unit code that hooks it:
    Code (csharp):
    1.  
    2. public IEnumerator ExecuteState(IEnumerator state)
    3. {
    4.     while (state.MoveNext())
    5.     {
    6.         yield return state.Current;
    7.     }
    8. }
    9.  
    We can kick off the execution of the state (typically done as part of our state's Enter method) with one line:
    Code (csharp):
    1.  
    2. unit.StartCoroutine("ExecuteState", Do());
    3.  
    This method allows us to monitor the conditions required to maintain the State from within the State itself instead of from the Unit. It also saves us some processing time by not having to poll each unit every frame. The State Machine manages itself completely and all of it's interactions with the world funnel through the same piece of code on the unit.

    Combined with a few triggers to kick off state changes, units should be able to act much more intelligently to events in the world around them. The hope is that they can be smart enough to keep themselves alive long enough for the player to make decisions and give them further orders.

    If anyone is interested, this is an awesome article on Coroutines in Unity by Richard Fine and this is a C# translation of Mat Buckland's Finite Sate Machine. Both of these articles saved my bacon when formulating the basics for the state machines in Fractured State.
     
    IsDon likes this.
  9. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
    Some more concept art from Todd.

    Dor-Juk - the largest production city in Laperia. Made up almost entirely of slums and factories, this is where the Industrialist Guilds produce most of their technology.


    A concept sketch for a bank building.
     
  10. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
    Here's some more concept art for the first infantry unit. We're calling him a Rifleman currently but that will change. Full post can be found here.





    And also some street lamp prop concepts.

     
  11. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
    When you set out to model something, you really can’t(shouldn’t) just model it. You need to know all sorts of things about the thing you are modeling and what you are modeling it for. So when modeling assets for fractured state, I need to know a lot about the world we are making. The technology the people have access to changes what the buildings look like. What they are made from. How they are made. To make a convincing world, you have to take all of these things into consideration.

    But it is more than just making something that looks good and fits your world. Its about fitting your asset to the game as well. If you know what you need, then you know what you have to model or what you need to make your asset work. That’s what the whole process comes down to. Making things work. But I guess we have deadlines. So its making it work. On time.
    .....
    Full blog post

     
  12. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
    Decided to start updating this thread again.

    Video demo of the Model View module in the Mod Tools.


    Quick size comparison of some in-progress structure models.


    Incinerator concept.
     
  13. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
    Todd did some rocking transport concepts last week.



     
  14. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
    Here's a video demo of some early code for our map editor. I also re-organized the first post to bump some info up.

     
  15. FlorianSchmoldt

    FlorianSchmoldt

    Joined:
    Jul 2, 2012
    Posts:
    334
    thats looking fantastic ! great tools, sexy concept art, impressive voice... Top ! :)
     
  16. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
    Thanks! (Especially on the voice compliment, lol)
     
  17. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
    Here's a new video demo of our XML based UI system. Basically, if you can write web pages you can write a custom UI for Fractured State! It uses a combination of quad meshes built and textured at run time and Unity's GUI for anything that takes user input (the chatbox in this case).



    Note that the UI elements are temporary (programmer art) and for demonstration only.
     
  18. dtg108

    dtg108

    Joined:
    Oct 1, 2012
    Posts:
    1,165
    Looks very sexy indeed so far. Can't wait to see what comes of this!
     
  19. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
  20. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
  21. Warrior1424

    Warrior1424

    Joined:
    Sep 30, 2010
    Posts:
    984
    MOTHER OF GOD
    So much talent!
     
  22. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
    Thanks! :)

    New dev video showing some progress on steering behaviors
     
  23. ogier

    ogier

    Joined:
    Nov 23, 2011
    Posts:
    222
    +++++
    what an incredible univers !!!

    it reminds me of some design of a Japanese film : "Cashern"

     
    Last edited: Mar 1, 2013
  24. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
    I've never heard of that movie but I can definitely see the comparison. :) Very cool!
     
  25. ogier

    ogier

    Joined:
    Nov 23, 2011
    Posts:
    222
    The film is pretty special, but some designs are really excellent.
    Good luck in your project!
     
  26. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
    Todd is in the process of finished up his work on the diffuse texture for a tenement structure asset. Check it out.



     
    Last edited: Mar 23, 2013
  27. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
    Took a bit of a break from updating the blog and stuff so that we could focus on hammering out a bunch of work for our prototype. Here's a video showing some snapping "LEGO style" terrain and a homegrown navigation mesh solution.

     
  28. GeneBox

    GeneBox

    Joined:
    Nov 15, 2012
    Posts:
    480
    Awesome, this is looking great!
     
  29. AustinK

    AustinK

    Joined:
    Dec 10, 2012
    Posts:
    86
    It's really coming along. Good job.

    Interested to see updates :)
     
  30. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
    Thanks for the feedback folks. :)
     
  31. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
    Todd completely revamped his texturing style. Here's a side-by-side comparison of the old Tenement texture and the new one
    $001_small.png

    And here are a couple of shots of a test scene that Todd uses to do his texture work so he can see how the diffuse plays with other effects. You can also see that the factory has a tweaked diffuse texture and also includes specular on the metal roof.

    $002_small.png

    $003_small.png
     
  32. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
    We've been heads down for a long time so we haven't posted an update. But - new year means new updates!

     
  33. Kirbyrawr

    Kirbyrawr

    Joined:
    Jul 23, 2012
    Posts:
    945
    It reminds me a little of Bioshock Infinite, great job, i love it!

    Cheers
     
  34. DexRobinson

    DexRobinson

    Joined:
    Jul 26, 2011
    Posts:
    594
    Other than some different tile sets and buildings, this looks good. I like the cover system and the mechanics behind flaking and garrison. Good luck on the project, it's turning out nice.
     
  35. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
    Thanks! That's our test map so the assets are a bit more sparse than they will be on final maps.
     
  36. Keldain

    Keldain

    Joined:
    Jan 20, 2014
    Posts:
    2
    @KelsoMRK: Been watching your game's progress for quite some time now through different channels, glad to see you posting again and I'm eager to play Fractured State, hopefully I'll get lucky and somehow end up in your Alpha or Beta testing phase, in any case, keep up the great work and tell Todd the Ritualists look awesome. =)
     
  37. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
    Thanks for the kind words!
     
  38. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
    Laperian Grenadier concept - read more about him here
    $GrenadierConcept.png
     
  39. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
    New concept and Dev Video for CotA's answer to the Grenadier - the Fist of the Ancients

    $ancientFistFS1.png
    Full Post

     
  40. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
    It's been awhile since I've posted an update so I figured I would include some screenshots from our Alpha play sessions.







     
  41. IAmCraigSnedeker

    IAmCraigSnedeker

    Joined:
    Jul 20, 2014
    Posts:
    117
    Love the steampunk vibe and the look of the game, excited to play this!
     
  42. AthosK

    AthosK

    Joined:
    Jan 20, 2013
    Posts:
    428
    looks very intresting!
     
  43. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,437
    Hey KelsoMRK,

    I was wondering if your game will have multiplayer functionality at all? I'm currently making an RTS using Unity as well, and so far it looks like my game will have to be single player only -- it might be possible to do multiplayer but I'm not sure. So I was curious if you got yours to be multiplayer somehow? Btw, it's great to see another RTS game being made using Unity. Looks like you guys have done some work :) Best of luck with it.

    Thanks.

    Velo
     
    Last edited: Aug 22, 2014
  44. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
    Thanks! It's actually multiplayer only at the moment - but obviously that will eventually change.
     
  45. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
  46. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
    Here are some screenshots of our helper popups for buildings. Holding Alt reveals these. They show faction-specific unit unlocks, how many capture points it takes to capture the building (if it can be captured), and faction-specific flavor text. Buildings that don't unlock units don't display any icons. Buildings that don't hold some gameplay importance don't get flavor text.
     

    Attached Files:

  47. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,437
    Nice work KelsoMRK.

    Those look good. Are you using the new Unity uGUI for those? Good to see you're still working on the game :)

    Every once inawhile, I'm still trying to figure out if (or how) to make my game multiplayer lol. I hope to see your game released sometime in the near future.
     
  48. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
    Thanks! Nope - legacy system.
     
  49. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
    Pressing tab switches to Tactical View to give the player an overhead look at the battlefield. Also shown is the territory ownership overlay.

     
    IsDon likes this.
  50. Keldain

    Keldain

    Joined:
    Jan 20, 2014
    Posts:
    2
    Heya Kelso, looks like some good progress going on!

    Would still definitely like to help test the game out when and where possible! =)