• 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
EngineProgrammer

Game Engine Programming

37 posts in this topic

For our school projects we may only use the Game Engines given from our school or we may use our own Game engine.
And because the game engines at school are very bad ( bad framework, lots of bugs, etc ) I'm writing a Game engine for the school project I am going to make.
The school project must be finished in may so I have plenty of time left.

And I'm also doing this to learn how to engine program. It's quite fun. :-)
0

Share this post


Link to post
Share on other sites
[quote name='phantom' timestamp='1345481424' post='4971539']
[quote name='EngineProgrammer' timestamp='1345429694' post='4971301']
Also, does someone have any tips for me I can use to create an efficient engine?
[/quote]

Yes; don't write an engine.

Write a game, extract parts from it, reuse those parts in another game and repeat. In time the reusable parts will form an 'engine' as you become more experianced.

Attempting to sit down and write an engine without a game to focus it will result in unusable junk which you will just end up re-writing as soon as you want to use it in any real sense. Lack of experiance making games will just make this problem even worse.

EVERY good game engine out there has grown out of being used in a game (or series of games) first and then recycled. This is the only way to ensure you get something usable.
[/quote]

Exactly. Just make a game, with some re-usability in mind but don't over-sweat it if it gets in the way of getting game done (it shouldn't get in the way of getting things done anyhow). If you want to get a game done it may, in most cases, be better to use something like Ogre.

On the timeframe, it can vary wildly with regards to what you want to do and how experienced and productive you are. Keep in mind that even old engines (Quake 2 for example) took a lot of manpower.
2

Share this post


Link to post
Share on other sites
[quote name='EngineProgrammer' timestamp='1345430497' post='4971306']
T_Engine::ReleaseInstance();
T_Window::ReleaseInstance();
T_System::ReleaseInstance();
[/quote]

Should release in the reverse order of allocation to avoid deadlock (in general)
0

Share this post


Link to post
Share on other sites
I have already read the article Write Game, Not Engines. I do know engine programming isn't necessary for my future games I'll be writing. But if I enjoy doing it why discourage me? [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]

I love all those low-level programming of Win32 [img]http://public.gamedev.net//public/style_emoticons/default/biggrin.png[/img]
But yes indeed, I need to write games, get the reusable code from it and make my engine that way.
I'll do that but to write my game I also need to write some 'engine' code. [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]

Here is an example of what I have so far.
- Specular shading
- Bump mapping
- Camera that can move around
- I have also made a modelreader ( .obj ).
- ( And many more: text, 2D bitmaps, textureshaders, multitextureshader, etc )

[media]http://www.youtube.com/watch?v=8mltl2GJADw[/media]
But now. I'm not working with Mesh Loader of DirectX yet. I found the algorithm to read in obj files into C++. But I have a little problem now. As you can see in the video I don't have smoothing groups yet.

Can someone help me out a bit for that? In the .obj file there is this kind of data:
[CODE]
s 4
f 1/1/1 2/2/2 3/3/3
f 3/3/3 4/4/4 1/1/1
f 5/5/5 6/6/6 3/3/3
f 3/3/3 2/2/2 5/5/5
f 7/7/7 8/8/8 6/6/6
f 6/6/6 5/5/5 7/7/7
f 9/9/9 10/10/10 8/8/8
f 8/8/8 7/7/7 9/9/9
f 11/11/11 12/12/12 13/13/13
f 13/13/13 14/14/14 11/11/11
s 1
f 15/15/15 16/16/16 17/17/17
f 17/17/17 18/18/18 15/15/15
f 15/15/15 19/19/19 20/20/20
f 20/20/20 16/16/16 15/15/15
f 19/19/19 21/21/21 22/22/22
f 22/22/22 20/20/20 19/19/19
f 21/21/21 23/23/23 24/24/24
f 24/24/24 22/22/22 21/21/21
[/CODE]

s : smoothing group
f : faces

How do I enable the smoothing into my model? The normals I read in should normally create the smooth rendering but it doesn't. So I'm missing something but I dont' know what. Also what do I need to do with the value for the smoothing?

[quote]Should release in the reverse order of allocation to avoid deadlock (in general)[/quote]
Yes I noticed. Already changed it 2 days ago. Thanks! [img]http://public.gamedev.net//public/style_emoticons/default/happy.png[/img] Edited by EngineProgrammer
0

Share this post


Link to post
Share on other sites
Have a look at this link: http://www.martinreddy.net/gfx/3d/OBJ.spec

It appears the integer after the "s" is the smoothing group number. It also appears that if the file did not contain vertex normals (vn) then you may have to create some yourself and then interpolate them across smoothing groups (groups of vertices).
0

Share this post


Link to post
Share on other sites
I've read the article of .obj completely! Yet, not a single sentence says how to link the smoothing groups with the faces.
But I've asked my docent at school and he told me a way to do it. So should work now.. When I've written the code. [img]http://public.gamedev.net//public/style_emoticons/default/biggrin.png[/img]

About the singleton, yes I've already changed my framework for that. [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]

So last thing I want to say is kinda off-topic.
I'm starting a journal so you guys can watch my progress! [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]
Feel free to follow my blog.

http://www.gamedev.net/blog/1543/entry-2255042-creotex-engine-introduction/
I'll post Part 1 with some code this night. First I want to be sure everything runs smoothly so I don't show you bad code. [img]http://public.gamedev.net//public/style_emoticons/default/wink.png[/img]
0

Share this post


Link to post
Share on other sites
A tip when building your game engine, make sure you break your development down into small manageable chunks with clear goals at each stage. It is very easy to become unmotivated if you can't see progress from one day to the next. When I was making my engine I always started by defining a game that I wanted to make first. Then as I build the game, I would break things down into small pieces of reusable code that I would put into my engine for reuse on the next game that I was going to make. After creating 5 or more games, you start to see some structure in the engine.
0

Share this post


Link to post
Share on other sites
Thanks, yes normally a better plan is just to write games and collect all the reusable code.

But for every game I need graphics, models, shaders, sounds, etc. So I can directly put all of those into my engine so I don't need to worry about them anymore later on.
But I'm putting all those piece of codes in small classes to have a nice overview of my engine. I love clean code. [img]http://public.gamedev.net//public/style_emoticons/default/biggrin.png[/img]

My motivation breaks down sometime because I want to rewrite the whole framework when it's "bad". This is my 5th try to get a nice framework and it's already looking good so I think I have a good structure now. [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img] But then, when I have rewritten the framework I can continue even faster than the last framework so then I get motivated again. [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]
0

Share this post


Link to post
Share on other sites
Ah I have a question:

Everyone remembers this line of code?
[CODE]static LRESULT CALLBACK WndProc(...) [/CODE]

When you got this method:
[CODE]LRESULT CALLBACK Class::HandleEvents(...)[/CODE]
What did you do to be able of calling that method?

There are some possibilities.
- Using singleton design
- Using a global pointer
- Creating the pointer using WM_CREATE and then make calls when the pointer exists.

That's all what I can think of at the moment.
I've found something ,even better, you don't need anything of the three above!!
[CODE]
static LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
return ((Window*)GetWindow(hWnd, 0))->HandleEvents(hWnd, msg, wParam, lParam);
}
[/CODE]
Now the strange part comes up.
This pointer that is returned is always nullptr. Never it will be allocated or initialized with an existing pointer. But.. The is not a single crash, he can call every method inside that class.


But does someone knows the disadvantage of this code? Because in all those years of programming I can't be the first one who noticed this? Is this an "unstable" line of code?


~EngineProgrammer Edited by EngineProgrammer
0

Share this post


Link to post
Share on other sites

This is a good idea to read as it can be easy to write 2d engine if you want to waste about a year to make it good but you don't need to waste the reiventing the wheel just use previous libraries to shorten time, strain, and many other annoying stuff than you can design the game but for directx you may need some different libraries and for 3d you may need to search for 3d graphic and physic library

Seriously it's acutally not hard and can be short if you know what to do but if you are building a new unity or trying to build something with a UI than waste 2 years at least if you are new so I suggest the explaination

0

Share this post


Link to post
Share on other sites

When I was searching for game engine creation tutorials I was looking for how should I build it but unfortunately I could never find any thing I was looking for so what I'm trying to do is add to the internet as much information to the public as possible so people have an easier time finding it because seriously there seems to be a giant gap between people who know how to build game engines and people who don't like there isn't anyone who is learning how to by doing of which I am so now I will do my best to make a new class of people to learn how to build game engines as most people who try seem to only know bits and pieces until they finish but they don't think the same as before or anywhere near that before time so it is harder for people that want to learn to get clear information. I'm sorry if this was overexplained.

And if you ask have you been here before, yes it seems that you are always forced to the older stuff first than newer stuff comes up

 

What does one year matter if you get information to people who need it as this was one of the five game engine disscussions that came up of which barely helped

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