-
November 29th, 2008, 05:45 PM
#1
2D graphics
I want to make a 2D graphical app, it will be a mapping application that will allow to draw lines, squares, circles etc... and then save those configs to a file. It's to spawn a MMO world.
Just wondering where I should start and what would be the best thing to learn for such graphics. DirectX? Also is there a standard way of doing 2D graphic / GUI apps or are most calls all OS specific? I'll be coding this for windows so it's not a huge issue but I always like to go cross platform if I can.
-
December 1st, 2008, 05:03 AM
#2
Re: 2D graphics
C++ has no knowledge of graphics or sound or similar. That is something that uses a third party library. There are some reasonably portable libraries like SDL or Allegro which on windows probably kick down to the directx functions.
-
December 1st, 2008, 07:59 AM
#3
Re: 2D graphics
Originally Posted by Russco
That is something that uses a third party library. There are some reasonably portable libraries like SDL or Allegro which on windows probably kick down to the directx functions.
No, you don't need any "third party library"
Just use GDI/+
-
December 1st, 2008, 09:23 AM
#4
Re: 2D graphics
GDI+ is ridiculously slow for making maps for a mmo world. They gonna be kinda large. Also gdi+ is not portable, its for windows only and the OP wanted a cross-platform solution.
-
December 3rd, 2008, 08:32 PM
#5
Re: 2D graphics
If there's not anything cross platform easily available then I'll go Windows only route. I'm writing the program for windows anyway, and at worse I can always rewrite it for Linux. I'll be sure to keep that in mind when I'm coding it, so that all I need to change is the graphics engine itself.
This would be a windows app at least for now. I would probably be drawing pixel by pixel. The maps are basically links to tiles, the tiles are images in a propiatary format, so I'd actually be generating the pictures with code. OR I could maybe just have a process that converts the map to a bitmap first, that may be faster.
Is directX best way to go?
-
December 4th, 2008, 06:54 AM
#6
Re: 2D graphics
directx limits you to windows. SDL is portable.
Get Microsoft Visual C++ Express here or CodeBlocks here.
Get STLFilt here to radically improve error messages when using the STL.
Get these two can't live without C++ libraries, BOOST here and Loki here.
Check your code with the Comeau Compiler and FlexeLint for standards compliance and some subtle errors.
Always use [code] code tags [/code] to make code legible and preserve indentation.
Do not ask for help writing destructive software such as viruses, gamehacks, keyloggers and the suchlike.
-
December 8th, 2008, 04:51 AM
#7
Re: 2D graphics
Whoever thinks there are no libraries that can work on *nix as well as Windows does not contain enough information for this subject and should not post in this section, not that I am bashing them, but giving incorrect knowledge is close to sabotage in my eyes. Check yourself before you give an answer.
OpenGL will work on different platforms such as different distro's of linux and windows.
Gamedev.net contains a HUGE amount of information that will benefit you. It has GREAT learning resources for the beginner and it contains different engines that may interest you.
http://www.gamedev.net/
You say you are interested in cross platform code, if you ever decide to go further than only 2D graphics, you should look into Crystal Space 3D.
http://www.crystalspace3d.org/main/Main_Page
If you decide to work with DirectX, then I would suggest to look at Drunken Hyena for great starting tutorials that will teach you exactly what you are asking for. I have included another great link as well.
http://www.drunkenhyena.com/cgi-bin/directx.pl
http://www.directxtutorial.com/
If you decide to work with OpenGL, then here are some links to some beginner to advanced tutorials. Have fun .
http://nehe.gamedev.net/
http://www.videotutorialsrock.com/
http://www.opengl.org/code/
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|