Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

superpig

Is this engine design any good?

This topic is 5683 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

I''ve recently finished the first in a series of articles on developing a game engine (that is, from scratch), which I planned on submitting to gamedev as something aimed at newbies. I showed the article to a couple of people, and it seemed there were quite a lot of problems (mainly with my explanations of the engine, rather than the engine itself). I''d like to get a wider sample of opinion. Have a read of the article and tell me what you think. (Please). Looking forward to your feedback - just how badly panned can I get, hmm? :D Superpig - saving pigs from untimely fates, and when he''s not doing that, runs The Binary Refinery.

Share this post


Link to post
Share on other sites
Advertisement
As an "advanced newbie" I found the article very useful indeed. However, it does delve into quite a lot of detail that a "pure newbie" would have trouble with. I think you just need a couple of extra paragraphs on the overall engine you are planning before jumping into the first tier. Although I''m sure the rest of the series would explain it, remember that the newbie confusion over "engines" usually stems from not understanding what goes into one. Perhaps a quick overview of the engine you plan on making would help clarify the whole series at the start. A nice diagram would be luverly too.

Good article


pan narrans | My Website | Study + Hard Work + Loud Profanity = Good Code

Share this post


Link to post
Share on other sites
Hidden
I think it''s to much code and not enough explanation, I mean a newbie needs to understand very well how everything works. I think you should focus more on how to design an engine than what code you should put in, in fact it''s useless to learn how to code if all you build your engine from is cut and paste.
Anyway I am writing an article about engine design!!!
but mine won''t have a single line of code: it will be for advanced programmers(but not software engineers)

Share this post


Link to post
OK. I was thinking a roadmap of the series would be a good idea. I guess I need to decide what I''m going to put into the rest of the series, then.

I''m actually building a game on top of the engine the series builds - so far I''ve added scripting support, sprites, and DirectShow->textures (so you can not only play movies, but use them as standard textures, too). Thus far, the foundation tier is supporting things beautifully.

Superpig
- saving pigs from untimely fates, and when he''s not doing that, runs The Binary Refinery.

Share this post


Link to post
Share on other sites
Hidden
Maybe forget about the code and make it as a downloadable file, and try to explain in details everything!

Share this post


Link to post
Two things

First, nice article, although it is aimed at someone with a little more XP then the noobie. For example, including the libraries, which they should have read in the readmes with each, but, if they are a noobie, chances are they haven't.

I am wondering about your CLog object though. Doing the logger that way it won't be available to other classes? Only inside the application object. Not sure what else you have setup down the road, but I assume you may have a texturing unit, or a scene graph and having the logger unavilable to them could be a pain. Not sure though.

Still, pretty good article.

[EDIT] Make that 3 things fmod's site is www.fmod.org, not .com

[edited by - Joviex on April 1, 2003 11:11:42 AM]

Share this post


Link to post
Share on other sites
Oh, the logger is available - it''s available indirectly, via the ErrorMessage() functions on the CApplication object (which is globally accessible as a singleton). The advantages of that are

(a) I can very easily change the logging method from my CLog to, say, a std::stream, without having to change things throughout the engine
(b) All ''messages'' are done through the same mechanism - be they errors, warning, infos, or diagnostics.
(c) It allows for ''gestalt'' behavior. The application may not want anything being logged for some period of time (spurious example: it wants to minimise HD access) - this method gives it total control over the logging process. Passing a CLog object all around the place means that while it''s preserving the paradigm of object modelling, it also results in disjointed functionality - the app does not behave as a syncronised system (a ''gestalt,'' or ''whole'').
(d) it allows for the app to handle overloads. For example, the CLog class should not be responsible for the message table (because the same strings will be used for user and debug messages as for log messages), so either we have everything using the table call some kind of GetStringFromTable(STRINGID) function; or we just have it call an overloaded version as ErrorMessage(STRINGID, target).
(e) I like the idea of only having one ''CApplication'' singleton, through which you access all other Foundation Tier services.

OK, so they aren''t brilliant reasons. But it''s working fine for me like that.

I fully intend to have a downloadable source code zip, which will include the minimum of the external libraries needed to compile the code (headers, libs, and any required documents like the GNU license agreement).

You''re all right in that it needs more explanation. I might split all the theory and code into seperate sections, actually - cover what each section of the engine is going to do and how it''s going to do it, and then actually look through the code.

Superpig
- saving pigs from untimely fates, and when he''s not doing that, runs The Binary Refinery.

Share this post


Link to post
Share on other sites
Although we had some misunderstandings a few months ago, I wanted to say the article is very nice. I think it would help alot of newbies, and about the code thing: MSDN Library!
The only problem I see is the look. Your using pre-text, which is almost unreadable!

.lick

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Not to offend but that is not geared for a newbie!

Share this post


Link to post
Share on other sites
You have some serious bugs in your code.

First, CMMObject doesn''t have a virtual destructor. When your garbage collection routine deletes any object, it will only call CMMObject''s dtr, not the dtr of the derived class.

Second, your DoGarbageCollection/DeleteRemainingObjects functions aren''t erasing any of the list nodes. However, you are deleting the pointers in the list nodes. So, your list is going to be full of bad pointers after you call either of those functions.

Share this post


Link to post
Share on other sites

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