Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 06 Oct 2010
Online Last Active Today, 11:22 AM

Posts I've Made

In Topic: Spritebatch With SharpDx

21 October 2014 - 08:01 AM

It looks like you're not specifying a Viewport to the device context. Aside from needing to define a viewport, SpriteBatch will internally use that to create a projection matrix as input for the sprite shader.

In Topic: Switching from XNA to DirectX9 for 2D platformer

18 August 2014 - 09:22 AM

How exactly are you quantifying “XNA seems to be running slower than DirectX”? What are you comparing your game to? Whatever the case is, it’s not that useful in my opinion. Generally you’re going to be using C++ with the DirectX API, and C# with the XNA (which is just a wrapper around Direct3D 9). You’re really comparing unmanaged and managed applications, and there will always be some level of overhead with a managed application.


Don’t get caught in the trap of “Im not doing it like the makers of Crysis, therefore what I’m learning is useless”. You’re a beginner and a one man team; any experience you gain, any tools and languages you learn is an asset for the future, especially if you’re making software development as a career. And even with the expected overhead of a managed application, C# is good enough for professional quality real time 3D graphics applications (games and anything else). And that is certainly true for simpler 2D games. Go on steam, there are quite a few good games (largely indie) that stick with C# and XNA (or one of the wrappers for Direct3D out there).


Learning Direct3D9 would be a step back by the way, it’s an old API at this point. Most of the world is moving to or has moved to Direct3D11, which has a cleaner structure to it and is generally more performant due its design (less state switching, immutability, etc). You’re interested in learning low-level stuff and what's being used right now…well that’s it! Learning 9 first will do you a disservice when you try to learn something more modern. And, if you used XNA 4.0, they took some inspiration from Direct3D10 which has a similar organization and layout to the Direct3D11 API.


So my suggestion is stick with C# and learn about SharpDX (www.sharpdx.org), which is a managed wrapper around Direct3D [Avoid "Managed Direct3D" as it's an old and outdated library at this point, XNA replaced it!]. Unlike XNA, SharpDX is more or less a 1-to-1 mapping to the actual API. It’s fast, well maintained, and also has a Toolkit which is similar to that DirectXTK Sparkton linked you to (which means it is XNA-inspired). That sounds like it’s the next step in what you’ve already been doing.


A good and useful book on Direct3D11 is this one: Practical Rendering and Computation with Direct3D11


I can’t tell you much about MonoGame (all software has bugs) but there are some released games for that API. For Windows platforms they do use SharpDX, for other platforms they use OpenGL. It would be useful (if you don’t want to do the Unity route) if you want to deliver your app to other platforms. But it sounds more like you want to learn tech, so don’t over extend yourself. Stick to one path, learn it well, and then tackle the next thing.

In Topic: will you buy this?

30 July 2014 - 12:41 PM

The problem is you're trying to write a one-size-fits all solution for an application. Not just a library that loads a model (like Assimp) but also gets it on the screen, so you're locking in users into how things are formatted and function. Basically you're offering a platform, which can be problematic if a user wants to do something different. And you aren't going to get buyers unless if there are a lot of features that sets it apart from free/open source competitors.


I think you'd do better if you wrote plugins (for profit) for an already established and mature platform. E.g. write something useful for Unity and sell that.

In Topic: C# UI libraries? Either written in managed code, or with managed wrappers

26 July 2014 - 11:48 AM

There's Squid which labels itself as engine agnostic - it requires you to implement a renderer interface and do the texture loading/management bookkeeping. I don't think they ever fully finished the library though. Better than nothing if you want an in between to "write from scratch" and "pay 500 to use".

In Topic: How to transition into Game Dev with Java

02 July 2014 - 01:02 PM

Edit: Java is not a language to use for large scale 3D games. Attempting to render complex 3D shapes with texture mapping and lighting can bring your game to a screeching halt.

 (( Java is a perfectly fine language to use for 2D MMOs, and non graphic intensive 3D games ))


Eh, I wouldn't worry too much about "rendering complex 3D shapes and texture mapping and lighting", and so on as that's going to be hardware accelerated. It's not like your choice of language is going to greatly impact that.


The biggest pain point in my opinion is the lack of structs in Java. All your math "objects" are exactly that, objects allocated on the heap. So you're going to have to worry about allocations during updating/rendering (gotta be smart about it, e.g. extensive use of pooling). Then of course concerns about performance with a managed language where code is being JIT'ed on the fly. Certainly not going to get the performance of native in that regard, but that doesn't mean you can't do serious graphics programming. Far from it!


If you want a more comprehensive package, jMonkeyEngine is a good platform. I used to use it back in the day, but they've made some big strides the last time I used it (or used Java...heh I'm mainly a .NET developer and personally prefer using C# over Java and Direct3D over OpenGL, but that's me). It has a lot of stuff out of the box, so you may not be finding yourself right from the get go doing complex low-level stuff (or writing shaders).


But if you really want to learn graphics programming I would go with the low-level wrappers around OpenGL or Direct3D (although, are there any D3D wrappers out there for Java?) such as LWJGL. And like Glass said, search for "Modern OpenGL", e.g. programmable pipeline.... --> OpenGL Bible 6th Edition. There's a plethora of tutorials and material out there that use fixed function, which at this point is legacy, so it can be confusing and overwhelming when first starting.