Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

the mystery of 2D vector graphics

Sign in to follow this  


2D graphics programming is important for a variety of reasons if you want to be a serious developer. Vector graphics are a math based computer graphics technologies that have become popular with artists, designers, and since the recent development of more advanced video graphics technology, are becoming popular in games.

I have been studying them mostly in the context of for use with menu's and overlays for games, and in my case, role playing games, because that's the kind of game company I have.

In the graphics programming world, we have:

  • Direct2D
  • OpenVG
  • HTML5
  • SVG API's
  • Java2D
  • Custom API's and SDK's that extend low level apis

    Did you know, there are OpenVG implementations available from ImaginationTechnologies for Windows? For linux, there are a few API's available, but if you want full control over your game engine, you would have to implement the library yourself. This is one of the reasons why we don't see lots of linux games, and also another reason why web based games have gained in tremendous amounts of popularity. This is also why Android and iOS became such a popular platform to make games on. It is tough to make a cross platform game engine, though it is possible.

    Here are some tips if you are thinking about writing your own game engine for a platform, and are serious about competing in the game industry:

    For Directx programming: You have to use shared surfaces and know how to use them really great, and practice a lot with them. This coupled with multithreaded game loops, allows for writing to the back buffer of your game scene, from both Direct3D and Direct2D contexts. If you want to be able to do this, you should set goals to meet the following requirements.

    • Parsing your system for available graphics cards, and creating interfaces to them dynamically
    • Create Direct2D contexts
    • Create Direct3D contexts
    • Create memory safe multithreaded loops
      aEUR'Once you can confidently do this, then you should look up shared surfaces in directx on msdn. This will allow you to create a great overlay menu for your 3D game. If you have a 2D game, learning some of the techniques will allow you to gain performance speedups in creating your game.

      If you want to write a unix,linux game engine that is easy to transport games to linux, mac, then you have to implement your own openVG library with the headers from Khronos group. Obviously this is for OpenGL games. OpenVG provides a framework that would allow the development of a game engine or library that is easily usable by anyone using the openvg header, in case you make your project opensource. If you are just using it in house, then you get ideas from it, or partially implement it.

      • In OpenVG, you can write your own rasterizer, or you use OpenGL to render 2D graphics to the screen z-depth plane.

        There are a variety of techniques for 2D programming speed ups I will talk about in upcoming blogs. I will also update these blogs with pictures, videos, and animations when I get the chance.

Sign in to follow this  


Recommended Comments

There are no comments to display.

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!