Jump to content
  • Advertisement
stigzler

Help a newb? SharpDX or DX and .net

Recommended Posts

Hi folks. I'm a hobby coder who makes apps for retro gaming purposes (see here). Given it's a hobby, I use vb.net. I'm looking to develop a new app to hold all games controls for all games on all systems (a bit like controls.dat for mame, but for all systems). It will also be able dynamically show layouts for each game from game assets. These layouts should be able to contain video, pdfs, text files, images and text with effects (like drop shadows etc). 

Weirdly, all of the above are achievable via winforms and gdi+. However, of course, this is sooooo slow. So I thought I'd brave the world of DirectX in .net. 

And this is where I'm coming unstuck. Looked into lots of different potential solutions (SFML, mono, xamarian...Win2D looked ideal until I realised it's only available for certain versions of windows and on wpf only) and in the end it looked like it came down to SharpDX and SlimDX (as I still wanted to be able to use windows forms for other backend parts to the application). 

So, it transpires both are shocking when it comes to documentation and help and both are virtually dead. I got so far with SharpDX, but then got stuck on how to display video and images on the same display surface (see this post here).

I'm not sure where to go next - can't find any present support for SharpDX. 

Raw DirectX seems way beyond my level of comprehension( as the SahrpDX concepts illuded me a biot - especially when it came to differences between video and image rendering) 

So basically, what would be the most accessible way for me to place images, videos, text and pdfs on a rendersurface, whilst also having some rendering performance?

Share this post


Link to post
Share on other sites
Advertisement
Posted (edited)

Maybe have a look at Unity. It's using C#, it's free and takes care about all the rendering stuff and you can concentrate on creating the actual gaming code. There are tons of tutorials also for using 2D only in Unity.

Edited by Auskennfuchs

Share this post


Link to post
Share on other sites

@Auskennfuchs - thanks, man. Yeah - I've played with unity before. I'm wondering if that's a bit heavy for what I need (essentially it need to be a windows app first with some graphical capabilities). I'm jst looking into mono at the moment, as this seems more of a .net app first with additional graphical features (as per here)

Share this post


Link to post
Share on other sites

Pah. Monogame turned out to be a dud. I'm going to need to be able to render user-set fonts and images, but mg doesn't appear to accommodate this very well, as you have to load all your resources in first via building them (thus removing user-set fonts etc|). Also, you can't even render a basic 2D rectangle. Grrr... this is all very annoying..

Share this post


Link to post
Share on other sites
15 hours ago, stigzler said:

Pah. Monogame turned out to be a dud. I'm going to need to be able to render user-set fonts and images, but mg doesn't appear to accommodate this very well, as you have to load all your resources in first via building them (thus removing user-set fonts etc|). Also, you can't even render a basic 2D rectangle. Grrr... this is all very annoying..

Well I think Monogame change the renderer state, shaders, etc. to draw things on the screen. If you mess around with the renderer then it's drawing won't work as you expected.

And unfortunately the basic 2D stuffs like shape is not supported.... You need 3rd party library for that.

Share this post


Link to post
Share on other sites
19 hours ago, stigzler said:

... you can't even render a basic 2D rectangle. Grrr... this is all very annoying..

MonoGame is a framework just like XNA, it's not a game engine or have an editor out of box, you need to implement and roll your own camera, scenenode, skybox, physics, entity management etc. ( Which is good IMO if you want to create a tailored game engine ) for me MonoGame is just a rendering engine that's run on different platforms using the C# language that runs on Windows Desktop, UWP, Linux, Mac, OUYA, Android, Xbox*, PS4, PSP, Web Browser and Nintendo Switch. Etc...

While if you're going to use SharpDx and SlimDx route, you'll stuck on Microsoft platform.

I think it's not that hard to draw a rectangle using MonoGame if you already have your texture loaded and a rectangle area, after the sprite batch begin rendering it's just a single command.

_SpriteBatch.Draw( myTexture, myRectArea, Color.Red );

If you think it's very annoying and hard for you to render even a basic 2D rectangle using XNA/MonoGame but want to use C# you might just use Xenko, Wave or Unity which is drag and drop and also support C# and have a good editor.

Cheers ^_^y

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

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!