[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 Forex Trading on 25 de outubro de 2016 - 2:04 am

    Trading is no more ambiguous for me with CentroFx. The state-of-the art platforms for trading has really skyrocketed my profits. With CentroFx I am now able to explore the world of forex by getting favorable access to commodities and the CFDs. It is renowned for offering favorable trading environment, helping traders to do away with their trading phobias.

  2. #2 by pixum rabatkode on 25 de outubro de 2016 - 2:07 am

    I am extremely impressed together with your writing skills and also with the format for your blog.
    Is this a paid subject or did you customize it yourself?
    Anyway keep up the nice high quality writing, it’s rare
    to peer a great blog like this one nowadays..

  3. #3 by automobile industry logos on 25 de outubro de 2016 - 2:11 am

    This is turning out to be a bit much more subjective, nevertheless I considerably choose the Zune Market place. The interface is colorful, consists of further more flair, and some interesting attributes like ‘Mixview’ that permit on your own out of the blue view comparable albums, audio, or other customers equivalent in the direction of what you are listening in the direction of. Clicking upon one particular of people will middle upon that product or service, and one more preset of “neighbors” will arrive into view, making it possible for on your own in the direction of navigate over studying by very similar artists, audio, or end users. Chatting of consumers, the Zune “Social” is too Wonderful pleasurable, making it possible for you find others with shared tastes and starting to be friends with them. Oneself then can pay attention to a playlist constructed centered on an amalgamation of what all your mates are listening toward, which is on top of that exciting. Those people concerned with privacy will be relieved to know by yourself can stay away from the public against seeing your unique listening behaviors if you so make a decision.

  4. #4 by lvchuang.org on 25 de outubro de 2016 - 2:16 am

    What’s Happening i am new to this, I stumbled upon this I have discovered It positively helpful and it has aided me out loads.
    I am hoping to give a contribution & assist other users
    like its helped me. Great job.

  5. #5 by ADHD in children on 25 de outubro de 2016 - 2:21 am

    Way cool! Some very valid points! I appreciate you writing this write-up and also the rest of the site is very

  6. #6 by Wakizashi Sword for sale on 25 de outubro de 2016 - 2:35 am

    This is my first sword. It came in perfect condition. The handle and wrapping were tight. The blade was very nice with no defects. The sword has a good edge but needed some final sharpening to slice stuff up. I filled a plastic bottle with water and it busted/cut it some and knocked it into the bushes. I sharpened it a little and re-tried my test. It sliced through with so little resistance it was a little scary. This thing is ready to go now. I also waxed the scabbard and it really made it shine. If its as tough as the videos show…its a keeper. I also bought a bokken to practice with…..which was a good call because a mistake might cost me some stitches or worse. 😀

  7. #7 by best katana in the world on 25 de outubro de 2016 - 2:35 am

    I usualy love cold steel knives. This katana arrived a bit sub standard. There are rust spots about 2 inches long on the face of the blade.

  8. #8 by garcinia cambogia extract dr oz walmart on 25 de outubro de 2016 - 2:36 am

    Imagine having the ability to experience immediate weight reduction from Garcinia Cambogia
    extract with no risk.

  9. #9 by turquoise hats and fascinators on 25 de outubro de 2016 - 2:36 am

    But a smiling visitant here to share the love (:, btw great layout.


  10. #10 by Solomon on 25 de outubro de 2016 - 2:38 am

    Guinea pigs on a high cholesterol diet who were given another Garcinia species (atriviridis)
    had an inclination to reduce lipid composition levels and fat deposition in the aorta HCA caused congenital
    defects in rats.

  11. #11 by Best Forex Robot on 25 de outubro de 2016 - 2:54 am

    Good read, enjoyed it!

  12. #12 by terrebonne parish home elevation on 25 de outubro de 2016 - 2:56 am

    A person essentially help to make seriously
    articles I would state. This is the very first time I frequented your website page and to this point?
    I surprised with the research you made to create this actual
    post incredible. Wonderful task!

  13. #13 by ran zituni fraud on 25 de outubro de 2016 - 3:00 am

    Here are a few of the web pages we advocate for our visitors

  14. #14 by dream car at 21 on 25 de outubro de 2016 - 3:27 am

    I read this article fully regarding the comparison of hottest and previous technologies, it’s awesome article.

  15. #15 by busines s on 25 de outubro de 2016 - 3:29 am

    Sorry for the substantial critique, nonetheless I am genuinely loving the contemporary Zune, and hope this, as properly as the Good opinions some other people in america consist of published, will help by yourself come to a decision if it truly is the immediately selection for you.

  16. #16 by quest bars on 25 de outubro de 2016 - 3:30 am

    Excellent Webpage, Continue the very good job. Thank you.
    quest bars http://questbars33.blogspot.com

  17. #17 by paintings and pictures for sale on 25 de outubro de 2016 - 3:37 am

    Sorry for the enormous analyze, nonetheless I’m fairly loving the new Zune, and hope this, as well as the Fantastic testimonials some other Those people consist of penned, will assistance by yourself determine if it is the specifically decision for you.

  18. #18 by losing weight on 25 de outubro de 2016 - 3:44 am

    I have been surfing online more than 2 hours today, yet I never found any
    interesting article like yours. It is pretty worth enough
    for me. In my opinion, if all site owners and bloggers made good content as you did, the web will be much more useful than ever before.

  19. #19 by Gaston on 25 de outubro de 2016 - 3:51 am

    Hello, I think your website might be having browser compatibility issues.
    When I look at your blog in Firefox, 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, terrific blog!

  20. #20 by lularoe leggings on 25 de outubro de 2016 - 3:53 am

    I really like your blog.. very nice colors & theme.
    Did you make this website yourself or did you hire
    someone to do it for you? Plz answer back as
    I’m looking to create my own blog and would like to find out where u got this from.
    thank you

  21. #21 by betty comic on 25 de outubro de 2016 - 3:54 am

    Highly descriptive article, I liked that a lot.
    Will there be a part 2?

  22. #22 by バーバリー 時計 on 25 de outubro de 2016 - 3:56 am

    バーバリー(BURBERRY)の海外通販サイト!大人気バーバリーのバーバリー 財布、バーバリー 時計、バーバリー バッグ、バーバリー ポロシャツ、バーバリー 傘、バーバリー マフラー、バーバリー コート激安通販。送料&返品?交換も無料!

  23. #23 by jay leno's garage on 25 de outubro de 2016 - 3:57 am

    Good way of describing, and good post to get facts about my
    presentation subject, which i am going to convey in school.

  24. #24 by Sonia on 25 de outubro de 2016 - 3:59 am

    I got tһis web page from my pal ԝһo shared աith me regаrding thіs web
    site аnd now thіѕ time I am browsing thiѕ site and reading very informative posts аt tɦіs timᥱ.

  25. #25 by visit on 25 de outubro de 2016 - 4:03 am

    Past Exhibition CARTApartment CART Apartment CART Blog

  26. #26 by Margaret on 25 de outubro de 2016 - 4:05 am

    Garcinia Cambogia is acknowledged as GRAS by the FDA,
    meaning it’s been adequately demonstrated to be safe under the conditions of its planned use”.

  27. #27 by Best Diwali 2016 Gifts For Family on 25 de outubro de 2016 - 4:05 am

    Wish you all a very Happy and Prosperous Diwali my friends Get The best Readable stuff on Diwali on our Blog .

  28. #28 by animations on 25 de outubro de 2016 - 4:09 am

    Greetings! Very helpful advice within this post! It’s
    the little changes that make the most significant changes.
    Thanks a lot for sharing!

  29. #29 by original betty boop on 25 de outubro de 2016 - 4:11 am

    Hello! I know this is kinda off topic but I was wondering which blog
    platform are you using for this website? I’m getting tired of WordPress because I’ve had
    problems with hackers and I’m looking at options
    for another platform. I would be awesome if you could point me in the direction of a good platform.

  30. #30 by promotions company on 25 de outubro de 2016 - 4:21 am

    I truly appreciate this post.Much thanks again. Much obliged.

  31. #31 by vaporizers reviews on 25 de outubro de 2016 - 4:22 am

    They could be a dime a dozen however going even more, it is also more difficult
    to discover a vape pen that will vaporize natural herbs uniformly
    and with an excellent non burned preference that still continues to be
    at a reasonable price.

  32. #32 by turquoise fascinators for weddings on 25 de outubro de 2016 - 4:23 am

    Hello, Neat post. There’s an issue together with your site in internet explorer, might test this… IE nonetheless is the marketplace chief and a huge component to people will leave out your fantastic writing because of this problem.

  33. #33 by Wyatt on 25 de outubro de 2016 - 4:23 am

    I got this web site from my friend who told mme aboit this
    weeb site andd now this time I am browsing this site and reading very informative articles or reviews at this time.

  34. #34 by Printer leader 55printing.com on 25 de outubro de 2016 - 4:28 am

    ԜҺat а informatiοn ߋf un-ambiguity and preserveness
    ߋf precious knowledge ⲟn thе topic of unexpected emotions.

  35. #35 by Kara on 25 de outubro de 2016 - 4:31 am

    Another step was implementing for the sales person permit and spending a one
    year licensing fee.

  36. #36 by hiking backpack carry on on 25 de outubro de 2016 - 4:34 am

    Hiking routes could be tough as well as rough – they are not kept as park
    sidewalks – put on boots or footwears created for treking.

  37. #37 by street speed 717 on 25 de outubro de 2016 - 4:36 am

    Hi! I understand this is sort of off-topic
    however I needed to ask. Does managing a well-established website
    such as yours require a large amount of work? I am completely new to running a blog
    but I do write in my journal on a daily basis. I’d like to start a blog so
    I will be able to share my personal experience and thoughts online.

    Please let me know if you have any kind of recommendations or tips for brand new aspiring bloggers.

1 1.007 1.008 1.009
(não será publicado)