Skip to content

Commit 6274362

Browse files
committed
what
1 parent d8f48fe commit 6274362

File tree

5 files changed

+95
-19
lines changed

5 files changed

+95
-19
lines changed

config.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
#=========================================================================================
77

88
base_url = "https://jedjoud10.github.io" # Domain name of your website
9-
title = "Jed307's yapping sessions"
10-
description = "Hobby yapper in the domain of graphics programming"
9+
title = "Jed's blog"
10+
description = ""
1111
default_language = "en"
1212
theme = "serene"
1313
output_dir = "public"
@@ -39,9 +39,9 @@ anchors = "on"
3939

4040
[extra]
4141

42-
name = "Jedjoud10" # Your name
42+
name = "Jed" # Your name
4343
id = "Jed037" # Your id / username / handle
44-
bio = "Hobby Programmer / Computer Science Student at UofG" # Your bio
44+
bio = "Hobby Programmer" # Your bio
4545
avatar = "img/avatar.webp" # Your avatar
4646
links = [ # Your links
4747
{ name = "GitHub", icon = "github", url = "https://github.com/jedjoud10" },
@@ -56,7 +56,7 @@ homepage_layout = "list" # "about" | "list"
5656

5757
sections = [
5858
{ name = "projects", path = "/projects", is_external = false },
59-
{ name = "skills", path = "/skills", is_external = false },
59+
# { name = "skills", path = "/skills", is_external = false },
6060
{ name = "about", path = "/about", is_external = false },
6161
]
6262
blog_section_path = "/blog"
@@ -82,9 +82,9 @@ outdate_alert_days = 120 # How many days will a post be outdated by
8282
outdate_alert_text_before = "This article was last updated "
8383
outdate_alert_text_after = " days ago and may be out of date."
8484

85-
footer_copyright = "© 2024 Jed037"
85+
footer_copyright = "Jed037"
8686
footer_credits = true # Whether to show "powered by zola and serene" in footer
8787

8888
not_found_title = "404"
89-
not_found_error_text = "Not Found (real)"
90-
not_found_recover_text = "« back to home (eepy) »"
89+
not_found_error_text = "Not Found"
90+
not_found_recover_text = "« back to home »"

content/blog/micro_opt_hell_simd_bit_gather.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
+++
22
title = "SIMD Bit-Gather: X86 AVX2 Edition"
3-
date = 2025-05-21
3+
date = 2025-06-22
44
draft = false
55

66
[taxonomies]
@@ -28,7 +28,7 @@ It is a simple bit-gather, but vectorized using ``X86 AVX2`` intrinsics.
2828
For some reason, Burst compiler did not want to vectorize the ``Load4`` internal loop, so I wanted to see if using manually placed intrinsics would be faster.
2929
It was faster by 3ms on the median time for a chunk of volume ``66^3``, but for a chunk with volume ``34^3``, this is most probably only a marginal improvement. I will most probably remove this for the sake of code cleanliness and upgradeability, since having raw intrinsics like that make modifying the code extremely more convoluted and annoying for such a small speedup. But, I will leave this here on my website just as a way to archive it because I still feel proud of such an optimization, even though it's not that good.
3030

31-
```cs
31+
```cs, linenos, hl_lines=10 13 16 19 22-23
3232
[MethodImpl(MethodImplOptions.AggressiveInlining)]
3333
private unsafe int CalculateMarchingCubesCode(uint3 position, int baseIndex) {
3434
// https://docs.unity3d.com/Packages/[email protected]/manual/docs/CSharpLanguageSupport_BurstIntrinsics.html

content/blog/project_ideas.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
+++
22
title = "New programming project ideas"
33
date = 2024-04-27
4-
draft = false
4+
draft = true
55

66
[taxonomies]
77
categories = ["Random"]

content/blog/unity_ecs_2025.md

Lines changed: 64 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
+++
2-
title = "The State & Usability of Unity ECS in 2025"
2+
title = "The state of Unity ECS in 2025"
33
date = 2025-05-21
44
draft = true
55

@@ -26,12 +26,11 @@ Here is the list of the nuances / pitholes, and pros that we feel should be more
2626

2727
# Pros
2828
- Easy to create "entity" like behaviour without worrying about what should be inherited and what should be composited; everything *will* be composited
29-
29+
- Umm.... it's.... it's le ECS.... hehehehehe
3030

3131
# Cons
32-
3332
## Pit Holes
34-
- ``ISystem`` and ``SystemBase`` ``OnCreate`` executes even before some baked entities get created in the world. Meaning that if you want to fetch a baked singleton component to spawn something only **once** you need to do something like *this*:
33+
- ``ISystem`` and ``SystemBase`` ``OnCreate`` executes even before some baked entities get created in the world. Meaning that if you want to fetch a baked singleton component in one of your sub-scenes you need to do something like *this*:
3534
```cs
3635
public partial struct System: ISystem {
3736
private bool initialized;
@@ -49,8 +48,65 @@ public partial struct System: ISystem {
4948
}
5049
}
5150
```
52-
like what the **fuck**? why can't I just add a ``[CreateAfter(typeof(SomeSceneLoadingSystem))]`` instead and call it a day?????
53-
54-
- Why is it that some functions require you to use ``SystemState`` whilst others require you to use ``SystemAPI``?? Why can't you keep it consistent...
5551
- ``ISystem`` can NEVER use or even REFERENCE a managed class type. Even if you don't have ``[BurstCompile]``, you still can't use it in ``ISystem``
56-
- Due to code gen, using generics (or generic query functions) becomes a bit harder. Still doable as long as you don't use ``SystemAPI``
52+
- Having a baked child (with a non (1,1,1) scale and with a collider component) will not bake it as a child. Any transformations done on the parent entity will not be propagated to that child or its children. No warning or anything like that to let you know either... lol
53+
- Due to code gen, using generics (or generic query functions) becomes a bit harder. Still doable as long as you don't use ``SystemAPI``
54+
- There is no way to force two colliders (a child and a parent) to not be merged during baking when using ``Unity Physics``. So far, I have not found a solution for this. This is really annoying.
55+
56+
# SystemAPI discrepencies
57+
- There are missing ``EntityManager`` methods in ``SystemAPI``.
58+
- There does not exist a ``SystemAPI.TryGetComponent`` nor ``SystemAPI.TryGetComponentRW``. You have to do a manual ``HasComponent`` check and then fetch the component data
59+
- There does not exist a ``EntityManager.GetComponentDataRW`` for entities, like ``SystemAPI.GetComponentRW`` for entities.
60+
61+
# Entity Baking / Conversion Workflow
62+
- The ```Entity Baking System```. It's painful that all the GameObject prefabs that can be spawned at runtime must be first converted to Baked Entities. This stops you from using ``Scriptable Objects`` to store ``GameObject`` prefabs to instantiate, as you must keep the data in an ``Authoring`` ``MonoBehaviour`` with corresponding ``Baker``. For example, the following data-driven code:
63+
```cs
64+
public class SwordData: ScriptableObject {
65+
public float hitDamage;
66+
public float aoeDamage;
67+
public float range;
68+
public GameObject hitPrefab;
69+
}
70+
```
71+
72+
must be converted to all of THIS to be able to instantiate ``hitPrefab`` as an entity
73+
```cs
74+
public class SwordDataAuthoring: MonoBehaviour {
75+
public float hitDamage;
76+
public float aoeDamage;
77+
public float range;
78+
public GameObject hitPrefab;
79+
}
80+
81+
public class SwordDataBaker: Baker<SwordDataAuthoring> {
82+
public override void Bake(SwordDataAuthoring authoring) {
83+
Entity self = GetEntity(TransformUsageFlags.None);
84+
85+
AddComponent(self, new SwordData {
86+
hitDamage = authoring.hitDamage,
87+
aoeDamage = authoring.aoeDamage,
88+
range = authoring.range,
89+
hitPrefab = GetEntity(authoring.hitPrefab, TransformUsageFlags.Dynamic)
90+
});
91+
}
92+
}
93+
```
94+
95+
{% note(header="Edit") %}
96+
Because you must first add it to the entities baking dependency chain for conversion. That whole system should be removed and instead of using gameobjects, Unity should have implemented an Entity only workflow. Adding that level of complexity (converting from GameObjects to Entities) complicates things, as you can only do that at runtime.
97+
{% end %}
98+
99+
I mean, I understand why they'd opt for this. Having all the data being serialized in entities before spawning them makes loading scenes with lots of entities really quick, as it's just a memory copy practically. No expensive loading. My issue is how they have built the entity conversion workflow on *top* of GameObject based MonoBehaviours instead of coming up with a dedicated solution specifically for ECS.
100+
101+
Unity states that "you should be able to mix and match ECS and GameObjects in your projects" but that practically never happens. Either because you need one ECS-specific feature in ECS that isn't supported by MonoBehaviours or because you need one GameObject specific feature that isn't supported by ECS. It's half baked, basically. If they made the runtime Entity component editor able to create entity "Prefabs" and set their components that way, that could save us some trouble, but I bet it wouldn't be easy considering the other design choices.
102+
103+
104+
- ``MeshRenderer``s with multiple materials create multiple additional entities during baking, but there's no way for the user to know about these additional entites. This screws you over if you want to keep track of all the mesh renderers of a converted ``GameObject`` so that you could, for example, change their ``RenderFilterSettings`` value at runtime (for example, for changing the light layer value at runtime). At least Unity converts the multi-mat ``MeshRenderer``s to Parents in the ECS world, so you could iterate over its children, but that's still somewhat stupid.
105+
106+
# Blob Data
107+
- No way to check or debug blob data in the editor. Looking at a component with a ``BlobAssetReference`` will NOT show the internal blob data that was baked. There isn't a blob data window tab either. It's as if blobs do not even exist in the editor lol.
108+
109+
{% note(header="Lol, lmao even") %}
110+
\> https://blog.s-schoener.com/2024-12-17-unity-blobs/ <br>
111+
\> "Blob assets in C# were an experiment, and it failed."
112+
{% end %}

content/projects/data.toml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,26 @@ tags = ["tech", "rpi", "machine learning", "electronics"]
8383
links = [
8484
]
8585

86+
[[project]]
87+
name = "Unity Multiplayer Chat Lobby Prototype (2025)"
88+
desc = "Implemented in a few hours using Unity Netcode for GameObjects."
89+
tags = ["unity", "multiplayer"]
90+
links = [
91+
]
92+
93+
[[project]]
94+
name = "Unity Multiplayer Tic Tac Toe Prototype (2025)"
95+
desc = "WIP. Using Unity Netcode for GameObjects."
96+
tags = ["unity", "multiplayer"]
97+
links = [
98+
]
99+
100+
[[project]]
101+
name = "Unity Factory Game Prototype (2025)"
102+
desc = "WIP. Using ECS as the backend. Taking inspiration from Satisfactory / GregTech / Factorio / Create. Maybe something more realistic with more in depth automation."
103+
tags = ["unity"]
104+
links = [
105+
]
86106

87107
[[project]]
88108
name = "This website itself!!"

0 commit comments

Comments
 (0)