/dpt/ - Daily Programming Thread

Previous thread: What are you working on, Sup Forums?

Other urls found in this thread:

joelonsoftware.com/2002/11/11/the-law-of-leaky-abstractions/
twitter.com/NSFWRedditImage

Making batch interface for my game engine
typedef struct DgBatch DgBatch;
DgBatch *dgBatchNew(size_t size);
void dgBatchDel(DgBatch *batch);
void dgBatchVertex(DgBatch *batch, float x, float y, float z, float w, float s, float t, float p, float q, float r, float g, float b, float a);
void dgBatchSimpleTriangle(DgBatch *batch, float x1, float y1, float x2, float y2, float x3, float y3, float r, float g, float b);
void dgBatchSimpleRect(DgBatch *batch, float x, float y, float w, float h, float r, float g, float b);
void dgBatchSimpleSquare(DgBatch *batch, float x, float y, float s, float r, float g, float b);
void dgBatchSimpleLineShadow(DgBatch *batch, float x1, float y1, float x2, float y2, float lx, float ly, float r, float g, float b);
void dgBatchSimpleRectShadow(DgBatch *batch, float x, float y, float w, float h, float lx, float ly, float r, float g, float b);
void dgBatchSimpleSquareShadow(DgBatch *batch, float x, float y, float s, float lx, float ly, float r, float g, float b);
void dgBatchUnbatch(DgBatch *batch, size_t count);

take your Sup Forums b8 elsewhere

Remember to report the OP.

Why do you need your game engine?

but why

> tfw every faggot wants to do data analysis

Clearly this will help with all sorts of things like bug reproduction, testing and design.
I say he should have a feature to record the game state (entire memory footprint) and inputs too. But that's quite a bit of work and comes with some limitations without even more work.

We have an update lads.

My mom will do data analysis now. So I've looked into it.
Why is this considered a separate field? Is it because you rely on real programmers to do the actual work?
Writing down some algorithms in python isn't work. Any domain knowledgeable engineer can do it.

why are these pictures so awful every time

Reminder that a Sup Forumsentleman should be a radical centrist.

Because they're one dimensional and wrong.

Maybe domain engineers are a superset of data analysis
I'll bet that their average wages are a superset of data analysis's wages too
why get mad

1. Learning at least one level below what I actually want to do. Read this on why you should do that too:
joelonsoftware.com/2002/11/11/the-law-of-leaky-abstractions/
2. Will be something to put on my CV. I'm still a freshman, so this will be something.
3. Making a little platformer, it's so tiny a home-made engine will suffice. It's already got 50 levels though.
4. Have a small hope some people (way smarter than me) may like it because it's kind of unique (in C11) and have some interest in it, thus giving me advice on how to do things better. This will be released under BSD-2 btw.
5. Trying to make something different than stuff that already exists. Namely, I focus on simplicity, thus not touching any complex frameworks or languages. IMHO this means lower learning curve and easier porting. Also, you can expand it whenever you want. Even with this goal in mind, the design I wrote down is still pretty huge.
6. First experience in making a framework.
7. It's fun.

>Java > C#
>Matlab on there at all
>this is during the portion of the graph meant to be taken seriously before the "joke" ones at the end
what?

This can help, but only if you know how to do it properly. Read "Clean code" or similar before.

>mad
I wouldn't say I'm mad but I don't like superfluous workforce. Go do something else. We should get to work on helping engineers translate their ideas into executable form more easily. If we have a bunch of monkeys that will just take time.
I was wondering why you tend to use python but it dawned on me now. It's one of the languages complete newbies feel comfortable with so you'll have a good chance of engineers without programming background writing python.

I still say scratch is more appropriate. The whitespace significance just kills it I'd imagine. You could translate it to python of course.

> he thinks people from other fields dont know programming
Tho programmers will still rely on ststisticians to write blueprints for them.

t. brainlets

At this point, there are more cs-related jobs that exist than there are qualified workers. There just aren't enough highly-skilled people to fill in the work- hence, you get shit like data analysts.

It's worth noting that I'm not one, although you wrote your post as if I was one.

Get out

This picture triggers me

I am trying to compe up with a company name, so can start putting it into my apps, to make it obvious they fall under the same dev, but holy shit, literally everything i came up with is already taken, either by some faggot youtuber, by some actual company or someone else, even various glued together terms and shit.

Like this i will have to have some original name i will have to use something like ff4s5f5s4f5sdf4

>law of leaky abstraction
Good idea.
>CV
Yep, knowing engine programmery stuff is certainly good.
>I design a lot
Looks very ambitious in the end
>I want it to become an open source project
I do think games with simple programming interfaces have a higher chance of this.
>low number of frameworks/libraries
It's a difficult choice. Many libraries can cost you simply because they're designed for a particular setting. Others helps you because the implementation and interface will always be simple (think, image loading, basic audio processing, arguably rendering but there's many flavors so not really) and they save you time in implementation.
I do think people use too many libraries but some things can be regarded as more standard. For instance box2D for effects is very common and wouldn't confuse anyone. And gives you a lot of flexibility with little effort.

Just report and ignore.

Real thread here:

FF4S

>2. Will be something to put on my CV. I'm still a freshman, so this will be something.
And now let me tell you how the real work works.

>So mr. Virgin, it says here you did engine dev, but our company uses Unity3D and our partner company uses UE4, because obviously reinventing the wheel for our products would be a huge waste of time and resources, are you well versed in any of those two?"
>Virgin: "Ummm no but-"
>"That will be all mr. Virgin, you can leave, we will call you, thank you for your time."
>Virgin: "but you don't have my number"
>"..." "Someone please call security"

I can come up with gay names too, but i wan't something cool, and all cool names are taken

I specifically posted the batch interface because it's the ugliest one of the many (17) interfaces. Here are the things I tried before:

1. Encapsulate using specific types like
>struct {float x, y, w, h;} DgRect
>struct {float x, y, s;} DgSquare;
>struct {float x ,y;} DgPoint;
>struct {DgPoint a, b, c;} DgTriangle;
This leads to a huge number of types which are almost exclusively used in the batch interface and are not reused elsewhere, thus polluting the global namespace.

2. Encapsulate using general types (DgVec4, DgVec3, DgVec2, float).
This is somewhat better, but it's less clear what the arguments are meant for and if you want to clarify that you need to clutter the code with comments. Also, since the general types are simple arrays to make them fast and standard-conformant (no struct-alignment problems), they are tough to work on in client side.

3. Encapsulate using specific types implemented using general types.
>typedef DgVec4 DgRect;
>typedef DgVec3 DgSquare;
>...
This combines the problems of 1) and 2) while giving little benefit if at all.

The *core* problem is that the batch interface itself is neither very reusable nor has a specific problem-domain. It's strictly a *commodity* interface. The only general function is DgBatchVertex, but it would be a pain to use it, so I provide extra functions for very specific cases that I find to be more likely to be common, but the commodity function list is by no means excaustive.

DgBatch is commodity *bloat*, which is very handy, but it's bloat nevertheless and I think that trying to obfuscate bloat with nice types is effort spent bad. So I just left it as it is. Slow, general, ugly and very useful in practice.

>Looks very ambitious in the end
This is the third rewrite. It solves the problems I encountered on the first and second iterations. It's not *that* ambitious. Also I'm using small libraries to help me: GLFW3, libsoundio and Nuklear as a reference.

That's depressing.

>I'm not a data analyst
I didn't think so but re-reading I see how I'm ambiguous wording myself.
>there's a lack of skilled workforce
That's when we automate things. Look at something like the eigen template library. It's goal is to translate and simplify math expressions from code that looks a lot like actual math.
You could easily take something like latex and translate those math expressions into code. Having some syntax for piping the output to the input somewhere else.
That is assuming engineers only know how to write papers. You could easily find something that's very cheap on time for them while it does a very good job for the operating side. It also collects efforts under a format so you could make tools for creating mathematical approximations automatically for instance. We'd get so much done. My mom has been working with a company to develop a standard. They're data analysts so when they hear that they need a user accessable format they think that a single conditional expression fetched from a database that they'd go eval() in python is enough. What's actually needed is the bridge I describe. Or a more friendly environment in python. But they don't consider themselves 'users' of course. It's disgusting.

Choosing something like python and using the monkeys doesn't help us in the long run.

>that's depressing
It's not true either.
You won't find a team that isn't in dire need of expertise writing engine code or code close to the engine.
You'd need C++ for both unity and UE4 though.

Yes, you *could* do all of these things.
Hiring the unskilled monkeys in the meantime doesn't prevent capitalism from working. These people WILL be automated out of the workforce just as truck drivers are about to be.

It's true. I don't like bad lazy solutions though. Especially at the scale data analysts impact as a group.

That's sorta true, yeah. Every aspiring enginedev should really pour some time learning modern production engines to not look like shit at the interviews. And for educational purposes also

Saying that tho, my company interviewers like people with big c++ projects written from scratch.

Where is c++ used in unity3d?

loli.forsale

big apps for you

Take your initials and add some random word like "studio"

"TT shop", "JM studio"