Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

1892 Excellent

About Starnick

  • Rank

Personal Information

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I like the final box art. It kind of reminds me of the opening title scene in "Indiana Jones and the Fate of Atlantis".
  2. Starnick

    SharpDX loading TGA textures

    Before rolling your own parser, there are some C# texture IO libraries out there that support loading TGA files.   Shameless plug, because I maintain one - TeximpNet. It wraps two native libraries (FreeImage and Nvidia Texture Tools) in one convenient package for loading and processing textures. FreeImage also has its own C# bindings, but I don't know how well they are maintained.
  3. Starnick

    Fluid - Spatial Grid

    You can look into pairing functions to create a hash from XY coordinates:   http://stackoverflow.com/questions/919612/mapping-two-integers-to-one-in-a-unique-and-deterministic-way  
  4. Starnick

    Is it C# Territory?

    Depends on the company, I think AutoDesk has some products that you can interop with C#. Others, like my company (e.g. https://www.bentley.com/en/products/brands/openroads) use a mix of C++ and C#...many of our power applications sit ontop of a C++ platform for graphics, element storage, etc but a lot of the business logic and UI are in C#.   C# is more than suitable for a robust graphics application however, you will need to care more about memory management than a typical C# programmer may (e.g., the upcoming language feature of "ref returns" is a big deal to us, but at the //BUILD conference this year it kind of just was shoehorned into the C# team's presentation).
  5. Starnick

    BeginInvoke within XNA

    If I'm understanding right...you're talking about a compile error?   Microsoft.Xna.Framework.Game doesn't have a function called BeginInvoke. Presumably your sp_DataReceived was declared in a type that extended a Form or some Control before you ported the code over to an XNA game. This is where MSDN documentation is your friend, as BeginInvoke is a method declared in System.Windows.Forms.Control.   You'll get an error if you try and modify state on a WinForm control from a thread that is not the UI thread (the thread that the controls are being run on). BeginInvoke allows you to send a message to the UI thread and perform an action that will update the UI at a later point in time. So call BeginInvoke on one of your WinForm controls and it should compile.
  6.   Just a FYI:   Dictionary, List, possibly a few others (except for Collection<T>) all have struct enumerators and explicitly implement the GetEnumerator() so the GetEnumerator that actually will be called in that foreach will return the struct enumerator and not do any boxing.    With that said though, ElementAt is an extension method for IEnumerable<T> so the value collection is going to be treated as an IEnumerable<T> and the explicitly implemented GetEnumerator will be called, which means the struct enumerator will be boxed.
  7. Starnick

    The first video game enemy you ever murder.

    For me I'm pretty sure it had to be Golden Axe, on an older arcade machine (when it was released I was only 2!) and it's only vague memories. It may have also been Wolfenstein 3D, but I have more concrete memories of playing that.    
  8. Starnick

    Suggest a name for my game(15$)

    For some reason while reading that description the phrase "Rock'em sock'em gangnam style" popped into my head. Not sure why.
  9. This isn't a random sequel either, there's been talk of an ID2 movie for at least the last 10 or 15 years and the script was in "development hell" with the folks involved wanting to do a sequel but unsure where to take the plot.   I really liked the first movie, it was shlock, but it was fun block-buster summer movie schlock. I'm pretty sure the sequel won't rise much above that, but I've been looking forward to this movie for a while now :)
  10. Drake is right, you're hitting a limit with how big a single resource can be. Direct3D11 (guaranteed) limits can be found here. Direct3D10 had a 128 mb limit for vertex buffers, but I guess you can go higher in D3D11 depending on your hardware. SharpDX will follow these limits (think of it as a nearly 1-to-1 wrapper for the Direct3D libraries...all the documentation applies.   So split up the vertex data into two buffers and make two draw calls.
  11. Starnick

    How to Set Pixel Shader Constants

    I fixed the link (not sure why copy and paste failed me...!). I was trying link to PSSetSamplers.   So the point of the default constant buffer is that you don't define it. If any of your parameters are defined in the global scope (as in, not inside an explicitly defined cbuffer or tbuffer) then they automatically will be in a buffer called $Global. There's also another default constant buffer called $Param for uniforms that are defined in the parameter list of your main function. (See this article). For pre-D3D10 shaders to work those parameters have to end up somewhere, so HLSL puts them in $Global rather than failing and forcing you to rewrite your shader code. I think $Global will always be bound to slot 0, but don't quote me on that.   As for the data types, they'll be 32-bit floats. See the HLSL data types page. Knowing the data type sizes is important. E.g. Bool in HLSL will be 4 bytes, but in C# it's 1 byte...I *think* the same is also in C++. I agree somewhat with not wanting to have to replicate your constant buffer as a struct on the CPU side. People just do that for convenience more than anything (although padding and alignment rules can throw a wrench in your direction). You may want to look up on how to do shader reflection when you compile your HLSL fragments. That way you can obtain metadata about what constant buffers have what parameters, the size/type of those parameters, and the offsets of each parameter in the buffer. I have something similar in my setup, where I can reference parameters by index/name and set individual floats, vectors, etc or even come up with a struct that represents everything and set it once. The buffer is just a bunch of bytes and can be treated as such. Doing graphics programming in C#, I tend to not want to worry about struct padding and just reference each parameter individually...   Depending on what you want to do and learn, you could also use Effects11. Everything I described above, Effects11 does for you. It's distributed separately from Direct3D now, but it still seems to be maintained by Microsoft.      
  12. Starnick

    How to Set Pixel Shader Constants

    Well samplers (and other resources) aren't set in a constant buffer. Those are separate calls (e.g. PSSetSamplers)   Those parameters in that HLSL file will wind up in a default global constant buffer (named $Global). So while not defined in the same fashion the other posters are talking about, at the end of the day it'll be treated as any other constant buffer that contains p0, p1, size1, args0.   Edit: Fixed the link...huh not sure why it was broken.
  13. Mine dates back from the mid-to-late 90s when my family first got dial up (AOL) internet. Obviously I'm a Nicholas, and I really like Sci-fi, or more specifically, space adventures (when I was a kid I wanted to be an astronaut!). So Star + Nick...Starnick. It's been my handle ever since.
  14. Collada (DAE) is another one that you can use. If you already have FBX models because you were using them in XNA, why not just use Assimp (.NET wrapper in my sig) to load them? It supports importing FBX model format now.
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!