[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))
            {
                engine.Run();
            }

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);

ILogger

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)

PloobsEngine.Engine.Logger.ActiveLogger.LogMessage(message,PloobsEngine.Engine.Logger.LogLevel.LOGLEVEL_YOU_WANT);

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

Links

 

, , , ,

  1. #1 by lululemon cyber monday sales on 9 de dezembro de 2016 - 10:33 pm

  2. #2 by adidas tubular on 9 de dezembro de 2016 - 10:44 pm

    I precisely wanted to appreciate you again. I’m not certain the things I might have gone through without the tips contributed by you about that problem. It had been an absolute frightening concern in my position, however , observing this well-written technique you solved that took me to cry with fulfillment. Extremely happier for this support as well as have high hopes you really know what an amazing job you happen to be getting into training people using your webpage. I am sure you haven’t come across any of us.

  3. #3 by www.tapa.org.tw on 9 de dezembro de 2016 - 11:41 pm

    If the outer edges of the keyboard are employed as landmarks for centering the keyboard and monitor, the users hands
    will be devkated since the alphanumeric keys willl be to the ledt of the user’s midline.

  4. #4 by Kanariyorum.org on 9 de dezembro de 2016 - 11:45 pm

    Good day I am so grateful I found your web site, I really found you by mistake, while I was browsing on Bing for something else, Anyways I am here nnow and would just like to ssay many thanks
    forr a remarkable post and a all round interesting blog
    (I also love the theme/design), I don’t have time to read through it all at the minute but I have bookmarked iit and also added in you RSS feeds, so when I have time I will be back to read a
    lot more, Please do keep up thhe fantastic
    work.

  5. #5 by free psychic reading chat on 10 de dezembro de 2016 - 12:00 am

    I’d should talk to you here. Which is not one thing I do!

    I quite like reading a post which will make people believe.
    Also, many thanks permitting me to comment!

  6. #6 by hotels on 10 de dezembro de 2016 - 12:03 am

    Thanks for sharing your thoughts about engine. Regards

  7. #7 by cheap moncler jackets on 10 de dezembro de 2016 - 12:06 am

    Purchased our as being a present for the my mama and she loved this. awesome excellence wonderful cost plus my personal mother liked they. In addition sent extremely quick. When you need a present quickly and you such as this compared to this is actually the 1 you need to pick!

  8. #8 by hermes belt replica on 10 de dezembro de 2016 - 12:07 am

    Bought this one as being a present towards my personal mother and she loved that. sweet excellence good price and also our mom enjoyed this. Additionally sent very accelerated. So if you need a present quickly and you such as this compared to this is actually the someone make sure you purchase!

  9. #9 by Ashli on 10 de dezembro de 2016 - 12:55 am

    Үߋur way of explaining eveгything in this article
    is actually goߋd, aall be capable ⲟf effortlessly bbe aware of
    іt, Ꭲhanks a lоt.

  10. #10 by Quadcopter Reviews on 10 de dezembro de 2016 - 12:58 am

    Pretty! This has been an incredibly wonderful article. Thanks for providing this
    info.

  11. #11 by best tarot reading on 10 de dezembro de 2016 - 2:12 am

    I’m truly impressed with your writing talent. Anyway
    keep up the superb high quality writing, it’s rare to
    see a great blog such as this nowadays.

  12. #12 by Obat Kutil Kelamin on 10 de dezembro de 2016 - 2:13 am

    Hi there, after reading this remarkable post i am
    as well cheerful to share my familiarity here with friends.

  13. #13 by morepaytoday.com on 10 de dezembro de 2016 - 2:14 am

    I have actually constantly been the individual that queues
    for an airplane or a helicopter in a Battlefield game.

  14. #14 by vinhomes phạm Hùng on 10 de dezembro de 2016 - 2:24 am

    I read this paragraph fully about the difference of most up-to-date and preceding
    technologies, it’s remarkable article.

  15. #15 by Cheap Viagra on 10 de dezembro de 2016 - 3:01 am

    Hey I know this is off topic but I was wondering if you knew of any widgets I could add to my blog that automatically tweet my newest
    twitter updates. I’ve been looking for a plug-in like this
    for quite some time and was hoping maybe you would have some experience with something like
    this. Please let me know if you run into anything. I truly enjoy reading your blog and I look forward to
    your new updates.

  16. #16 by just click the next website on 10 de dezembro de 2016 - 3:17 am

    I have been browsing on-line greater than three hours as of late, but I by no means found any fascinating article like yours. It’s beautiful price sufficient for me. Personally, if all website owners and bloggers made good content as you did, the web can be much more useful than ever before.|

  17. #17 by Obat Wasir on 10 de dezembro de 2016 - 3:34 am

    This site was… how do you say it? Relevant!! Finally I’ve found something which helped me.

    Thanks a lot!

  18. #18 by Janine on 10 de dezembro de 2016 - 3:36 am

    If your teenager delights in computer and also online games,
    she could play totally free video games on, or Your teen can make use of
    the solo game alternatives to enhance her Scriptures knowledge so she does better on Scriptures games dipped into church.

  19. #19 by movers ocala fl on 10 de dezembro de 2016 - 3:36 am

    that could be the end of this write-up. Right here youll find some web sites that we consider youll enjoy, just click the links over

  20. #20 by Click Here on 10 de dezembro de 2016 - 3:54 am

    Someone necessarily assist to make critically articles I would state. This is the very first time I frequented your website page and thus far? I amazed with the analysis you made to create this particular put up incredible. Great process!

  21. #21 by get more info on 10 de dezembro de 2016 - 3:58 am

    Wonderful paintings! This is the kind of info that are meant to be shared around the web. Shame on the search engines for no longer positioning this submit upper! Come on over and discuss with my website . Thank you =)

  22. #22 by fucks on 10 de dezembro de 2016 - 4:06 am

    Appreciate the recommendation. Will try it out.

  23. #23 by Get More Info on 10 de dezembro de 2016 - 4:17 am

    You completed a few nice points there. I did a search on the theme and found nearly all persons will consent with your blog.

  24. #24 by Read This on 10 de dezembro de 2016 - 4:24 am

    Normally I do not learn post on blogs, however I wish to say that this write-up very forced me to take a look at and do so! Your writing style has been amazed me. Thanks, quite great article.

  25. #25 by gamefly free trial on 10 de dezembro de 2016 - 5:14 am

    Lovely Webpage, Maintain the excellent work. Many thanks!
    gamefly free trial http://j.mp/1RQFQV3

  26. #26 by get your lost data back on 10 de dezembro de 2016 - 5:21 am

    I as well as my guys were actually digesting the good ideas from your web site then at once I had a terrible feeling I never expressed respect to you for those secrets. The men ended up for that reason warmed to read them and have really been enjoying them. Appreciation for actually being quite kind as well as for making a decision on certain amazing subject matter most people are really wanting to be informed on. My sincere regret for not expressing gratitude to you earlier.

  27. #27 by bollywood movie reviews on 10 de dezembro de 2016 - 5:23 am

    Our latest addition to the limousine fleet is the 7 passenger
    Cadillac Escalade. The turbo 4-banger in the Volkswagon GTI
    Mk5 is fairly unique among such engines in that it produces huge amounts of torque at a relatively low
    number of RPMs. You can visit Monaco Motors for your classic car’s regular
    check-up and you can also do your own daily car care so
    your vintage car will look as new and luxurious as
    ever.

  28. #28 by l’achat de Cialis on 10 de dezembro de 2016 - 5:32 am

    Salut là, chaque fois i utilisé pour vérifier weblog messages ici début dans le lever du jour,
    car i comme à connaissance de gain plus et plus encore.

  29. #29 by Find Out More on 10 de dezembro de 2016 - 5:44 am

    It is perfect time to make some plans for the future and it’s time to be happy. I have read this post and if I could I want to suggest you few interesting things or tips. Maybe you can write next articles referring to this article. I desire to read even more things about it!

  30. #30 by website on 10 de dezembro de 2016 - 5:45 am

    Pretty section of content. I just stumbled upon your weblog and in accession capital to assert that I acquire actually enjoyed account your blog posts. Anyway I’ll be subscribing to your feeds and even I achievement you access consistently quickly.

  31. #31 by Our Webpage on 10 de dezembro de 2016 - 6:11 am

    What’s up Dear, are you actually visiting this web site daily, if so afterward you will absolutely take good know-how.|

  32. #32 by visit the following internet site on 10 de dezembro de 2016 - 6:32 am

    Hi there would you mind sharing which blog platform you’re working with? I’m looking to start my own blog in the near future but I’m having a difficult time deciding between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your design seems different then most blogs and I’m looking for something completely unique. P.S My apologies for getting off-topic but I had to ask!|

  33. #33 by aprender inglés leyendo libros on 10 de dezembro de 2016 - 6:57 am

    Hello, acabo de ojear tú y me a parecido muy seductor tu
    aporte. A partir de ahorita voy a beneficiarme de todos tus
    consejos y los pretenderé seguir en el futuro. Te doy la
    enhorabuena por tu site.

  34. #34 by tinysluts on 10 de dezembro de 2016 - 8:00 am

    wapipi jay and k. bonsu videospermaqual der teenies http://femaleglamourgalleries.com/dayna-helen-sex-video-xnxx-com/ With her head next to mine, she whispered to me.When obsolete in the doggie-fashion the rope heads via the aid and from there you can pull it.I closed my eyes attempting to vision her in this revved on space i was i perceived a gallop but did not seize peep but then i remembered the door..

  35. #35 by pissporn on 10 de dezembro de 2016 - 8:01 am

    I investigated mom’s insides, experiencing my assets trembling.Out of the corner of my study, I can eye my Popular paramour. pantyless wifebrook taylor pornkayden kross mandingo http://femaleglamourgalleries.com/indonesia-asiansexdiary-yantimp4/ She looked wait on at me from the mirror, screaming and wriggling, and whispering muddy lil’ teases.Her gigantic knockers where juggling around all over.albeit I can’t yelp that I’ll be clothed this contrivance! She chuckled a bit at that and then told me,Well, you can if you want to, or need to.I couldn’t bear abet I couldn’t Make out if I desired to, I sensed my ejaculation coming up from deep down, Ughhh I’m going to jizm, I’m going to shoot my spunk!Oh baby shoot your torrid splooge jizz in me, bust the spunk that you’re going to munch, say it– say it again.

  36. #36 by solowife on 10 de dezembro de 2016 - 8:11 am

    With that the smallish girl came over to Vanessa and got down on her knees.Vanessa pivoted her thighs so that Tracey could seek her daughter-in-law. icarly pronstickam teen batedebonairblog com http://femaleglamourgalleries.com/dayna-helen-sex-video-xnxx-com/ I realized when the dolls commenced speaking to each other, that they had reach to steal results of the dolls from college.As Donna and I ambled Help to the table I could disclose that Sue and Eileen were looking at my spunk-shotgun which was bulbous out the front of my trousers.How could I net out of it? Then I remembered the DreamLover again.She reached down, and gripped his chisel once more.

  37. #37 by http://www.cisoso.com/test on 10 de dezembro de 2016 - 8:31 am

    Undeniably believe that which you said. Your favorite reason appeared to
    be on the web the easiest thing to be aware of.
    I say to you, I certainly get irked while people think about worries
    that they plainly do not know about. You managed to hit the nail upon the top
    and defined out the whole thing without having side effect ,
    people could take a signal. Will likely be back to get more.
    Thanks

  38. #38 by amautuer on 10 de dezembro de 2016 - 8:36 am

    chicago backpagesmommy masterbates http://femaleglamourgalleries.com/most-popular.html T-that’s a man, she said thru gritted teeth, give mama the penetrating of her life, save her jism bask in the bi-atch that she is.Annie admitted that she hadn’t, and with stress from Ed, agreed to smooch him, unbiased to showcase that she wasn’t a racist.2 sunbeds out, my wife came out in the garden in her perceive thru beach sundress, bare beneath, and ordered several more beds be set out..

  39. #39 by wifeshare on 10 de dezembro de 2016 - 8:38 am

    discontinue you know what that is sub?I’ve heard of it but not indeed domme.So off to the side while my acquaintance and I toyed videogames, Adam ripped up her again. stickam jbvideo ponograficojapanese father daughter incest http://femaleglamourgalleries.com/princess-leia-braces/ I was itching to fumble her slick flesh.Say satiate, let me taste my pre-jism.His gams now shuddering as his climax subsided he reached for some tissue to super his pecker.It perceived indulge in you could utilize it as a dumbbell if you dreamed to.

1 1.167 1.168 1.169
(não será publicado)