PDA

View Full Version : C# graphics



m34tcode
03-28-2014, 10:50 PM
I am writing a game in C#, similar to bejeweled but on a hexagonal grid, and I am curious what the best and most efficient way to handle graphics is.

Currently I am using a GraphicsBuffer and drawing to that when there is an update, invalidating the area that needs to be redrawn, and redrawing that portion of the buffer in the paint event handler.

This is really slow and I get like 15 - 20 Fps if only updating the small area. Updating the whole window forces that down to around 2 Fps.

Kasi
03-29-2014, 12:04 AM
Use DirectX

m34tcode
03-29-2014, 03:06 AM
Ah, great idea! I am planning on porting to Java then Android so I will use OpenGL, and I am sure that will increase the speed. Thanks! :-)

masterBB
05-19-2014, 10:28 AM
A little late. But I suggest monoGame.

x[Warrior]x3500
05-20-2014, 12:58 AM
with masterBB's suggestion i would also add:

for openGL and c# - opentk (http://www.opentk.com/)

for a great game engine (most popular one atm (http://www.moddb.com/engines/top)) - unity (http://unity3d.com/unity)

masterBB
05-20-2014, 06:11 AM
x3500;1294574']for openGL and c# - opentk (http://www.opentk.com/)

monoGame is a wrapper for both openTK and sharpDX

x[Warrior]x3500
05-20-2014, 04:27 PM
Well, that's a TIL. :) thanks for the info!

EDIT: i thought monogame used the tao framework xD

m34tcode
05-21-2014, 02:04 PM
Yea, I tried multiple libraries, but ended up going with OpenTK, since the higher level libraries are missing important elements, like rotation and scaling or antialiasing. I will look at monogame, if it is cross platform. I will be porting this to android.

Lama
03-25-2016, 11:19 AM
I second MonoGame. It's pretty phenomenal. It's insanely cross-platform too; develop for Windows/Mac/Linux/PS4/Xbox/Android with ease.

IIRC, it was originally built to port games made with XNA (Microsoft's old proprietary Xbox/Windows dev framework) to other platforms, but has now filled the void XNA left a few years ago when it was discontinued.

EDIT: And I just realized this is an old thread. Oh well.