[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 found it for You on 24 de março de 2017 - 11:02 am

    Marvelous work on behalf of the owner of this web site, superb post.

  2. #2 by visit this web-site on 24 de março de 2017 - 11:05 am

    I merely hope to tell you that I am new to writing a blog and absolutely valued your page. Most likely I am most likely to remember your blog post . You indeed have stunning article content. Truly Appreciate it for share-out with us your favorite url article

  3. #3 by Deadpool 2 Official Trailer on 24 de março de 2017 - 11:20 am

    This text is invaluable. When can I find out more?

  4. #4 by partner site on 24 de março de 2017 - 1:07 pm

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

  5. #5 by table on 24 de março de 2017 - 1:10 pm

    First of all I would like to say superb blog! I had a quick question in which I’d like to ask if you do not mind.
    I was interested to find out how you center yourself and clear your head prior to writing.

    I’ve had trouble clearing my mind in getting my thoughts out there.
    I truly do take pleasure in writing but it just seems like
    the first 10 to 15 minutes are generally lost simply just trying to figure out how to begin. Any ideas
    or tips? Many thanks!

  6. #6 by gipperich-gipprich-wiki.com on 24 de março de 2017 - 1:39 pm

    We stumbled over here from a different web page and thought I may aas well check
    things out. I like what I seee so i am just following you.
    Look forward to checking out your web page repeatedly.

  7. #7 by http://www.facebook.com on 24 de março de 2017 - 2:32 pm

    My brother recommended I would possibly like this website.
    He was entirely right. This submit actually made my day.
    You can not believe just how so much time I had spent for this
    information! Thanks!

  8. #8 by colimas oceanside on 24 de março de 2017 - 2:40 pm

    Bout #2 saw ex-Mixed Martial Artist Alec Christenberry who
    works out in the UFC Gymnasium in San Marcos, Florida and lifestyles in Foothill Ranch, CA in his professional-introduction increase contrary to the more seasoned Ulises
    Sierra (3-0-1, 2 KOs) of San Diego.

  9. #9 by Jack on 24 de março de 2017 - 2:46 pm

    Some genuinely good stuff on this website, I enjoy it.

  10. #10 by image source on 24 de março de 2017 - 2:51 pm

    It happens to be proper occasion to have some intentions for the long-run. I have browsed this blog post and if I have the ability to, I desire to suggest you couple entertaining recommendation.

  11. #11 by decorate homes on 24 de março de 2017 - 2:51 pm

    Incredible points. Solid arguments. Keep up the good effort.

  12. #12 by Austin on SEO experts on 24 de março de 2017 - 2:53 pm

    The best Austin seo is here. Their Austin seo expert, consultant, experts and consultants are the best from all the Austin seo companies. Check out their SEO Austin today. Both Austin SEO and SEO Austin is available.

  13. #13 by maxocoin on 24 de março de 2017 - 2:54 pm

    If you are going for best contents like myself, only pay a visit
    this web page all the time because it gives quality contents, thanks

  14. #14 by Nam on 24 de março de 2017 - 3:32 pm

    Hello! I’ve been reading your weblog for a long time now and finally got the courage to go ahead and give you a shout
    out from Dallas Texas! Just wanted to mention keep up the great
    job!

  15. #15 by youtube.com on 24 de março de 2017 - 3:32 pm

    You ought to take part in a contest for one of the highest quality websites
    on the web. I will recommend this blog!

  16. #16 by rajah pelet sesama jenis on 24 de março de 2017 - 3:36 pm

    Hi I am so thrilled I found your weblog, I really found you by accident, while I
    was researching on Yahoo for something else, Nonetheless I am here now and would just like to say thank
    you for a tremendous post and a all round interesting blog
    (I also love the theme/design), I don’t have time to browse
    it all at the minute but I have bookmarked it and also added in your RSS feeds,
    so when I have time I will be back to read a lot more, Please do keep up the excellent job.

  17. #17 by need shelf plans on 24 de março de 2017 - 3:40 pm

    Hi, I want to subscribe for this blog to obtain most up-to-date updates, so
    where can i do it please help.

  18. #18 by http://delhidolls.com/high-profile-delhi-escorts on 24 de março de 2017 - 3:44 pm

    Hello my friend! I wannt to ssay that this article is amazing, great written and include
    almost all vital infos. I would like to
    peer extra posts like this .

  19. #19 by Elvis on 24 de março de 2017 - 4:04 pm

    Hi there, I enjoy reading through your article post.
    I wanted to write a little comment to support you.

  20. #20 by Collette on 24 de março de 2017 - 4:10 pm

    We absolutely love your blog and find most of your post’s to be what precisely I’m looking for.
    Does one offer guest writers to write content
    in your case? I wouldn’t mind composing a post
    or elaborating on some of the subjects you write regarding here.
    Again, awesome site!

  21. #21 by emogesmc on 24 de março de 2017 - 4:16 pm

    office 2013のセキュリティ、性能と安定性、及びwindows 8とinternet explorer 11の通用性を向上させました。 センサー部分は8個も狭い間隔ではんだ付けしないといけないので老眼の私には苦痛です。 [url=http://dixq.net/forum/blog.php?u=2392&b=6483]windows 7 ソフト[/url]
    SDL Trados のデモを交えながら、翻訳支援ソフトを使用して翻訳品質と効率を高める手法や、導入におけるチェックポイントなどを、わかりやすくご説明します。 あなたは Policy-90 とい う名前の空の保持ポリシーを作成します。
    [url=http://natsu-oz.versus.jp/xoops/modules/d3forum/index.php?post_id=7205]windows7 ストア アプリ[/url] デ ー タ ベ ー ス の 読 み 取 り 専 用 値 をTrue に設定します。 さて、そのシルバーウィークのさなか、21日昼頃からSkypeが世界的な接続障害に陥っていた。
    [url=http://www.croquet.no/phpbb/viewtopic.php?p=42334#42334]windows8.1 ストア アプリ[/url]
    それで、ファイルをアップロードになるわけですが。 また、安定性も高いので結構重要なデータも保存されている。 [url=http://izunotabi.jp/modules/wordpress/index.php?p=1249]office 2013 価格[/url]
    それはあなたがいつでも最新の70-341試験トレーニング資料をもらえるということです。 そこへAmazonでの購入は6月30日まで3,000円offと出ていたのでここで購入を決心。
    [url=http://www.bicyclemap.net/modules/newbb/viewtopic.php?topic_id=2524&post_id=2818&order=0&viewmode=flat&pid=0&forum=11#forumpost2818]office 2013 激安[/url] 先日、無料掲示板に掲載したパソコンに問い合わせ頂いたお客様に、自宅で見ていただいて、パソコンを購入していただきました。 例えば、DVD CSS、ソニーArccOS、RCEリージョンコード、UOPs 、APS、ディズニームービーコピープロテクションなど。
    [url=http://www.computersoc.com/viewtopic.php?p=176433#176433]office2013 プロダクト キー[/url]

  22. #22 by amazon warehouse deals bargains on 24 de março de 2017 - 4:23 pm

    Tɦanks very nice blog!

  23. #23 by Daniele on 24 de março de 2017 - 4:24 pm

    No matter if some one searches for his essential
    thing, so he/she wishes to be available that in detail, thus
    that thing is maintained over here.

  24. #24 by Rudolf on 24 de março de 2017 - 4:31 pm

    It’s impressive that you are getting thoughts from this piece of writing as well as from our discussion made here.

  25. #25 by www.alejandrodeduenas.com on 24 de março de 2017 - 5:35 pm

    Pretty! This was an incredibly wonderful post.
    Thank you for supplying this info.

  26. #26 by Xanax on 24 de março de 2017 - 5:37 pm

    I was suggested this website by my cousin. I’m not sure whether
    this post is written by him as no one else know such detailed about my trouble.
    You’re wonderful! Thanks!

  27. #27 by http://www.cozy-time.co.uk/londonprice.asp on 24 de março de 2017 - 5:49 pm

    I have this particular headphonesconcerning our mom for the moms evening, to she definitely enjoyed they! The actually attractive headphonesas well as the saying on the card that will come within the package is very emotional!! As well as the excellence of the beads is awesome!

  28. #28 by cheap christian louboutins replica on 24 de março de 2017 - 5:49 pm

    I got that headphonesconcerning the mom for mothers time, then she definitely adored this! It really is quite adorable headphonesand suggesting on the card your comes within the container is really sentimental!! And the top quality of the beads is very good!

  29. #29 by located here on 24 de março de 2017 - 5:54 pm

    Well composed articles like yours renews my faith in today’s writers.
    You’ve written information I can finally agree on and also use.
    Thank you for sharing.

  30. #30 by http://www.cosycornernorfolk.co.uk/shoescl.asp on 24 de março de 2017 - 5:59 pm

    This might be completely kind of. I love things lots. Their quotation are cute and also package covered in cool bow. It’s not one particular stunning bracelet ever, however for the price this surpasses the expectations. Can’thold off to award things at our mom to Mother’s time!

  31. #31 by tinder dating site on 24 de março de 2017 - 6:11 pm

    Amazing Web-site, Preserve the great work. With thanks!
    tinder dating site

  32. #32 by quit addiction on 24 de março de 2017 - 6:28 pm

    Pretty great post. I simply stumbled upon your blog and wished to say that I have really loved browsing your
    weblog posts. After all I’ll be subscribing on your feed and I’m hoping you write once more soon!

  33. #33 by admpembangunansiak.com on 24 de março de 2017 - 7:23 pm

    Acreditasse que civilizações místicas antigas como a dos Incas, teriam revelado através de mapeamento astral,
    a cidade de São Thomé das Letras e também desenvolveram uma passagem subterrânea para lá.

    , Capitão João Francisco Junqueira, havia sido
    revelado, cansado dos maus tratos, refugiou-se em uma depressão no cima da monte, onde passou a
    subsistir de pesca, frutos e também raízes da área.
    Um dia, um A Empresa Municipal de Excursionismo de
    Belo Horizonte não sabe nem mais nem menos quantos, mas estima em milhares
    os turistas que, todo mês, estacionam veículo junto à calçada para vê-lo escorregar rampa acima.

  34. #34 by Travel Agent on 24 de março de 2017 - 7:26 pm

    Keep up the good work , I read few blog posts on this site and I believe that your website is real interesting and holds sets of good information.

  35. #35 by http://www.tulikajain.com on 24 de março de 2017 - 7:26 pm

    Great blog here! Also your website rather a lot up very fast!
    What web host are you thhe usage of? Can I get your affiliate hyperlink
    for your host? I want my web site loaded up as fast as
    yours lol

  36. #36 by landenocob369147.isblog.net on 24 de março de 2017 - 7:27 pm

    You made some respectable points there. I looked
    on the internet for the issue and found a lot of people will go along with your website.

  37. #37 by http://cheappsychicreadingslady92.ampedpages.com/The-smart-Trick-of-online-psychic-readings-That-No-One-is-Discussing-5332378 on 24 de março de 2017 - 7:34 pm

    I’m in love with this blog. I have visited this website so frequently.
    I found this site on the internet. I have gotten an excellent stuff of knowledge.

    Thanks a lot.

  38. #38 by website on 24 de março de 2017 - 7:36 pm

    Good way of telling, and good post to obtain facts regarding my presentation topic,
    which i am going to deliver in school.

  39. #39 by bitbeanpool.com on 24 de março de 2017 - 7:40 pm

    Fortunately in today’s society it is now acceptable that people probably will
    change careers and jobs a few times before they finally
    find something that they revel in, something that they are fantastic at and are
    thrilled to show up to five days a week. This type of technology utilizes
    specialized equipment, teaching materials and services which will enable him or her perform and function of
    their surroundings. Allowing consumers to choose the charity,
    or perhaps creating a revolving set of charities,
    comes across as a marketing incentive.

  40. #40 by lululemon yoga bag on 24 de março de 2017 - 7:41 pm

  41. #41 by Mouptut on 24 de março de 2017 - 7:47 pm

    ダンサーとしての実力もあり、お客様の心を魅了させることでしょう。 つながるから不利益も大きいことに我々は気付くべきだ。 [url=http://www.minkita.net/modules/d3forum/index.php?post_id=2027]ごぶごぶ BOX13/第13弾 DVD-BOX激安[/url]
    以前から興味があったのは、i3コアを使ったパソコンの速さです。 なんと、ありがたいことにネットから無料でダウンロードすることができる。
    [url=http://spione.adept-press.com/forum/comments.php?DiscussionID=23402]日本ドラマ MONSTERS DVD-BOX 価格[/url] EU盤で最近発売されたハーフオフィシャル盤です。 110か国以上のおよそ2000種類の慈善団体から一つ選んで寄付することで他の人の幸せに貢献するか、出金してご自身のためにお使いいただくこともできます。
    [url=http://www.bicyclemap.net/modules/newbb/viewtopic.php?topic_id=2488&post_id=2780&order=0&viewmode=flat&pid=0&forum=11#forumpost2780]リンカーン芸人大運動会2011·2012 DVD-BOX[/url]
     燃料電池車(FCV)は車に充填した水素と空気中の酸素を化学反応させて発電した電気で走る車で、走行中に二酸化炭素を排出しない。 Instagram ムービー #31instagram.com/p/BGTjHIZPMhH/?taken-by=hanaimorihiko_ofc&hl=jaオレ、1冊の本を手にとってみたんだ。 [url=http://gossipgalore.foroomy.com/viewtopic.php?f=7&t=21496]韓国ドラマ 奇皇后I-IV -ふたつの愛 涙の誓い- DVD-BOX[/url]
    Anyway I was pretty satisfied with these days!!!Thanks a lot ;)兎にも角にも、本っ当に大満足!!!ありがとうございました☆*:.。. o(≧▽≦)o .。.:*☆おまけ♪。 しかし、疲れるOSだねWindows10は、もっとドライバ出してくれ!!。
    [url=http://forum.tsukaeru.net/viewtopic.php?p=31522#31522]日本アニメ人気DVD box[/url]   けど… モロにの根元に止まったおーい!chain sawは????  振れるのかな? 絵理香ちゃん何とかアドレス取れるみたいで振れるみたいだ。 OSはWindows7から10へのバージョンアップ。
    [url=http://www.kakudate.com/modules/newbb/viewtopic.php?topic_id=82405&post_id=83819&order=0&viewmode=flat&pid=0&forum=5#forumpost83819]日本ドラマ ぼくらの勇気 未満都市 DVD-BOX[/url]

  42. #42 by Source on 24 de março de 2017 - 7:48 pm

    I merely hope to advise you that I am new to wordpress blogging and totally valued your review. Very likely I am probably to store your blog post . You definitely have lovely article material. Be Grateful For it for telling with us your current site report

  43. #43 by targeted traffic on 24 de março de 2017 - 7:48 pm

    Good info and straight to the point. I am not sure if this is actually the best place
    to ask but do you guys have any thoughts on where to hire some professional writers?
    Thx :)

  44. #44 by barba de respeito on 24 de março de 2017 - 7:57 pm

    Que faço?

  45. #45 by Zoloft on 24 de março de 2017 - 7:58 pm

    Greate pieces. Keep writing such kind of information on your page.

    Im really impressed by it.
    Hi there, You’ve performed an incredible job. I’ll definitely
    digg it and in my view suggest to my friends. I am sure they’ll be benefited from this web
    site.

  46. #46 by http://phonepsychicreadingwomen10.pointblog.net/Detailed-Notes-on-best-psychics-4889027 on 24 de março de 2017 - 8:16 pm

    Bookmarked your wonderful website. Incredible work, unique
    way with words!

  47. #47 by Entretien Ménager Montréal on 24 de março de 2017 - 8:34 pm

    Hello there, just became aware of your blog through Google,
    and found that it’s truly informative. I’m gonna watch out for brussels.

    I will appreciate if you continue this in future.
    Many people will be benefited from your writing.
    Cheers!

  48. #48 by adidas yeezy boost 350 price on 24 de março de 2017 - 8:53 pm

  49. #49 by Click here on 24 de março de 2017 - 8:56 pm

    I was able to find good advice from your articles.

1 1.502 1.503 1.504
(não será publicado)