Latter part unfinished (no plans for completion) [Unity] How to make a turn-based tactics game + How to create a unique, easy, and cool game architecture. Currently demonstrating scalability and reusability while adding content features.
This is an incomplete course where the latter parts of the curriculum have not been covered. However, the core content for prototyping and advanced sections is included. (Please refer to the announcement for further details.) ---------------------------------------- How to Implement a Turn-Based Tactics Game Part 1, 2 -> Basic features, basic combat loop (the core framework) As the assets available to me increased and the list of things I wanted to update grew, you can think of this as a guide for rapid prototyping. Based on the content covered in these two parts, you can infer how the updated (and future) features will be implemented. ---------------------------------------------------------- Updates -> Deepening and enriching the content built in Parts 1 and 2 cf -> Useful content for game development in this genre + alpha
41 learners
Level Intermediate
Course period Unlimited
Finally, even advanced items are starting to appear.
Design and implementation for reactive states are starting. (We will also cover common common contents in between #Advanced# <- Only those that are attached to this)
It uses the IEnumerator event, which allows you to perform operations in a set order no matter when you subscribe to it.
(In fact, it's the same as what we did in previous classes) It's a method of using additional IEnumerators by grouping them by priority and category and sorting them in a Consecutive and Parallel manner.
However, it may take some time to get used to the event subscription cancellation pattern at first.
Don't you want to try those states? If they are implemented, you can add a lot of strategy to the tactics game you make.
Those + you will now be able to implement and add similar things enough,
System change? It's added after development (I think it's a consistent context).
+After following all of that, you can now apply the IEnumerator event to most other projects with great excitement.
I think it might be possible.
Part 1,2 also perfectly controls the timing of events by IEnumeratorizing the events (in the order of subscription) <- This is also really good. And it's easy.
But this is one level higher, not depending on the subscription order, but automatically proceeding in a predetermined order + same categories at the same time!
๐ฏ Func A true innovation in the priority system
๐ Legacy System vs. Improved System
๐ก Structure and limitations of existing systems
Existing: Subscription order dependent method
csharp
public event Func OnDamageEvent; // ๊ตฌ๋
ํ๋ ์์๊ฐ ์คํ ์์๋ฅผ ๊ฒฐ์ OnDamageEvent += ProcessDamage; // 1๋ฒ์งธ ์คํ OnDamageEvent += PlayAnimation; // 2๋ฒ์งธ ์คํ OnDamageEvent += CheckDeath; // 3๋ฒ์งธ ์คํ // ์คํ yield return this.ConsecutiveAll(OnDamageEvent.GetInvocationList() .Cast >() .Select(handler => handler())); Problem:
Determine execution order based on subscription order
Depends on code location or initialization order
Difficulty controlling order in complex interactions
Unpredictable execution order in dynamic subscriptions
๐ Innovation of the improved system
๐ Custom attribute-based priority control
Innovation: Declarative Priority Management
csharp
public event Func OnDamageEvent; // ๊ตฌ๋
์์์ ๋ฌด๊ดํ๊ฒ ์ฐ์ ์์๋ก ์คํ [EventPriority(1, "Damage")] IEnumerator ProcessDamage() { } [EventPriority(3, "Death")] IEnumerator CheckDeath() { } [EventPriority(2, "Animation")] IEnumerator PlayAnimation() { } // ๊ตฌ๋
์์๊ฐ ๋ฐ๋์ด๋ ์คํ ์์๋ ํญ์ ๋์ผ OnDamageEvent += CheckDeath; // ๋ฆ๊ฒ ๊ตฌ๋
ํด๋ OnDamageEvent += ProcessDamage; // 1๋ฒ์งธ ์คํ OnDamageEvent += PlayAnimation; // 2๋ฒ์งธ ์คํ // 3๋ฒ์งธ ์คํ ๐ The Real Value of This Innovation
๐ฎ Power in complex game scenarios
Scenario: Combat with Chain Reaction
csharp
// ๊ธฐ์กด ๋ฐฉ์: ๊ตฌ๋
์์์ ๋ฏผ๊ฐ OnAttackEvent += ProcessDamage; // ๋จผ์ ๊ตฌ๋
ํ๋ฉด ๋จผ์ ์คํ OnAttackEvent += TriggerCounter; // ๋ฐ๊ฒฉ์ด ํผํด๋ณด๋ค ๋ฆ๊ฒ ์ฒ๋ฆฌ OnAttackEvent += CheckDeath; // ์ฃฝ์ ์ฒดํฌ OnAttackEvent += PlayAnimation; // ์ ๋๋ฉ์ด์
// ๋ฌธ์ : ์ด๊ธฐํ ์์๋ ๋์ ๊ตฌ๋
์ ๋ฐ๋ผ ์คํ ์์ ๋ณ๊ฒฝ ๊ฐ๋ฅImproved approach: Ensuring clear ordering with attributes
csharp
[EventPriority(1, "PreProcess")] IEnumerator CalculateDamage() { } [EventPriority(2, "Damage")] IEnumerator ApplyDamage() { } [EventPriority(2, "Counter")] // ํผํด์ ๋์์ ๋ฐ๊ฒฉ IEnumerator TriggerCounter() { } [EventPriority(3, "PostProcess")] IEnumerator CheckDeath() { } [EventPriority(4, "Visual")] IEnumerator PlayAnimation() { } // ์ธ์ ๊ตฌ๋
ํ๋ , ์ด๋ค ์์๋ก ๊ตฌ๋
ํ๋ ์คํ ์์ ๋์ผ๐ก Innovation in category-based parallel processing
Same priority, different categories = parallel execution




