3D / Game Development / Programming Thread

Yeah, I worked for about 6 years as a programmer. I worked in the defense industry.

2 Likes

Holy crap that’s cool bro lol sounds like some interesting work!!!

2 Likes

Yeah I’m hardly following you.

Structs are something I miss…

Never used field vars or lambdas… So yeah not my language over my head.

1 Like

Oh ok…was just trying to hold a reference to a variable in another script in the first script.

I wanted to be able to not have to call my get method Everytime I needed to change data

We both know nothing I will say is over your head lol

1 Like

That sort of makes more sense… But yeah thats a difference in languages there for sure.

The scripting environement/game engine has all the scripts running in tandem… Sort of a sand box. Lots of different ways to establish references like that. I do have to do that sort of thing all the time.

1 Like

Yea man … It felt kind of basic but believe it or not I’ve never tried to use the ref function in unity c#. I think before I just always created a new array in the calling script and synced it with the other arrays in other scripts lol so I never used references In the way I wanted to this time.

I know this will make me sound really basic but I had actually forgotten that you could hold a (copy) reference that effected an original variable declared in another script…

And yea ..I think my first post was a little messy but both basically said the same thing bro :sweat_smile: at least in my mind.

Anyways because structs can hold multiple types I was having issues with nullvalues . I would declare the struct in the data script and then try to pass it as an argument but because arrays act differently than other types across scripts my values kept coming up null. That was what got me on the path to use the ref function.

This was the first time I used enums and structs to hold and organize all my data so I was kinda bound to run into the array issue across scripts. Anyways ..that operator is going to be really useful until unity actually supports c#11+

Btw…thanks for baring with my ignorance/messy mind. Like I said I’m not the brightest person but I legit love to dev man !!!

1 Like

You’re good I havent coded in a while so its cool to think about.

Structs are nifty but hard to impliment. Good for storing things but manipulating and moving them declaring arrays of them… Pretty fragile.

I’m stuck declaring new classes to do such things.

1 Like

Yea…I think that’s what I’m gonna do from now on lol it’s the best option. It’s unfortunate but my exposure to more efficient techniques is pretty minimal.

I’m trying to move towards more elegant less stupid ways of programming but it’s a learning process I guess.

On the bright side I’m leaning alot of new techniques fast using AI. But the original strategy was to declare a reference field variable. If I could use c#11+ I guess it would have been as easy as creating a class but I could use a struct like you would use a class …

Idk bro…I’m gonna use ai alotmore to learn better ways of coding. Anyways…I’m happy with the result so far.

1 Like

Looks like I will be using a class man .. lesson learned lol thank you bro

1 Like

I have a c# masters class on udemy. Thinking I need to take that seriously like I’m taking music study more seriously

Edit: guys I might be a basic ā– ā– ā– ā– ā–  lol and lazy :sloth:

I’m just learning you can use singletons and scriptable objects in unity for data structures. On my racing game all the vehicles attributes were handled straight from a save file and synced across scripts when using arrays.

This is my first time using structs and not I’m realizing you can use singletons instead of classes and scriptableobjects for persistent data across scenes and game exit.

I feel like I’m just now ready to really be a good programmer but AI is taking over … possibly. Fml

@Mars

2 Likes

I think you might be making it too complicated with the ref thing. Maybe you’re applying concepts from C/C++ in C# ? I’m doing a bit of C# lately and i don’t think unity supports entity framework which is more common in the wider .net ecosystem. It might be best to just serialize and deserialize your objects to JSON files, that should be easier. Ask AI to go that route.

2 Likes

Its a struggle similar to what I went through. I wish I could do bit wise operations and make super effecient storage systems but godot more or less runs everything at 64 bit… You can get more efficient arrays going buts all baked in. Best that can be done is use basic stuff in unintended ways… Like Color var being a 4 vector.

Code looks odd declaring a color when you mean to be doing a spatial vector… Like unit vector with magnitude… Gotta wrap a class around it but that kind of stuff is still fun.

I need to start coding. Ive taken a couple days break from 3d stuff. Just been chilling and playing video games. Gotta finish retexturing that boat. Gonna be a pain.

That’s what’s up man I think they call it hacking basically. And I’ve rarlycome across that makeshift necessary dynamic in code but I definitely know what u mean and it is fun.

And also ..chilling sounds good bro. I’ve been trying to also. I wish I could choose between game dev or music so I can get deeper faster but I can’t..I’m stuck switching focus …

Off topic…will AI make programmers obsolete?

AI is better at chess.. People still play. Cameras take perfect portraits people still paint.

Really though I think AI as it is is basically a smokescreen… It’s sort of a farse. The big companies love it because the moat is already there… But building data centers the size of small cities just to have computers approximate intelligence… That’s a bad trade off and an obvious sign that we’re getting ahead of ourselves.

I mean its a glaring gap of inneficiency.

So whatever it is that makes AI more portable and modular… I think that AI construction just becomes a more common branch of programming… Its more like algorithmic construction and less func by function coding. Nueral nets sitting next to nested statements in the coders tool box.

Frontier models… Sounds cool today but I bet it looks like a stupid idea in hindsight.

And its not really intelligent when it becomes a frozen binary. It’s something else… Like a mirror of intelligence… Or a ghost.

1 Like

I got a copy of your post before via email. I can ignore it. I wouldn’t want to derail the thread.

But in brief. Things can be intelligent without consciousness. This is the bridge into philosophy… How do you define intelligence? How do you define consciousness?

I don’t think the AIs are conscious but they are self-aware. That is objectively… They can identify themselves and what they are and even their roles in a greater system. But they do this without the integral deep self awareness that we have… They can do all that because its all been explained to them. They’re more like virtual intelligences from Mass Effect.

I think this guy has the right approach.

1 Like

3 Likes

Quite unique. Can sort of looks like it’d be a drone. Is that a full on vehicle?

I got back to coding yesterday… Should have something to post within a couple days.

Only 4 or 5 major steps.

Sort of wondering how it’ll work as a playable space. I mean what I’m working on will temporarily pass through a phase that is something like super mario galaxy.

The planet will be large enough that it doesnt feel that way but I want to get on to skeletal rigs and animations.

Later I’ll have to double back and set up some sort of stream/loading with all the spatial projections redone so it functions more like a flat plane that pulls in the location specifics.

This should let me mess around with the oddities of navigating on the surface of a sphere… Tracking compass directions etc.

Instead of trying to reverse engineer all the reference factors… Just build it out and at least have it to refer to when making the more ā€œshortcutedā€ scene construction.

As always its more complicated than it seems… Got 3 days off after tonight I should have timeto work on it.