Home > "Ghost of a Tale", Unity, update > Optimizing a bit

Optimizing a bit

January 17th, 2013 Leave a comment Go to comments

Recently I’ve been working on optimization; both in terms of programming efficiency (still have a lot to learn) and in terms of sheer framerate. Of course, the two are often linked. So far the game runs on my machine in 1600×1200 at about 40fps. But my graphic card is a couple of years old and it’s a professional one, definitely not optimized for running games. So I’d be very curious to see how well it can run on an up-to-date gaming PC, I want to see if I love it as much as the cozino games.

In the process I’ve also discovered that Unity’s OnGUI functions are awfully slow to display HUD textures. Probably because they’re called multiple times per frame. So I reverted back to simply updating GuiTextures whenever I need it and it’s so much faster. I still haven’t decided yet on a look for the interface though. I thought it was going to be really tricky to implement a health bar a la Dark Souls; when you’re hit, your health goes down instantly, but a “shadow health bar” goes down more slowly behind, so you can see how much you lost. But it literally takes ONE line of code to implement this functionality in C#.

I also refined the player control scheme (camera, displacement and animation) and the little guy is super responsive. It’s really fun to just run around and jump all over the scenery, and if you’re interested in this type of games or other like gambling games, then visiting sites as sbobet.com are great to make some bets online.

Anyway, while I was play-testing and also in a online questions game I emerged from under a dark stone-arch and the sun’s rays appeared; so I took a picture… :)


Categories: "Ghost of a Tale", Unity, update Tags:
  1. Arturo
    January 26th, 2013 at 23:00 | #1

    I definitely will buy this game. When I first went to the crydev forums the first game I saw was yours and fell in love with that little mouse running around. I use unity3d a lot and can understand the move. I’m reluctant to use CryENGINE 3 not because of the code (I’m a coder of C++ and C#), but because of the proprietary software needed and the way of doing practically everthing has to be specific. The sheer ease of use is clearly night and day difference. Unity will also release a new GUI system which is way much better looking and faster. I think it might be in 3D and have a GUI editor just like cryengine 3. Oh, and you can export to linux which I think is awesome too, so more people can enjoy your game.

    Just wanted to say, congrats!

  2. Seith
    January 27th, 2013 at 14:21 | #2

    Thank you for your moral support, Arturo! Regarding the new Unity GUI system, I wish they’d release it sooner than later (I saw the beta demo they showed a while back). But what I’m also waiting for is the fixes and enhancements they’re going to add to Mecanim (zoomable view, anim events, etc…).

  3. January 29th, 2013 at 11:07 | #3

    hie, Seith,

    I saw you make the move from CryEngine to Unity Engine,
    Seems that it was “Easy” ? regarding of the quality of your work, keep going nice, :)

    Just one question about the export from Maya,
    seems you just need to save the maya scenes as a .mb native Maya format,
    then Unity open the .mb then convert to FBX ?

    the question, does Export from Maya is more EASY and fluent compare to the CryEngine one, with all the plug-ins naming convention and malformed edge ??

    did you achieve to import any kind of geometry
    any limit in polygon count ? according to your experience,

    I’m about to make the move too…

    soo thx any advice about the export would be nice :)


  4. Seith
    January 29th, 2013 at 11:22 | #4

    Hi Thanenbauk. Thanks. Yes, you can save Maya files (.ma or .mb) and Unity converts them on the fly. Personally I prefer to export the files directly in .fbx format though. To answer your other questions: yes, things are much easier. No naming convention or temperamental material/physics requirements. I haven’t met any limit in polygons yet. I’m sure there must be one, but it hasn’t been a problem for me so far.

    Good luck with the switch! The thing to keep in mind is that some things you take for granted in the CryEngine do not exist in Unity; you have to create them yourself.

  1. No trackbacks yet.