Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Raenir Salazar
Nov 5, 2010

College Slice
Finally got my rotations figured out. To accomplish a sort of Resident Evil "item/clue inspection" camera where you have full free 3D rotations I had to plug in the global world axis I wanted to rotate on (to match the camera) plus the angle of the amount I'm rotating into the Add Local Rotation (passing in a Quaternion) and this gets me perfect 3D rotation without gimbal lock. :toot:

Adbot
ADBOT LOVES YOU

jizzy sillage
Aug 13, 2006

Nika posted:

Where do you teach? I've always been interested in how game development and design is taught, but have never talked to anyone who's done it.

I teach at the University of Canterbury in Christchurch, New Zealand. I started a couple years back as a teaching assistant because I was taking a break from my degree in game dev due to burnout, and just sorta emailed them and asked if they had any part time teaching roles.

Now I'm full time teaching, operating the motion capture suite, and helping set up our new virtual production studio.

Teaching is really cool, I enjoy it a lot. I don't think a more formal path into education would have suited me very much, and I've had a few events teaching high schoolers that I found pretty difficult.

I don't really have any named or quantifiable teaching methods, I just try to get my students to build an attachment to what they're trying to make - get excited about making your game, and you'll find it easier to learn how to do vector math; want to design an interesting puzzle, here's ten different games that did puzzles differently but are engrossing, one of those tweaks the back of your mind, right?

It can be tricky to find the balance for a lot of students, too - some are completely disinterested in theory, and just want to learn how to program or animate ("I've never played a video game but I play a lot of chess" types). Others just want theory and really struggle with the technical skills (ideas guys).

Where do you put the minimum standard for passing a game development course? How do you split a degree into appropriate papers that cover enough core topics without making everything compulsory?

Universities (as opposed to technical colleges) are often theory heavy, with enough application to get the student to the workforce, but in game dev that's not really enough - they need to reach workforce with enough technical skill to fill a junior role and enough theory to be able to discuss the "why" of what they're building, and I'm not sure they always do.

Anyway teaching is cool and I like talking about it so feel free to ask me anything.

Alterian
Jan 28, 2003

I also teach game development at the community college level. My husband is a TT prof that teaches undergrad game stuff!

I just had my 10 year anniverssary of teaching full time. I didn't think I would stay at this job for this long, but dammit, the stability and summers off is nice.

OneEightHundred
Feb 28, 2008

Soon, we will be unstoppable!

aardvaard posted:

I went to game dev college cause i'm an idiot and one professor would always give the advice that if you want a comfortable life as a game developer - marry well.
You can make a perfectly livable salary doing it but it's not competitive with other fields (Facebook's median salary is almost $300k...) and there are a few notorious lowballers (*cough* Blizzard *cough*).

But going into business for yourself doing anything is extremely risky and involves lighting tons of money on fire.

jizzy sillage posted:

they need to reach workforce with enough technical skill to fill a junior role and enough theory to be able to discuss the "why" of what they're building, and I'm not sure they always do.
It's weird to read this because so much of everything is non-standardized and ad-hoc and everyone has a different way of doing it. Like you might get some standardization with "the way Unity does it" and "the way Unreal does it" but outside of that, oof.

OneEightHundred fucked around with this message at 05:38 on Apr 27, 2024

Raenir Salazar
Nov 5, 2010

College Slice

OneEightHundred posted:

It's weird to read this because so much of everything is non-standardized and ad-hoc and everyone has a different way of doing it. Like you might get some standardization with "the way Unity does it" and "the way Unreal does it" but outside of that, oof.

Yeah I've been at it for 7 years of software development and there's still a lot of ad-hoc stuff that's always going to be different and differ studio to studio. But some stuff is always useful if at least at a minimum level to have an good idea of a starting point. Ultimately game development just like any programmer or software development role is about problem solving; and just having a decent and health means of approaching and breaking down problems even if the technical knowledge is a little lacking can get you places as long as they have the determination to keep at it and not get discouraged from setbacks.

Basic understanding of vectors and the common operations like Dot Product and Cross Product, some data structures, algorithms, design patterns, some trig, some programming, basic AI concepts like state machines, and it always helps to be familiar with other aspects of the development pipeline like knowing how to make a simple model in blender (but some studios might use Maya, but this isn't that important for a developer, just that the candidate is familiar with the concepts the artist will need to communicate with you), texturing/uvs, etc etc.

This is presumably what jizzy sillage refers to, as long as they have a general understanding even if they have to constantly use google to remember things, you can probably still get by.

Basically its about knowing what you don't know, like known unknowns or unknown knowns sort of deal; "I want to get the point C of the triangle ABC, but I only know the line/vector AB, while AC and BC are unknowns, I'd like to have basically the (vector) projection of AB onto BC to find point C as I want to know where BC and AC intersect but how? Oh I know the direction that point A is pointing (in this case towards B) so if I just let the line AC be arbitrarily or infinitely long I can get the projection of AB onto AC instead to get AC' which gets me what I want! Woo! GameDev Math!" (Actually a real world scenario I faced like a week ago at work, I wanted to have a more robust "zoom" where I wouldn't overshoot if the camera happened to be far enough above the target when zooming in that it technically never gets close enough to the origin of the 'target'*)

e: Technically I could've just placed a sufficiently large mesh plane slicing through the spot in question to get the point using a ray or whatever and turn off its rendering so its invisible but I knew I could avoid this and any problems it might cause down the road by just constructing the information I wanted via math and it seemed more fun to me as a solution.

Hughlander
May 11, 2005

OneEightHundred posted:


It's weird to read this because so much of everything is non-standardized and ad-hoc and everyone has a different way of doing it. Like you might get some standardization with "the way Unity does it" and "the way Unreal does it" but outside of that, oof.

Is that really any different than webdev? The way Blazor does it, the way react does it, the way vue does it? The way this company uses these 182 npm modules and that company uses those 143 npm modules? (Honest question I've spent way too long in live service games.)

jizzy sillage
Aug 13, 2006

Raenir Salazar posted:

This is presumably what jizzy sillage refers to, as long as they have a general understanding even if they have to constantly use google to remember things, you can probably still get by.

Yeah this is exactly it.

If you're a programmer, can you do vector math? Can you visualise them in 3D space? Do you understand the difference between a physics based solution or a kinematic one? Can you identify potential performance issues before they occur?

If you're an artist, can you sketch a character from a verbal description? Can you pick a colour palette to evoke an emotion? Can you animate a walk cycle?

The core basics never really change, are engine- and tool-agnostic, and the local studio "how" of animating something or programming something is always learned once you get the job, not before.

Alterian
Jan 28, 2003

One of the more important skills you learn in a game dev program is how to learn. If you get thrown at a new / different program for a job, how do you get competent at it quickly? I've had to use 3dsmax, maya, and blender for various projects.

I teach a tech art class spring semester. I had planned on teaching tool creation in blender using Python. Of course Blender 4.0 comes out with node tools in November. I didn't have time to learn it myself but it seemed important enough I changed the last 3 weeks into them experimenting with guidance to create a tool with it that they would want. I warned them that if they hit an issue beyond a basic one, I can't help. I have no clue, but they are free to reach out for guidance from the blender community. The only thing is they have to document for me their process and where they get information from. Welcome to the wonderful world of tech art! You are the one that has to solve the problem!
It's turning out great. I have some students who are really getting into it.

Raenir Salazar
Nov 5, 2010

College Slice
One thing experience I think is trying to tell me is the importance for solid/methodical debugging. The rotation probably I basically solved once I decided to draw debug arrows (using the Unreal provided ones, i.e Draw Debug Arrow/Draw Debug Line, etc) and it let me more clearly see what wasn't working and why. And additional keyboard hotkeys to let the rotation happen on a "auto" mode instead of by holding down the buttons so I can detach from the pawn and see it from above.

The debug arrows specifically let me see the World Axis vs Local Axis issues and better think about what I should be attempting; and thanks to the Blueprint C++ library that added some Quaternion functionality I found had an easier time resolving the gimbal lock issues.

Nika
Aug 9, 2013

like i was tanqueray

jizzy sillage posted:

Teaching info

This is all really interesting, thank you for sharing. Education in game dev and design has always been sort of a black box to me, but that's probably because I learned most things in the worst and most chaotic/brute force way possible, and it's difficult to imagine doing it in a structured manner.

quote:

they need to reach workforce with enough technical skill to fill a junior role and enough theory to be able to discuss the "why" of what they're building, and I'm not sure they always do.

This is something I've seen a lot of as well, just from talking to aspiring designers and developers, and sometimes I wonder if most people even want to learn the why. Many I've talked to want to get into the industry but seem fundamentally incurious about how anything works (even on the level of individual systems) except for whatever theoretical idea is currently occupying their mind.

The best people I've worked with, in this industry and others, are curious people who enjoy zooming out to get a look at the bigger picture, how and why everything works together--at least sometimes.

Alterian posted:

One of the more important skills you learn in a game dev program is how to learn.

I majorly agree with this as well, and feel like it applies in almost any given profession but especially in gamedev.


quote:

Welcome to the wonderful world of tech art! You are the one that has to solve the problem!

One thing I dislike about my career is that I've never gotten to work at a studio with a strong tech art department. I've been lucky to be able to talk to some of those guys/gals at Naughty Dog for awhile, and from everything I learned from them I could swear that good tech artists are the glue for so many disparate areas of a game.

Raenir Salazar
Nov 5, 2010

College Slice
Yeah we hired a tech artist at our studio as like a contractor/consultant and they're probably pretty vital.

Alterian
Jan 28, 2003

My background is environment art / level design, but I did pick up programming. Most of the classes I teach are more of an art side slant, but I try to explain a lot of the guts of the engine with the art. For instance I try to give them an appreciation of batch counts / tri counts. Understanding what those are and how they can affect your game can help with the why of why you should approach your 3d art a certain way.

I might be a little unique in my situation with teaching it at a community college. The only barrier to entry is you need a high schoo diploma / GED. I get students frequently who have zero experience with technology other than playing games.

jizzy sillage
Aug 13, 2006

Actually technological illiteracy is a rapidly growing problem even at the University level here - my partner teaches here and she once said to a student "the first thing you need to do is zip it"; the student thought she was telling her to shut up rather than compress the file.

I'm not sure what's causing it. I think it's a mix of the rise of smartphones and the COVID pandemic hitting them during their highschool/teenage years. I also have had students with English literacy problems too, which can be extremely frustrating at a tertiary level.

This generally presents as a student who is unable to communicate effectively with either written or spoken english, is therefore unable to ask appropriate questions of either staff or search engines, and has an expectation of being spoonfed the solution (and will be frustrated when there isn't a single/concrete solution).

Going back to root causes:

- Smartphone interfaces don't match desktop PC interfaces. You don't really perform many file operations on a phone (zip/unzip, move, rename, etc). You don't have a cursor. You don't see file extensions. Apple puts everything in the cloud for you and you never need to know how it works, just that it does.
- For many students, COVID meant learning remotely through Zoom, and that meant not learning at all. This means students turning 18 and coming to University, who are somewhere at the educational level of a 13/14 year old.
- High schools ignoring the whole ChatGPT/gen AI problem, so they've been getting away with submitting generated essays. I've had students genuinely shocked when I told them I knew they hadn't written a word.

These are just guesses based on my experience, but it's a huge problem and something I've discussed with my colleagues a lot. So far we don't have a solution that fixes everything for everyone, and I do worry sometimes that some students are falling through the cracks.

Edit: Also, video tutorials! gently caress! None of them want to read anything more than a sentence or two, and want every lecture recorded so they can "watch it later" (not watch it and not have to attend in person). I write a ten step solution to a problem with screenshots and they ask me "I'm stuck, I don't know what to do"; it's written right there, step 5! Read it!

jizzy sillage fucked around with this message at 00:35 on Apr 28, 2024

roomforthetuna
Mar 22, 2005

I don't need to know anything about virii! My CUSTOM PROGRAM keeps me protected! It's not like they'll try to come in through the Internet or something!

jizzy sillage posted:

Actually technological illiteracy is a rapidly growing problem even at the University level here - my partner teaches here and she once said to a student "the first thing you need to do is zip it"; the student thought she was telling her to shut up rather than compress the file.
That particular example is funny and not too horrific on its own, but yeah, the whole trend is infuriating to me and I don't even have to try to teach people stuff. I hate it because the same trends also make it hard to find how to do anything - where in Old Internet you could do a search and find a page telling you how to do a thing that would take like a minute to read, in New Internet you do a search and you get pages and pages of probably-AI-generated garbage self-contradictory answers to a question and/or ten+ minute youtube videos where the 5 seconds that answers the actual question is somewhere between minutes 5 and 8. Even the semi-official guides for e.g. how to do things in Blender are getting to be interminable videos now.

I always thought the trend came from the source and was to do with monetization, but if the students are as you say then I guess maybe the sources are just catering to the modern audience and this complaint is just you and me being dinosaurs and this is how things are done now?

Alterian
Jan 28, 2003

You should come over to the professor thread in the Science, Academics, and Language forum.

xzzy
Mar 5, 2009

It's not a new trend at all, my mom has been working in teacher certification for a state university for 30 years and she's been making the exact same complaints about students for at least the past 15. Waves of young people that are seriously lacking in skills once considered baseline and expect the school to just wave them through anyways.

Maybe the specific failures shift over time but it reveals there's a serious problem in the education system prior to hitting college. Which I think all of us know anyways so it's not like this is a shocking new revelation.

more falafel please
Feb 26, 2005

forums poster

The universities are selling the idea that if they pay the tuition, they get a degree that gets them a job, so I kind of understand where the kids are coming from. The school is treating their relationship as purely transactional, it's hard to expect the students to feel differently.

OneEightHundred
Feb 28, 2008

Soon, we will be unstoppable!

jizzy sillage posted:

Going back to root causes:

- Smartphone interfaces don't match desktop PC interfaces. You don't really perform many file operations on a phone (zip/unzip, move, rename, etc). You don't have a cursor. You don't see file extensions. Apple puts everything in the cloud for you and you never need to know how it works, just that it does.
Thinking about this one a lot
https://www.youtube.com/watch?v=D1dv39-ekBM

There are a LOT of kids growing up an environment where they don't use a desktop/laptop computer for anything.

Also while there's plenty of discussion to be had about students being below expected proficiency levels, that only matters for technological literacy if they're actually being graded on technological literacy.

roomforthetuna posted:

I always thought the trend came from the source and was to do with monetization, but if the students are as you say then I guess maybe the sources are just catering to the modern audience
Most rotten trends on the Internet do in fact come down to rotten financial incentives, but another problem with video specifically is that it rewards slick production and presentation more than usefulness.

jizzy sillage
Aug 13, 2006

OneEightHundred posted:

Thinking about this one a lot
https://www.youtube.com/watch?v=D1dv39-ekBM

There are a LOT of kids growing up an environment where they don't use a desktop/laptop computer for anything.

Yeah I babysat my cousin for a day and we put her in front of the computer to watch some YouTube. After a bit she asked how to change the "TV", and she didn't know how to use a mouse. Fortunately we had a touchpad and that was close enough to a touchscreen that she could drive it.

OneEightHundred posted:

Also while there's plenty of discussion to be had about students being below expected proficiency levels, that only matters for technological literacy if they're actually being graded on technological literacy.

I wrote a big thing about where the tech literacy is missing and needed at uni but then realised no, we don't grade for it. gently caress, maybe we should.

...

Since teaching discussion has taken over a bit, I have a couple ideas I'm kicking around for introducing game design to a cohort of first year students that aren't all destined to be game developers (some film students, some trad. animation students, some screenwriters, some game art, some game programming).

My first idea was for them to make a package of secondary media for a game that doesn't exist - fake screenshots, fake walkthroughs, fanart, reviews, soundtracks, anything that would normally crop up surrounding a game.

They need to first invent a game, then describe the game without actually making it in engine. The intent is to allow film students, screenwriters, artists, etc. who haven't yet learned any of the skills required to make game assets to produce media that still allows them to learn about game design, while simultaneously being a group project that lets them learn generic design principles and group work dynamics.

My second idea was simpler, where they would go onto Instagram or something and find one of those mobile phone game ads for features that don't actually exist (pin pulling, "only 1% of players can beat this level type stuff"). Then they grab a video of the ad, and use it to build that game. The problem with this is that it requires them to learn a game engine, which we do teach, but many of them struggle with.

Secret third option, they do both in order, giving them time to learn game engines and programming while they work on the first project, and then execute on the second later when they've got a little experience.

Mr Shiny Pants
Nov 12, 2012
I like this discussion.

I like the idea of making stuff for a game that does not exist.

As for technical literacy, it is easier understanding stuff and how it relates if you have a basic understanding on how computers function. (Filesystems, drives, networking).

Maybe all that stuff is not needed anymore, but I am a great fan of: even though everything gets abstracted to the nth degree, somewhere deep down in the stack there is a physical cable that actually needs to carry a packet somewhere. That goes for most stuff.

Mr Shiny Pants fucked around with this message at 11:51 on Apr 28, 2024

jizzy sillage
Aug 13, 2006

I got the idea from watching this Super Eyepatch Wolf video, especially the Lost Property Control Organisation; and the section where he discusses that nostalgic feeling of when you're a kid reading the game manual in the back seat of the car on the way home, imagining what the game will be like to play purely from the descriptions of gameplay and the images in the booklet.

floofyscorp
Feb 12, 2007

Oh my god, I just realised the 'how to use computer: this is a mouse. this is a file. what is a hard drive' classes we slept through at school because we already knew all of that poo poo might be actually valuable now that nobody has a desktop machine at home anymore.

I bet they don't do them anymore.

roomforthetuna
Mar 22, 2005

I don't need to know anything about virii! My CUSTOM PROGRAM keeps me protected! It's not like they'll try to come in through the Internet or something!

floofyscorp posted:

I bet they don't do them anymore.
I wonder if this is a recurring pattern, "well everyone knows [thing the previous generation all knows] so we don't need to teach that", and boom, a generation who can't cook / can't wrangle money / can't repair clothes / can't make a safe fire / etc.

Chillmatic
Jul 25, 2003

always seeking to survive and flourish
This touches on why a lot of younger/less experienced devs either hate or are super reluctant to use C++. It requires you to understand and think about the hardware you’re working with.

Like pointers are the easiest thing in the world to understand, if you know what memory is and how it works; otherwise it’s just this crazy abstract concept.

Dr. Poz
Sep 8, 2003

Dr. Poz just diagnosed you with a serious case of being a pussy. Now get back out there and hit them till you can't remember your kid's name.

Pillbug

Chillmatic posted:

This touches on why a lot of younger/less experienced devs either hate or are super reluctant to use C++. It requires you to understand and think about the hardware you’re working with.

Like pointers are the easiest thing in the world to understand, if you know what memory is and how it works; otherwise it’s just this crazy abstract concept.

An enduring memory of mine was the day we got to pointers in C++ at Full Sail around 2002-03. I know our teacher wasn't trying to be discouraging but what he said reminded me so much of that scene in Dazed and Confused with the teacher delivering a quote from Vietnam, "MEN! 50 of you are going on a mission today. 25 of you ain't coming back..."

Within a week or so, half the class had dropped and changed degree programs from Game Dev to Digital Media.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

Chillmatic posted:

This touches on why a lot of younger/less experienced devs either hate or are super reluctant to use C++. It requires you to understand and think about the hardware you’re working with.

Like pointers are the easiest thing in the world to understand, if you know what memory is and how it works; otherwise it’s just this crazy abstract concept.

you dont even use pointers in modern c++

every new version of c++ makes me want to use c more, for the most part.

Grum
May 7, 2007
I think everyone can get the concept of a pointer as an index into memory pretty quickly but how that interacts with the syntax of a given language, especially if you are still trying to figure out what you want the computer to do/what it can do and the tools you have to do that, is the real hurdle. Especially C, where you've got your declaration-follows-use syntax that is used literally no where else and is not explained in the K&R book. Earliest reference to that I could find was in a retrospective from the 80s which approximately nobody has read and if the last several decades of C have taught us anything it's that nobody can figure it out themselves

Grum fucked around with this message at 15:28 on Apr 28, 2024

KillHour
Oct 28, 2007


Having spent a good chunk of time writing a DX11 and later DX12 renderer in C++, I have determined that I really don't like it. Developers shouldn't deal with memory directly. Not because it's too hard, but because it's too easy to introduce horrible bugs.

Unsafe languages are useful for teaching about how computer memory works, but there's no reason to manage it yourself in the same way there's no reason to write assembly.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

KillHour posted:

Having spent a good chunk of time writing a DX11 and later DX12 renderer in C++, I have determined that I really don't like it. Developers shouldn't deal with memory directly. Not because it's too hard, but because it's too easy to introduce horrible bugs.

Unsafe languages are useful for teaching about how computer memory works, but there's no reason to manage it yourself in the same way there's no reason to write assembly.

counterpoint, managed languages are bad because you have the same or similar problems while lacking some of the tools to deal with them and people who dont understand you need to manage memory carefully anyway

i'd take C where people around me know they need to care vs C# where people around me pretend they dont any day

more falafel please
Feb 26, 2005

forums poster

leper khan posted:

counterpoint, managed languages are bad because you have the same or similar problems while lacking some of the tools to deal with them and people who dont understand you need to manage memory carefully anyway

i'd take C where people around me know they need to care vs C# where people around me pretend they dont any day

roomforthetuna
Mar 22, 2005

I don't need to know anything about virii! My CUSTOM PROGRAM keeps me protected! It's not like they'll try to come in through the Internet or something!

leper khan posted:

you dont even use pointers in modern c++
You use pointers *all the time*, just not bare pointers so much. unique_ptr and shared_ptr are still pointers. And bare pointers still have uses too, you just shouldn't be new/deleting them.

Alterian
Jan 28, 2003

I can't remember if I've shared this anecdote here:
I'm teaching Maya. We stick with the built in units of cm so that it doesn't get all pissy when you export out to Unity and it remains consistent. When I was starting a demo I told them to start with a half meter cube. A decent majory of them had no clue how many cm that was. They were asking if they were allowed to use a converter website.

I do have to say that the students that put the effort in and make it all the way through do end up having some pretty decent capstone projects despite us being only 2 years.

Volguus
Mar 3, 2009

Alterian posted:

I can't remember if I've shared this anecdote here:
I'm teaching Maya. We stick with the built in units of cm so that it doesn't get all pissy when you export out to Unity and it remains consistent. When I was starting a demo I told them to start with a half meter cube. A decent majory of them had no clue how many cm that was. They were asking if they were allowed to use a converter website.

I do have to say that the students that put the effort in and make it all the way through do end up having some pretty decent capstone projects despite us being only 2 years.

And the conversion would have been something like: 0.5m to feet, feet to cm, and end up with 50.0000016 cm because of rounding.

KillHour
Oct 28, 2007


leper khan posted:

counterpoint, managed languages are bad because you have the same or similar problems while lacking some of the tools to deal with them and people who dont understand you need to manage memory carefully anyway

i'd take C where people around me know they need to care vs C# where people around me pretend they dont any day

"Stop writing bad code" is not a realistic answer. People will continue to write bad code and that code will go into more important poo poo than video games. There is a reason so many big companies are going hard into Rust and similar languages. The compiler should handle memory safety.

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe

Chillmatic posted:

This touches on why a lot of younger/less experienced devs either hate or are super reluctant to use C++. It requires you to understand and think about the hardware you’re working with.

Like pointers are the easiest thing in the world to understand, if you know what memory is and how it works; otherwise it’s just this crazy abstract concept.

I learned programming in the 90's, after growing up with computers in the house. So I can comfortably say: pointers are not the easiest thing in the world to understand, they require a level of indirection that is not remotely intuitive to most people. Combine that with all the footguns inherent in raw pointers, and honestly, gently caress that noise. It's a good thing that the new generations of programmers largely don't have to deal with that stuff, and only the ones who are actually interested in low-level programming can opt into discovering the madness inherent in the system. Everyone else can frolic in the memory-managed spaces that take care of that poo poo for you, where programming is more fun and less terrible.

KillHour
Oct 28, 2007


I forgot where I saw it, but there was a talk where the presenter argued that every abstraction adds inefficiency to the final product - the theoretical most efficient system is an ASIC that is hand-built to run your application. But abstractions are necessary to actually deliver anything.

Abstracting memory management to a system designed to do it is the safer option 99% of the time, and that 1% is why extremely specialized experts exist. If C# et al make it easy to gently caress up memory access, it's because the system is poorly designed, not because the concept is inherently flawed.

Languages are getting better and better at this. At some point very soon (if not now) the argument for managing your own memory is going to be outdated in the same way as arguing that a manual transmission is more fuel efficient is outdated.

Raenir Salazar
Nov 5, 2010

College Slice
I think for gamedev its more about not thinking about it also generally means not thinking about performance, or means of improving performance. Its not really the language at fault; I don't think any of the university classes I took for any language or engine really took the time to talk about memory management or performance beyond abstract notions about algorithms.

Red Mike
Jul 11, 2011

leper khan posted:

counterpoint, managed languages are bad because you have the same or similar problems while lacking some of the tools to deal with them and people who dont understand you need to manage memory carefully anyway

i'd take C where people around me know they need to care vs C# where people around me pretend they dont any day

I'm not making any judgment on either side of this because honestly I've gone both directions in the arguments at various times and I think there's room for both (and would be more room if the interop between the two weren't godawful), but I find it funny that C# is the example for the managed language because it's the one language where I keep running into people that deliberately remove all the benefit of the automatically managed memory "for performance" (usually well before any optimisation is actually justified in any way).

I don't think this happens usually in Unity/client code at least, but on the backend side I keep running into the same things all drat time: people setting up shared buffers/pools and access with unsafe blocks "to avoid GC" (while doing it wrong and making it not just slower but also worse for GC), people deciding that the standard serialisation/logging/etc libraries are inefficient and rolling their own (that doesn't work properly, has weird bugs, and is worse for performance and GC), people deciding that instead of creating instances of classes to pass stuff around services within the same program they'll instead use byte array buffers that they use unsafe/pointers to access into the buffer (literally a worse approach than even the worst written C, particularly because the language and tooling isn't set up to support this).

By comparison, in Python the closest thing I've seen has been people setting up C libraries and doing interop to achieve this, and that's at least giving you a clean cut where managed ends and native begins. In C# you can do some horrible chimeras that randomly switch between managed and native without you noticing.

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe

Raenir Salazar posted:

I think for gamedev its more about not thinking about it also generally means not thinking about performance, or means of improving performance. Its not really the language at fault; I don't think any of the university classes I took for any language or engine really took the time to talk about memory management or performance beyond abstract notions about algorithms.

As someone who actually shipped a pretty large game in C# on Unity, "thinking about performance" and micro-managing memory are absolutely not the same thing. You want to know what was murdering my performance in the game? It was poo poo like:

- logging too much
- making a copy of every ship for each instance of that ship in the mission
- calculating firing angles for each gun on each ship during mission loading, even though I then throw out that data because I have it precalculated and stored in the ship data
- rendering dynamic HUD textures (for the radar) every frame instead of on alternating frames (nobody notices if the radar is 15 or 30 FPS instead of 60)
- performing physics checks for every projectile every frame (instead of doing it on alternating frames and only for projectiles that are close to their targets)
- regenerating displayed strings even when the text doesn't change
- having trees on the terrain

Yes, there are a few cases where I added pooling. Almost universally, these cases were "I want there to be a technically infinite number of this thing in the game, but instantiating new ones causes lag, so I'll pre-instantiate the number I need and then enable/disable them as required".

Somewhat more common was me cutting down on allocations by creating a static data container (list or dictionary or whatever) that is only used by one function, so that that function can avoid calling `new`.

In absolutely 0% of cases did I even briefly consider stepping outside of C#'s memory management.

All of my performance improvements were identified by using a profiler. I did not worry about performance for the first ~year of development, because my priority was shipping the game and features count more for that than performance does.

(also, Zelda: Ocarina of Time runs at 20FPS at best and people love that game, the occasional FPS hitch is not the end of the world)

Adbot
ADBOT LOVES YOU

Raenir Salazar
Nov 5, 2010

College Slice
Sorry if I wasn't clear but my point was more in the context of the earlier discussion in how I think there's a link I think between the two things conceptually, and that the lack of experience or education in one has negative effects towards the other.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply