Results 1 to 9 of 9

Thread: C# graphics

  1. #1
    Join Date
    Dec 2011
    Posts
    733
    Mentioned
    2 Post(s)
    Quoted
    7 Post(s)

    Default C# graphics

    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.
    My scripts: LunarPlanker
    ---
    My Utilities: Cross Platform, Open Source, SPS Path Generator

    Join the Unoficial SRL Skype Group by clicking here, or visiting this thread.

  2. #2
    Join Date
    Dec 2007
    Posts
    2,112
    Mentioned
    71 Post(s)
    Quoted
    580 Post(s)

    Default

    Use DirectX

  3. #3
    Join Date
    Dec 2011
    Posts
    733
    Mentioned
    2 Post(s)
    Quoted
    7 Post(s)

    Default

    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! :-)
    My scripts: LunarPlanker
    ---
    My Utilities: Cross Platform, Open Source, SPS Path Generator

    Join the Unoficial SRL Skype Group by clicking here, or visiting this thread.

  4. #4
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    A little late. But I suggest monoGame.
    Working on: Tithe Farmer

  5. #5
    Join Date
    Jan 2009
    Location
    Turlock/LA, California
    Posts
    1,494
    Mentioned
    3 Post(s)
    Quoted
    66 Post(s)

    Default

    with masterBB's suggestion i would also add:

    for openGL and c# - opentk

    for a great game engine (most popular one atm) - unity

  6. #6
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    Quote Originally Posted by x[Warrior]x3500 View Post
    for openGL and c# - opentk
    monoGame is a wrapper for both openTK and sharpDX
    Working on: Tithe Farmer

  7. #7
    Join Date
    Jan 2009
    Location
    Turlock/LA, California
    Posts
    1,494
    Mentioned
    3 Post(s)
    Quoted
    66 Post(s)

    Default

    Well, that's a TIL. thanks for the info!

    EDIT: i thought monogame used the tao framework xD
    Last edited by x[Warrior]x3500; 05-20-2014 at 04:59 PM.

  8. #8
    Join Date
    Dec 2011
    Posts
    733
    Mentioned
    2 Post(s)
    Quoted
    7 Post(s)

    Default

    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.
    My scripts: LunarPlanker
    ---
    My Utilities: Cross Platform, Open Source, SPS Path Generator

    Join the Unoficial SRL Skype Group by clicking here, or visiting this thread.

  9. #9
    Join Date
    Feb 2013
    Location
    The Boonies
    Posts
    203
    Mentioned
    9 Post(s)
    Quoted
    70 Post(s)

    Default

    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.
    Last edited by Lama; 03-25-2016 at 11:23 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •