Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 29 Jul 2001
Offline Last Active Yesterday, 11:09 PM

#5269075 Google Analytics for iOS

Posted by Promit on 03 January 2016 - 04:46 PM

I can't offer any comparisons to other options, but it's worked well enough for us and we haven't caught any flack from Apple over it. Apple doesn't offer in-app analytics. We do make note of it clearly in our privacy policy page.

#5269030 [SOLVED] Uniform buffer actually viable?

Posted by Promit on 03 January 2016 - 11:34 AM

I'm not totally sure what the problem is- buffer updates should be a simple matter of dispatching a memcpy to the right place before draw. You complain about sizes, but have you run the numbers? 1k of uniform data times 4096 draw calls in a frame is 4 MB of uniform data, times triple buffer is 12 MB for all your uniforms. That's trivial, and I am guessing your scene is nowhere near that massive.

#5268716 Where do I get to learn about state of the art rendering techniques?

Posted by Promit on 01 January 2016 - 11:27 AM

Mostly the thing to do is simply Google the topics and read the papers that come up. You'll usually get a mix of SIGGRAPH papers, NV/AMD slides, and GDC talks from game developers. You ahould also look at all of the SIGGRAPH proceedings for the last couple years, especially the courses on physically based shading.

#5268630 Xcode and OpenGL shaders

Posted by Promit on 31 December 2015 - 02:10 PM

Mac and iOS use application bundles to package executables together with all of their supporting files. You need to copy the shaders into the application bundle, and then you need to find out where your application bundle is. For the first step, the easiest thing to do is simply to add the shaders to the XCode project - they will automatically be copied to sit alongside the executable. It will ignore folder structure in this case. To get a folder structure, add a folder reference to XCode.


Once you have the files copied in, the usual way is to use Cocoa system calls (typically NSBundle's resourcePath property) to get the path to your bundle and thus your files. This requires an objective C file, which is of course a real hassle. The trick to get around this is that you can write an Objective C implementation for a C function. So I have a header called "PlatformHelp" with a bunch of simple C styled functions inside a namespace, and then it's implemented in C++/Win32 for WIndows and ObjC/Cocoa for Mac and iOS.

#5268429 [D3D12] Driver level check to avoid duplicate function call?

Posted by Promit on 29 December 2015 - 10:59 PM

In principle, the driver does as little as it possibly can in D3D12. Your commands go to GPU, end of story. I suspect that the story in reality is currently pretty close to that, because everything is still very new. You can never really rely on driver optimizations in the first place, unless you happen to be somebody NV/AMD are working directly with.


A year or two from now though, the drivers will be massively optimized for this stuff and will be playing all kinds of clever tricks. That's just how it goes. But even so, you can't rely on it.

#5268167 Need hardware recommendation

Posted by Promit on 27 December 2015 - 09:42 PM

I'm just going to make it simple and point you to the Dell Inspiron 7000 15" as a very reasonably priced and specced laptop option. Lenovo and Asus are worth looking at as well, though I don't think their Skylake refreshes are ready yet.

#5267231 Vulkan is Next-Gen OpenGL

Posted by Promit on 20 December 2015 - 04:08 PM

The CEO of Stardock claims the PS4 API is lower level (read: closer to the hardware, and likely faster) than Mantle and DirectX12, but hopes the PS4 supports both, for ease of porting games that will be written in Vulkan.

He claims a lot of things, but he understands less about the hardware or graphics APIs than most of the members here. I don't recommend using him as a source.

#5267216 Game loop sucking up CPU

Posted by Promit on 20 December 2015 - 03:29 PM

Eating up the CPU is the point of the game loop. If you're rendering using vsync, that will cause it to slow down and not take up the entire CPU. But without vsync or sleeps as a throttling mechanism, taking 100% is by design. If you really want to try using Sleep as a throttle, submit very small values (like 1) and see how that works out for you. Candidly, I would only think about this as a battery life conserving mechanism, and ignore it otherwise.

#5266147 OpenGL Efficient Rendering of 2D Sprites

Posted by Promit on 13 December 2015 - 12:26 PM

Bindless would make this whole texture atlas thing wholly unnecessary, but we're getting into very sophisticated (and audience-limited) uses of OpenGL that are probably not needed. I stream my 2D vertices into persistent mapped buffers and don't atlas anything, one draw call per element, and it's never been a problem for UI code. Atlases are definitely better, though.

#5265819 Smartphone Game Resolution Query

Posted by Promit on 10 December 2015 - 08:49 PM

Texture compression (PVR/ASTC/etc) is always a good idea too.

#5265353 What is a suitable default value for buffers/vertex arrays/textures etc

Posted by Promit on 07 December 2015 - 04:55 PM

Soooo long story short, don't predicate the validity or non-validity of a texture object on its GL handle. glGenTextures et al won't ever return 0, which you can use to detect errors at the point of call. Handle that appropriately, but don't use the value itself as your check.



The reason I have gotten confused is glGetUniformLocation as a location of 0 is perfectly valid. What is a good default for that, -1?

Unlike the Gen functions, glGetUniformLocation returns a signed value and -1 is a perfectly sane default, as well as the error value for the function itself.


All of which takes us back to the problem that the entire API feels like it was carelessly mashed together from pieces that were lying around and everyone is worse off for it.

#5265221 Would it be worth it to attend GDC, or would it be a waste of money?

Posted by Promit on 06 December 2015 - 11:05 PM

There's an extensive array of job recruitment/meetup events at GDC, and a million people trying to get in on them. Seriously we're talking lines out the door and people waiting for on the spot preliminary interviews. It is simultaneously the best and worst thing for getting a job. Personally I'm not terribly fond of the whole idea - being part of a massive crowd vying for attention doesn't seem like the way to go.

#5264510 Looking for Input on a Low-Pay Internship

Posted by Promit on 01 December 2015 - 06:33 PM

I've seen better and worse out there. In general the larger companies will pay better, the smaller ones not so much. Location also matters - things are much better in Silicon Valley or Seattle or Austin than many other places. At the very least, I'd look at all your options if you don't have to respond right away. That includes non game software development options.

#5264191 Quick tutorial: Variable width bitmap fonts

Posted by Promit on 30 November 2015 - 12:06 AM

cool.png Don't worry, I just checked and this code is still driving the text rendering for our current gen engine. I think a few minor tweaks were made over the years, and that's it.

#5264043 Questions regarding how did you manage school

Posted by Promit on 28 November 2015 - 05:20 PM

Please keep in mind that there are gigantic cultural differences involved. School in the US is a vastly difference experience from school in India, which makes advice and stories from the US somewhat difficult to apply. It's possible here in the US to build a life from a non traditional path, leaving school early and returning on your own terms later or never returning at all. From what I can figure, this is next to impossible in India. Additionally, your choice of major is limited depending on your school and exam scores which also doesn't happen in the US. 


There's a strong American culture of being self-made and self taught which doesn't necessarily work in other countries as a viable life path.


With that in mind, everything that's been said above about learning online is basically correct for basic education. Especially thanks to programs like MIT CourseWare and several foundations building free textbook collections, it's possible to gain massive amounts of education completely on your own.