vendredi 13 mars 2015

HUD basics using SharpDX: How to Draw over the screen surface?

Scenario


I'm planning to learn the basics about how to develop a custom HUD for a 3rd party PC-game (free, legal), my intention is to develop an application that will draw/show additional info on the screen (by reading mem addresses).


So I've researched for profesional projects and I've found TurboHUD that uses SharpDX library to draw objects/overlays/text over the screen using that DirectX based library and the results are very good (it does not loose performancy at any moment when drawing multiple objects on the screen), but, since the author of that project does not provide a source to understand how they did it then I'm trying to learn by myself to use the same professional technics.


Question


If I'm on the wrong way or I missed some other better alternatives than SharpDX to develop this, please let me know.


My main question is:


In C# or preferably VB.Net, how I could just draw efficiently a custom string over the screen using SharpDX?.


Note that I could set the Form's oppacity to 0 but I think it should exists a proper way and I'm asking to know that proper way to draw directlly on the "desktop" screen.


My expects are to launch that PC-Game, then launch my custom HUD that will draw over the "desktop" screen surface to add additional info on the game, I hope you understand me.


Research


I should clarify that I'm totally unexperienced whit this kind of DirectX libs, and I'm using the SharpDX samples package to try learn its usage.


Since all the samples are in C# its more difficult to learn its usage under VB.Net.


Inside the SharpDX samples package there is an 'AdvancedTextRenderingApp' C# project, but as its name says it is an advanced example and also it instances a custom Form (a SharpDX.Windows.RenderForm) to draw on that Form.


This is the an VB.Net code translation of that C# project that I mentioned:


http://ift.tt/1KPVD4v


Aucun commentaire:

Enregistrer un commentaire