-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
13 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
layout: default | ||
--- | ||
|
||
## March 4th, 2024 | ||
These past 12 hours I’ve done a deep dive into the Unity documents on scriptable objects. One of the main issues I was running into with my previous development was the overwhelming number of events in the scriptable objects that just kept increasing as I added even more of them. I learned from the Unity documents that they typically create a scriptable object base class to describe events, then instantiate that base class and make one scriptable object instance per event. I also noticed that they did employ the technique of invoking events when data inside of a scriptable object was changed. This might be true if data inside of a MonoBehaviour instance was changed too, but I don’t recall seeing any examples of this. | ||
|
||
I also read a little bit more into doing proper networking and multiplayer management. I reviewed two examples provided by Unity on this topic: Boss Room and Galactic Kittens. One of the main questions driving me was merging the state machine game design pattern with Unity’s Netcode framework for multiplayer. In the past, I created C# classes to implement the state machine and states for certain game managers. Each of these states was instantiated on the fly inside of another state. However, after looking at Unity’s examples, it appears that I should add all of the states to the Game Manager game object in the scene editor / inspector view, then configure attributes about that state using the inspector. By taking this approach, I can have each of the states extend NetworkBehaviour, and thus provide them access to network variables and client / server RPCs. | ||
|
||
Some members of the Unity forums also indicated that mixing client and server code was typically not a good idea because it causes the code to be messy. For this reason, I believe I should consider having two state machines on the host (if necessary): one for the server and one for the host client. This way client logic can be distinctly separated from host logic and reduce the sizes of the Unity script files. | ||
|
||
Lastly, I watched a video today talking about party games and how there is a lack of good party games since the Wii era. I think I would like to make it my goal to resolve this and develop some more interesting and sophisticated party games for people to connect over. |