Tell me about: graphics in visual studio

MagisterMagister Registered User regular
edited December 2009 in Help / Advice Forum
I'm not really big on graphics knowledge, but today I was using visual studio to bodge together a simple client for accessing a database I made, and it left me wondering if I could use visual studio to hack together a simple tiles and sprites type game.

I figured I'd ask for some pointers, and advice before I looked too much further into the Microsoft "documentation" (I use that term loosely). Knowing what to look for before you look always seems to keep the blood pressure down when dealing with that lot.

I know I want double buffering, and at first glance it appears that you can set a form to buffer until all paint operations on the form are complete and then update the entire form as a single frame.

It also appears that you can paint a images to a form. I'm wondering if I can get away with just painting the images of tiles across the form, and then paint the images of the various objects. I'd think I'd just need to be careful to paint the images in the proper order so they all layer up correctly.

Can you actually get a reasonable number of form updates per second out calling the paint function a few hundred times per frame? Or is there some other approach that would work better? (well, another approach short of cracking open that big OpenGL book and doing it properly that is).

Magister on

Posts

  • KakodaimonosKakodaimonos Code fondler Helping the 1% get richerRegistered User regular
    edited December 2009
    No, trying to call paint that many times per frame isn't going to work too well. If you really want to do something like that, you're either looking at GDI+ (which is the old school way: http://msdn.microsoft.com/en-us/library/ms533798%28VS.85%29.aspx ).

    Or look at using DX9. Here's a good tutorial on using it in Forms: http://msdn.microsoft.com/en-us/magazine/cc164112.aspx

    I'd recommend the latter.

    Kakodaimonos on
  • MagisterMagister Registered User regular
    edited December 2009
    Well, I'm not touching DX with a 10 foot pole. Having glanced at DX and OpenGL, it just seems dumb to torture myself with DX and Microsoft's reindeer games. No point in using Visual Studio either if it can't provide an easy hack job option for the graphics either. Oh well.

    Magister on
  • virgilsammsvirgilsamms Registered User regular
    edited December 2009
    You can do this in visual studio using .Net WPF (Windows Presentation Foundation) or Silverlight pretty easily, I would steer clear of Forms for this particular idea. If you're using the .net stuff I would suggest using C#, not C++ as a language. Other than that, the visual in visual studio really stands for making drag and drop windows applications using windows forms or WPF, not 2D graphics as such. If you're not into .Net for a sprite game I'd just use a decent 2D engine.

    virgilsamms on
  • DelzhandDelzhand Hard to miss. Registered User regular
    edited December 2009
    If you're using Visual Studio, there's no need to "hack together" a game - the XNA framework does all the heavy lifting.

    Delzhand on
  • Mr RayMr Ray Sarcasm sphereRegistered User regular
    edited December 2009
    Delzhand wrote: »
    If you're using Visual Studio, there's no need to "hack together" a game - the XNA framework does all the heavy lifting.

    Limed to hell and back, this really is your best bet. You can download XNA game studio HERE (it plugs into whatever version of Visual Studio you have), and there are some pretty good tutorials on Microsoft's site HERE. There are also plenty of 3rd-party tutorials out there if you don't like these ones.

    Mr Ray on
  • TomantaTomanta Registered User regular
    edited December 2009
    3rd XNA. It makes things sooooo easy.

    Tomanta on
  • Jimmy KingJimmy King Registered User regular
    edited December 2009
    I'm too lazy to lime. Pretend I limed one of these XNA recommendations. XNA is one of the greatest things to happen to ameteur game development, imo. I haven't used it in a couple of years, but from what I've read, it's only gotten better since I last used it.

    Jimmy King on
  • NamrokNamrok Registered User regular
    edited December 2009
    I've been screwing around with XNA for years now. Making somewhat not horrible progress on a game right now. It gets all the boring crap out of the way for you and you can really focus on the fun stuff.

    There is an XNA thread over in Games & Tech you might want to check out.

    Namrok on
Sign In or Register to comment.