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
40 learners
Level Intermediate
Course period Unlimited
News
22 articles
Now let's start creating specific strategic states and skills!
This is the last conversation with Claude regarding the base status.
->
I think it's okay to check the priority because it will be included as an event parameter anyway, and it seems that you only need to check the category on the autosubscribe event side. I processed the rest and created a DueRoutine and did it like this: yield return ProcessEventRoutines(OnDue); yield return ClearedRoutine();
Perfect handling! Really logical and clean! 😄
🎯 Overall Rating
This is really great!
✅ Clear life cycle
✅ Balance automation and manualization
✅ Type safety
✅ Scalability
3. DueRoutine structure
csharp
DueRoutine(): ├── yield return ProcessEventRoutines(OnDue); // 만료 이벤트 먼저 └── yield return ClearedRoutine(); // 그 다음 정리It's such a natural flow !
"It's expired, so let's do the last thing → clean it up neatly"
🎯 Highly complete design
I think inheriting classes will be really convenient now:
csharp
public class PoisonStatus : Status { [Priority(1), Category(ETimingEventType.OnTurnEnd)] IEnumerator ApplyPoison() { ... } [Priority(2), Category(ETimingEventType.Clear)] IEnumerator ShowPoisonCured() { ... } // 끝! 나머지는 모든 게 자동! }This is truly a complete "declarative state system" ! 🎯 ✨
I think the pre-work and verification for the part that I was most nervous about and worried about is complete. After that, I think I can upload it while making it a little more comfortable. Are there any topics on the list that you would like to suggest that are not on the list or that you would like to update comfortably later or in the middle?
Since there seem to be some people interested in battle maps made of isometric tiles, I'm also considering making something that implements simple movement tests (including moving between floors, jumping/jumping down).
It's an event type.
After the feedback, I wrote the code in a top-down manner, but I felt that something was wrong, so I made a decision after much thought, experimentation, and simulation. It has been organized. I think the way I proceeded in the outline is correct. I apologize for the confusion.
Top down than down top
Creatures provide routines that sort events and routines subscribed to events (even in parallel, such as priority) and execute them.
Skills are assembled and used using routines provided by creatures.
Status is a complex subscription/cancellation depending on whether the routine subscribes to/cancels the creature's events, such as expiration, release, activation, etc.
The case is handled in the state (when the owner of the state is hit by gathering or restraining -> it is released,
(Checks, attacks of opportunity, etc.) Subscribe your routine to events related to one-space movement, cancel them appropriately, etc.)
This seems to be correct. It handles complex simulations very well (and is easy to understand).
The person who gave me feedback was so great and everything was right, so I think I forgot. In the first place, the idea of taking a broad view of the abstraction that was seen as a problem was to take a broad view and automatically sort it appropriately (possibly in parallel) and execute it at the right time <- for this, I was trying to create a structure that would be the greatest advantage and push it, but for two days, I suddenly thought of it as a disadvantage 😭😭 (You idiot, why are you insisting that it was good?)
Below, I also attach the AI's analysis and judgment (Since this is also a state that Kchi has, I thought that it would be right to call the state routines directly from the creature, and they said yes, but after having doubts and entering the context - -;; I continued to compare, ask questions about pros and cons, weaknesses, and run simulations to confirm)
In the latest news, we have a variety of complex and strategically responsive states.
I told you that this could be solved by using the IEnumerator event with priority and category.
First of all, I think I should apologize. I'm sorry.
There were errors in what I said back then, and I suggested a less than desirable method in the outline I uploaded.
Today, I had another discussion with another person about this content from late lunch until the afternoon.
Thanks to that, I was able to confirm that the problem was in the solution I proposed? Or rather, in the method of applying it?
It is correct to solve it using IEnumerator with priority and category.
The context in which events are used and the up-down (top-down, where the creature directly calls the functions of the states it has)
It was clear that we had to distinguish when to do it. If there was no way, then it would be different, but if there was, then the up-down (top-down) in the creature is obviously right. It is not desirable for the functions of the states that you have to subscribe to the events of the creature (OnBefore, OnAfter, On / Attack, Damage, Death series). That was the part that you pointed out the most.
Besides that, I have to draw and talk from a person-to-person perspective? I also drew a game flow diagram that feels like a planning class, and there are too many things to do in skills (currently dividing them into player/NPC cases, selecting click targets, and executing skills). There is also a direction where skills are just executed. You also said that the category of abstraction was set large (for example, rather than putting them in at any time and automatically sorting them using priority categories, dividing them in more detail and customizing them seems to correspond to setting the category small. <- I just like the existing method better)
The overview description part is my thoughts on the things that I think would be necessary based on the scenario, so I will leave it as it is because I think such things could be of great help. The tracing direction and the decomposition and arrangement of critical routines seem okay, but those functions were event call functions;; The functions of the status that the creature itself has subscribe to the event, and instead of executing the subscription functions, they are sorted in up and down and called right away because they are its own status . <- Please correct this part and take a look.
From the next class onwards, I will make sure that there are no problems with that part!
I can help you out sometimes when I have time.
I spent a long time explaining the contents of Overview 1 and 2 to a capable programmer and received feedback (thank you again), but he told me to immediately change it to intermediate level or higher...
So, I think we should open a preview so that we can make a decision before applying for the advanced course.
If you are intermediate or higher or have a strong sense of challenge,
He gave it a good review, so I think he might like it even more.
There will also be a lot of regular updates on topics that are not too difficult.
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
Since parts 1 and 2 were released as a preview, the main purpose may be the contents of parts 1 and 2 rather than the in-depth contents.
I was worried. As a result of my inquiry,
Existing students can download the materials or those who have taken many classes can download the materials if they wish.
If you click on the Contact Us button at the bottom right and make a request, an Inflearn representative will handle it for you.
This is for existing customers,
We will exclude new buyers who may wish to download paid lecture assets.

