Game Engine or not?

Started by
7 comments, last by Programmdude 12 years ago
Hello there smile.png

Right now, I'm working on a project with a group of people. We're basically trying to get together a 2D RPG (with a twist - more on that in a minute), and we've chosen C# as our language of choice (although I do want to implement Lua, Python, or what have you as a script engine at one point). We're not set to start coding until June, because we're currently conceptuallizing, but I brought up the issue of a game engine, however I have read somewhere that you don't actually *need* an engine.

We're planning on using managed code (i.e XNA/DirectX), and we essentially want to have a 2D RPG whilst you're "roaming" (in terms of movement, think about Pokémon, games created from RPGMaker), however when you enter combat, we want to switch to a battle screen that is 3D (or, at least, 2.5D - think FF). I've read that you don't really *need* a game engine in a 2D game because essentially all that needs to be done is have a main loop that updates events in the application (currently in my game engine mock up, I have a main thread with a variable timestep that signals a display thread to render asynchronously [which, in hindsight, seems rather ridiculous - see code below] which then tells the main thread it's done rendering and allows the main thread to continue to the next iteration).

My question is, would we require a game engine for this (it's intended to be a single player RPG though I am trying to convince them to allow you to have peer-to-peer multiplayer), if so what one would you recommend, and, if not, how would we go about organizing the code so it's not too messy? In addition, how would one switch from a 2D perspective to a 3D perspective *cleanly* in DirectX? Part of me thinks about having the 2D perspective transition into black, which a 3D perspective then fades in.. tongue.png

Best regards, sorry for wall of text, and let me know if I need to clarify anything. smile.png
Main game loop:
http://pastebin.com/wfZYdUuP

EDIT: I would also *GREATLY* appreciate if someone could tell me an efficient way to seperate Renderable content. Right now, I have

Interface IRenderable { void Render(); }
Class Scene : IRenderable { void Update(); }

But I'm wondering how I would efficiently create GUIs under that structure, or is that a lost cause?
Advertisement
Hi.
First, XNA is a very good choice when developing a RPG. It has already has good samples and Book written on the subject. That said, i would advice you to first get used to the technology.
Xna's already provides a strong Main loop and IDrawable and IUpdateable interfaces for your needs. I way you spcify your content, looks like you want to create your own.


My question is, would we require a game engine for this (it's intended to be a single player RPG though I am trying to convince them to allow you to have peer-to-peer multiplayer), if so what one would you recommend, and, if not, how would we go about organizing the code so it's not too messy? In addition, how would one switch from a 2D perspective to a 3D perspective *cleanly* in DirectX? Part of me thinks about having the 2D perspective transition into black, which a 3D perspective then fades in..


You probably will have to write your own game engine on top of XNA. I have never seen a RPG game engine that supports multiplayer. =\.
Adding the multiplayer component will be the most challenging. but it should not be difficult to find tutorials on how to do it ;).
Also the 3D effect will required you to learn a lot and will also add a new degree of complexity to your game, but its doable ;). My advice is to start by understanding how the RPG sample works and work from there ;). The sample alone is very difficult to program, and it will give you a good understanding of the challenges you will face when creating your game.

Hope this helps ;).

Hi.
First, XNA is a very good choice when developing a RPG. It has already has good samples and Book written on the subject. That said, i would advice you to first get used to the technology.
Xna's already provides a strong Main loop and IDrawable and IUpdateable interfaces for your needs. I way you spcify your content, looks like you want to create your own.

[quote name='Neglected' timestamp='1333712975' post='4928747']
My question is, would we require a game engine for this (it's intended to be a single player RPG though I am trying to convince them to allow you to have peer-to-peer multiplayer), if so what one would you recommend, and, if not, how would we go about organizing the code so it's not too messy? In addition, how would one switch from a 2D perspective to a 3D perspective *cleanly* in DirectX? Part of me thinks about having the 2D perspective transition into black, which a 3D perspective then fades in..


You probably will have to write your own game engine on top of XNA. I have never seen a RPG game engine that supports multiplayer. =\.
Adding the multiplayer component will be the most challenging. but it should not be difficult to find tutorials on how to do it ;).
Also the 3D effect will required you to learn a lot and will also add a new degree of complexity to your game, but its doable ;). My advice is to start by understanding how the RPG sample works and work from there ;). The sample alone is very difficult to program, and it will give you a good understanding of the challenges you will face when creating your game.

Hope this helps ;).
[/quote]
Thank you for your post! I should clarify that I am not completely new to 3D programming, although I *am* new to DirectX (having worked with OpenGL previously through LWJGL in Java). The problem I have with XNA is that, try as I might, microsoft's programs just don't want to work for me (I AM running windows 7 64x), so atm I am having to use MonoDevelop to code C#, and Eclipse for Java and C++, and MonoDevelop doesn't support XNA. :(
You should try using Mono Game. Many indie developers port their game to Mac using it. That said, i would recommend you to try again to install XNA and visual studio ;).
A game engine is basically the things that keeps everything together. Without a game engine, your main loop that updates everything will be a mess. If you're using XNA you basically need to just build some code on top of that specific to your game and use that.

You could have some classes like Tiles, Characters, Enemies... Etc...

Then the battle system will need its own set of rules. Once you have all of that I'd call it a game engine.

I've never heard of anyone saying a game engine is not needed for 2D games even... I think its safe to say that every game out there has some kind of game engine. They all just vary on their genericness. Unreal Engine, for example, is very generic and has been used for games ranging from FPSes like Unreal Tournament, to RPGs like Mass Effect, to fighting games like Mortal Kombat. RPG Maker is a game engine built specifically for making RPGs with a certain format. You are a little more limited but you can create almost any kind of RPG in the format that it allows. You can fill your game with any kind of content such as maps, tilesets, characters, as long is it is doable in RPG Maker.

Basically, the more generic the engine, the more complicated it is to make things, but the more powerful it is. You could even go so far as just using RPG maker if it suits your needs.
A matter of opinion I guess, I see a game engine as separated code in a game that is re-usable for other games.

A matter of opinion I guess, I see a game engine as separated code in a game that is re-usable for other games.

This is how I see it too.

@Bayinx: I did install XNA and whatnot, and it just simply doesn't work. Something about registry access. I have looked at every possible fix and none of them work (seriously). And yes I am running as Admin. :(

Graphic programming and I just really don't mix. And I'm stil confused by this timestep and interpolation thing. Q_Q.
OK so, IGNORING XNA since it doesn't want to work for me, can someone give me a display solution that could render both 2d *AND* 3d graphics (obviously not at the same time) on demand for C#/.NET? Thanks. :3 I was thinking DirectX and passing in a Gtk# Handle to a DrawingArea.
ill and vleugel are right, game engines are pretty much libraries that tie everything together nicely and that you can use in other projects. The library code would work just as well being inside the game project as it would in the library, with the obveous exception of using it in other projects.
Whether or not you want to use an engine, in house or someone elses, always keep your project neatly organized. Don't just shove a whole load of things in the game class, seperate it all out into there own classes. It makes it so much easier when fixing bugs and trying to add new features.

As for graphics, on windows in C# there is XNA, SlimDX and OpenGL. XNA and SlimDX both use DirectX 9, though SlimDX can also use DirectX 10 and 11. I have had no problems with XNA running on my own computer (Win7 x64), but there are several things I don't like about it too much. Not easily able to load files without the content pipeline, which means making your game moddable has now become almost impossible. No DirectX 10/11 support hurts a little when doing 3D games, and it doesn't support x64 projects.
SlimDX is very similar to XNA, but without the content pipeline, with DirectX 10/11 support and with x64 support.
There are several OpenGL wrappers for C#, with probably the best being OpenTK. If you want cross platform via mono, then this is your choice. You mentioned doing OpenGL through java before, so this could be another one to consider.

This topic is closed to new replies.

Advertisement