Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411561 Posts in 69384 Topics- by 58443 Members - Latest Member: junkmail

May 03, 2024, 06:20:31 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)The grumpy old programmer room
Pages: 1 ... 223 224 [225] 226 227 ... 295
Print
Author Topic: The grumpy old programmer room  (Read 739264 times)
Boreal
Level 6
*


Reinventing the wheel


View Profile
« Reply #4480 on: May 13, 2014, 02:01:14 PM »

Not a specific programming issue, but I'm just pissed off at graphics programming in general.

So people are finally starting to realize that the current graphics APIs (D3D and OpenGL) are shit.  Ridiculous CPU overhead, terrible concurrency problems and limitations, clunky API design, and unpredictable drivers (the last three points are pretty specific to OpenGL).

And we get Mantle.  Great, now we can do console-level GPU programming on a PC!  Oh, wait.  It's exclusive to AMD, which means that even if we write a Mantle backend we still have to do it again in D3D or OpenGL.  Oh, and now Microsoft is announcing D3D12 which does the same thing!  Well, that's all fine and dandy if you're willing to make your game exclusive to Windows 9 and the Xbox One.  And guess what?  None of these work on anything outside of Windows platforms.

As expected, everybody who likes programming on Linux or who wants to release cross-platform, like me, gets to use OpenGL.  What a mess.  First of all, it's 2014 - nobody should have to use that awful 90's style global-state-centric API.  It's clunky and doesn't lend itself well to multithreading.  Just let us upload and download data to and from device memory directly like we would with Direct3D.  Don't even get me started on the shader compilation system...why do we need programs?  D3D gets by just fine letting us bind shaders to pipeline stages independently, and it has a proper standardized compiler that actually supports all the features that it says it does.  Memory management is awful too.  In games it's not really efficient to let the driver juggle around buffers and textures as much as it wants and to be that bratty child that goes "I DON'T WANNA!  I'M GOING TO DO THIS INSTEAD!  I'M NOT LISTENING LALALALA..."  But wait, here's ARB_bindless_texture to save the day!  Nope, Nvidia-specific patented extension.  Good luck getting AMD and Nvidia to cooperate on bare-metal graphics.

Just a rant about graphics programming.  I love the power that GPUs give us, I really do, but the ARB and the various vendors make it very painful to actually harness any of it.
Logged

"In software, the only numbers of significance are 0, 1, and N." - Josh Barczak

magma - Reconstructed Mantle API
Graham-
Level 10
*****


ftw


View Profile
« Reply #4481 on: May 13, 2014, 02:32:09 PM »

Talking about collision detection, why the fuck does unity's "OnCollisionEnter2D" function get's called AFTER collision forces are applied. I can really see the charms of open source in times like this.

if you want before collision maybe you need to use on-trigger?
Logged
Graham-
Level 10
*****


ftw


View Profile
« Reply #4482 on: May 13, 2014, 02:35:36 PM »

Sounds like that could have been helped by rolling back a version and trying again. Condolences for the hellish bug hunt though.

A good suggestion, but a few things were working against me: I didn't want to lose the partly-written code since my last checkin, so that option was out.

*shudder* use git.

also, you can just backup your files.
Logged
Garthy
Level 9
****


Quack, verily


View Profile WWW
« Reply #4483 on: May 13, 2014, 06:55:46 PM »

A good suggestion, but a few things were working against me: I didn't want to lose the partly-written code since my last checkin, so that option was out.

*shudder* use git.

also, you can just backup your files.

So, what do you feel git would have offered in this situation that would have led to a superior outcome?
Logged
eigenbom
Level 10
*****


@eigenbom


View Profile WWW
« Reply #4484 on: May 13, 2014, 08:04:56 PM »

My government dropped all funding of games projects. Grr.
Logged

framk
Level 2
**


I don't know anything


View Profile
« Reply #4485 on: May 13, 2014, 08:32:53 PM »

My government dropped all funding of games projects. Grr.

Canada?
Logged

Geti
Level 10
*****



View Profile WWW
« Reply #4486 on: May 13, 2014, 08:36:48 PM »

@eigenbom Ugh coalition budget #auspol #toneabet etc

So, what do you feel git would have offered in this situation that would have led to a superior outcome?
The ability to make commits and swap between them whenever you want? Like that core tenet of distributed source control?
>commit your changes since last commit w/ commit message as normal "added bugs, broke features" etc
>roll back to pre-bug commit or at the very least read diffs that could have lead to these bugs.

Mercurial has this as well but git allows "doctoring" the tree as well if you're one of those perfectionist types that JUST CANT DEAL with temporary commits for commit's sake, but honestly I think people don't commit to their CVS enough, especially when using DCVS like hg/git.
Commit often, means you have an interactive history of your code.

If you're using source control that doesn't let you update forwards and backwards in the source tree, stop doing that.
Logged

Belimoth
Level 10
*****


high-heeled cyberbully


View Profile
« Reply #4487 on: May 13, 2014, 08:37:10 PM »

government funding lol
Logged

Geti
Level 10
*****



View Profile WWW
« Reply #4488 on: May 13, 2014, 08:38:41 PM »

^ this too. I've been making do with sales money for the past 3 years, so I'm more concerned about the cuts to higher education than the games industry.
Logged

Garthy
Level 9
****


Quack, verily


View Profile WWW
« Reply #4489 on: May 13, 2014, 09:43:55 PM »

(NEVER MIND)
« Last Edit: May 13, 2014, 10:57:57 PM by Garthy » Logged
Graham-
Level 10
*****


ftw


View Profile
« Reply #4490 on: May 14, 2014, 02:42:06 AM »

A good suggestion, but a few things were working against me: I didn't want to lose the partly-written code since my last checkin, so that option was out.

*shudder* use git.

also, you can just backup your files.

So, what do you feel git would have offered in this situation that would have led to a superior outcome?


You're saying that a lack of diffing against a previous revision, or an inability to go back a revision is what was hurting you. Am I wrong about this?

Git lets you commit locally, and "stash" files. You can branch locally etc. So no matter what state your work is in, you can run a command, go back to any previous committed state, do whatever you want, then return whenever you are ready.

edit:

o. geti said all this.
Logged
Garthy
Level 9
****


Quack, verily


View Profile WWW
« Reply #4491 on: May 14, 2014, 04:27:44 AM »

So, what do you feel git would have offered in this situation that would have led to a superior outcome?

You're saying that a lack of diffing against a previous revision, or an inability to go back a revision is what was hurting you. Am I wrong about this?

Git lets you commit locally, and "stash" files. You can branch locally etc. So no matter what state your work is in, you can run a command, go back to any previous committed state, do whatever you want, then return whenever you are ready.

No, not saying that. I was able to go back a revision easily enough, and check diffs against the last one (I use "meld" for a graphical diff, nice tool too). However, it wasn't clear which of the changes since the last commit caused the problem, and they weren't the type to correctly apply individually. Being able to see the changes didn't end up helping. This meant I was unwilling to revert, not unable. There was also the complication that I might have needed to go back two revisions (I only determined afterward that one was sufficient). And I was always "just find one bracket" away from a solution. I didn't want to have to revert, and implement things one step at a time again until I hit the point with the problem. It wasn't the sort of thing that lent itself well to a step-at-a-time approach, which is why I did it in a block.

The git local commit and stash sound interesting. There have been a few times when I would have liked a low-hassle temporary disposable commit. Whilst certainly possible in Subversion, I wouldn't describe it as low-hassle. I'm reading up on git stash now.
Logged
Graham-
Level 10
*****


ftw


View Profile
« Reply #4492 on: May 14, 2014, 04:42:11 AM »

Okay, I understand now. I thought something was a little off.

So the only thing git would have helped with here is if you were more comfortable making regular commits because the decentralization lets you branch locally etc. You would have needed a habit of smaller commits, and only then would you have been in a better position.

stashes are like mobile commits. since we're on the subject I'll exercise my muscles a little.

let's say you have 3 commits: A, B, C. they are made in that order. if C breaks the system, but you want to work on a bug fix on a stable build, you can checkout B, branch, and commit D. so then you would get:

Code:
A - B - C
      - D - ? - ?

You can merge when you are ready. You would get this:

Code:
A - B - D - ? - ? - merge w/ C

Stashing otoh isolates a change. So instead if you _stashed_ C, and went on with your bug fix you would get this:

Code:
A - B - D - ? - ?

Now when you want to go back to C you just apply your stash. This will apply the diff between B and C to your current state.

Code:
A - B - D - ? - ? - C

In both cases you are merging two separate kinds of changes. However with a branch merge you have to manually sort through extra conflicts.

wait. now I'm confused.

I rarely use stashes.

p.s. Once I had to hunt down an extra newline at the end of a php file. Before then I didn't realize how bad those were.
« Last Edit: May 14, 2014, 04:48:15 AM by Graham. » Logged
Geti
Level 10
*****



View Profile WWW
« Reply #4493 on: May 14, 2014, 05:02:33 PM »

re: that last bit - its always the little things that make me dislike php, haha.

re: stashing vs branching vs shelving in hg - honestly, I tend to just branch as normal with a commit message explaining that it's broken, and probably name the branch so it's out of default/master and noone merges it absent mindedly, then fix later.
That way you've got the history and chronology there, and having some floating heads isn't damaging at all beyond annoying some more obsessive people.
Logged

Garthy
Level 9
****


Quack, verily


View Profile WWW
« Reply #4494 on: May 15, 2014, 02:15:20 AM »

So a git stash is pretty-much a lightweight disposable branch, just with some slightly different rules attached?

Are git branches something you can safely remove or bury when you're done with them?
Logged
Graham-
Level 10
*****


ftw


View Profile
« Reply #4495 on: May 15, 2014, 03:28:08 AM »

Yes, and yes.

The reflog in git lets you go back to _any_ committed state, but that's hidden away.

re: that last bit - its always the little things that make me dislike php, haha.

fuck php

Quote
re: stashing vs branching vs shelving in hg - honestly, I tend to just branch as normal with a commit message explaining that it's broken, and probably name the branch so it's out of default/master and noone merges it absent mindedly, then fix later.
That way you've got the history and chronology there, and having some floating heads isn't damaging at all beyond annoying some more obsessive people.

I do the same thing mostly.

edit:

Here's one difference between a stash and a branch. If am partway through 1 commit, and I want to work on something else, if I branch I'll need to commit my partial stuff, and merge it later. This gives me 2-3 commits: the partial, the final, and the merge. Stashing would give only the one. And the branching takes literally more steps.

Really we're just getting into cleaner change-logs and execution convenience I think.
« Last Edit: May 15, 2014, 03:44:21 AM by Graham. » Logged
Slader16
Level 8
***



View Profile
« Reply #4496 on: May 17, 2014, 10:10:59 PM »

(Unity3D) Spent all day trying to figure out why Physics.Raycast wouldn't work with a BoxCollider2D, just remembered that I need to be using Physics2D.Raycast.  Facepalm
Logged

Netsu
Level 10
*****


proficient at just chillin'


View Profile WWW
« Reply #4497 on: May 18, 2014, 04:00:54 AM »

Implementing physics engines from scientific papers is a lot harder than I imagined.
Consequently, programming for a thesis takes a lot more time than I anticipated.
Logged

Layl
Level 3
***

professional jerkface


View Profile WWW
« Reply #4498 on: May 18, 2014, 05:30:41 AM »

Why can't the C# compiler give a warning when a function returns something disposable!? At least an annotation to make it give an error would be nice... I just want to do RAII in a garbage collected language is that so much to aaaaask  Cry
Logged
Code_Assassin
Level 5
*****


freedom


View Profile
« Reply #4499 on: May 19, 2014, 09:37:58 AM »

Code:
Warning	3	CA1060 : Microsoft.Design : Because it is a P/Invoke method, 'WindowHelper.GetConsoleWindow()' should be defined in a class named NativeMethods, SafeNativeMethods, or UnsafeNativeMethod.

Why does this concern my compiler. Why is this even a thing. suppress
Logged
Pages: 1 ... 223 224 [225] 226 227 ... 295
Print
Jump to:  

Theme orange-lt created by panic