Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 29 Jul 2001
Online Last Active Today, 10:00 PM

#5095356 Multi GPU out of system memory.

Posted by Promit on 19 September 2013 - 10:35 PM

You can't force the GPU to do anything. DXDiag is an ancient tool anyway and I wouldn't trust what it says. The real question is what is actually generating your out of memory errors, because the scenario you think you're chasing is not one that leads to OOM in the first place. It's possible that you're actually running out of virtual space and need to come up with a 64 bit build, but it's difficult to say without more information about your crash.

#5095350 Does C++ <random> lib require seeding?

Posted by Promit on 19 September 2013 - 10:30 PM

Check the docs, specifically the constructor for default_random_engine:


You'll notice that it takes a seed parameter, and the default value of that parameter is a constant 1u.

#5094135 CS Degree - Is it worth it?

Posted by Promit on 14 September 2013 - 08:06 PM


Ex: Saying things like: "You can get industry contacts at school that land you a job!" As if you can't do that at conventions, conferences, club meetings, bars, and park benches

Really? Sure, you can meet people at conventions, conferences, club meetings, bars, and park benches


True in theory. But let's face it, the vast majority of people here can't socialize productively and voluntarily without at least two drinks biggrin.png School forces you into it by group projects, clubs, etc. In all seriousness, why do so many people meet their spouses in college? It's very difficult to find that level of social interaction once you've moved out of that environment and the same goes for professional networking.


If you do choose to try and make a go without the degree, there's a few things to keep in mind IMO:

* if your school grades were good, then there's no real problem with enrolling after a few years in the work force, should you decide that the degree is a good idea after all. But it's awfully hard to go back to school psychologically and it will be much more difficult to connect socially with the people around you.

* You better be really god damned incredibly good at your craft. It is not enough to be a "good" programmer or even to be better than your peers. For this to be productive, you need to be stellar. That means a lot of work, a lot of research, a lot of DIY projects. Good software engineers with degrees AND ability AND experience are plentiful right now, so competing with that is not trivial.

* Pick up the standard textbooks for key pieces of the computer science education -- data structures, algorithms, computer architecture, operating systems, databases, etc. Know them well. This actually applies to everyone in the field regardless of background.

* Specialize. Life will be easier if you are really good at one particular thing and have the knowledge and projects to back it up.

* Understand that you will always be forced to prove more than your peers and paid less for at least a while. Some job opportunities will never call you back at all or will inexplicably skip over you. Comes with the territory.

* Interact with the rest of your peers in every way possible. Social networking (especially Twitter), conferences, meetups (IGDA etc), all of it. You need to be actively outgoing.

#5093146 CS Degree - Is it worth it?

Posted by Promit on 10 September 2013 - 06:10 PM

While I don't care one way or the other about your approach or preferred relationship structure, chasing women is a goddamn stupid reason to go to college.

#5092323 CS Degree - Is it worth it?

Posted by Promit on 07 September 2013 - 12:20 PM

Personally I think people who haven't been through a computer science program have no business judging what someone else may or may not get out of it. That's not to say it's always useful, but computer science is a far bigger (and far different) world from "this is how you program". If anything, one of the biggest perceived problems with computer science education is it doesn't cover programming much at all. They tend to focus heavily on theoretical underpinnings. That can be good or bad.

#5092284 CS Degree - Is it worth it?

Posted by Promit on 07 September 2013 - 08:10 AM

You should get some degree. What degree is your choice, though the closer it is to computer science the less explaining you may have to do when applying for software jobs. (Ie computer engineering or electrical engineering will be an easier sell than art history.) You should not skip an undergraduate college education entirely.

#5086935 Do you find C#'s lack of an explicit destructor to be an issue?

Posted by Promit on 17 August 2013 - 08:55 PM

Swiftcoder's words are far more critical than many people are willing to hear. I used to struggle with C#'s GC behavior a little bit, because it wasn't RAII the way C++ has. But you know what? It's RAII I gave up on. Managing data/memory lifetimes in larger, more coherent blocks with very explicitly designed ownership dispenses with the big problems here, relegating the details to just that, details. Does it work for everything? Not at all. But core game systems work on very rigid, well defined lifetimes. Understand how and when your objects are being used, and make that part of your primary design criteria. Don't vomit GC objects or shared_ptr objects because you have ill defined boundaries of ownership and lifetime.

#5084324 Easy-to-use Version Control on Windows? Needs to be able to easily ignore cer...

Posted by Promit on 09 August 2013 - 12:07 AM

Setting up a git server is super easy, provided you have a server with SSH access and don't mind giving all project members shell access. Step outside those bounds and things get... less pleasant.

#5084230 Barcode Scanning in Mobile Games: How do you take it beyond random battles?

Posted by Promit on 08 August 2013 - 02:15 PM

I haven't played it, but Skylanders immediately comes to mind. Worth looking into, I would think.

#5084201 Easy-to-use Version Control on Windows? Needs to be able to easily ignore cer...

Posted by Promit on 08 August 2013 - 12:35 PM

I vote for git, and I usually use a combination of the command line client and a graphical client called SmartGit that I'm quite fond of.

#5083110 Should I compile dependencies with my API?

Posted by Promit on 04 August 2013 - 05:11 PM

Here's a question to ponder over: What happens when someone links your library AND one of its dependencies? They may be using Box2D explicitly for something else, for example. Versions may not match. If you're exporting your dependencies' symbols, things will collide at link time and that can be very obnoxious. 

#5082813 Ocean opacity

Posted by Promit on 03 August 2013 - 01:43 PM

For the blue shift component of it, you're going to need to compute the ray from the vertex or pixel to the camera, then work out how far along that ray you hit the water surface. That distance value can be used to lerp between water color and object color. Fairly straightforward to do in a shader. Note that the correct approach is to subtract a mostly red color, rather than to interpolate towards a blue color.

#5082588 GLSL double precision

Posted by Promit on 02 August 2013 - 03:53 PM

To answer the second part of the question, it depends on the exact card. On many NVIDIA cards double precision will dramatically hurt performance. A lot of cards won't support it at all. Ideally you'll want to run a Quadro or FireGL GPU if you're doing doubles. It is not really a mass market possibility.


Will highp be 24-bit precision on all video cards?

highp is 32 bit precision on any hardware I've seen.

#5082547 Do you ever have to release or free a D3DXHANDLE

Posted by Promit on 02 August 2013 - 12:40 PM

You don't need to release it.

#5081758 Modernizing my GL based renderer.

Posted by Promit on 30 July 2013 - 01:01 PM

Regardless of what API or version you use, there will always be a pending collision between engine design, driver design, and underlying hardware design. I can tell you that at one point in time, the NVIDIA driver didn't really support separate vertex streams (in most or many cases?) and would simply manually interleave your attributes before sending it to the driver. Modern advice is to use one buffer for each block of vertex attributes that are updated together at the same frequency.


The trouble is, there's hundreds of similar little kernels of advice that are hardware specific, arch specific, and slowly slide and mutate over time. Keeping track of it all is maddening. And to top it off, best practices for GL are not always optimal. I've chosen to stick to the recommendations in the spec and wiki for the most part, and experiment with specific things where I think special tricks might help. There's no good answer though. NV and AMD will sit down with major game companies and help them fine-tune, because they're the only ones who really know.