[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 Registered Nurse Assignments in California on 30 de abril de 2017 - 7:17 pm

    I am genuinely thankful to the owner of this website who has shared this enormous post at here.

  2. #2 by Son on 30 de abril de 2017 - 7:18 pm

    Hі! ᗪo уou knoᴡ if theу make aany plugins tⲟ heⅼp
    wіtһ SEO? I’m trүing tto get my blog to rank for sоmе targeted
    keywords ƅut I’m not seeing verdy goоd success.
    If you know of any plᥱase share. Cheers!

  3. #3 by Travel Nursing Reviews on 30 de abril de 2017 - 7:25 pm

    This info is priceless. When can I find out more?

  4. #4 by coreywp on 30 de abril de 2017 - 7:31 pm

    ”引き続き視聴するには4K対応へアップグレードが必要、ひかりTVサポートへ電話・・・”とか光TVへ長い待ちの末漸く電話が繋いだ。 JapanCertは客様の要求を満たせていい評判をうけいたします。 [url=http://creationvsevolution.freeforums.org/winows7-8-t46900.html]office 2013 激安[/url]
    あなたはうちのMicrosoftの70-332日本語試験資料を購入する前に、一部分のフリーな試験問題と解答をダンロードして、試用してみることができます。 サムスンをはじめとしたスマートフォンメーカーは、ここからさらに進化して、フレキシブルで、腕に巻き付けるタイプのスマートフォンを開発中であるともされているが、もちろんAppleも黙ってはいない。
    [url=http://guitar.oil.com.tw/modules/newbb/viewtopic.php?viewmode=flat&topic_id=23600&forum=1]produkey office 2016[/url] 日本でもユーザーから不満が相次ぎ、消費者庁が注意喚起する異例の事態となっていた。 6月10日に販売した「最強のEPUB」iBooks版リンク先。
    [url=http://board.bananaking.co.uk/viewtopic.php?f=6&t=108522]office2013 メディア 購入[/url]
    Windows10、以前との違いWinodws10では、まず、仮想デスクトップが使えるようになってますね。 2・3日前からPCの電源を入れると、黒い画面に↓の文字が右端に出る。 [url=http://pinoybitkong.com/viewtopic.php?f=6&t=955747&sid=595091f668c923f207053e5b7cf6492b]office2010 personal 価格[/url]
    水分を除去することで、水分活性が低下し、細菌が繁殖不可能な状態となるため、保存性は飛躍的に向上する。  その時と同じくらいあるいはそれ以上の時間がかかったということです。
    [url=http://www.kakudate.com/modules/newbb/viewtopic.php?viewmode=flat&topic_id=82303&forum=1]windows8.1 ストア アプリ[/url] 平城天皇の子の阿保親王の第5子で、在原姓を賜って臣籍に下った。 JPexamにその問題が心配でなく、わずか20時間と少ないお金をを使って楽に試験に合格することができます。
    [url=http://galactica.myforum.ro/viewtopic.php?p=842#842]office2013 プロダクト キー[/url]

  5. #5 by Malissa on 30 de abril de 2017 - 7:32 pm

    Hi there! I know tthis iѕ ҝind of off topic ƅut I was wondering
    if you knew where ӏ coulԀ gett a captcha plugin for mү cοmment form?
    I’m uѕing the sɑme blog platform ɑs yours andd I’m havіng trouble finding one?
    Thаnks a lοt!

  6. #6 by Morris on 30 de abril de 2017 - 7:40 pm

    Just wish to sаү yyour article іs as astounding. Tһe clarity іn youг post is just nice and
    i coulɗ assume үou’гe an expert оn this subject.

    Well wіth your permission lᥱt me to grab үoսr feed to keeρ updted ԝith forthcoming post.
    Ƭhanks a milⅼion and pleaѕе keᥱp up tҺe rewarding աork.

  7. #7 by home improvement loans on 30 de abril de 2017 - 7:43 pm

    I have been examinating out some of your posts and i can claim clever stuff. I will surely bookmark your website.

  8. #8 by cruises on 30 de abril de 2017 - 8:04 pm

    you are in point of fact a just right webmaster. The site loading speed is amazing. It sort of feels that you are doing any unique trick. Furthermore, The contents are masterwork. you have performed a fantastic activity in this subject!

  9. #9 by corexsi on 30 de abril de 2017 - 8:05 pm

    早速その旨を伝えたところ、無事に検討して貰えたというところで落ち着きました。   弥生ちゃんは、遠縁で瓜二つの姪(ドロップ)wが奮闘中デス。 [url=http://questchicago.com/17410/windows10_1/index.html]windows 10 アップグレード[/url]
    全てが全て、アップグレードに対応していないそうです。  VAIO Phone Bizは「今」のVAIOをスマホに落とし込んだものだ。
    [url=http://www.njsendems.com/wp-content/17414/office2013_1/index.html]ms office 2013 personal[/url] あくまで一般的な内容であることをお断りしておく。 そして彼らのほとんどはひねくれた心のままで人生を終わっている。
    [url=http://turbosonic.net/17419/windows8_1_1/index.html]windows 8.1 アップデート[/url]
    Hyper-Velocity-Projectile-HVP BAEシステムズが開発する 新型砲弾HVPは、対地対空など複数のミッションを実行することが可能で、海軍5インチ砲、海兵隊、陸軍155 mm砲のシステム、および将来の電磁(EM)レールガンから発射可能だ。  OK.行けると、車の走行感覚で簡単に言う。 [url=https://blog.bravenewcloud.com/17413/office2016_1/index.html]microsoft excel 価格[/url]
    コンサルタント、フルタイムのデスクトップ サポート技術者、または広範な技術的業務の一部として Windows 8 ベースの PC やデバイスを管理する IT 専門家が、候補者となる可能性があります。 B. 顧客はセレクトプ ラス契約で Windows8.1 Pro の ラ ゗ セ ン ス を購 入 し な け れ ば な り ま せん。
    [url=http://turbosonic.net/17419/windows8_1_1/index.html]windows8 セットアップ[/url] 自分は、 1536 samples にしています。 Googleがそういう方針で臨んでいるのを当然知っているはずのマイクロソフトがなぜそんなケチな方針を出すのかである。
    [url=http://www.njsendems.com/wp-content/17414/office2013_1/index.html]ms office 2013 personal[/url]

  10. #10 by we find you customers on 30 de abril de 2017 - 8:06 pm

    I’m very pleased to find this web site. I want to to thank you for ones time for this particularly wonderful read!!

    I definitely really liked every bit of it and i also have you book marked
    to see new information in your web site.

  11. #11 by www.krogerfeedback.com on 30 de abril de 2017 - 8:08 pm

    I visited various web pages but the audio feature for audio songs present at this web page
    is genuinely marvelous.

  12. #12 by we find you customers on 30 de abril de 2017 - 8:10 pm

    Magnificent goods from you, man. I have have in mind your stuff prior to and you’re just extremely wonderful.
    I really like what you’ve acquired here, certainly
    like what you are saying and the way in which during which
    you assert it. You’re making it enjoyable and you continue to take
    care of to keep it sensible. I cant wait to read much more from you.

    That is really a wonderful site.

  13. #13 by does Vigrx plus work on 30 de abril de 2017 - 8:11 pm

    Thanks in support of sharing such a fastidious idea, post
    is good, thats why i have read it entirely

  14. #14 by vigrx plus results permanent on 30 de abril de 2017 - 8:22 pm

    Good way of describing, and nice article to get information on the topic of my
    presentation subject, which i am going to convey in institution of higher education.

  15. #15 by Hay Day hack download free on 30 de abril de 2017 - 8:38 pm

    Nokia’beds Snake mіght rigt now appearance simple, Ƅut a absence օff it ѡas tһe deal-breaker for many mobile phone purchasers.

  16. #16 by varezmir.ru on 30 de abril de 2017 - 8:41 pm

    Hi! Do you know if they make any plugins to help with Search
    Engine Optimization? I’m trying to get my blog to rank for some targeted keywords but I’m not seeing
    very good gains. If you know of any please share.
    Many thanks!

  17. #17 by pre-owned exotic cars Atlanta on 30 de abril de 2017 - 8:51 pm

    If some one desires expert view on the topic of blogging then i propose
    him/her to visit this weblog, Keep up the pleasant
    work.

  18. #18 by http://msfoundersfraternal.wordpress.com on 30 de abril de 2017 - 8:51 pm

    Why users still make use of to read news papers when in this technological globe all
    is accessible on web?

  19. #19 by custom Wristbands on 30 de abril de 2017 - 8:54 pm

    Thanks in support of sharing such a nice opinion, article
    is pleasant, thats why i have read it fully

  20. #20 by Fantasy Play on 30 de abril de 2017 - 9:02 pm

    just beneath, are a lot of totally not associated websites to ours, however, they are certainly worth going over

  21. #21 by Tabung Pemadam api on 30 de abril de 2017 - 9:17 pm

    But wanna admit that this is extremely helpful, Thanks for taking your time to write this.

  22. #22 by Buy Luxury Car Atlanta on 30 de abril de 2017 - 9:24 pm

    This design is wicked! You definitely know
    how to keep a reader amused. Between your wit and your
    videos, I was almost moved to start my own blog (well, almost…HaHa!) Great job.

    I really enjoyed what you had to say, and more than that,
    how you presented it. Too cool!

  23. #23 by High Paing RN Jobs in California on 30 de abril de 2017 - 9:29 pm

    It’s not my first time to go to see this web page,
    i am browsing this website dailly and get fastidious
    data from here everyday.

  24. #24 by where to get vigrx plus on 30 de abril de 2017 - 9:32 pm

    whoah this weblog is magnificent i love studying
    your articles. Keep up the great work! You realize, many individuals are searching
    round for this information, you could help them greatly.

  25. #25 by Clash Royale cheat engine on 30 de abril de 2017 - 9:34 pm

    Dᥱ applicatie stelt ԁe gebruiker іn bepaling om zo snel mogelijk һet telefoonnummer νаn Һet dichtstbijzijhde taxi bedrijf erbij
    vinden еn te bellen.

  26. #26 by http://news.cheapmoncler.xyz/cheapmonclerxyz/398.asp on 30 de abril de 2017 - 9:43 pm

    The device had been at such a ideal amount I never ever idea that the premium would be therefore excellent. It’s breathtaking. This mother will likely appreciate this on top of Holiday morning whenever she opens up present therefore appears like I devoted a great deal more, however rates ended up being simply great!!

  27. #27 by http://news.monclerjacketsoutlet.pw/monclerjacketsoutletpw/419.asp on 30 de abril de 2017 - 9:44 pm

    It product ended up being at such a great rates I never ever considered the particular grade is so that exceptional. It is striking. It mama will love they on top of Christmas day after she opens up present therefore appearances like I invested far more, but cost ended up being only awesome!!

  28. #28 by vigrx plus pills on 30 de abril de 2017 - 9:45 pm

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

  29. #29 by vigrx Ingredients on 30 de abril de 2017 - 9:46 pm

    you’re truly a excellent webmaster. The web site loading pace is incredible.
    It seems that you’re doing any distinctive trick. Furthermore, The
    contents are masterpiece. you have done a fantastic job on this subject!

  30. #31 by pre-owned exotic cars Atlanta on 30 de abril de 2017 - 9:57 pm

    Have you ever considered about adding a little bit more than just
    your articles? I mean, what you say is valuable and all. However think of if you
    added some great images or videos to give your posts more, “pop”!
    Your content is excellent but with images and clips, this site could certainly
    be one of the greatest in its niche. Awesome blog!

  31. #32 by More about Buying Luxury Cars in Atlanta GA on 30 de abril de 2017 - 10:00 pm

    Hello Dear, are you truly visiting this web page regularly, if so afterward you
    will without doubt get nice knowledge.

  32. #33 by Male Enhancement Pills on 30 de abril de 2017 - 10:05 pm

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

  33. #34 by tinder dating site on 30 de abril de 2017 - 10:09 pm

    Very good Web-site, Carry on the great work. Thank you.

  34. #35 by where to Buy vigrxplus on 30 de abril de 2017 - 10:11 pm

    Good day! Do you use Twitter? I’d like to follow you if
    that would be okay. I’m absolutely enjoying your blog and look forward
    to new updates.

  35. #36 by Latonya on 30 de abril de 2017 - 10:16 pm

    whoah this blog is grеat і like studying үour articles.
    ᛕeep uρ tһe ցood work! Yⲟu realize, many people are loօking around for thiѕ info, you coᥙld aid thhem ǥreatly.

  36. #37 by More about Buying Luxury Cars in Atlanta GA on 30 de abril de 2017 - 10:24 pm

    I like what you guys are usually up too. This
    type of clever work and coverage! Keep up the fantastic works guys I’ve incorporated you guys to our blogroll.

  37. #38 by www.pressnews.biz on 30 de abril de 2017 - 10:27 pm

    It’s appropriate time to make some plans for the future and it is time to
    be happy. I have read this post and if I could I wish to suggest you some interesting things or tips.
    Perhaps you can write next articles referring to this article.

    I want to read more things about it!

  38. #39 by Pre-Owned and Used Luxury Cars Atlanta Georgia on 30 de abril de 2017 - 10:29 pm

    Unquestionably consider that which you stated.

    Your favourite justification seemed to be at the web the easiest factor to take into account of.

    I say to you, I certainly get irked while other folks consider worries that they just do not
    know about. You managed to hit the nail upon the highest and also outlined out
    the whole thing with no need side-effects , other people can take a signal.
    Will probably be back to get more. Thanks

  39. #40 by Web Page on 30 de abril de 2017 - 10:35 pm

    Hi there to all, since I am truly eager of reading this weblog’s post to
    be updated on a regular basis. It carries
    good data.

  40. #41 by RN jobs on 30 de abril de 2017 - 10:54 pm

    Hi there! I understand this is somewhat off-topic however
    I needed to ask. Does running a well-established website like yours
    require a massive amount work? I am brand new to running a blog however I do write in my journal on a daily basis.
    I’d like to start a blog so I can share my personal experience and thoughts online.
    Please let me know if you have any ideas or tips for brand new aspiring bloggers.
    Thankyou!

  41. #42 by LpAqZjdqk20 on 30 de abril de 2017 - 10:56 pm

    Hello there! Do you know if they make any plugins to help with Search Engine Optimization? I’m
    trying to get my blog to rank for some targeted keywords but
    I’m not seeing very good results. If you know of any please share.
    Cheers!

  42. #43 by Speedway Bookies Free bonus on 30 de abril de 2017 - 10:57 pm

    Appreciate this post. Let me ttry it out.

  43. #44 by Adam and Eve Haul on 30 de abril de 2017 - 11:09 pm

    Wonderful story, reckoned we could combine a number of unrelated data, nevertheless truly really worth taking a search, whoa did a single understand about Mid East has got more problerms too

1 1.615 1.616 1.617
(não será publicado)