Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 29 Jul 2001
Online Last Active Today, 11:38 AM

#5256258 C# Garbage Collection and performance/stalls

Posted by Promit on 08 October 2015 - 01:07 PM

The Microsoft .NET runtime offers significant control over when and how the garbage collector runs: https://msdn.microsoft.com/en-us/library/System.GC_methods(v=vs.110).aspx

#5255937 What's the best system on which to learn ASM?

Posted by Promit on 06 October 2015 - 08:35 PM

Get yourself a Raspberry Pi2B or a BeagleBone Black.  These are ARM boards -- the ARM processor is way simpler than the x86 even though they're of the same relative vintage (ARM is RISC, x86 is Swiss Army knife).  In addition to learning ASM, you can futz with blinkenlights so you can really feel close to the metal.  Learn to love the smell of rosin-core solder, it's the smell of victory.

This is the way to go. Most of the other suggestions are useless - while Z80s, 6502s, 68ks are kinda cute to play with, they have no relevance to modern development or modern processor design. x86 is extremely useful and relevant but also complicated and psychotic. MIPS was relevant once and continues to be a popular university choice, and resources are readily available. The trouble is just that very few MIPS chips are out there and what is generally lives in highly constrained embedded systems so it's just not a very real-world skill.


ARM strikes a great balance of being a nice, modern design that is highly relevant to work today, but still fairly straightforward to learn.

#5255452 The f***ing horrible nfl madden games!

Posted by Promit on 03 October 2015 - 08:50 PM

It would not be legal under any circumstances to use real teams, real players, real mascots, etc, if that's what you're asking.

#5255367 Vulkan is Next-Gen OpenGL

Posted by Promit on 03 October 2015 - 10:56 AM

Don't get me wrong - I am ALL ABOUT the new APis from a technical standpoint. But I'm not living in AAA world these days and practical reality is that writing a render pipeline for a market that maxes out at 22% is just a bit rough. Now it's very helpful that Win10 is free and everyone wants to get the hell out of Win8. But the real key point is that it's very difficult, outside of a few select high budget things, to really design around the new APIs. Oxide's been talking about this, where you really start leveraging the added capabilities in a way that is more extensive than simply writing multiple render pipelines, and those changes feed all the way up to your game design.


FWIW I am shipping a Metal pipeline game in a few weeks - which is more about the structure of Apple's platform than anything - and that's not designed around the new rendering API either. I still have to maintain GL ES paths for a wide swath of old devices and that means the rendering changes are low hanging fruit with a lot of old assumptions and limitations still preserved.

#5255297 HDR gamma correction

Posted by Promit on 02 October 2015 - 10:37 PM

HDR images are already linear, yes. The only images that need gamma correction are sRGB images (typically 8 bpc), which are your "normal" images in common image formats. Essentially you can just tell the API that the textures are sRGB and the GPU will handle the correction for you.

#5254606 Mac to buy for app development?

Posted by Promit on 29 September 2015 - 09:39 AM

The Macbook Pro Retina is easily a solid choice if you're also going to use it as a day-to-day laptop. I ran out of memory trying to do development on the older 8 GB model MBP, but I don't know how big or heavy your stuff is. (I didn't feel like ours was big, but...)

#5254049 What is more charged?

Posted by Promit on 25 September 2015 - 03:21 PM

I agree with the above. Buuuut if we're talking about the best paid game dev jobs, it's going to be highly capable system architects well versed primarily (but not exclusively) in C++ and various low level technologies like DirectX 12, GL/Vulkan, etc. People with deep and heavily mathematical knowledge of graphics and/or physics probably do best, as they're very difficult to replace. The web and engine-specific guys just don't merit the same levels of compensation.

#5252792 DirectX高级动画制作(Jim Adams)

Posted by Promit on 17 September 2015 - 07:29 PM

Google translate: I purchased this book (DirectX Advanced Animation) when I lost this book 's CD , give me a copy?

#5250653 High Quality Light Trails

Posted by Promit on 04 September 2015 - 10:36 PM

Some background info here: http://www.fxguide.com/featured/art-directing-effects-for-infamous-second-son/

GDC slideset here: http://www.gdcvault.com/play/1020158/The-Visual-Effects-of-inFAMOUS

#5245824 PI or not to PI ?

Posted by Promit on 11 August 2015 - 02:37 PM

The PI term comes from normalizing the light response to 1 - essentially it's the product of a surface area integration over the hemisphere. If you don't have it, your surface will reflect pi times the correct amount of lumens back out. If you want to make sure your lighting is properly energy conserving, you can do the divide by pi when submitting the diffuse color to the shader instead of in the shader itself.

#5245166 OpenGL vs DirectX

Posted by Promit on 08 August 2015 - 06:06 PM

And nobody is going to with your current behavior. Thread closed.

#5245149 OpenGL vs DirectX

Posted by Promit on 08 August 2015 - 03:39 PM

If platforms outside than the Microsoft ecosystem are important to you, especially mobile, OpenGL.

If you're happy being limited to the Windows world, Direct3D.

#5241134 Md5 Password Hasher would you use this.

Posted by Promit on 17 July 2015 - 07:01 PM

You're Probably Storing Passwords Incorrectly

#5239834 Why Do People Use DirectX?

Posted by Promit on 11 July 2015 - 07:19 PM

I think we're done here. The responses you've gotten are on point.

#5239787 [SlimDX] Information on the history of SlimDX

Posted by Promit on 11 July 2015 - 02:08 PM

I wrote about some of the technical issues we ran into on my old blog. One of the longer-reaching problems we had, in my opinion, was with object lifetime. We used IDisposable as a convenient way to wrap the COM reference counting semantics, but this ended up being a bad idea because the concepts did not map 1:1, even after we implemented an object table holding all the SlimDX object references to ensure we kept only a single reference count.

3) Interesting technical challenges

Lifetimes and object identity existed together as a vexing headache. We wanted the library to behave like a sane managed library would. Simple IDisposable interface, predictable object identities, etc. One of the big motivating problems was something that I think we called the Get == Get problem. Essentially it looks something like this:

var bb1 = device.GetBackBuffer();
var bb2 = device.GetBackBuffer();
Debug.Assert(bb1 == bb2);

There are two behavioral goals for this snippet. One, the assert should pass. Two, that Dispose call should destroy the underlying object. (And this should be true for all CLR languages.) Neither is true in the naive implementation of the library used early on. Each call gets a native pointer, wraps a new managed object around it, calls an AddRef on the underlying COM object, and returns it. The reference equality fails (the object identities are not the same) and both need to be Disposed separately. I ultimately solved the problem through the aforementioned object table, a tool that in retrospect I still have extremely mixed feelings about. In the vast majority of cases, it actually does its job quietly and magnificently, as well as enabling some very useful debugging techniques. But in the bad cases, it gets really problematic. As Josh noted, we had not planned on using that design again if we were going to take another crack at rearchitecting the whole library.


Building documentation was oddly a real pain. MS went to a lot of trouble to build this comment documentation stuff into VS, but apparently it never ever occurred to them that, gee, maybe somebody else would want to be able to publish miniature forms of MSDN for their work. Eventually Sandcastleappeared and I used that with many custom patches. In conjunction with SHFB, it works really well to make CHM documentation. It is (was?) however entirely useless for building websites. I eventually did some more custom patches and homebrewed a site with JQuery and that's what drives the current documentation.


4) Future plans

When SlimDX was built, we all had a lot more time on our hands. I want to simply hand implement (not auto gen) the SlimDX 2 design for D3D 12, roll the math library in, and call it a day. This is somewhat complicated by a few things. First, life. I have a lot of it nowadays and that's getting inconvenient. Second, at a personal level I have a lot of doubts about D3D 12's near-term viability and a lot of optimism about Vulkan, which is complicating things. I still want to do it, but I'm not in that big a hurry.