• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Tim Lawton

Creating a Game Engine - Where to Start

11 posts in this topic

Hello,

 

I've been given a task to create a game engine, I am working on the graphics part of the engine. Now I don't know alot about creating an engine, I know what they do but thats about it.

 

Here is the scope of my problem.

 

I need to be able to allow a user to create objects to the screen in real-time, using input from the keyboard or mouse, either by typing command lines or clicking buttons, the user should then be able to place the objects where they desire by either being prompted to enter X,Y,Z cords or simply drag and drop (alot harder, will try to avoid that method).

 

I'm completely confused on even how to start this, I have fairly good knowledge when it comes to DirectX11 and I know how to create objects in a 3D space. But I have no idea how to do this, so I was wondering if someone could point in the right direction, what I should be looking at, I am constantly being told I should be using design patterns such as Factory Method or Service Locator, but I can't get my head round it. I guess what I am looking for is sample code of a working project which works similar to what I am trying to do, or UMLs which explain it better.

 

Any help would be appreciated, if my question is too bland please ask so I can help you help me..

0

Share this post


Link to post
Share on other sites

So you area basically creating a scene editor?

 

My first comment is , if you are creating that, you are not creating a engine, but rather a editor. The engine part should be already done and it would simplify most of those operations. 

So my first bet is to actually create  something that renders your objects with hardcoded positions to the screen.

 

Then your editor would only , create, translate and rotate them around using your "engine" methods. 

The factory Design pattern could help you in creating your objects, but its is not needed. Start simple.Get things done, then improve with your experience.

0

Share this post


Link to post
Share on other sites

At the moment yeah, I have a system where I am able to hard code objects to the screen, adding in the coords (X,Y,Z) manually into the code I am able to create a scene, but this doesn't solve my problem. So whats my next move, how am I able to get this code to be more flexible so anybody can use the application to create what they want without knowing C++ or DirectX

0

Share this post


Link to post
Share on other sites

Firstly ignore any advice you got related to patterns.  That is general/overall advice and has nothing to do with getting started, nor anything to do with graphics.  You can always find an excuse to use a pattern somewhere, but if and when you do it will be because you decided it was appropriate, not because someone told you do use a pattern and you went on a wild goose chase looking for where you can use them.  They don’t work that way and it would be better to just forget about them and lighten your load for now.

 

 

How to start a graphics engine?

Create a window and a device.

 

Then create a 3D file format that allows you to load 3D objects.

 

Then create something that draws those objects.

 

Things get more open-ended around that point, so instead of continuing to list a step-by-step procedure it would be better if you came back with further questions at that time.

 

 

L. Spiro

2

Share this post


Link to post
Share on other sites
Firstly ignore any advice you got related to patterns.  That is general/overall advice and has nothing to do with getting started, nor anything to do with graphics.  You can always find an excuse to use a pattern somewhere, but if and when you do it will be because you decided it was appropriate, not because someone told you do use a pattern and you went on a wild goose chase looking for where you can use them.  They don’t work that way and it would be better to just forget about them and lighten your load for now.

 

 

How to start a graphics engine?

Create a window and a device.

 

Then create a 3D file format that allows you to load 3D objects.

 

Then create something that draws those objects.

 

Things get more open-ended around that point, so instead of continuing to list a step-by-step procedure it would be better if you came back with further questions at that time.

 

 

L. Spiro

 

 

Ok, I have created a window, using hwnd, and Direct3D device aswell as a back buffer, what do you mean by a 3D File Format?

0

Share this post


Link to post
Share on other sites
At the moment yeah, I have a system where I am able to hard code objects to the screen, adding in the coords (X,Y,Z) manually into the code I am able to create a scene
That would have been nice to know from the first post.

So whats my next move, how am I able to get this code to be more flexible so anybody can use the application to create what they want without knowing C++ or DirectX
By allowing them to select which 3D object they want to add to the scene. Probably by adding a Browse button.


L. Spiro
0

Share this post


Link to post
Share on other sites
Ok, I have created a window, using hwnd, and Direct3D device aswell as a back buffer, what do you mean by a 3D File Format?
If you want to load 3D objects, you will need to store the data inside of a file.
Make a file format that contains the 3D data for your models. Vertices, normals, materials, textures, etc.


L. Spiro
0

Share this post


Link to post
Share on other sites

Your question is really open right now, what do you mean by creating all they want? 

Well thats a big question because you can't make a generic editor that will be used by everyone and to everyone needs, you need some sort of requirements. From your first post your requirements where: Create Objects, Translate and Rotate them in the world.

 

So start with that. You will need some sort of Scene Structure, do you have that? This would be where all the information of your scene is detailed, objects, positions, translations.

 

After that, you will need to decided what features you need, if your objects are sorted in list, you would need some sort of uniqueID, Name to distinguish them in the world.

After you have that, selecting a object would be a matter of requesting by that ID/Name, after that you could change your positions via other methods.

 

As I said, start simple, then keep adding features as you need it.

0

Share this post


Link to post
Share on other sites
Ok, I have created a window, using hwnd, and Direct3D device aswell as a back buffer, what do you mean by a 3D File Format?
If you want to load 3D objects, you will need to store the data inside of a file.
Make a file format that contains the 3D data for your models. Vertices, normals, materials, textures, etc.

An easy format to work with is Wavefront OBJ (.obj)

All 3D modeling softwares export to this format.

 

I've worked with it using OpenGL, but since there are many open-source loaders for this format out there, translating it to DirectX specifications should be straightforward.

Edited by kuramayoko10
0

Share this post


Link to post
Share on other sites

It should be mentioned that you should never load directly from .OBJ, .DAE, .FBX, etc. into your run-time.  These formats should be converted to your own custom formats and loaded into your run-time with your own custom loader.

 

 

L. Spiro

Edited by L. Spiro
1

Share this post


Link to post
Share on other sites
It should be mentioned that you should never load directly from .OBJ, .DAE, .FBX, etc. into your run-time.  These formats should be converted to your own custom formats and loaded into your run-time with your own custom loader.

 

Whats the reason to why you never want to do that?

 

I can recommend Assimp if you easily want to import many different model formats. Then once the models are imported you can easily export them to a custom format if you want.

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0