Jump to content
  • Advertisement
Sign in to follow this  
elle_lawliet

About 2D Engines

This topic is 2538 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi!

I want to make a 2D game and I can't completly understand the concept of "game engine". So, the questions are:

If I use a 2D game Engine

-Can I know if a character is in front of an item without a lot of programming?
-Can I know if a character in front of a hole (and can't keep walking)?
-Can I change a room ilumination?
-Can I know if a character has passed through a door and I have to change the scenario?

Basically, are those things something that an engine could resolve? Do I need to code them?

I want to learn more about game engines but I couldn't answer those questions with the info I found.


Also, please tell me if you know about a free 2D game engine with DirectX9 support and complete documentation.

Thanks for your time smile.png

Share this post


Link to post
Share on other sites
Advertisement
Your question entirely depends on what "Engine" you're using. I look at an Engine as the barebone components from a given game, or a generic structure to form a given game. Which means you could have a "2D Plat-former Engine" which has all of the code setup for input, collision, jumping, ect...

There are a lot of 2D Engines, and tools out there; however you need to state which language you will be using.

Share this post


Link to post
Share on other sites

Hi!

I want to make a 2D game and I can't completly understand the concept of "game engine". So, the questions are:

If I use a 2D game Engine

-Can I know if a character is in front of an item without a lot of programming?
-Can I know if a character in front of a hole (and can't keep walking)?
-Can I change a room ilumination?
-Can I know if a character has passed through a door and I have to change the scenario?

Basically, are those things something that an engine could resolve? Do I need to code them?

I want to learn more about game engines but I couldn't answer those questions with the info I found.


Also, please tell me if you know about a free 2D game engine with DirectX9 support and complete documentation.

Thanks for your time smile.png


1. You have to draw the character after all the other stuff.
Implementing an z-axis or a draw-order would help you.

2/4. Collisiondetection in 2d is mostly really simple. You only need to check the boxes for a collision. This is solved by nearly every engine.

3. Illumination is an advanced technique but, sure, there are some engines that support this.

Share this post


Link to post
Share on other sites
Thanks for the answer!

I've found 2 or 3 useful engines, but they hadn't documentation.

I will use C++ with DirectX 9.0.

In the game you will have to solve puzzles in rooms (like Resident Evil 1, but the view is from above the character and it's not 3D) and it will not have any battle/combat.

Edit

@IceBreaker23

Thanks for the answer.
The problem with 2/4 is that I have lots of items in the same scenario. Do I need to check the x-y axis of all items in oder to know which one I am picking?
I do the colission detection with a DirectX function.

Share this post


Link to post
Share on other sites
I'm studying Software Engineering and we always use C++ or Java, so I have a long time programming with C++, but we usually don't use it for game programming.
The only games I have done are simple games like a multiplayer tetris, and other games with bitmaps.

I want my game to be something like this (but obiously, different)

[media]
[/media]

Is the Irrlicht Engine good for that king of game?

I don't know if it's ok to post videos. If not, please let me know :)

Share this post


Link to post
Share on other sites
Yes, it should do just fine. Your best bet is to just dabble in any selected engine and see if you like it. Heck, you could even make that game using GameMaker if you wanted. Tools are nothing more than tools. You could have all the best wood working tools in the world, but if you're unable to utilize them properly, it means nothing.

For a 2D game simliar to the one you showed, why not use SDL, Allegro, or SFML?

Share this post


Link to post
Share on other sites
I'm using DirectX becouse I'm still learning about it and I want to practice it.

SDL seems easy to work with, I'll keep that in mind.
I made a simple game in Allegro about a year ago, but I forgot almost everything about the syntax so I just have to learn it again.

I'm going to start reading the tutorials of the engine you gave me, but also I want to discover if I can code the points 1 2 3 and 4 by my own (I think I will learn a lot if I do it).

Share this post


Link to post
Share on other sites

@IceBreaker23

Thanks for the answer.
The problem with 2/4 is that I have lots of items in the same scenario. Do I need to check the x-y axis of all items in oder to know which one I am picking?
I do the colission detection with a DirectX function.


If you are testing 100 objects with one point you´ll need 100*4 int-compares(normally a bounding box does it). ( x1 >= x2 && y1 >= y2 && x1 <= x2+width && y1 <= y2+height)
But why would you want to make 100 objects on a single screen? Furthermore a modern pc will handle this, I think.

Keep in mind that you are only using 2D and this with c++, a really fast language. Modern 3D games do much more on the CPU in one frame.

Hope I could help you!

Share this post


Link to post
Share on other sites

[quote name='elle_lawliet' timestamp='1325526098' post='4898994']
@IceBreaker23

Thanks for the answer.
The problem with 2/4 is that I have lots of items in the same scenario. Do I need to check the x-y axis of all items in oder to know which one I am picking?
I do the colission detection with a DirectX function.


If you are testing 100 objects with one point you´ll need 100*4 int-compares(normally a bounding box does it). ( x1 >= x2 && y1 >= y2 && x1 <= x2+width && y1 <= y2+height)
But why would you want to make 100 objects on a single screen? Furthermore a modern pc will handle this, I think.

Keep in mind that you are only using 2D and this with c++, a really fast language. Modern 3D games do much more on the CPU in one frame.

Hope I could help you!
[/quote]

This is also where specialized scene hierarchies, such as quadtrees can help. But again, modern computers are more than capable of handling a load like this.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!