[PloobsEngine] Tutorial 5 – Initialization Parameters

This tutorial will talk about the PloobsEngine Initialization Parameters. (tutorials series here)

The tutorials so far used some “curious” options when initializing the engine, now we will talk about each of those misterious choices. =P

In every engine sample, we have the following block of the code (when starting the engine).

            InitialEngineDescription desc = InitialEngineDescription.Default();
            ///start the engine
            using (EngineStuff engine = new EngineStuff(ref desc, LoadScreen))

We are just creating a simple object describing the engine initialization confs, providing it to the EngineStuff constructor and starting the PloobsEngine workflow.

Now we will talk about the InitialEngineDescription object in depth.

We can create the InitialEngineDescription using the static method Default or using the detained constructor. The following block discuss a little about the parameters you can change in this object.

  • BackBufferHeight: the resolution of the screen in Y (if windowed also controls the Y size of the screen)
  • BackBufferWidth: the resolution of the screen in X (if windowed also controls the X size of the screen)
  • isFullScreen: If true, the game will run in fullscreen mode, if not, windowed.
  • GraphicsProfile: The engine only support HiDef profile in this release. We plan to use this field to load in run time the right DLL for the users.
  • isFixedGameTime: If true, the engine will force the game to be 60 FPS (and will try to ensure the game has this minimum FPS, if it is slower than this, the draw method  will be called less times). When debuggingm i suggest to turn this off (so the FPS will be real).
  • isMultiSampling: to use force using Multisampling  (Anti Aliasing method). This ONLY works in Forward Rendering. If you enable this in deferred we will use Multisampling but the quality wont be improved a lot (cause under XNA (DirectX 9c) we dont have Multisample when using Multiple Render Targets). We suggest to turn this off in lower specs PCs when Deferred Render is used. Under Deferred Render, try using Post effects AA technichs (will be explained in next tutorials =P)
  • Logger: Interface provided by the user (can be null) where the engine logs problems (will be discussed more later in this article)
  • OnExit: Event called when the engine exits
  • ScreenName: The name you want to the engine screen
  • UnhandledException_Handlerquality
  • UseAnisotropicFiltering: Use Anisotropic Filtering instead of Linear filtering when possible (better quality but slower)
  • useMipMapWhenPossible: Improve Texture filtering using MipMaps when possible (better quality but slower)
  • UseVerticalSyncronization: Sync the graphics drawing with the monitor refresj frequency (recomended, but forces the draw FPS to 60)

Engine Default

When you call the static method Default of the the InitialEngineDescription, the following options are used:

public InitialEngineDescription(string ScreenName = "PloobsEngine", int BackBufferWidth = 800, int BackBufferHeight = 600, bool isFullScreen = false, GraphicsProfile graphicsProfile = GraphicsProfile.HiDef, bool useVerticalSyncronization = false, bool isMultiSampling = false, bool isFixedGameTime = false, ILogger logger = null, bool useMipMapWhenPossible = false, bool UseAnisotropicFiltering = false);


The PloobsEngine Debug DLL (the one provided) sometimes logs messages to the user. These messages can be:

  • Warnings: Whe the user does something that is not wrong, but normally is not what “user wants” to do. The message is just a “Are you sure you want to do this ???”
  • Recoverable Errors: When the user make a error somewhere, but the engine can recover from it (THE USER SHOULD correct the source of the problem), normally the engine aborts the current operation when recoverable  errors happens, ao unexpected stuffs can happen.
  • Fatal Error: This happens when the user does something that CANNOT be done. This is normally folowed by an Exception being thrown.

The user can provide a implementation of the interface ILogger to the InitialEngineDescription object (if not provided, nothing is logged … we STRONGLY recomend implementing this). The following code show the interface:

public interface ILogger
        void Log(string Message, LogLevel logLevel);

It is pretty simple, you override the Log method. The LogLevel can be Warning, Fatal Error and Recoverable Error as dicussed. We tried to not use the ILogger in code that runs everytime, so you can write to files, write to server … in the implementation (we suggest you to dont do this in production code, try to use Threads or something assync to proccess the message).In debug a simple Debug.WriteLine is enough =P

Users can also log messager using this log system. Just use the following static method: (everywhere, after the EngineStuff constructor)


Unhandled Exception

Sometimes, the engine can throw exeptions to the user (When fatal error happens (user mistake),when XNA/Windows fails, when engine bugs decide to appear =P … ). The engine normally does catch those exception, so the user can handle them (you cant recover, your job is to “something” like write to a log file or server, before the end the of the execution). To use this funcionality, you just need to provide a method with the following signature to the InitialEngineDescription.

public delegate void UnhandledException(object sender, UnhandledExceptionEventArgs e);

Its all for today (small tutorial =P)

Any doubts, critics, suggestions, pls go to our forum or leave a comment here.

See you guys =P



, , , ,

  1. #1 by http://www.haberinasli.xyz/ on 17 de janeiro de 2017 - 12:41 am

    Hi i am kavin, its my first time to commenting anywhere, when i read this article i thought
    i could also create comment due to this sensible piece of

  2. #2 by vibrator g spot on 17 de janeiro de 2017 - 12:44 am

    always a major fan of linking to bloggers that I like but do not get a lot of link love from

  3. #3 by www.youtube.com on 17 de janeiro de 2017 - 12:48 am

    Normally I do not read article on blogs, but
    I would like to say that this write-up very compelled me to try
    and do it! Your writing taste has been amazed me.
    Thank you, very nice article.

  4. #4 by apps for pc on 17 de janeiro de 2017 - 12:56 am

    I love the efforts you have put in this, thanks for all the great blog posts.

  5. #5 by escort on 17 de janeiro de 2017 - 1:41 am

    Hey, I think your site might be having browser compatibility issues.
    When I look at your blog in Safari, it looks fine but when opening in Internet Explorer, it has some overlapping.
    I just wanted to give you a quick heads up! Other then that, excellent blog!

  6. #6 by sex toy on 17 de janeiro de 2017 - 1:54 am

    Does your website have a contact page? I’m having a tough time locating it but, I’d like
    to shoot you an email. I’ve got some suggestions for your blog you might be
    interested in hearing. Either way, great site and I look forward to
    seeing it improve over time.

  7. #7 by Raticate Pokemon on 17 de janeiro de 2017 - 2:18 am

    Thank you, I’ve just been searching for info about this topic for a long time and yours is the best I’ve found out till now. But, what about the bottom line? Are you certain concerning the source?

  8. #8 by http://www.habersizmisiniz.xyz/ on 17 de janeiro de 2017 - 2:22 am

    This piece of writing is genuinely a good one it assists new net viewers, who are wishing for blogging.

  9. #9 by http://www.habersonrasi.xyz/ on 17 de janeiro de 2017 - 2:24 am

    Hmm it looks like your website ate my first comment (it was
    super long) so I guess I’ll just sum it up what I had written and
    say, I’m thoroughly enjoying your blog. I as well am an aspiring blog writer
    but I’m still new to the whole thing. Do you
    have any tips for first-time blog writers?
    I’d certainly appreciate it.

  10. #10 by Heath on 17 de janeiro de 2017 - 2:26 am

    Bad credit private loans normally have fastened rates
    of interest, so you don’t have to worry about your repayments fluctuating over time.

  11. #11 by anal vibrator on 17 de janeiro de 2017 - 2:27 am

    the time to study or stop by the content material or web-sites we’ve linked to below the

  12. #12 by apps for pc on 17 de janeiro de 2017 - 2:41 am

    I discovered your blog site on google and check a few of your early posts. Continue to keep up the very good operate. I just additional up your RSS feed to my MSN News Reader. Seeking forward to reading more from you later on!…

  13. #13 by http://www.haberinkrali.xyz/ on 17 de janeiro de 2017 - 2:43 am

    I used to be recommended this web site via my cousin.
    I am now not certain whether this publish is written through him as no one else know such
    special about my difficulty. You are amazing! Thanks!

  14. #14 by android games for pc download on 17 de janeiro de 2017 - 2:45 am

    I¦ve read a few just right stuff here. Definitely worth bookmarking for revisiting. I surprise how so much attempt you set to create such a wonderful informative site.

  15. #15 by http://www.habergundem.xyz/ on 17 de janeiro de 2017 - 2:45 am

    Hello to every one, the contents existing at this website are truly remarkable for people
    knowledge, well, keep up the nice work fellows.

  16. #16 by http://www.haberfenomen.xyz/ on 17 de janeiro de 2017 - 2:48 am

    Its like you read my mind! You appear to know so much about this,
    like you wrote the book in it or something.
    I think that you could do with a few pics
    to drive the message home a bit, but instead of that, this is great blog.
    An excellent read. I will certainly be back.

  17. #17 by phone Psychic Reading on 17 de janeiro de 2017 - 2:49 am

    Happy to be one of the visitors on this awe inspiring site :

  18. #18 by http://www.haberasp.xyz/ on 17 de janeiro de 2017 - 2:51 am

    My spouse and I absolutely love your blog and find almost all of your
    post’s to be exactly what I’m looking for.
    can you offer guest writers to write content for you personally?

    I wouldn’t mind producing a post or elaborating on most of
    the subjects you write about here. Again, awesome

  19. #19 by http://www.habersorar.xyz/ on 17 de janeiro de 2017 - 2:55 am

    After I initially left a comment I seem to have clicked
    on the -Notify me when new comments are added- checkbox and now
    every time a comment is added I recieve four emails with the same comment.
    There has to be a way you are able to remove me from that
    service? Thanks a lot!

  20. #20 by http://www.sohbetciyiz.xyz/ on 17 de janeiro de 2017 - 3:02 am

    Fantastic goods from you, man. I have understand your stuff prior to and you’re simply extremely great.
    I actually like what you’ve received here, certainly like what you are saying and the
    best way by which you are saying it. You make it
    entertaining and you still take care of to stay it smart.
    I cant wait to read far more from you. That is really a tremendous website.

  21. #21 by http://www.haberlernededi.xyz/ on 17 de janeiro de 2017 - 3:03 am

    My partner and I absolutely love your blog and find nearly all of your post’s to be what precisely
    I’m looking for. Does one offer guest writers to write content for yourself?
    I wouldn’t mind producing a post or elaborating on a few of the
    subjects you write concerning here. Again, awesome weblog!

  22. #22 by dealdash wintoday code on 17 de janeiro de 2017 - 3:04 am

    Wonderful blog! I found it while surfing around on Yahoo News.
    Do you have any suggestions on how to get listed in Yahoo
    News? I’ve been trying for a while but I never seem to get there!
    Thank you

  23. #23 by escort on 17 de janeiro de 2017 - 3:10 am

    Hi there, just became aware of your blog through Google, and found that
    it is really informative. I am gonna watch out for brussels.
    I’ll appreciate if you continue this in future. A lot of people will be benefited from your writing.

  24. #24 by escort on 17 de janeiro de 2017 - 3:24 am

    Howdy superb website! Does running a blog such as this require a massive amount work?

    I have virtually no understanding of programming but I had been hoping
    to start my own blog in the near future. Anyways, should you have any ideas or techniques for new blog owners please share.
    I understand this is off subject but I simply
    wanted to ask. Appreciate it!

  25. #25 by escort on 17 de janeiro de 2017 - 3:39 am

    This piece of writing is genuinely a fastidious one it helps new internet users,
    who are wishing for blogging.

  26. #26 by http://www.haberfresh.xyz/ on 17 de janeiro de 2017 - 3:40 am

    Excellent post. I was checking continuously this blog and I am
    impressed! Very helpful information particularly
    the last part :) I care for such information much. I was seeking this certain information for a long time.
    Thank you and good luck.

  27. #27 by http://www.haberhtml.xyz/ on 17 de janeiro de 2017 - 3:42 am

    Hey There. I found your weblog the usage of msn. This is a really well written article.
    I will make sure to bookmark it and return to read extra of your useful info.
    Thanks for the post. I’ll certainly comeback.

  28. #28 by lie detector machine on 17 de janeiro de 2017 - 3:46 am

    I¡¦m not positive where you are getting your information, however good topic. I needs to spend some time learning much more or working out more. Thanks for excellent info I used to be searching for this information for my mission.

  29. #29 by http://www.internetcihaber.xyz/ on 17 de janeiro de 2017 - 3:50 am

    What’s up it’s me, I am also visiting this web page regularly,
    this site is genuinely good and the users are really sharing good thoughts.

  30. #30 by adidas yeezy boost 350 on 17 de janeiro de 2017 - 3:55 am

  31. #31 by http://www.haberdetay.xyz/ on 17 de janeiro de 2017 - 3:56 am

    When I initially commented I clicked the “Notify me when new comments are added” checkbox
    and now each time a comment is added I get three e-mails with the same comment.
    Is there any way you can remove me from that service?
    Thanks a lot!

  32. #32 by http://www.haberfare.xyz/ on 17 de janeiro de 2017 - 4:07 am

    I am really glad to read this website posts which contains lots
    of useful information, thanks for providing these kinds of statistics.

  33. #33 by psychic readings online on 17 de janeiro de 2017 - 4:11 am

    Very informing story, saved your site for hopes
    to read more!

  34. #34 by escort on 17 de janeiro de 2017 - 4:12 am

    We are a bunch of volunteers and opening a new scheme in our
    community. Your site offered us with helpful information to work on. You have done a formidable activity and our entire group will be
    thankful to you.

  35. #35 by escort on 17 de janeiro de 2017 - 4:13 am

    I enjoy, result in I discovered exactly what I was taking a look for.
    You’ve ended my four day long hunt! God Bless you man. Have a great day.

  36. #36 by http://www.uctuhaber.xyz/ on 17 de janeiro de 2017 - 4:24 am

    First off I would like to say wonderful blog! I had a quick question that I’d like to ask if you don’t mind.
    I was curious to know how you center yourself and clear your thoughts before writing.

    I’ve had trouble clearing my thoughts in getting my ideas out there.
    I truly do enjoy writing however it just seems like the first 10 to 15
    minutes tend to be wasted just trying to figure out
    how to begin. Any ideas or tips? Thanks!

  37. #37 by vida gay on 17 de janeiro de 2017 - 4:27 am

    E que dão mais importância para os preliminares (troca de caricias) e ao sexo oral.

  38. #38 by http://www.habersimsek.xyz/ on 17 de janeiro de 2017 - 4:35 am

    Whats up this is kinda of off topic but I was
    wondering if blogs use WYSIWYG editors or if you have
    to manually code with HTML. I’m starting a blog soon but have no coding know-how so I wanted to
    get guidance from someone with experience. Any help would
    be enormously appreciated!

  39. #39 by http://www.haberist.xyz/ on 17 de janeiro de 2017 - 4:44 am

    Have you ever considered publishing an ebook or guest authoring on other
    websites? I have a blog based upon on the same information you discuss and would really like to have you share some stories/information. I know my readers would value your work.
    If you are even remotely interested, feel free to send me an email.

  40. #40 by escort on 17 de janeiro de 2017 - 4:49 am

    Howdy! I know this is kinda off topic however I’d
    figured I’d ask. Would you be interested in trading links or maybe guest writing a blog article or vice-versa?
    My blog covers a lot of the same topics as yours and I think we could greatly benefit from each other.

    If you are interested feel free to send me an e-mail. I look forward to hearing from you!
    Terrific blog by the way!

1 1.296 1.297 1.298
(não será publicado)