Giter Club home page Giter Club logo

unitytutorials-rts's Introduction

[Unity/C#] Making a RTS game

Mina Pêcheux • March 2021 - March 2022

thumbnail

📕 Discover the series as an ebook and get bonus material on Gumroad!

This repository contains the code for my on-going series of tutorials on how to make a real-time strategy (RTS) game in the well-known game engine Unity! Throughout this series of tutorials, I explore C# scripting for games, GUI building, event systems, behavior trees, sound optimization...


To run this project, make sure you play it from the "Core" scene! ;)

→ For more info, see Tutorial #41

demo

You can find the list of all tutorials on Medium, or right below:

Known issues

About installing / upgrading

The project was written in Unity 2020.3. This implies that, when loading it up with different recent versions of Unity, you'll need to "upgrade" the project. This usually goes without a hitch, but there is for now 2 bugs that have been spotted by the followers and I:

  • incorrect lighting: upgrading to some Unity 2020+ might lead to some strange lighting of the scene (because of pipeline render defaults and lighting settings changes). To get a similar lighting to the original project, make sure that you remove all baked lighting data, that all your (directional) lights are set to "Realtime" and that you ignore the environment lighting.

    To do so, open the Window > Rendering > Lighting panel, go to the "Environment" tab, and set the "Intensity Multiplier" variable to 0 both in the Environment Lighting and Environment Reflections sections.

  • FOV shader bug (thanks to @Oarcinae): upgrading to Unity 2019.4 might lead to unexpected behaviour for the FOV shader (because of pipeline render defaults changes); to fix the issue, you can try modifying the AlphaProjection.shader and comment out the line: #pragma exclude_renderers d3d11 gles (still an open issue #2, any help is welcome 🙂)

unitytutorials-rts's People

Contributors

minapecheux avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

unitytutorials-rts's Issues

DirectoryNotFoundException: Could not find a part of the path

image

I downloaded this project to run it for test. But I've failed to open it.
It yields an error like below. I installed Unity 2020.3.18f1 to match with the version that you've uploaded but it still fails.

DirectoryNotFoundException: Could not find a part of the path 'C:\Users\handy\AppData\LocalLow\minapecheux\RTSTutorial\Data_Dev\Games'.
System.IO.__Error.WinIOError (System.Int32 errorCode, System.String maybeFullPath) (at <695d1cc93cca45069c528c15c9fdd749>:0)
System.IO.FileSystemEnumerableIterator1[TSource].HandleError (System.Int32 hr, System.String path) (at <695d1cc93cca45069c528c15c9fdd749>:0) System.IO.FileSystemEnumerableIterator1[TSource].CommonInit () (at <695d1cc93cca45069c528c15c9fdd749>:0)
System.IO.FileSystemEnumerableIterator1[TSource]..ctor (System.String path, System.String originalUserPath, System.String searchPattern, System.IO.SearchOption searchOption, System.IO.SearchResultHandler1[TSource] resultHandler, System.Boolean checkHost) (at <695d1cc93cca45069c528c15c9fdd749>:0)
System.IO.FileSystemEnumerableFactory.CreateFileNameIterator (System.String path, System.String originalUserPath, System.String searchPattern, System.Boolean includeFiles, System.Boolean includeDirs, System.IO.SearchOption searchOption, System.Boolean checkHost) (at <695d1cc93cca45069c528c15c9fdd749>:0)
System.IO.Directory.InternalGetFileDirectoryNames (System.String path, System.String userPathOriginal, System.String searchPattern, System.Boolean includeFiles, System.Boolean includeDirs, System.IO.SearchOption searchOption, System.Boolean checkHost) (at <695d1cc93cca45069c528c15c9fdd749>:0)
System.IO.Directory.InternalGetDirectories (System.String path, System.String searchPattern, System.IO.SearchOption searchOption) (at <695d1cc93cca45069c528c15c9fdd749>:0)
System.IO.Directory.GetDirectories (System.String path) (at <695d1cc93cca45069c528c15c9fdd749>:0)
DataHandler.GetGamesList () (at Assets/Scripts/Tools/DataHandler.cs:196)
MainMenuManager._PopulateLoadsList () (at Assets/Scripts/Managers/MainMenuManager.cs:250)
MainMenuManager.Start () (at Assets/Scripts/Managers/MainMenuManager.cs:48)

Can you let me know how I can fix this?
Is there someone who has in same situation with me?

Thanks.

Two other issues

Tree Prefab is missing from Terrain objects

and the Fog of war shader doesn't render

rts

FOV not working, missing material?

I opened the project with 2019.4. All I see is the pink for missing materials. I didn't have time to figure it out myself yet but just wanted to check if that was expected, or an issue on my side maybe? Thanks!

EDIT: Disabling FOV fixed it. So it seems like something is broken or missing or needs config on the FogOfWarProjector

Missing Wood and Gold

When you create a worker in 2020.2 you get this error, it happens for wood and gold

ArgumentException: Requested value 'gold' was not found.
System.Enum+EnumResult.SetFailure (System.Enum+ParseFailureKind failure, System.String failureMessageID, System.Object failureMessageFormatArgument) (at <695d1cc93cca45069c528c15c9fdd749>:0)
System.Enum.TryParseEnum (System.Type enumType, System.String value, System.Boolean ignoreCase, System.Enum+EnumResult& parseResult) (at <695d1cc93cca45069c528c15c9fdd749>:0)
System.Enum.Parse (System.Type enumType, System.String value, System.Boolean ignoreCase) (at <695d1cc93cca45069c528c15c9fdd749>:0)
System.Enum.Parse (System.Type enumType, System.String value) (at <695d1cc93cca45069c528c15c9fdd749>:0)
UIManager._CheckBuyLimits () (at Assets/Scripts/UI/UIManager.cs:277)
UIManager._OnUpdateResourceTexts () (at Assets/Scripts/UI/UIManager.cs:311)
UnityEngine.Events.InvokableCall.Invoke () (at :0)
UnityEngine.Events.UnityEvent.Invoke () (at :0)
EventManager.TriggerEvent (System.String eventName) (at Assets/Scripts/Managers/EventManager.cs:93)
Unit.Place () (at Assets/Scripts/Units/Unit.cs:146)
CharacterManager.Start () (at Assets/Scripts/Units/Characters/CharacterManager.cs:25)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.