« first day (3729 days earlier)      last day (1298 days later) » 

3:01 AM
I think "I want to write my own low-level-graphics api" comes more often than "I want to write a pokémon game"
 
 
5 hours later…
7:52 AM
@Vaillancourt i did do that :D
 
 
4 hours later…
11:48 AM
@dot_Sp0T which one?
 
@Vaillancourt well depends how low level
 
12:31 PM
did i ever say that i hate radians?
 
user92578
12:46 PM
Pi bad, Tau good
 
@Tyyppi_77 I think the Emperor of Mankind would disagree with you
 
user92578
Tau would make radians a lot easier
 
1:32 PM
@dot_Sp0T Ah, you meant "graphics api" rather than "pokémon game".
Okay :)
Interesting stuff!
 
it's fun to understand how pixels end up on a screen
but yeah it was only sth supersmall to get images onto a screen made of i think ~10k leds, built by a friend back when i studided electrical engineering before switching majors
 
Still, a nice challenge!
The most complex thing I wrote toward something like that was rending 3d boxes and spheres using SFML, in 2d.
 
2:06 PM
@Vaillancourt I think there's a persistent misconception that DirectX/OpenGL/Vulkan/Metal are middleware libraries that add an extra layer between you and the device, rather than API specs for how to talk to the driver.
So every so often we get someone saying "Not invented here! I'll roll my own for Maximum Efficiency™!"
 
@DMGregory how can it be there's no tvtropes article on that term Oo
 
Guess it's more of a programming trope than a pop culture trope.
 
Maybe; although I wonder what ratio of users come up with this idea "for maximum efficiency" vs those who want to do it "to learn how it's done".
 
There was an interesting GDC talk about that I was watching recently...
It was arguing that computer graphics courses that focus on first principles are somewhat misaligned with the reality of working in graphics today, where submitting commands to a GPU via an API IS "how it's done" unless you're one of the very few people writing graphics card drivers.
 
@Vaillancourt believe me, most are of the first kind
 
2:19 PM
The video is behind a paywall, but the slides are here
 
Okay, thanks!
@dot_Sp0T We'd need to track the questions we get here during the next year :P
 
@DMGregory well you could argue that many/most universities are misaligned in that it is expected that people can instantly enter certain non-research jobs after finishing university education; while classic university education is and should be about understanding and learning about underlying basics
@Vaillancourt wanna spend some time sunday setting up a tracker?
 
TBH, I think wanting to "write your own" is fine once you understand how "the mainstream ones" are working. But once you know how "the mainstream ones" are working, you'll likely not want to write one of your own anymore :P
 
yeah, which means almost all 'write your own' projects are started by folks that have not yet invested time into the mainstream stuff
 
Ahaha I don't really have time for this, unfortunately (nor the interest of really knowing the answer...)
 
2:24 PM
i mean that is mostly how my gameengine project/idea started. yet it gradually shifted to the 'wanna understand this stuff' kind of work; and now I'm mostly using it because it works and i enjoy digging into stuff
 
@dot_Sp0T I'd say even for a research job, you should understand the current state of practice, so you don't reinvent the wheel or miss opportunities to build on battle-tested approaches.
 
Yeah, I don't think it's an issue per-se. You can write your own thing without knowing how the mainstream stuff is made, you'll just face the same issues they have faced and had to fix.
 
user92578
@DMGregory IMO that's exactly how universities should work, OpenGL/DX/Vulkan/Metal tricks become obsolete in 3 or so years, which is why graphics programming courses should definitely focus on the principles instead of the tech.
 
user92578
That whole thing of going concepts first, language/tech/implementation second is really strongly present in pretty much all the uni courses I have ever taken
 
@DMGregory yes. But in my opinion you should understand / have worked with current practices before deciding to further deepen your understanding and study them. Studying used to be about deepening your knowledge from User to Creator. E.g. Studying Engineering meant you would be building the machines that you were using until then
 
2:31 PM
I have a hard time with professors teaching anything that is "used in the industry". Most of those professors I had were interested by research. Their code was bad. They knew the theory well (i.e. how it works), but the way they used the technology on a global level seemed to be lacking.
Maybe it depends on the University.
And where you live.
 
@Vaillancourt def depends on the uni. the uni i study at requires profs to work parttime in the field / does not allow fulltime professures
 
To be fair, in the talk the speaker wasn't talking about cutting-edge industry tricks. But about the paradigm of submitting commands/programs for parallel execution by shader cores. That's been with us for decades and it looks like it's got some life in it for quite a while yet. ;)
 
user92578
@dot_Sp0T What? When do they do any research?
 
As you further your education, you should be going deeper in to the theory, and less in the practice.
 
@Tyyppi_77 as part of their jobs i guess?
 
2:34 PM
And a college student should be doing more "practical" stuff and less "theory" stuff.
 
user92578
So X hours in the industry, Y hours teaching and Z hours research? Sounds like a busy life
 
I teach in an undergraduate degree program at a college, and probably go deeper into theory than I should 'cause I geek out about it. 😅
 
The uni has a bunch of aligned institutes where most profs work, but these are required to get work from the 'real world', meaning they need to find investors that pay them to do jobs; i believe they use profits they run to do research
 
@Tyyppi_77 I do ~6 hours teaching, ~32 hours at Ubi, and ~12+ hours in lesson prep/grading... basically I don't get weekends during the school semester. 😭
 
user92578
Considering a research project? :D
 
2:37 PM
see
 
user92578
We have our highest level of education split between universities and "polytechnical schools", where universities provide bachelors (3yrs), masters (2yrs) and doctorates (?yr), and the polytechnical schools provide a degree (4yrs) that is more directed towards getting a profession
 
...I am thinking about taking a year or two to get a master's degree. 😅
 
user92578
Oh neat!
 
@DMGregory Any topic in mind?
 
That's what I'm struggling with.
 
2:39 PM
@DMGregory But.. do you really do ~32 hours at Ubi? :P
 
Here if you pursue a masters it is almost always just an extension of your bachelors
@Vaillancourt that is 4 days fulltime?
sounds right
 
@Vaillancourt I've been getting better about not putting in too much overtime. 😉
 
although our good @DMGregory seems to go above and beyond regarding classprep
don't they give you a TA for grading and such?
 
I'm just reaaaallly slow.
Not for a part-timer like me. I was able to request one when I was teaching 3 sections, because without that I wouldn't have been able to juggle it all.
 
@DMGregory Nice ;)
 
2:42 PM
I've been looking at the masters as a means to an end, to be able to teach full-time. I'm a pretty curious person, so I'd be happy studying pretty much anything. But that makes it hard to pick ONE thing.
 
at my uni all classes get assigned assistants; not even the profs themselves specifically. to be fair most profs use the same assistant in different classes they teach, but still
 
Might also be a college vs university thing. Sheridan's officially a college, even though they've started adding degree programs
 
@DMGregory I am def toying with the thought of going into UX-Design. I find it a super interesting field especially because it is so diverse and deep and comparatively unexplored. So much design is about testing and finding out what works, instead of deriving proper principles that can be applied broadly
 
@DMGregory I guy I went to school with did his masters on dynamic difficulty in games.
 
UX is all about understanding your users. which is awesome. (basically what I always understood psychohistory to be all about, if you read Asimov)
 
2:44 PM
@dot_Sp0T UX design is a huge area of development in my studio atm. 😀
 
@DMGregory see :D
 
@Vaillancourt Ooooh cool! I've been thinking a bit about procedural techniques, or game design for accessibility. There's an Inclusive Technology program at a nearby school where that one could be a fit.
 
We also had a teacher at university for which it was his job: teaching. He was not a professor. Really passionate about all the stuff he was teaching. Really a good teacher. But he was "just" a teacher. He had to eat the crumbs that the professors left for him. To have a "full time" job, he needed four classes per semester, but he often only had 2 or 3.
 
@Vaillancourt that's what language teachs at our uni have to do :/ although one of the english teachers is awesome. He's all about: I do not understand what you folks learn here, but I love hearing you explain little bits to me, that's why i teach here
 
Interesting! I almost went to teacher's college after my undergrad, but landed a job at a game studio instead. 😁
 
2:53 PM
@DMGregory Maybe for now you have the best of both worlds.
It looks like being a teacher is a kind of precarious/stressful situations with all the unions and the politics, while becoming a professor looks impossible because there are not a lot of openings, and a lot of people wanting the job. At least that appears to be the case here.
Teaching is fun :)
 
I think I've got a good shot at the next opening at Sheridan. It's just the lack of the master's that's holding me back atm.
 
If you can get away with a master's degree, then go for it, if that's what you want ;)
Gotta have the conditions to stay focused, though.
 
Yeah. I'd likely take a break from gamedev and teaching to just power through it. I know some folks have managed a master's part-time while juggling other stuff but I think that would kill me.
 
An option is to start part time, while you take the required classes, and once you're done with those, you stop everything and focus on the research.
/shrug
 
user92578
I have a co-worker who is doing his master's thesis as a part-time employee, I think he's doing the programming/development work on the thesis on the work days, and writing the thesis on the non-work days
 
3:06 PM
That's an option, if you can do something for your work
 
That could be good advice. Thanks for the tip!
 
My failed attempt at getting my Master's involved returning living with my parents while living 6 hours away from the University, not having frequent communication with the professor, not having a topic I loved, and Star Trek.
 
 
1 hour later…
4:26 PM
Is it common to use Utility classes inside an ECS environment instead of component methods ? Are there any advantages ( Speed ? ) ? ^^
 
@genaray to do what? as compared to what?
 
Instead of component methods :P im trying to evaluate which approach to use. I am working on an inventory mechanic, when an item gets removed, added or updated i need to mark that entity and the inventory entity itself. I need this quite often so im not sure if i simply should duplicate that code, put it into a utility class, component method or create a ecs event for this operation
 
user92578
100% don't duplicate it, component method vs free function is just a choice between how "purist" you want to go, and if the operation really is something of a component instead of maybe something that touches multiple components
 
user92578
Some people want their components to be pure data, but I'd definitely consider it case by case if a method would make sense and follows the traditional SRP properly
 
the functionality you seem to need seems to be 100% related to the component; so why not have it coupled to the component? -> i.e. i do not see where you would get code duplication from
in my ECS implementation i use markers to tell if data in a component changed - so i don't have to check however-many fields depending on what is done with that data later. that code is just another field on that component though, and whatever system processes that component checks the mark instead (+ a system running at the end of each cycle that resets marks)
if i were to do an Inventory somehow, I'd have a System that is responsible for maintaining the inventory that runs towards the end of each cycle, so marked inventoryitems can be processed(?)
@Tyyppi_77 what is SRP?
 
4:39 PM
@Tyyppi_77 @dot_Sp0T Thanks, than i think im gonna implement this as a free function ^^ Im approaching something similar... i actually wanna be able to run over all added, removed and modified items in an inventory. Thats the main goal. So my current thought was to mark the inventory items with an "added", "updated", "removed" component where i put in entity ids that changed.
 
user92578
Single responsibility principle
 
The single-responsibility principle (SRP) is a computer-programming principle that states that every module, class or function in a computer program should have responsibility over a single part of that program's functionality, which it should encapsulate. All of that module, class or function's services should be narrowly aligned with that responsibility.Robert C. Martin, the originator of the term, expresses the principle as, "A class should have only one reason to change," although, because of confusion around the word "reason" he more recently stated "This principle is about people." ��2�...
 
user92578
@genaray Components as pure data is definitely a reasonable approach
 
Sounds like a dirty flag, @genaray? In that case, I'd say setting the flag in a setter method is a robust approach, so you can't accidentally forget to set it somewhere. The interface enforces the invariant that all relevant changes set the flag.
 
@Tyyppi_77 Thanks ! :) Nevertheless im still not that happy with my solution... I actually want to iterate over inventorys which include new items like : "(inventory, addedItems) => {}"... But that component should only stay one frame, like a one time flag.... so i end up with a bunch of conditions to check if the inventory entity already contains "addedItems" :/
@DMGregory Ah that makes sense... i heard of dirty flagging. I actually need to read the site first, but i guess you simply attach some sort of bool to the component and when its true we know that it was modified ? ^^
 
4:46 PM
Yep. Or, if you want to iterate over it, you could consider adding it to a "recently added" list, then you can have a system that processes that list, removes the items from it, and puts them into their proper inventory. That may be more efficient than scanning over all inventory items and skipping the ones without the flag set. (Depending on your use patterns)
Similarly with a "to-be-removed" list. Probably doesn't make sense for an update-in-place operation though.
 
the question really is: what do the updates mean? so what is getting changed that the inventory needs to know about it?
makes sense to have methods/lists for adding/removing items from the inventory
whooooowie finally got arc'd text to work properly ( i hate trig )
 
@DMGregory That actually sounds like a much better way of doing it ^^ Thanks, it would be much cleaner.
 
Well done, dot_Sp0T!
In some circumstances, this kind of "waiting room" queue for new objects entering the system or destroyed objects leaving the system can help avoid order-of-update bugs or concurrent access problems, making sure you're not blowing away an item that another part of your code is still using until you've gotten to a safe time at the end of the update tick when only the clean-up remains.
 
5:24 PM
spoke too early
still thanks :D
 
Uh-oh. Is it giving you trouble we can help with?
 
nah, i know what's wrong. just need to calculate through different ideas until one works out
 
5:55 PM
@DMGregory but if you want to, remember the image I posted a few days ago? still trying to properly figure a formula for x3 and x4 so it works for every point around a circle
^^
 
user92578
Don't you just take the midpoint between the two points on the circle, which with the center of the circle gives you the direction that x3 and x4 are from x1 and x2?
 
user92578
Then you add that multiplied by the side length to the points on the circle?
 
Got a link to the image? I don't remember it off the top of my head.
 
user92578
 
you need to adjust for the angles. (i just got back from dinner) currently coding out a solution that does that, also takes into consideration the ratio between inner and outer circle
 
user92578
6:03 PM
What outer circle?
 
so point between x1 and x2 on the circle. dist between x1 and xC multiplied with ratio gives the points for x3 and x4
x3 and x4 are on an imaginary outer circle
otherwise you need go crazy with angles, and that didn't work for me very well the last days i tried^^
so i switched to shifting points
 
user92578
Oh, that's not obvious at all from the picture that x3 and x4 land on a circle
 
actually it is, as the distance between x1 and x3 is the same as x2 and x4
thus it follows that you can draw an outer circle where x3 and x4 are on
maybe though notations between Switzerland ~15 years ago, and the US are different :)
 
Do I understand correctly that you want to draw a rectangle such that the corners of one face sit on an inner circle, subtended by an angle alpha, and the opposite face sits on an outer circle (subtended by a smaller angle)?
 
@DMGregory i do not know the word subtended (yet) but it sounds right
love it when the internet doesn't seem able to translate a very specific word to german
Funny thing i just saw: Top and Bot (when you shorten Bottom) are almost phonetically opposites
 
6:10 PM
I think I've used it incorrectly here. I mean the arc along the circle corresponds to a particular angle measured from the center of the circle.
 
user92578
I don't understand what is supposed to happen when the angle gets large
 
Yeah, and "down" is sometimes abbreviated as "dn" which is just "up" spun 180 degrees.
 
user92578
This isn't correct then? desmos.com/calculator/uqcv92jwig
 
@DMGregory that is awesoem!
 
A game I made with a gravity-changing mechanic was originally called "up & dn" before our publisher made us change it. ;)
 
6:12 PM
@DMGregory A W E S O M E - what's its name now?
@Tyyppi_77 i am having trouble reading that, are two of the 4 points meant to be in the space between circles in your example? if yes than no
 
user92578
Yeah the outer circle is positioned wrong since there's a normalization missing
 
So if we moved the blue point along the line through the blue and green points until it touches the outer circle, and did the same moving the purple point, keeping its direction from the black point the same, would that be your intended output?
 
basically the proportions of the rectangle need to stay the same no matter how it's rotated in respect to the origin of the inner circle
i could do it with quaternions and matrices, but i'm trying to get it with normal trig
 
Let's back up a bit. What problem are you solving, or what game feature does this serve?
 
in this case writing text along an arc.
 
user92578
6:22 PM
When b is appropriately sized for a character, moving a seems to create what you want, no? desmos.com/calculator/vwiidxmn73
 
user92578
But this is just an overly complex way of positioning points of equal angles on two circles of different radius?
 
@Tyyppi_77 could be, i have no idea
@Tyyppi_77 sort of, but if i move b in your example it quickly breaks
 
user92578
So the correct behaviour would be what there is but the two points are always on the outer circle?
 
yeah, just imagine shifting the rectangle from my drawing along the circle always keeping x1 and x2 on the inner circle, keeping Lw and Lh the same all time
or imagine taping a post-it to the steering-wheel of your car. when you turn the wheel the post it gets rotate too, but all corners rotate accordingly
lemme get a screenshot of the current outcome (that is wrong but almost right)
 
So can we rephrase your problem as, "How can I rotate and translate a character rectangle with a given width and height so that the bottom sits on a circle with a given center and radius, and compute the corners of the resulting rectangle?"
 
6:29 PM
@DMGregory invert the last argument: "How can I rotate and translate a rectangle with a given width and height, where the top corners sit on a circle with radius a and the bottom corners sit on a circle with radius B (A + ?) where the circles share the same center?" maybe
 
That could entail scaling the rectangle as well, if the distance between the two circles does not match the height of the rectangle. Is that acceptable?
 
no, the second circle is determined by the height of the rectangle, resp the resulting ratios
 
It looks like you're also distorting the rectangle into a trapezoid. Is that desired? Or would you like to keep it a rectangle?
 
that is sort of the point of trying to derive a formula
@DMGregory the distortion is what is currently still wrong
 
Then it's already specified by the height and you do not need to add it as an additional given.
 
6:32 PM
@DMGregory i was not sure about that, as I did not yet come around to thinking of doing math to prove that^^
if it were a trapezoid then x/y could be simply 'shifted' by adding the height to the inner radius:

r2 = r1 + height)
x1 = r1 * cos(theta)
x2 = r1 * cos(theta + alpha)
x3 = r2 * cos(theta)
x4 = r2 * cos(theta + alpha)

And the same for y using sin
 
user92578
I think the only thing wrong I have is the rendering of the large circle, but the rectangle behaves as you want? Or then I'm still just not understanding at all what you want
 
As I sketch this out, I think you might be parametrizing this wrong for your intended use of font rendering.
 
@Tyyppi_77 seems so, i probably just have a hardtime understanding it bc I never seen or used that website before in my life
 
I don't think it's the corners of the rectangle you want to sit on the circle at all. I think you want the baseline of the character to sit tangent to a circle.
 
user92578
^
 
6:42 PM
The baseline can in general sit somewhere inside the rectangle - it typically won't be flush with one of its sides.
The corners might end up sitting on different circles, but it's the baseline the player will be using to visually judge whether the characters are aligned. They don't get to see the corners of your rendering quads.
 
@DMGregory you're talking characters now. the rectangle is the definition from the highest ascender to the lowest descender of the given font. THat part works as expected ;)
that is also the reason i never ever mentioned characters. because then people start thinking in one of a miriad of possible ways to render characters and fonts
 
Right, but I don't think you can get all the corners aligned as you want unless you distort the characters into wedges. You can align heights along the center lines of the character, but that might then place some corners inside/outside the "mean circle", depending on the width of the character.
 
@DMGregory the height works universally in my fontrenderer
believe me there
 
I'm talking about facts of geometry here. If you want, say, the visible bottom-center point of a T and an I to sit on the same circle, then the corners of their quads will not sit on the same circle, because the T is wider than the I.
 
yes but the difference between that width can be described using an angle and cos/sine functions
 
6:51 PM
I can describe any arbitrary shape with cos and sine functions. That doesn't make this particular issue disappear.
 
so i am trying to find the function that describes the shift of the points according to my desired result. Because I can draw this whole thing using a compass and a tirangle ruler, i know that i can also derive formulae to describe these ratios
 
user92578
Draw a wider rectangle into the same picture you shared a few days ago
 
anyway, i rly gotta go, it 2100 here
thanks for all the help :)
@Tyyppi_77 and yeah I know what you mean, that will be an issue of middling it in somehow
 
user92578
It will 100% show you the issue DMGregory identified
 
then the language barrier might make me misunderstand the issue he identified
 
user92578
7:02 PM
Nice, the picture will help you then :)
 

« first day (3729 days earlier)      last day (1298 days later) »