Posts

Showing posts from September, 2015

Namespaces hell

Welcome in namespace hell . In this place you will find annoying code and the best part: it is on demand. So lets start another topic base on one of my horror stories which ended with hours spend to straight things up. But let's start from begin. This words probably don't mean a lot for you:  s2d, s3d, world2d. world3d, fs, sound, physics, math, navmesh, utility, resources, game, editor, lba, wre, wr. Personally I know them really well. All of t his are namespaces that I used or using in my code. This is collection from 7 years of development and they are probably not all of them. When I start writing engine I wanted to do stuff right. So I created modules which then I encapsulate in namespaces. This was naive and stupid because I ended with annoying code. Who want to write physics::CPhysics for physics class? This is duplicated information. But well with time I got smarter and removed most of them using simple method :  Find and replace all. This was my first sin. Af...

Commit comments

Now that I thought about this is interesting topic: How your comments for commits look like? In my case you probably think that they are poor because I do project myself. But here I will surprise you (and myself to) because most of the time I do full summary what I done in given change list. So bellow you will find few of my comments from different commits across last 3 years (I use not modified git logs) : * 13/11/2012 Show/hide 3 fix: not working chest with animation, not working dropping items from chest and terrain crash on ci_exterior. * 25/02/2013 Show/hide Some cleanups and changes in material mgr, added some mechanic to secure engine use, begin of Gui Editor, render script function support changed, added better tips to console. [0] At last renamed files with implementation of materials (moved them to "src/Material" and removed "Impl" from name). [1] Added removing of unused materials from manager. [2] Better management of materials (...

Animation System Changes: Part 1

Image
After weeks of work (probably I could even say months) and hundred resolved tasks and bugs new animation system finally start working ;] Check final effect: If you think that it is look no different from my old animations then you are almost right :D Currently this new system have even less functionality than old one. Because of that I needed to disable big part of gameplay. Was it worth it ?  Short version : I think that: YES. 

Playing games and Dreams

Image
Normally I don't play too much games but there are days when I just want to relax and play. Sometimes even a little too much for one day but well this have it's charm (till the next day when you need to wake up). This week I finished playing PS3 Uncharted games and Zone of the Enders. I feel inspired by their style. I really liked Uncharted 2 graphics would it be cool if Little Big Adventure remake had this level of graphics :D Well I need to return to development I still need do few things to make dreams became true.

RTTI: Changes for better

As some of you may know White Rabbit Engine use it's own R un T ime T ype I nformation  system. And well like with everything else sometimes come time when you need to upgrade stuff. Recently I had another occasion to do iteration over this system. In this post I will try to give you a little bit insight how m  RTTI  look is engine, what changed and what are plans for future. But well let's start from begin.

Weird thoughts

Image
Let's start this from some thoughts about who I'm (yes I will be talking about myself). I'm not seeing myself as somebody really intelligent I would say that I'm event think that I'm stupid. Funny thing is that with time I see that even then I'm more intelligent than a lot of people :| Question is where this bring us and why I'm in such a position? I thought about this and my answer is: "learning".  I like to learn new stuff, discover things that I didn't know about. This is for me something incredible and in current time we can do this really simple. Sadly because of that I see how small my knowledge is and how big the sea of possibilities is. There is always ways to growth.  On other hands we have people who don't really want to learn. They do it only when they are forced by situation. They think that what they know is enough. I don't know which way of thinking is good or right. The thing that I know is the fact: I ...

Short Term Memory

Funny thing about doing your own tech is that you sometimes need to do some funny stuff. This week I needed done  Short Term Memory Manager. My comment in code describe it like this: Short Term Memory Manager (STM Manager). STM is memory which you want to use for short one-shot tasks:             Create->Execute->[GetResult]->Destroy It is limited by capacity so you never can use more than you pre-allocated for it. Right now it's use to transfer resource data CPU->GPU and in  animations tasks. For me this is temporary memory which I use for example to load texture data and then passing it to GPU upload (which will remove it). There are also other usage where I think using normal allocation...

Hunting of memory corruption

This is the story of memory corruption hunting and what I learned thanks to it. So the story started when after one of many big changes in component system I needed to re-save all maps and objects templates :] Because I'm lazy bastard some time ago I created processes which loading each of it and re-save. All this after pressing one "magic" button. Great idea and in the same real stress test how object system works. Sadly after all this time I didn't use it, whole process failed. And in worst possible way: memory corruption. Everybody who have occasion to deal with at leas one not trivial one know that this are not nice bug. Especially in multi-threaded environment:/ In my case normal corruption wasn't enough and sometimes even my callstack was corrupted. Fun :| So well my hunt begin because I couldn't left this issue without fix. 1st approach: Debugger The first approach was the most trivial one check what happening when app crashed. Simple a...