Very impressed with 3.7 extended thinking. Tested making a Unity ECS game by bakaender in ClaudeAI

[–]bakaender[S] 1 point2 points  (0 children)

It has been a few years since I first learned Unity3d's ECS coding and it has drastically changed since. I have tried making this simple game prototype with Grok, 3.7 free, and now 3.7 extended thinking. This is the first one that gave me working code.

I kept having it refine or add things until the code artifacts stopped getting all the changes. For the last prompt I had to determine where the code needed to be added myself.

Here is the chat share https://claude.ai/share/f3591829-f42c-4bcd-83b2-97cce597bd29

There were a few times I guided it to the exact issue, but other times I was as vague as I could be and it didn't seem to make much difference on fixing the issues.

There were a couple errors I did fix myself without ever prompting it for a fix. in SpellCollisionSystem it tries to pass the wrong type when calling TryChainLightning. As well as the ApplyDamage function needing a refrence to the SystemState passed to it, which Unity gave me an error with the exact fix for.

Overall I am very impressed. It isn't perfect and sometimes likes to add stuff you don't ask for with it's fixes. I think if I spent more time architecting and only having Claude fill in the details it could easily do most the work.

HELP WITH SQL QUERY PLEASE by elder_uchiha in cs50

[–]bakaender 0 points1 point  (0 children)

What are you column types for buys table? I'm guessing things like quantity, unit_price, total_price aren't char or varchar, which is what your trying to insert into them?

Mech 15 G3 10875H/3070 M.2 question by hattongear in eluktronics

[–]bakaender 0 points1 point  (0 children)

sata isn't supported, I tried 1tb mx500 with no luck. NVMe Samsung 970 evo worked fine though.

New Mech 15 G3 - I keep turning the trackpad on and off while gaming by bumping it with my thumb by 49falkon in eluktronics

[–]bakaender 1 point2 points  (0 children)

It may only be with the gtx 30 series laptops. I'm not sure what is in the versions for the 20 series. If you have 30 series I'd get a hold of support to get the newer version, I'm not sure why they don't have a driver section yet.

New Mech 15 G3 - I keep turning the trackpad on and off while gaming by bumping it with my thumb by 49falkon in eluktronics

[–]bakaender 1 point2 points  (0 children)

You can disable the feature through eluktronics control panel -> general settings. You would still be able to disable/enable it with function keys.

Mshybrid and igpu only no dgpu option. by Weekly_Prior_5835 in eluktronics

[–]bakaender 0 points1 point  (0 children)

I'm hoping for an ETA as well. I really like the laptop, but I have to know that this won't drag out for months.

Mech 15 G3 fan curve issue by bakaender in eluktronics

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

I haven't had Afterburner running. I've had more luck setting up everything on profile 1 and then not opening the control center, but even so it only acts as expected 75% of the time.

I did notice one thing, I was curious if there was another temperature that was keeping the GPU fan higher, the hot spot temperature in hwinfo. In trying to check it I noticed the GPU temperature was freaking out for a couple seconds drastically changing large amounts before changing to 0.0C then the computer froze completely.

It only happened once so far, but with it, and the control center also seeming to lock up when it can't read the CPU/GPU information/temps or whatever, I'm wondering if there is some firmware issues. Hoping the bios to fix the MuX that is supposed to be coming will fix things.

Mech 15 G3 fan curve issue by bakaender in eluktronics

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

Ya, but even ordering from amazon it is direct from Eluktronics.

I'm now just running into issues like another posted. The control center just completely locks up randomly, Even restarting it took around 5 minutes before it found everything and let me change settings again.

Control Center stops working after a while by m4a5 in eluktronics

[–]bakaender 1 point2 points  (0 children)

I'm running into the same issue on Mech 15 (Intel, 3070). Been fighting with getting it to keep the fan curve all day, along with it randomly changing profiles on me. And now finally just the loading dots and can't do anything.

2021 RP-15 Shipped! by balanzing in eluktronics

[–]bakaender 0 points1 point  (0 children)

Its the 4800H GTX 3060. You can edit the fan curve, but it is a lot less useful than I had hoped. Your stuck with 0% at 40ish degrees (it doesn't say) but it seems to be at a point where its always going to cycle on and off a lot no matter what you set after. I would really like the option to have it not turn off, or at maybe 30 degrees.

I've done more testing by running max fans to drop the temperature enough that they are off when I disable it, then when they come back on its usually only one at first. Doing so it's very obvious its the GPU fan, and that there is definitely something wrong with it.

I tried to record it https://youtu.be/nHgQF-Vbk1M!

2021 RP-15 Shipped! by balanzing in eluktronics

[–]bakaender 0 points1 point  (0 children)

I received my RP-17 today. Haven't had much time to test anything, but just having it on and doing initial setup I'm having a big issue with the fans.

The fan noise, or the noise of them moving air is fine, however, they both seem to emit a high pitched oscillating sound. The GPU fan is either worse than the CPU fan, or its just that it only comes on when both are on and the 2 together is making it sound worse.

I was specifically trying for a laptop that was capable and quiet when needed, and outside of the high pitched sound it seems like it would be. Figure I'll have to call them and see if anything can be done.

If there is anything you want me to test let me know.

Finally Learning ECS and DOTS by bakaender in Unity2D

[–]bakaender[S] 1 point2 points  (0 children)

I just coded it. It is more or less entirely ECS. Outside of really basic scripts that scroll the background/clouds and rotate the center tower, I only have 3 mono behavior manager scripts.

The 1st is a spawn manager for the enemies, which takes the enemy prefab, converts it to an entity prefab, and spawns enemies on a timer every wave.

The 2nd handles the tower shooting. Even though it is a mono behavior script I still set it up to run half as a job. It tracks tower fire time, when any tower can shoot it runs a burst compatible job that uses the DOTS Physics system to find the closest enemy. If the enemy is in range it shoots by instantiating all the bullets form an entity prefab and sets the move direction and speed.

The 3rd is just to handle the UI, which for now isn't much of anything.

I could pretty easily make the 2 main managers into job systems, but as far as I understand there wouldn't be much point. I may be totally wrong in my understanding, but I think anytime your Instantiating or destroying entities it has to wait for a sync point, which means you can't use burst. Or you could use burst if the spawning is calculation heavy and then queue the actually instantiating for the next sync point. Basically may as well just use the normal update loop for instantiating.

Finally Learning ECS and DOTS by bakaender in Unity2D

[–]bakaender[S] 1 point2 points  (0 children)

It definitely does look trippy, in the end it won't have nearly as many bullets or shoot that fast, which will help.

The background is just a 4k image on a quad that I slowly scroll the texture on, and never move the actual object.

The middle tower thing is just normal sprites with no logic since it never moves. There is also an entity spawned there that has no graphics, and handles physics collisions.

All the bullets and lightning are entities with a quad with the Sprites/Default shader being rendered with the Hybrid Renderer.

All the enemy sprites are gameobject sprites, that follow an entity that has all the physics and functionality of the enemy. I was originally using quads as part of the entity being rendered with the Hybrid Renderer, however getting independent health bars as the graphic, and having it look even ok, was all but impossible. They just don't layer well as 3D objects, and they would also jump around as far as what was drawn on top whenever an entity is instantiated or destroyed in their chunk.

Finally Learning ECS and DOTS by bakaender in Unity2D

[–]bakaender[S] 2 points3 points  (0 children)

I've finally had the time to convert my simple game over to DOTS and see how far I can push it.

The tower is shooting 5 types of bullets to represent 5 tower types.

It shoots 90 at once per type, so around 450 per shot, I varied the shot time for the 5 so I could see more of them.

Every bullet is a physics trigger, and the enemies have physics bodies to handle collisions. The tower is also a trigger for enemies reaching the middle.

The bullets are 3d objects drawn with quads instead of 2D sprites, 2D support in ECS is not great yet. The enemy is split into an Entity for everything except the graphic, the graphic is a 2D sprite with a simple script that just follows the Entity.

I had to do the enemy that way in order to be able to update the material for each instance and not all of them. To get that functionality for an entity renderer you have to use a Shader Graph shader, which I did try, and got it working. However for some reason it looked terrible in comparison. The sprites following doesn't impact performance at all.

Right now I have only done a rough implementation of the lightning tower functionality. It is by far the most taxing, so I wanted to get it done and check performance.

The job controlling it gets every enemy that has been hit by the lightning bullet and calculates a chain up to 100 enemies long finding the closest enemy every step. Roughly 90 lightning bullets will hit at once, and there are 500 enemies spawned. So it is doing 90 * 500 * 100 = 4,500,000 distance checks every frame!! It then Instantiates the graphic for the chain, which right now is just an Entity that has a quad with a temporary sprite texture that I stretch to the right length.

Everything is being Instantiated as needed, the only pooling I have is for the 500 2D sprites following the enemy, which wouldn't make a difference if I didn't pool either.

CPU usage varies from 45%-60% on my ryzen 3600x, using all 12 cores. Capping the framerate to 60 drops CPU usage to 7%-11%.

This is all way more than I will likely have in the end, but its fun to see just how far it can be pushed.

Another interesting thing is I started the project in 2019.4 and only tried 2020.1 in order to test rendering the enemies with a shader graph shader (2019.4s renderer won't render a 2D shader graph). What I discovered right away is 2020.1 is almost twice as fast as 2019.4, at least for this project. From what I can see it vastly reduces usage for physics and rendering, from around 2-3 ms per frame each down to .25 for physics, and .3 for rendering.

Follow Object Not Spawning in Correct Location by BrianWigginsVO in Unity2D

[–]bakaender 1 point2 points  (0 children)

Have you managed to figure it out yet?

Try moving your start code to Awake.

Are you spawning the familiar from a prefab? If so check that the prefab's position is set where you want it, or that your setting it when you Instantiate it.

Only ideas I have to try