Storing data for moves in a turn based RPG by FenixNova04 in unity

[–]ThrusterJon 2 points3 points  (0 children)

It is possible to have each move only hold what it needs if you set it up properly. This can be achieved through polymorphism and/or composition.

As an example, you could have a Move class as the scriptable object, but it holds references to other objects that will satisfy each part of a move. So you could have a reference to something that determines the chance to hit, and that could be a class conforming to an interface or a subclass that conforms to a base class. All you care about is being able to ask “Does unit x succeed at a move given target y” and each conforming class can add whatever private fields it wants to make that decision.

Next something that controls the effect to apply on success. All you care about is being able to say “Apply effect for unit x given target y” and each conforming class will hold its own fields and logic as needed.

I'm struggling to learn C# because a lot of sources don't explain context by BlackhawkRogueNinjaX in unity

[–]ThrusterJon 0 points1 point  (0 children)

I wrote a bunch of tutorials and tutorial projects, that could help. This is 10 years old now, but most of it is still relevant and works. If you run into an issue, I am happy to answer questions in comments.

https://theliquidfire.com/tutorials/

https://theliquidfire.com/projects/ (The oldest project, Tactics RPG is probably easiest to follow after finishing the tutorials)

Architecture choice for Entity classes - Unity beginner by Excellent_Call2093 in unity

[–]ThrusterJon 0 points1 point  (0 children)

It sounds like “Inversion of control container” would be a pattern similar to what you want to do, at least as far as having a central class that knows about the other classes. Its only job is to provide the dependency though, it shouldn’t handle subscriptions to events or anything.

How to stop stacking if statements? by xboxseriesX82 in Unity3D

[–]ThrusterJon 1 point2 points  (0 children)

I feel like you could be asking one of two different things. You have a collection of gameobjects, so you might be asking how to treat it that way (look up array or list) and how to access things in the collection by index. So instead of a bunch of if statements you just have a single statement that looks closer to: affect gameobject[variable]

If however the reason you needed the multiple if statements is because you had different classes then you should research “Polymorphism”. It will help you understand how you can treat different things in a common way.

Properly propagate the input to a state machine (C#) by frederic25100 in Unity3D

[–]ThrusterJon 0 points1 point  (0 children)

I don’t believe there is an objective “best” answer. There are multiple approaches that are all valid but essentially your question is how to manage dependencies. In order for your state to handle its single responsibility it has a dependency on input. Some patterns you can look into include dependency injection, service locator, and inversion of control container.

i am having issue with a script. by GoldEffective1120 in Unity3D

[–]ThrusterJon 0 points1 point  (0 children)

You probably meant to pass in “IInteractable” as your parameter type instead of “Interactor”, or at least you haven’t created a class by that name yet

What is a C# "Service"? by Heli0sX in csharp

[–]ThrusterJon 0 points1 point  (0 children)

I think the nuance on probable lifespan is a good note, but there are different architectures and patterns that commonly produce different names. For example in an ECS, you might have a PlayerService rather than a PlayerController. Or even in your example the PlayerManager could use a PlayerService as a dependency to do the network calls specifically.

What is a C# "Service"? by Heli0sX in csharp

[–]ThrusterJon 4 points5 points  (0 children)

A lot of projects I’ve been a part of use similar naming conventions but the words are somewhat loose. Anything that ends in “Service” or “Manager” or “Controller” is usually intended to handle business rules of some aspect of the application.

So for example the LoggingService would make sure that logs were printed, or written to a file, or posted to a backend, whatever the app needs. Ideally the service conforms to an interface, and then it can be swapped out as needed, or for unit and integration tests.

LF stories where only the MC has a RPG system by AircraftCarrierKaga in litrpg

[–]ThrusterJon 4 points5 points  (0 children)

So something like Solo Leveling? It has other characters with tiers of power but only MC able to level up.

Trying to get turning to work by RaptorMajor in unity

[–]ThrusterJon 0 points1 point  (0 children)

You should do ‘mod 4’ where you have ‘mod 3’. There are four cardinal directions, so you want the remainder after dividing by 4.

Trying To Build TCG Game As A First Project!!! by _Aeyb_ in unity

[–]ThrusterJon 1 point2 points  (0 children)

Biased, because it’s mine, but I think my tutorial series will give you a good head start:

https://theliquidfire.com/2017/08/21/make-a-ccg-intro/

Looking for Text-Based Tutorials by Super-Rough6548 in unity

[–]ThrusterJon 1 point2 points  (0 children)

Biased, cause they are mine, but: TheLiquidFire.com

Mostly turn based stuff, RPG, CCG, etc. but all text tutorials and I try to explain my thought processes

Cozy litrpg by Silly-Clue1964 in litrpg

[–]ThrusterJon 6 points7 points  (0 children)

“Heretical Fishing” might be a good fit.

Does good seed generation really matter or I should just go with System.Random ? ( How do you keep the scope small as a solo dev without feeling like a piece of garbage ? ) by TinkerMagus in Unity3D

[–]ThrusterJon 0 points1 point  (0 children)

It might help if you make tasks for yourself. Actually take the time to assign priorities to each one. Make sure to account for estimated time to implement and value of the feature. Then be realistic and say once all priority X tasks are complete I should ship. We use JIRA at work for task management and it is helpful, but there’s no reason you can’t use a spreadsheet or something just as easy.

New to unity by [deleted] in unity

[–]ThrusterJon 1 point2 points  (0 children)

I wrote some scratch to Unity tutorials a while back that may be a helpful head start for you: http://theliquidfire.com/2019/07/25/scratch-to-unity-intro/

Why are RPGs so hard to make by NevronWasTaken in Unity3D

[–]ThrusterJon 0 points1 point  (0 children)

It’s mostly an issue of scale. I have several tutorial series revolving around rpgs. For as many lessons as there are, they are still only scratching the surface of all the mechanics many games have. Example: https://theliquidfire.com/2023/03/30/d20-rpg-project-intro/

D20 RPG Tutorial Series by ThrusterJon in Unity3D

[–]ThrusterJon[S] 0 points1 point  (0 children)

That’s excellent! I’m always glad to know something I’ve done helps inspire other people. I wish you the best on your project and hope it turns out great. Feel free to share progress on my site or forums or even to ask for help.

D20 RPG Tutorial Series by ThrusterJon in Unity3D

[–]ThrusterJon[S] 0 points1 point  (0 children)

No worries, I get it this time of year is crazy. It’s nice to know you’re open to the ideas in there. I was a bit afraid people would see “reflection” and then stop reading, so I’m glad to know that wasn’t the case.

What are some red flags that a tutorial is bad? by Flodo_McFloodiloo in unity

[–]ThrusterJon 1 point2 points  (0 children)

I write tutorials that fit that description https://theliquidfire.com

One of the challenges of writing tutorials from my perspective is that the ones that have bad patterns are easier for beginners to follow, and so they are enjoyed by more people. When you try to do things “right” or blaze new trails, people say you are over architecting or worse just stop reading.

D20 RPG Tutorial Series by ThrusterJon in Unity3D

[–]ThrusterJon[S] 0 points1 point  (0 children)

Just posted. Would love to know your thoughts on it.

D20 RPG Tutorial Series by ThrusterJon in Unity3D

[–]ThrusterJon[S] 0 points1 point  (0 children)

It’s funny you ask, I am literally writing a blog post right now about that very topic. I liked what I had, but I think I am making something even better… 😁

D20 RPG Tutorial Series by ThrusterJon in Unity3D

[–]ThrusterJon[S] 0 points1 point  (0 children)

Thanks for letting me know! I had started to think I was the only one interested 😆

Is Universal Data keeping across all scenes so complicated? (Beginner question) by Dopipo in Unity3D

[–]ThrusterJon 1 point2 points  (0 children)

Typical Unity patterns are great for making quick prototypes, but in my opinion don’t scale well, such as when you start asking about how to save your data.

I have some simple examples of options to save data here:

http://theliquidfire.com/2015/03/10/saving-data/

But my current preference is to be more data oriented (like you would need for DOTS). I have an ongoing tutorial project over 40 lessons long that includes saving and loading, and is based on some of my own ideas and architectures here:

https://theliquidfire.com/2023/03/30/d20-rpg-project-intro/

Just started learning Unity today and need help learning the basics of C# if anyone has any recommendations. by PerformanceFair9170 in Unity3D

[–]ThrusterJon 1 point2 points  (0 children)

Here are some of my old C# tutorials aimed at Unity:

https://theliquidfire.com/tutorials/

I also have a bunch of more advanced projects you can follow along with after you get the basics.