-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathLOGS.txt
More file actions
213 lines (179 loc) · 13 KB
/
LOGS.txt
File metadata and controls
213 lines (179 loc) · 13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
March 30, 2025 – April 2nd, 2025
• Attributed basic/ wrapper functions as inline i.e. `[PatchMethod(AggressiveInlining)]`
• Changed from possibly-overloaded `null == …` nullity checks to `… is null` checks
• Configured C# build compilations to enable nullish annotations i.e. `/nullable` — saves on typing `#nullable enable annotations` at the beginning of every script.
• Configured C# from the .NET 9 runtime to the .NET 10 runtime i.e. `/langversion:10`
• Configured C# script warnings as errors for developing robust game code i.e. `/warnaserror`
• Developed `GameObjectEnumerator` and `GameObjectSharedList<T>` for faster `UnityEngine.GameObject` (and `UnityEngine.Component`) tree hierarchy traversal
• Extended `Add(…)` method to support initialization list for `System.Collections.Generic.Queue<T>` and `System.Collections.Generic.Stack<T>`
• Optimized `PatchOdyssey.Extensions` and `PatchOdyssey.Util` features
• Optimized `UnityEngine.GameObject` (and `UnityEngine.Component`) extension methods e.g. `::FindChildBy*(this, …)`
• Parity between `System.Array` and `System.Collections.Generic.List<T>` features
• Preferred `double`-based functions over `float`-based design
• Preferred `event` feature instead of manually tracking stacks of `delegate`s
April 3rd, 2025
• Acknowledged `System.Collections.Generic.IReadOnlyDictionary<TKey, TValue>` interface — and promptly redacted its conflicts with `System.Collections.Generic.IDictionary<TKey, TValue>`
• Configured C# from the .NET 10 runtime to the Unity’s Preview C# version i.e. `/langversion:preview`
• Extended `AddRange(…)` method for `EditorDictionary<…>`, `EditorReadOnlyDictionary<…>` and `System.Collections.Generic.IDictionary<…>` types
• Extended `TryAdd(…)` method for `EditorDictionary<…>`, `EditorReadOnlyDictionary<…>` and `System.Collections.Generic.IDictionary<…>` types
• Implemented `EditorReadOnlyDictionary<…>` using `System.Collections.Generic.IReadOnlyDictionary<…>`
• Shimmed `required`
• Preferred user-defined `delegate`s (e.g. `Interpolator`, `RefAction`) over standard `System.Delegate`s (e.g. `System.Func`)
April 4th, 2025 – April 7th, 2025
• Developed `PatchOdyssey.Util.HandlerInfo` for handling events e.g. `Load*(…)`, `Wait*(…)`, …, e.t.c. like a “fat” `delegate` with additional data
• Supplemented `event` properties with `PatchOdyssey.Collections.EventHandler` class — supporting `System.Delegate` invocation lists, operator overloads, …, e.t.c.
• Supplemented `System.EventArgs` with `PatchOdyssey.Collections.Event` generic
April 8th, 2025 – April 9th, 2025
• Attributed constructors as setting required members i.e. `[PatchConstructor]`
• Refactored `Wait*(…)` and `Util.WaitForTimer*(…)` utilities
April 10th, 2025 – April 13th, 2025
• Developed `Util.WaitForCoroutineEvery(…)` and `Util.WaitForCoroutineUntil(…)` utilities
• Learned Unity’s Entity Component System (ECS) feature using their Data-Oriented Technology Stack (DOTS) — https://www.youtube.com/watch?v=1gSnTlUjs-s
April 14th, 2025 – April 15th, 2025
• Refactored `EventHandler<T>`, `HandlerInfo<T>`, and other associated code
April 15th, 2025 — April 16th, 2025
• Designated `System.Math` for non-game-specific, `Unity.Mathematics` for ECS-specific, and `UnityEngine.Mathf` for game-specific mathematics
• Refactored `LoadURI*(…)` utilities
• Shimmed `init`
• Shimmed `System.HashCode`
April 20th, 2025 — April 22nd, 2025
• Developed `Mono<T>` structure for monostate (localized singleton) variables
• Developed `RefDictionary<…>`, `RefList<T>`, `RefReadOnlyDictionary<…>`, and `RefReadOnlyList<T>` classes to allow in-place value-type modification of dictionary/ list elements
• Optimized out `System.Array` bounds-checking with `ArrayReference*(…)` utilities instead of `ref array[index]`
• Shimmed `System.Index`, `System.Range`, and collection expressions
• Use test Unity project to test smaller scale code i.e.
```csharp
public static class Program {
[UnityEngine.RuntimeInitializeOnLoadMethod]
private static void Main() => new UnityEngine.GameObject("…", typeof(MyMonoBehaviour));
}
```
April 23rd, 2025
• Added `Event::epoch` property to track initial time of signaling
• Added `Event::metadata` field to store call-site arguments
• Added `ToString()` method overrides to `PatchOdyssey.Collections` structures
• Extended `TrimExcess(uint)` method for `RefList<T>` and `SharedList<T>` classes
April 24th, 2025
• Refactored `Animation.UISequence` from an internal `System.Collections.ObjectModel.ReadOnlyDictionary<string, object?>` to an internal `System.Collections.Specialized.ListDictionary`
April 28th, 2025
• Developed `PatchOdyssey.Traits` namespace for basic generic metaprogramming
• Disregarded some null checks — responsibility is on the user’s end
• Extended `Fill(…)` method for `RefList<T>`, `SharedList<T>`, and `System.Collections.Generic.IList<T>` interfaces
• Extended `TryAppend(…)` method for `RefList<T>`, `SharedList<T>`, and `System.Collections.Generic.IList<T>` interfaces
• Renamed `EditorDictionaryDrawer<…>` (and `EditorReadOnlyDictionaryDrawer<…>`) to `RefDictionaryDrawer<…>` (and `RefReadOnlyDictionaryDrawer<…>` respectively)
April 29th, 2025 – April 30th, 2025
• Lots of refactoring, especially for Unity’s lack of `System.Runtime.CompilerServices.Unsafe.Add(…)` method
May 1st, 2025
• Acknowledged `System.IEquatable<T>` interface for `PatchOdyssey.Collections` structures (and classes)
• Developed `RefComparer<T>`, `RefEqualityComparer<T>`, `RefReadOnlyComparer<T>` and `RefReadOnlyEqualityComparer<T>`
• Developed `RefSortedCollection<…>` class to allow in-place value-type modification of elements unlike `System.Collections.Generic.SortedDictionary<…>` and `System.Collections.Generic.SortedList<…>`
May 2nd, 2025
• Implemented `*Ref*Comparer<T>` and `Ref*Equatable<T>` features for `PatchOdyssey.Collections.*` classes
May 3rd, 2025
• Acknowledged refactoring the `*Event`s into a structure of arrays format would have had faster cache/ memory locality
• Updated `RefList<T>` and `RefReadOnlyList<T>` internals to use `RefReadOnlyEqualityComparer<T>`s for its `::*IndexOf(…)` methods
May 5th, 2025
• Refactored `::Find*(…)` methods for `PatchOdyssey.Collections.*` list classes with a sentinel `::Null` field
• There’s only ever one synchronous load in the list and it's either getting the payload or waiting for an asynchronous one.. Check if it's called up in a `repeated` `LoadUri(…)` call
May 6th, 2025 – May 7th, 2025
• `PatchOdyssey.Collections.KeyInfo` alongside `PatchOdyssey.Collections.KeyInfo.Translate(…)`
• `PatchOdyssey.Collections.PointerInfo`
• `PatchOdyssey.Collections.Vector2Bool`, `PatchOdyssey.Collections.Vector3Bool`, `PatchOdyssey.Collections.Vector4Bool`
• `PatchOdyssey.*…IndexFor<T>`
• `PatchOdyssey.*…Load` completed
• Reordered `PatchOdyssey.Util`
• User interface system
May 8th, 2025
• Keyboard event system
May 12th, 2025
• `PatchOdyssey.Collections.DeviceState` structure with non-supported `Util.Reference.Compare` and `Util.Reference.Equals`
• `PatchOdyssey.Log` and `PatchOdyssey.UI` utilities
• `PatchOdyssey.Collections.Shared` and `PatchOdyssey.Collections.SharedMono` structure utility
• `Keys.IsPressed(…)` (as well as `Keys.IsHeld(…)`, `Keys.IsReleased(…)`) easier to prototype than some `Key.OnKeyPressed(…)` `event`
• `Keys.Modifiers` and `Keys.Specials`
• `NoInlining` (remember `AggressiveInlining`) for functions that `throw`
• `operator false/ true` overloading
May 13th, 2025
• Mouse event system
• Tabbing event system
• `Util.Path` namespace
• `Util.Vector` rework including `Util.Vector.Coalesce` and `Util.Vector.Set`
May 14th, 2025 – May 15th, 2025
• Edible `RefList` in Inspector. Had to learn how `UnityEngine.JsonUtility` worked — delimit each `T[]` by serialized because `T[]` itself isn’t serializable (and use `UnityEditor.SceneManagement.EditorSceneManager.MarkSceneDirty(UnityEngine.SceneManagement.SceneManager.GetActiveScene())` to persist serialization)
• `PatchOdyssey.Collections.LazyMono` and `PatchOdyssey.Collections.SharedLazyMono` for deferred initialization
May 16th, 2025
• Fixed `RefReadOnlyDictionary` wrapping for `RefDictionary` (again, bad initial design)
• `UI::components` finally begun: “background”, “combat”, “credits”, “dialogue”, “inventory”, “menu”, “pause”, “splash”, “tooltips” (HUD), “tooltips” (scene)
First step into a non-`PatchOdyssey` construct, I see
May 19th, 2025
• Metted `PatchOdyssey.Animation` classes into `PatchOdyssey.Collections`
• Serialization with `UnityEngine.GameObject` didn’t work (must be main thread, not supported by default, can’t enumerate before scene load, …), temporarily fell back to manual drawing solution
May 20th, 2025 – May 22nd, 2025 [BETA]
• Fixed minor bug with `UISequence` animator i.e. `(b - a) * progress` to `((b - a) * progress) + a`
• Serialization with `UnityEngine.GameObject` works now
• Explicit `Util.Lerp(…)` function
May 23rd, 2025 – May 25th, 2025
• Added `Util.Log.Clear(…)`
• Buttons animated
• Components (including “menu”) animated
• Fixed minor bug in `AnimationSequence` interpolating the wrong `AnimationKeyframe`s
• Fixed minor bug with supporting both pointer and tabination devices for button selection
• Renamed `UIKeyframe` and `UISequence` to `AnimationKeyframe` and `AnimationSequence`
• Serialization a la persistent save system prototyped
• Splash screen animated
• UI selection event system completed
• Updated extension methods to support nullish coalescence
• Wrote up a simple console prettifier
May 26th, 2025
• Menu navigation
• Music/ volume sliders functionality
May 27th, 2025
• Background component dynamism
• Gameplay sequencing
May 28th, 2025
• `AnimationSequence`s as countdowns(?)
• Let aside ECS due to deadline
• Pause feature works
• Quit to menu works
• Transition includes icon
• Unity’s “Script update consent” updated from `UnityEngine.Rigidbody.velocity` to `UnityEngine.Rigidbody.linearVelocity`
📆
• Lesson learned: Learning C# technical details and ECS is a time investment that must be planned for within the timeline of the project
• Lesson learned: Low-level C# is more difficult to debug with Unity’s console, or work with considering Unity scarcely supports `MemoryMarshal` and `Unsafe`
• Lesson learned: Premature optimization can be a tricky challenge to deal with i.e. “Keep It Simple, Stupid”
• Next time going with a different game base because slow iteration times when developing are a pain
• C# polyfilling exists because Unity uses an older .NET runtime
ROADMAP_🗺️__________________________________________________________________________________________
• … — Keep Mesh as child GameObject of scripted parent GameObjects
• Core utilities — PatchOdyssey.cs
• User Interface — UI.cs
• UI sequencing — Game.cs
chunks are ECS'd. ALL of them. They pop up from the biome grassland when the player gets close
The player doesn't glow themselves, they have a drop-glow beneath them
bullets and particles are ECS'd, one monster spawns minions that are ECS'd?
another monster spawns collidable crystals from the ground
monsters, tamers, UI, and text boxes are just GameObjects
REQUIREMENTS_✅_____________________________________________________________________________________
• Development log
• Final Major Project
• Online portfolio — think “once:blank”, “dafluffypotato.com”, and others
IDEAS_💭____________________________________________________________________________________________
• Character names: “Audu”, “Aure”, “Strydum”, “Xinis”, …
• Complement the player usually
• Each section is a unique Scene with a Loading UI menu as their start
• Enemies have drop-glow, too. NPCs don't
• Fogged-out chunk sides
• Hexagon chunks as opposed to square chunks
• Monster autonomy, Tamer autonomy ⟶ Player lassoes wild monster, is teleported on them as Rider — material changes to white with animated scaling and invulnerability
• NPCs notice you in anticipation before responding — not all monsters are immediately hostile
• Opening Looney Tunes vignette that leads into tutorial section
• Plants vs Zombies game design of always introducing new things to look forward to if possible
• Player failure still means progress
• Vignette UI that reddens slightly (no shake) on damage and shakes on attack
ENTITY_COMPONENT_SYSTEM_(UNITY DOTS)_🌐_____________________________________________________________
• Install 2D Sprite, Entities, Entities Graphics, and Unity Physics packages
• Set project to not rebuild
• Create Sub Scene (bottom of the list) for Entities (converts everything in it to entities)
• Set Preferences → Editor to show Runtime Data in the Scene View Mode
• Prefab variants exist… think inheritance
• Prefabs must have the Linked Entity Group script