• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Deadly_kom

DX11
The native side of Hololens

9 posts in this topic

Posted (edited)

Good time of the day, members of the forum!
    I do not think that many have tried themselves in the development under
 Hololens, but nevertheless decided to write. In any case, all work with
 Hololens is reduced to UWP and DirectX 11. So I wrote a small prototype
 for easy initialization of primitives, etc. In the scene, and began testing
 on the piece of iron ... And I was very upset by the performance tests.
       
    A short excursion, for those who are not in the subject: - the construction
of an image under Hololens, naturally a stereo image for this reason I use
 DrawInstanced with pre-prepared shaders. Shaders are very simple, conversion
 to world coordinates and projection of the species, color is set straight in
 the shader. Plus to switch the render in 2D Texture Arrays I use the geometry
 shader, that's basically all.

   For the test, I generated a grid of 10k - 30k and output them about 10
 times ... for 10k grid and 10 calls - 30fps, for the last about 18 - 20fps.
 Sadness, I thought, and I decided that my hands are not growing in size and
 my brain does not want to work anymore ...
   I decided to look for flaws in my shit ... I measured the time for drawing
10 calls - about 800 ticks, it's kind of not that bad. Slightly optimized the
sorting by materials, namely, switching between shaders minimized but in the
 loop there were updates of constant values for the shader namely transform for
each object. Fps grew by 2-3 but the time to render the frame did not measure ...
   Although Unity seems to hold the bar 1.2 - 1.3 mm triangles at 10-15 fps ...
I myself did not check the word for people.

    So, maybe someone can decide what can be crooked and what can be patched up ...

 

P.S.  The buffer of depth is 16 bit, and I use similar indices. Thank you in advance.

Edited by Deadly_kom
0

Share this post


Link to post
Share on other sites

would love to read this novel prose, but it appears to be sunk into some kind of eyeFrame with annoying scrollbars

1

Share this post


Link to post
Share on other sites
12 minutes ago, paultrott said:

would love to read this novel prose, but it appears to be sunk into some kind of eyeFrame with annoying scrollbars

So it's better?

Here's a video with 60k triangles

0

Share this post


Link to post
Share on other sites

He meant not to use the 'Formatted' font (it's for code anyway), e.g. like so

Quote

Good time of the day, members of the forum!
    I do not think that many have tried themselves in the development under
 Hololens, but nevertheless decided to write. In any case, all work with
 Hololens is reduced to UWP and DirectX 11. So I wrote a small prototype
 for easy initialization of primitives, etc. In the scene, and began testing
 on the piece of iron ... And I was very upset by the performance tests.        
    A short excursion, for those who are not in the subject: - the construction
 of an image under Hololens, naturally a stereo image for this reason I use
 DrawInstanced with pre-prepared shaders. Shaders are very simple, conversion
 to world coordinates and projection of the species, color is set straight in
 the shader. Plus to switch the render in 2D Texture Arrays I use the geometry
 shader, that's basically all.
   For the test, I generated a grid of 10k - 30k and output them about 10
 times ... for 10k grid and 10 calls - 30fps, for the last about 18 - 20fps.
 Sadness, I thought, and I decided that my hands are not growing in size and
 my brain does not want to work anymore ...
   I decided to look for flaws in my shit ... I measured the time for drawing
 10 calls - about 800 ticks, it's kind of not that bad. Slightly optimized the
 sorting by materials, namely, switching between shaders minimized but in the
 loop there were updates of constant values for the shader namely transform for
 each object. Fps grew by 2-3 but the time to render the frame did not measure ...
   Although Unity seems to hold the bar 1.2 - 1.3 mm triangles at 10-15 fps ...
 I myself did not check the word for people.

    So, maybe someone can decide what can be crooked and what can be patched up ...

fixed.

0

Share this post


Link to post
Share on other sites
29 minutes ago, unbird said:

He meant not to use the 'Formatted' font (it's for code anyway), e.g. like so

fixed.

clearly ))

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Similar Content

    • By Shnoutz
      Hi, quick question.. Why is the type of "fooBar" ambiguous?
      template< typename T > struct Bar { }; template< typename T1, typename T2 > struct Foo; template< typename T > struct Foo< T, Bar< T > > { }; template< typename T > struct Foo< float, Bar< T > > { }; Foo< float, Bar< float > > fooBar; I would expect that the second version of Foo is more specialized than the first...
      (I am building a compiler and I would like to understand the template specialization selection algorithm)
      Cheers!
    • By AlekseyRybchak
      Hi there!
      We are working on an fantasy based RPG with some really challenging gameplay.  
      We've got two writers (and we are sure we need no more), a couple of designers, one coder, one musician and one PM. 
      Here is the deal. We want to publish a demo within a 3-4 months from now. We got a popular Youtuber who would promote the game. 
      Now we need the following additional members:
      2 designers who know substance designer, photoshop, 3ds max/maya. Specifically a character artist and an environment artist.

      2 more programmers with experience in Blueprint, C++ and Unreal Engine.
      You'll get rev share after we publish the full game.  Publishing would not be an issue.
       
      Important:
      Part timers, dudes runing over 9000 other projects, lurkers, and those who got 'only 30 minutes per week' are highly unwelcome.
       
      We communicate in Hacknplan and Discord. And yes we love discipline and consistency! So get ready for real deadlines and regular team calls!
      If you are interested PM me or better e-mail Paul: pauldando21@icloud.com
       
      BR,
      Alex
       
       
    • By Holy Fuzz
      I am working on a game (shameless plug: Cosmoteer) that is written in a custom game engine on top of Direct3D 11. (It's written in C# using SharpDX, though I think that's immaterial to the problem at hand.)
      The problem I'm having is that a small but understandably-frustrated percentage of my players (about 1.5% of about 10K players/day) are getting frequent device hangs. Specifically, the call to IDXGISwapChain::Present() is failing with DXGI_ERROR_DEVICE_REMOVED, and calling GetDeviceRemovedReason() returns DXGI_ERROR_DEVICE_HUNG. I'm not ready to dismiss the errors as unsolveable driver issues because these players claim to not be having problems with any other games, and there are more complaints on my own forums about this issue than there are for games with orders of magnitude more players.
      My first debugging step was, of course, to turn on the Direct3D debug layer and look for any errors/warnings in the output. Locally, the game runs 100% free of any errors or warnings. (And yes, I verified that I'm actually getting debug output by deliberately causing a warning.) I've also had several players run the game with the debug layer turned on, and they are also 100% free of errors/warnings, except for the actual hung device:
      [MessageIdDeviceRemovalProcessAtFault] [Error] [Execution] : ID3D11Device::RemoveDevice: Device removal has been triggered for the following reason (DXGI_ERROR_DEVICE_HUNG: The Device took an unreasonable amount of time to execute its commands, or the hardware crashed/hung. As a result, the TDR (Timeout Detection and Recovery) mechanism has been triggered. The current Device Context was executing commands when the hang occurred. The application may want to respawn and fallback to less aggressive use of the display hardware). So something my game is doing is causing the device to hang and the TDR to be triggered for a small percentage of players. The latest update of my game measures the time spent in IDXGISwapChain::Present(), and indeed in every case of a hung device, it spends more than 2 seconds in Present() before returning the error. AFAIK my game isn't doing anything particularly "aggressive" with the display hardware, and logs report that average FPS for the few seconds before the hang is usually 60+.
      So now I'm pretty stumped! I have zero clues about what specifically could be causing the hung device for these players, and I can only debug post-mortem since I can't reproduce the issue locally. Are there any additional ways to figure out what could be causing a hung device? Are there any common causes of this?
      Here's my remarkably un-interesting Present() call:
      SwapChain.Present(_vsyncIn ? 1 : 0, PresentFlags.None); I'd be happy to share any other code that might be relevant, though I don't myself know what that might be. (And if anyone is feeling especially generous with their time and wants to look at my full code, I can give you read access to my Git repo on Bitbucket.)
      Some additional clues and things I've already investigated:
      1. The errors happen on all OS'es my game supports (Windows 7, 8, 10, both 32-bit and 64-bit), GPU vendors (Intel, Nvidia, AMD), and driver versions. I've been unable to discern any patterns with the game hanging on specific hardware or drivers.
      2. For the most part, the hang seems to happen at random. Some individual players report it crashes in somewhat consistent places (such as on startup or when doing a certain action in the game), but there is no consistency between players.
      3. Many players have reported that turning on V-Sync significantly reduces (but does not eliminate) the errors.
      4. I have assured that my code never makes calls to the immediate context or DXGI on multiple threads at the same time by wrapping literally every call to the immediate context and DXGI in a mutex region (C# lock statement). (My code *does* sometimes make calls to the immediate context off the main thread to create resources, but these calls are always synchronized with the main thread.) I also tried synchronizing all calls to the D3D device as well, even though that's supposed to be thread-safe. (Which did not solve *this* problem, but did, curiously, fix another crash a few players were having.)
      5. The handful of places where my game accesses memory through pointers (it's written in C#, so it's pretty rare to use raw pointers) are done through a special SafePtr that guards against out-of-bounds access and checks to make sure the memory hasn't been deallocated/unmapped. So I'm 99% sure I'm not writing to memory I shouldn't be writing to.
      6. None of my shaders use any loops.
      Thanks for any clues or insights you can provide. I know there's not a lot to go on here, which is part of my problem. I'm coming to you all because I'm out of ideas for what do investigate next, and I'm hoping someone else here has ideas for possible causes I can investigate.
      Thanks again!
       
    • By FordPerfect
      This is basically a repost of http://www.gamedev.ru/flame/forum/?id=228402 .
       
      As many programmers know, there is quite a lot of undefined behavior in C++ shifts.
      So let's make our own ones!
      Since the task is relatively small, it seems worth doing WELL, to save everyone using it a bit of time.
      Motivation:
      0. Well-defined semantics rulez.
      1. For many cases (e. g. shifts by a constant) the result should be exactly the same as built-in shifts, with no performance penalty.
      2. For many other cases performance does not matter.
      3. If old code (with built-in shifts) worked, then, presumably the shift amount was always in the allowed range, and the branch in the new code would have essentially 100% prediction.
      4. For the cases, where shifts are variable, and performance matters so much, that even predicted branches make difference (e. g. coding/decoding) - well there built-in shifts still remain. Hopefully, it is <5% of code.
      My present attempt:
      // This software is in the public domain. Where that dedication is not // recognized, you are granted a perpetual, irrevocable license to copy // and modify this file as you see fit. template<typename L,typename R> L shl(L value,R amount) { if(amount>=R(sizeof(L))*8) return L(0); if(amount<R(0)) { if(amount<=-R(sizeof(L))*8) { if(value<L(0)) return L(-1); return L(0); } return value>>(-amount); } return value<<amount; } template<typename L,typename R> L shr(L value,R amount) { if(amount>=R(sizeof(L))*8) { if(value<L(0)) return L(-1); return L(0); } if(amount<R(0)) { if(amount<=-R(sizeof(L))*8) return L(0); return value<<(-amount); } return value>>amount; } I subject it to scrutiny of the community.
      Basically, pretty please, check that all corner cases actually work.
      Quite a bit of trickery went into the writing this code, to satisfy the rules of C++. As you can imagine, there are A LOT of corner cases, and I am not confident everithing works correctly.
       
      Some useful links:
      http://www.gamedev.ru/flame/forum/?id=228402 - original post (in Russian)
      http://en.cppreference.com/w/cpp/language/operator_arithmetic - for language-lawering
      http://en.cppreference.com/w/cpp/language/implicit_cast#Integral_promotion - likewise
      http://rextester.com - for testing snippets
      http://gcc.godbolt.org - for testing assembly output
       
      P. S. Does anyone see a nice way to do it in C? Templates are C11, macros evaluate arguments multiple times, and lots of functions are ugly.
      I'm asking because it seems like a good candidate for inclusion into stb_* (right along with stb_divide.h), and maybe if we ask really nicely, Sean Barrett can do just that.
  • Popular Now