Suggestions for Game Engine Building?

  • (2 Pages)
  • +
  • 1
  • 2

27 Replies - 3096 Views - Last Post: 23 July 2013 - 02:38 PM Rate Topic: -----

#1 IntVoid   User is offline

  • New D.I.C Head

Reputation: 7
  • View blog
  • Posts: 33
  • Joined: 21-July 13

Suggestions for Game Engine Building?

Posted 21 July 2013 - 10:12 PM

Alright, to begin I dug around the site and I couldn't find any relevant topics/tutorials of game engine programming. Not that there isn't any, but that I just fail in searching forum sites! My inability sometimes just kills me! (Also first time on this site!)

But I digress, I have been looking around the internet for several weeks now, inspecting game engines from UDK to Cryengine, Unity, and many others, but those three are just to name a few. The few I found haven't really caught my attention to use. So I decided I wanted to set out and build my own, simple(and when I say simple, I mean as to building it for as side project) and just to learn the fundamentals.(Also would be great for my portfolio/Game Reel I have to get shored up in a couple of years)

I had two ideas of what I wanted to build, a top down tile set game engine, classic for top-down role-playing games, or what really has been catching my eye, is a voxel engine, which by far would be the more difficult of the two.

What I have planned for the voxel engine would be something simple for the graphical side of things. For example, here are a few examples in what I'm looking for...
Cubeworld
Stonehearth
I just find the look of them very appealing and well, the ability of them are usually quite amazing.

Now, I was hoping if I could get some assistance in finding those elusive links of the site for any tutorials, tips, hints or hell, if anyone has links to any more information that I may have possibly missed? Even suggestions as I'm finally looking out for some outside opinions then the ones I have where I live!

Is This A Good Question/Topic? 0
  • +

Replies To: Suggestions for Game Engine Building?

#2 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 14925
  • View blog
  • Posts: 59,590
  • Joined: 12-June 08

Re: Suggestions for Game Engine Building?

Posted 21 July 2013 - 10:32 PM

Game engine architecture is a non trivial task - more so than just normal game building. At heart an engine is just a four state machine with a bunch of cruft pile on top.

Posted Image

Have you thought about picking up a book on the topic?
Was This Post Helpful? 1
  • +
  • -

#3 aaron1178   User is offline

  • Dovakiin, Dragonborn
  • member icon

Reputation: 170
  • View blog
  • Posts: 1,310
  • Joined: 22-October 08

Re: Suggestions for Game Engine Building?

Posted 22 July 2013 - 01:25 AM

I would not suggest building an engine. I've tried and failed numerous times. I am now more focused on developing a working game, rather than trying to build an entire engine. When you think about it, a game engine supports a lot of things, for example:

  • Differenet Platforms
  • Supports a wide variety of resouce types
  • Has a lot in the lighting deparment
  • Has a global Asset system
  • Has a scripting engine
  • Has AI stuff
  • And a lot more


For example, why not download Unity, and have a look at what that engine supports and all that good stuff.

And a game engine is just not practical for one human alone.

Just my two cents
Was This Post Helpful? 1
  • +
  • -

#4 BBeck   User is offline

  • Here to help.
  • member icon


Reputation: 792
  • View blog
  • Posts: 1,886
  • Joined: 24-April 12

Re: Suggestions for Game Engine Building?

Posted 22 July 2013 - 06:10 AM

While agreeing with the advice others gave, I might point you in the direction of XNA. You said that you've decided that you want to go to a lower level than a game engine, where you can learn. XNA is the perfect environment for that.

XNA is a framework for C# that serves as a wrapper for DirectX but is more focused on game programming (DirectX is not for game programming, its for programming your graphics card).

XNA 4.0 and MS Visual C# 2010 are free downloads from Microsoft. So, you can try it for free. You have to learn the C# programming language first, but you said you want to learn.

I'm a huge fan of RB Whitiker's stuff and there are several books and tutorials out there to get you started.

Whether you want to do 2D game programming, or 3D game programming, XNA is an environment where you can learn the fundamentals of game programming. You are working at a deeper level than any game engine and learning the things that are involved in building a game engine or any game.

And, its a good place to start building your own games.

This post has been edited by BBeck: 22 July 2013 - 06:11 AM

Was This Post Helpful? 1
  • +
  • -

#5 anonymous26   User is offline

  • D.I.C Lover

Reputation: 2
  • View blog
  • Posts: 3,638
  • Joined: 26-November 10

Re: Suggestions for Game Engine Building?

Posted 22 July 2013 - 09:26 AM

View PostBBeck, on 22 July 2013 - 10:10 AM, said:

While agreeing with the advice others gave, I might point you in the direction of XNA. You said that you've decided that you want to go to a lower level than a game engine, where you can learn. XNA is the perfect environment for that.

You are so tempting me to click that -1 button when you do this! Don't start making games for a dead toolset. ;)
Was This Post Helpful? 1
  • +
  • -

#6 IntVoid   User is offline

  • New D.I.C Head

Reputation: 7
  • View blog
  • Posts: 33
  • Joined: 21-July 13

Re: Suggestions for Game Engine Building?

Posted 22 July 2013 - 09:36 AM

First, I want to say Thank you to everyone who has replied!

modi123_:
I have thought about picking up a book on the subject, and thanks for the link on the subject. It's not a bad idea to go and it isn't too expensive. (Student budget and all that jazz) I'll most likely pick it up by the end of the week. Also thank you for the clarification with the flow chart, helps me remember the four stages of it.

aaron1178:
Thank you for your input, I do aim to just learn and at least attempt a better understanding of a game engine. Ultimately I would love to have a custom game engine where I have complete creative control over it. Though I do understand it's not a trivial undertaking. I'll take another look at other game engines and see what all I can do with them. I'm stuck with the idea that I'd be limited with what I could do with the game engines, but more then likely, its not true. I should just open them all up and take a look at the guts.

BBeck:
XNA looks interesting but I would have to freshen up on C#, haven't programmed in it for a few years while I practice my C++ but there not too far apart in the syntax department I believe. Also thank you for the links.

ButchDean:
What do you mean XNA is a dead toolset? Did Microsoft abandon it? Man, do I feel out of the loop with my head in the studies for so long!
Was This Post Helpful? 0
  • +
  • -

#7 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 14925
  • View blog
  • Posts: 59,590
  • Joined: 12-June 08

Re: Suggestions for Game Engine Building?

Posted 22 July 2013 - 09:39 AM

If you want it cheape I saw a used copy for $34 on abebook.

As for XNA - yeah, with the new shift in windows 8, tables, windows phones, and the xboxone XNA was pushed into 'sunset' territory.
Was This Post Helpful? 0
  • +
  • -

#8 BBeck   User is offline

  • Here to help.
  • member icon


Reputation: 792
  • View blog
  • Posts: 1,886
  • Joined: 24-April 12

Re: Suggestions for Game Engine Building?

Posted 22 July 2013 - 10:14 AM

View PostButchDean, on 22 July 2013 - 11:26 AM, said:

You are so tempting me to click that -1 button when you do this! Don't start making games for a dead toolset. ;)/>



>:-)

LOL If you click the -1 button, I'll understand.

(For anyone who doesn't know, Microsoft has announced that they are no longer "working on XNA". They still "technically" support it because they are still running its forum and keeping code examples and such on their website. But they've basically said it's "dead" and that they are not going forward with it.)

However, I'm not recommending XNA as "tool set" for creating commercial games, so much. With MonoGame, it appears that there "may" still be an avenue for commercial games through XNA. (For anyone that does not know MonoGame is a project to make XNA run cross platform on just about any system, including on Windows 8. Microsoft has basically been telling XNA programmers to start doing MonoGame.) I'm hopeful on that front, but the MonoGame community is small and its future is uncertain. Still, I'm hoping for the best with MonoGame.

Also, I might point out that you can still do XBox360 games with XNA4.0 even though the new XBox will be coming out soon and you won't (I presume) be able to use XNA for that. I've heard rumors that the new PlayStation may support MonoGame too. If that's true, that could be significant for the future of MonoGame.

But, XNA is in may ways a "dead platform" at this point, especially without considering MonoGame. So, your point is well taken.

However, I don't believe there IS a better platform for beginning game programmers to learn on. As long as the focus is learning and not about making commercial games, there is no reason not to use XNA for the next 2 or 3 years while a newbie is learning the ropes.

The further I get from XNA, the more I realize what an amazing oppurtunity to learn game programming XNA presents. I have been searching high and low for a replacement to XNA. Something anything to even come close to replacing it. The bottom line is, I can't find such a platform and I honestly don't believe it exists. There is just simply nothing even remotely close to XNA when it comes to learning game programming. And if I'm wrong, then show me this other platform, because I've spent a whole lot of time looking for that platform and thinking this over.

Bottom line: Because if its poor prospects for the future over the next 4 or 5 years and its "deprecated" status, its probably not the place to be for making commercial games. However, XNA provides better oppurtunities for learning game programming than any other game programming platform out there. And there isn't even a close second, not that I can find anyway. And I've spent a lot of hours looking for its replacement.
Was This Post Helpful? 1
  • +
  • -

#9 IntVoid   User is offline

  • New D.I.C Head

Reputation: 7
  • View blog
  • Posts: 33
  • Joined: 21-July 13

Re: Suggestions for Game Engine Building?

Posted 22 July 2013 - 12:40 PM

Thanks for all the information BBeck. Really helpful, and Ill definitely take a look into seeing if it'll server my purpose of learning of building a rudimentary game engine.

Thanks for all the help. This site is going to be amazingly helpful to me in the long run! :D
Definitely made a permanent member.
Was This Post Helpful? 0
  • +
  • -

#10 stayscrisp   User is offline

  • フカユ
  • member icon

Reputation: 1040
  • View blog
  • Posts: 4,325
  • Joined: 14-February 08

Re: Suggestions for Game Engine Building?

Posted 23 July 2013 - 04:58 AM

View PostButchDean, on 22 July 2013 - 05:26 PM, said:

View PostBBeck, on 22 July 2013 - 10:10 AM, said:

While agreeing with the advice others gave, I might point you in the direction of XNA. You said that you've decided that you want to go to a lower level than a game engine, where you can learn. XNA is the perfect environment for that.

You are so tempting me to click that -1 button when you do this! Don't start making games for a dead toolset. ;)/>


You more than tempted me to click the +1 button :)

Quote

However, XNA provides better opportunities for learning game programming than any other game programming platform out there. And there isn't even a close second, not that I can find anyway. And I've spent a lot of hours looking for its replacement.


What are you basing this on exactly? What are the features that XNA has that other don't?
Was This Post Helpful? 1
  • +
  • -

#11 BBeck   User is offline

  • Here to help.
  • member icon


Reputation: 792
  • View blog
  • Posts: 1,886
  • Joined: 24-April 12

Re: Suggestions for Game Engine Building?

Posted 23 July 2013 - 06:58 AM

View Poststayscrisp, on 23 July 2013 - 06:58 AM, said:

Quote

However, XNA provides better opportunities for learning game programming than any other game programming platform out there. And there isn't even a close second, not that I can find anyway. And I've spent a lot of hours looking for its replacement.


What are you basing this on exactly? What are the features that XNA has that other don't?


The primary feature that XNA provides that no others do is "ease of learning and a huge body of great 'learning aides' while at the same time allowing one to dig almost as deep into the subject of game programming as one wishes".

First, XNA is real game programming in the sense that you're using a real computer language (C#) to do basic things like define vertex buffers and configure rasterization (or simply to draw sprites on the screen).

I would start by contrasting this with something extreme on the two far ends of this scale. First, it's not an engine where you have very little low level control and things are obfuscated that keep the user from getting a real understanding of what's going on. Even basic things like setting up and controlling a 3D camera have to be programmed. But second, its not a graphics driver like DirectX is.

As I get into DirectX11, I realize that DirectX 11 is NOT for game programming. Yes, people use it for that, but that's not its purpose and that's not what it does. DirectX 11 is basically a framework to control your graphics driver. You are directly manipulating the graphics card. Whether you manipulate the graphics card for medical imaging, scientific information display, Computer Aided Drafting (CAD), or even for making a game, it's not about making a game, it's about controlling the graphics card directly.

As an illustration, I would point out the steps needed to draw a sprite on the screen in DirectX. First of all, you have to be comfortable in C++. You need to be extremely comfortable with pointers, a subject that causes most students to drop out of C++ classes before they complete them. And you're going to have to be more comfortable with them than most of the A students of said classes. In short, you need to be absolutely rock solid in multiple dereferenced pointers and such. You can get there, but most of the people who have recently completed a C++ class are not solid enough in pointers to "be" there. You'll need to read a book dedicated to explaining pointers more than likely. And you'll also need to be pretty comfortable with the stack, the heap, and dynamic memory allocation as you'll be doing this all the time.

Second you have to define a window. It's true that you can copy and paste the code for this and that its only about 4 pages of code or so. But to understand the code you just pasted into your program is well beyond the knowledge one would have after completing a college C++ class. You're going to have to get into the somewhat archaic and cryptic subject of WIN32 (albeit, if you stick strictly to the pasted code you don't have to get very deep into WIN32 since most all you need it for is drawing a window and MAYBE handling user input).

Third you have to use COM, as in Distributed COM. DirectX is a COM object even though it is in a wrapper to make it "usable". I have yet to be able to figure out COM although I gave up trying to figure it out long ago. Fortunately, you don't have to know much about COM to program in DirectX. Mainly, I think you just need to know that COM basically de-allocates its own objects based on the number of them created and its different than memory management in WIN32. That's not too difficult.

Fourth, you have to initialize DirectX. DirectX has to be setup by your code to begin doing its thing and there's a lot to learn in order just to start DirectX, let alone actually use it, with everything I've mentioned so far. Just simply starting DirectX and initializing the graphics card is about 8 pages of advanced pointer code and calls to various somewhat difficult to understand DirectX methods. If you can get this far, you've got my respect although you haven't done anything yet really except put a Window on the screen and get DX ready to do some work.

Then you are ready to get some actual work done. DX11 does not know how to draw sprites. If you want to draw a sprite you will have to do it in 3D and that means you had better be fairly solid in basic 3D programming in order to do the most basic things in 3D.

You will need to load a vertex buffer up with the 4 vertices of the 3D rectangle you are about to draw. You will need to load an index buffer to wind the indices to form 2 triangles which will be the 3D rectangle (2D object in 3D space).

Next you will need to load your sprite image. "Officially", DX11 only supports the .DDS image format. It supports no common format, such as .BMP, .JPG, Tiff, etc. There are some "deprecated" functions you can use to load these images though. So, you either use the deprecated functionality or you have to "teach" DX11 how to convert an image file into an actual image. (That should give you a good idea of things to come. And make you realize we are no longer in Kansas anymore Toto.)

So, you load your image into an image buffer and you attach all your buffers to the graphics pipeline. Next you need to have a shader written in HLSL. Yes, just to do something as simple as draw a sprite on the screen you need to be solid in understanding High Level Shader Language. So, then you have DirectX compile your HLSL code and attach the shader to the pipeline.

Your also going to have to be solid with matrices just to draw sprites on the screen. Your sprite will be controlled by a world matrix, you will have to setup a view matrix to act as a "camera", and you'll need to define an orthogonal projection matrix. You'll pass all these matrices to the shader before drawing. But if you want to rotate the sprite, or such, you will have to rotate it by manipulating its world Matrix; no built in "rotate" function found here.

I can't even begin to imagine a beginner doing this. I find it almost laughable to think someone straight out of a college level C++ class is going to be able to accomplish this without step by step instructions. And I haven't seen such instructions. I've seen some tutorials and such on DX, but I haven't seen one that explains how to basically do 2D sprites as a class that you can reuse in your games. (I'm actually hoping to write such a tutorial at some point. It's one of my current projects.)

Compare that to XNA. First of all, you don't even use pointers and memory management is all handled for you in C#. So, you don't have to spend all that time trying to grasp one of the more difficult concepts in computer science. You don't have to even learn what WIN32 is. And you don't need to even know what COM is or how to initialize anything.

XNA has a template defined when you startup and you are already to that step when you simply create your blank/empty XNA program. You just saved about 4 years of learning stuff like pointers, COM, and WIN32 that have little to nothing to do with game programming.

To draw sprites, you create an instance of the SpriteBatch object, load your sprite image into a texture object, tell the SpriteBatch to begin, Draw your sprite including rotation, depth, effects etc all with one line of code, and tell your SpriteBatch to end. It's like 5 lines of code to do what took 10 pages in XNA. And now you're ready to learn about sprites and how they are used in games. Annimating your sprites is probably another few lines of code.

In other words, rather than spending 4 years learning about things that have little to nothing to do with game programming, you can jump in and immediately start doing game programming. That's huge for teenagers and people who are absolutely new to this stuff.

Now let's compare that to SDL. SDL, likewise obfuscates a lot of this stuff. It's not very many lines of code to do this stuff in SDL, much like it's done in XNA.

But you yourself have basically said that SDL is not for beginners. You have to be solid with C++ and that means pointers and such (although nothing compared to how solid you need to be with pointers to do DX). But the big problem with SDL that makes it impossible for beginners is that it is a library that is constantly in flux.

You have to compile the SDL library yourself. That's no small task for a beginner. That would be like requiring and XNA programmer to rebuild/recompile XNA itself every so often. And it's not just one library that you compile in SDL, it's multiple libraries for various functionality and any minor misstep could mean that SDL compiles wrong and you have a version of SDL that is completely un-usable. In short, this is a nightmare that most beginners are never going to make it through even to do what took them 10 seconds to do in XNA.

There are only two versions of XNA currently in use XNA 3.0 and XNA 4.0. As long as you get those two straight and know that they are not particularly cross compatible, you're good. You download them in a couple of clicks and they are ready to use.

Just getting SDL setup to begin using is something that requires a rather intimate knowledge of your compiler that you are not likely to have after completing a college C++ class.

XNA doesn't even require you to compile it. It's just there ready to use.

So, there's a steep learning curve with SDL that makes it almost impossible for the teenager who just learned to program last year, or anyone just starting out in game programming who doesn't have massive experience in the C++ world.

With XNA, you just download and immediately start making games as long as you have read a C# book or two. It's just that simple. So simple in fact, that a teenager on their own could do it.

And just because its simple, don't think that XNA isn't powerful. It's unbelievably powerful. But it lets you "ease" into that power. In a couple of minutes the absolute beginner can start drawing sprites on the screen. But when you're ready for more, you can go deeper with XNA.

In XNA you can do 3D. SDL doesn't even have 3D capabilities. (I believe you can use OpenGL with SDL for 3D, but then I think you're starting to get into some of the issues similar to what we were talking about in DX11).

In XNA you can get deep into advanced topics like rigid animation and skinned animation, High Level Shader Language with all of its vector math, terrain engines and algorithms for terrain management such as ROAM, Shadows and advanced lighting, advanced collision detection, advanced object management, loading custom content such as level files or model(or picture)file formats that are otherwise unsupported. The list goes on and on. Basically, XNA allows you to go just about as deep into the subject of game programming as you want to go.

For 2D work, the advantages of XNA are there and they are significant. But if you want to learn 3D, I can't even imagine learning 3D without XNA. And there are quite a few books out there to help you learn 2D and 3D in XNA.

Show me any other platform/framework, that allows you to dig that deep into game programming, has as rich of a library of functionality as .Net, and yet is so simple to use that all one needs to get started is a few C# books and a couple of XNA books? Honestly, I am looking for such a platform, and have been for the past year, and I can't find such a platform or anything that even remotely comes close to it.
Was This Post Helpful? 2
  • +
  • -

#12 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 14925
  • View blog
  • Posts: 59,590
  • Joined: 12-June 08

Re: Suggestions for Game Engine Building?

Posted 23 July 2013 - 07:30 AM

I always looked at it pretty simply - XNA let you get to the game play aspect of videogame making and less on the tech building behind it while being open enough not not be locked into mechanics like a drag and drop 'RPG Maker' line.
Was This Post Helpful? 1
  • +
  • -

#13 stayscrisp   User is offline

  • フカユ
  • member icon

Reputation: 1040
  • View blog
  • Posts: 4,325
  • Joined: 14-February 08

Re: Suggestions for Game Engine Building?

Posted 23 July 2013 - 07:49 AM

I see your points but they are not exclusive to XNA. What about Flash/Flex and the starling framework, ticks all of the boxes you mentioned yet is also still being supported and updated and is cross platform; two huge pluses in my eyes. Develop games for iOS, android, desktop and web from the same code base, pretty big deal to be honest. And It's free and open source. Along with Starling there is also Flixel and FlashPunk.

Away from AS3, what about the JMonkey engine? Ticks most of your boxes too, right? And I'm sure there are others I have not mentioned.

As for SDL needing to be compile that is not entirely true, once a snapshot is out there then you can just link the library directly without compiling and only get the updates when you feel they are needed.

I don't disagree with you that XNA is a good tool (or was) but I hugely disagree that it has no competition as a tool for learning game programming. It is simply one that you found the most helpful.
Was This Post Helpful? 0
  • +
  • -

#14 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 14925
  • View blog
  • Posts: 59,590
  • Joined: 12-June 08

Re: Suggestions for Game Engine Building?

Posted 23 July 2013 - 07:57 AM

Exactly - it worked well for me. I've never been a flash fan so that fell off the radar. I've never heard of JMonkey - but java + opengl is.. amusing.
Was This Post Helpful? 0
  • +
  • -

#15 stayscrisp   User is offline

  • フカユ
  • member icon

Reputation: 1040
  • View blog
  • Posts: 4,325
  • Joined: 14-February 08

Re: Suggestions for Game Engine Building?

Posted 23 July 2013 - 07:59 AM

It's really not that amusing. And open source.

https://www.youtube....h?v=WZ_alfF5Zt4

And a stage3d game

https://www.youtube....h?v=M2fCBN1aSG4
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2