first game
first game
Hello forum
I'm making my first graphical game in C++. I plan for it to be a 2D top-down shooter game with multiplayer support.
I've got the movement down, your character stays in the middle of the screen and walks when you press W,A,S, or D or a combination of two of them. The direction he walks is relative to your cursor, so when you hold down W he walks towards your cursor.
Any suggestions? How should I do collision and maps? I was thinking about using tiled maps, but I'm not sure how to implement collision.
Also, is there any way to rotate a 2d image? I want my character to always be facing my cursor.
I'm making my first graphical game in C++. I plan for it to be a 2D top-down shooter game with multiplayer support.
I've got the movement down, your character stays in the middle of the screen and walks when you press W,A,S, or D or a combination of two of them. The direction he walks is relative to your cursor, so when you hold down W he walks towards your cursor.
Any suggestions? How should I do collision and maps? I was thinking about using tiled maps, but I'm not sure how to implement collision.
Also, is there any way to rotate a 2d image? I want my character to always be facing my cursor.
-
- Posts: 616
- Joined: Wed Nov 01, 2006 6:26 pm
- Location: Cairo,Egypt
- Contact:
Hi,
For maps, its a good idea to use tiles-based maps (less heavy than drawing a whole level in one single texture...)
For collisions, here is a useful link found in the forums :
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=13029
For rotations, it has also been asked on the forums, so here is a link :
http://irrlicht.sourceforge.net/phpBB2/ ... php?t=9632
(I found those both with forum search, using "rotate AND sprite" )
Good luck, and good evening !
For maps, its a good idea to use tiles-based maps (less heavy than drawing a whole level in one single texture...)
For collisions, here is a useful link found in the forums :
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=13029
For rotations, it has also been asked on the forums, so here is a link :
http://irrlicht.sourceforge.net/phpBB2/ ... php?t=9632
(I found those both with forum search, using "rotate AND sprite" )
Good luck, and good evening !
--
Lideln, France
Lideln, France
-
- Posts: 616
- Joined: Wed Nov 01, 2006 6:26 pm
- Location: Cairo,Egypt
- Contact:
For rotation, in the thread I gave you the link, a person advises to use a mesh with only one face (one face = 2 triangles), and put the texture on that face.
Then, just rotate the face thanks to the 3D mesh rotation functions, and you're done !
For the collision, it should not be that difficult.
There should be some rectangles collision functions in irrlicht, check the documentation.
If it is fast or not, I dunno, but it should do it.
Then, just rotate the face thanks to the 3D mesh rotation functions, and you're done !
For the collision, it should not be that difficult.
There should be some rectangles collision functions in irrlicht, check the documentation.
If it is fast or not, I dunno, but it should do it.
--
Lideln, France
Lideln, France
-
- Posts: 616
- Joined: Wed Nov 01, 2006 6:26 pm
- Location: Cairo,Egypt
- Contact:
Well there's no harm in using Irrlicht as it copes just fine with 2D graphics, so you wouldn't run into any problems. And just using the GUI for a 2D game... I'm not sure about that, there've been discussions before about which is better to use driver->draw2DImage or an IGUIImage and no one seemed to give any answer as to the advantage of one over the other, but im sure there are some!
-
- Posts: 616
- Joined: Wed Nov 01, 2006 6:26 pm
- Location: Cairo,Egypt
- Contact:
More fun? Not sure why, may have more 2D features, as you say Irrlicht is mostly 3D i guess. Faster.. maybe, if it's got more of a focus on 2D it may have done more work on making it more efficient, but i shouldnt think Irrlicht is slow by any means and would never run into troubles in 2D as it's not very demanding. Easier? Again possibly if they've done more focus on 2D then maybe they've got easier ways of doing things.