Page 1 of 1

2D Graphics Engine?

Posted: Thu Sep 03, 2009 7:38 pm
by Arya
Hey guys,

Well, I'm back, and the first thing I really want to do is make a 2D Grand Strategy Game based primarily on the War on Afghanistan from 2001 to 2012. The game would allow you to make the leading general (name of your choice) of the American Troops in Afghanistan, and have to deal with NATO, your own President, the various Warlords in Afghanistan, the Taliban/Al-Qaeda, and the Armed Forces and "Government" of Afghanistan. It would give you untill 2012 to help fix Afghanistan, give good international support for it, and as Iraq goes on, fight for reinforcements against the Taliban. 2012 would show you how well you did, just a beginning game that I thought would be really fun.

However, I need a good 2D graphics engine, and since I know a bit in Irrlicht, I thought I would use the 2D graphics engine. Has anyone used it? How strong is it, and will it fulfill the objectives of the game I have here? Is there any documentation on it? Thank you!

Arya

Posted: Thu Sep 03, 2009 7:48 pm
by serengeor
Well if I understood you right(that you want to use irrlicht as 2d graphics engine) its not a really good choice because it doesn't have good support for 2d graphics. I mean it doesn't support much things needed for a game.
But everything could be made withsome other external libraries :wink: tough I can't really tell you one because i haven't used any.

BTW it seems you are onto a big project and I would like to ask what games have you programmed before? :roll:

Posted: Thu Sep 03, 2009 7:59 pm
by Arya
Just simple things (Tetris, Pong) I'm not looking to finish this in months.. rather years, and it's not going to be that bad because it is at most a decision engine more than a game altogether. Now I need to know how to simulate guerilla warfare :roll:

Posted: Thu Sep 03, 2009 10:07 pm
by Lonesome Ducky
Not to be rude serengeor, but I'd have to say you're incorrect. Irrlicht could make a perfect 2D graphics engine. In fact, many 2D games fake it with 3D to gain access to hardware acceleration. And Arya, there are quite a few good code snippets to allow for 2D image rotation, scaling, etc. that would probably work for you.

Posted: Fri Sep 04, 2009 12:44 am
by jpoag
Lonesome Ducky wrote:Not to be rude serengeor, but I'd have to say you're incorrect. Irrlicht could make a perfect 2D graphics engine. In fact, many 2D games fake it with 3D to gain access to hardware acceleration. And Arya, there are quite a few good code snippets to allow for 2D image rotation, scaling, etc. that would probably work for you.
Yeah, I second this notion. I'm actually here looking into upgrading an existing 2d engine by using Irrlicht as the backend.

It is also correct that most 2d engines use the 3d pipeline to get hardware acceleration.

Posted: Fri Sep 04, 2009 3:35 am
by bobyBola
jpoag wrote:Yeah, I second this notion. I'm actually here looking into upgrading an existing 2d engine by using Irrlicht as the backend.

It is also correct that most 2d engines use the 3d pipeline to get hardware acceleration.
did james means is popcap engine :roll: :roll: :roll:
i agree with lonesome ducky ^^ i have made some 2D game using irrlicht, just search using "image" and "rotate" if you are looking how to ratate 2D image

Posted: Fri Sep 04, 2009 3:21 pm
by peacerosetx
@ bobyBola:

IMHO. Irrlicht is wonderful for 2D in fact our next game is just a 2D game using Irrlicht. There are some terrific resources to help you on this website. You may have seen/ or already know the information noted below. In any event...

To begin:

I would look at this link for the tutorial on 2D graphics with Irrlicht:

http://irrlicht.sourceforge.net/docu/example006.html

II You can also look at the Irrlich forum which is entitled “Everything 2d/3d Graphics”
Here is the link also:
http://irrlicht.sourceforge.net/phpBB2/ ... m.php?f=18

III Simply type into the search box in the main Irrlicht page 2d and you will have a plethora of documentation on 2D. This is what I did. Here is the link:

http://www.google.com/custom?hl=en&cof= ... eforge.net

Have fun.

Peace.

Posted: Fri Sep 04, 2009 6:26 pm
by serengeor
Well I said that irrlicht alone is not so good with 2d graphics it needs some modifications to make a good game since irrlicht itself as i know does not support image scaling or rotating am I right? :roll:

Posted: Fri Sep 04, 2009 7:07 pm
by jpoag
serengeor wrote:Well I said that irrlicht alone is not so good with 2d graphics it needs some modifications to make a good game since irrlicht itself as i know does not support image scaling or rotating am I right? :roll:
Correct. I'm looking into using matrix transformations on triangle quads. If you look into the source code for 2d image drawing, you'll see that it uses identity matrices for the world, projection and view transforms.

I'd say to manually transform the 2d quads using a matrix (Rotate,scale,translate) and either render them or cache them until a texture change.

Irrlicht has facilities for creating a texture from an image (and converting it to a POW2 size). It doesn't, however, cut image surfaces that are too large into smaller textures, nor does it (to the best of my knowledge) automatically create an atlas texture for lots of little images (again to batch draw calls).


Yeah, I'm looking into porting the PopCap framework, but I'm also going to upgrade it a little after the stable port is finished. One of the ideas (so you can start off with it) is to keep a matrix stack for accumulating transforms.

Think of an entire screen shake.. or the zoom on Peggle. Maybe even widescreen support!

Also, there is a Post Processing class in another thread that looks close to what I have planned for my upgrades.

Good luck.

Posted: Fri Sep 04, 2009 8:35 pm
by peacerosetx
oh I meant my comment to the OP not @bobyBola.

Peace