Posts

Showing posts from 2015

Postmortem - 7 hours of hell

Image
If you remember my  7 hours of hell post   you probably wonder why postmortem. To give you introduction to this you need to know that I recently done port to Visual Studio 2013 (I used vs2010 till now). This migration was planned for some time already. I even started it in the past. But never finished because rebuilding of external libraries was pain in the a.. . Now I fixed this issue by automated building script and without bigger problems I was able to compile everything with Microsoft compiler ver: 12.0. If this was good idea I still don't know but for sure I know that I still fixing bugs and issues that shown in meantime. I don't mind it so much because some of stuff I do right now were also in plan for future. Probably you are curious what my one button plugin postmortem have to do with this changes ? Answer is simple I miss my one button plugin in Visual Studio 2013 ;( I tried to use plugin without any modification but it didn't work and for now I work...

Generated code

When two months ago I created generator for RTTI code I didn't realize how this one script will change so much in my programming style. Right now I have already four of generators in my code base: RTTI - Generate part of my RTTI code. SID - Generate CStringID with already calculated hash Pimpl - Generate interface class. Enum - Generate toStringID, fromStringID functions. So what changed for me after writing this one generator that make difference ? I try not to do monkey job . To show you how this improve my workflow let's look on generator I wrote today: Generator of Enumerator functions: toStringID, fromStringID. This is simple problem where for some enumerators we want to have conversion from value to some verbose type. Some people may claim that this is not issue. You write functions once and they work. Later you just need to modify them when you do some changes in enum. This take like about half minute work  ... if we don't do mistake there. Then thi...

Tools Design

Image
Variable Set Editor - Main view Continuation of previous post :] this time with real examples :D Real tools design  This may look like joke but this one window took me ~3 days to do. This include all it's features and communication: Editor Engine. But this is reality. Creating good tools require time and I wasn't joking in  Summary  from previous post: "As you can see creating of good tools is not easy. You often need go back and forth to create something really useful. You don't want to modify everything by scripts in which you can make easily mistake. Good tool will for sure save you a lot of work and return effort that you spend on it." 

Few words about tools design

Image
Once again I will return to topic of tools. Mostly because right now this is the part of code I spend most of my time in.  I will focus in this post on one dialog: Variables Set Editor This one dialog may sound simple but if you start thinking more about it it's really complex tool.  So let's start with short description what Variables Sets are then lets move what we want achieve and in the end look on real implementation of this problem. Variables Set This is really simple system which allow you to specify some kind of properties. Right now I support only values of types:  StringID Float Vec4. Whole system may be use to store values like: life, attacks parameters, movement speed etc. In my case to this data have also access animation system which may request some kind of information which later may be use to control blends and generally its behavior. Because this is simple list of variables you want to be able to have some kind of hierarchy. i...

7 Hours of hell

Image
This will be story, my story based on true events. Hour 0 Recently I start using project generator not only to generate makes, projects and solutions but also to generate some code. Because of that from time to time I need to run one python script. This is not big problem but I decided to make my life easier and add button in Visual Studio 2010 (I'm working slowly on progression to new one) which will trigger this task. Sound simple right ? 

My biggest problem: I try to do things right ...

Image
In last weeks I done a lot of work on animation system. In the same time I did not code too much of it. Right now I still struggle with some basic thing: edition of blend tree. And this is not that I'm not able to code it. It just my current prototype fell somehow wrong. I don't like forcing myself to do stuff. If I do this is the worst possible situation. Code will be messy without any clean goals and in the end it will feel somehow wrong each time there will be need of modifying it. To not loose time I do other things completely unrelated to animation system. Leaving this problem hanging somewhere in "background". When I have time I try to find in my head a way to improve my design of editor to make my changes nicer. When I will know how I want to do it I will just sit down and code it: quicker, better and with a lot more fun. Of course some may see all of this as excuse for not doing stuff I should :] And if somebody saying that it just mean that h...

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...

Return from overseas

Finally I have my stuff from Canada :] There is a lot of them but one of the important ones are my computers. Thanks to that I return to normal programming but well before that I needed to sync my projects. There was a lot of changes in projects in last three months so I expected problems and well there were :) First is my lack of normal internet connection :/ yep I still waiting for it. So right now I try to use hotspot option in android to be able exchange code between Linux laptop PC. Second was broken Windows build :/ I tried really hard to have working version of windows but without continuous compilation it's hard to switch systems all the time just to check if I didn't broke something. But well hour later the build worked. Third were missing manifest generations (TBD) which allow me to hold plugins to editor in separate folder. Because of that I needed to do some changes manually. My continuous compilation is still dead I need to recover it (I missing ...

Am I good programmer?

After some break in posting I returning with another weird topic :D Am I good programmer ?  This is one of this topics that is simple: I'm the best programmer :D so we all came to this nice conclusion and we can end all discussion ... If only real life was so simple :) Some time ago I spend whole evening with friend discussing if I am good in what I do. Funny thing is that in this discussion I was the person who claimed that I'm still not skilled enough. Because what in the end mean that I'm good programmer? I think that this is tricky question because of multiple reason: It depend who you compare to. It depend what kind of work you do/done. It depend what you expect being good in. It depend what you mean by being good. So lets start in order: Follow and be followed After all this year I spend on programming I still seeing that there are people who are better than me and in the same time I see people that are not so good as me. It don't mean tha...

Bug in rendering of editor

Image
Week ago I wrote post about porting editor to linux . I was mentioning there this weird bug : Editor works (Yes I know that drawing area is shifted to right. This is one of bugs that I still don't know why happening and I already spend on it like two days :/) Which is really nicely visible on this screen shoot: I spend on it like three days and still wasn't able to figure out why it happening or find any trace of it. I tried to ignore it but after noticing similar issues with blender and chrome I decided on desperate step.  From my experience I know that upgrades of system never ending good. This is the reason why I try avoid them as much as it possible. But well sometimes you need to do stupid things so I decided to update my Linux (Ubuntu 14.04) and graphics card drivers (fglrx-14.301) to newest versions. What went good: I was nicely surprised that system upgrade went without bigger problems. There were two steps 14.04 -> 14.10 -> 15.04 which took ...

Scripting language in game ....

I know I know I stepping on thick Ice. Some people love scripting languages other hate and other don't care. Personally I still don't know to which group I belong. I somehow understand all sides: Scripting language: [+] Have quick iteration time [+] Non programmer can do some simple stuff [+] It's easier than native code [+] Separate game from engine [-] Can be slow (most of the time is) [-] Use garbage collector so it was more user friendly  [-] Can be tricky to debug. Native code: [+] Can be really efficient [+] Give you access to everything [+] You have full control [+/-] No garbage collector [-] Can get easily messy [-] Easy thing can take really a lot of time [-] Slow iteration time [-] You need really good programmers to utilize it Because I'm not 100% sure about using scripting language in game I will try to create some add-on to engine so you could use scripts but you weren't forced to do this if you want.  And here start my...

Understanding of problem

This topic came to my mind in meantime of resolving linking problem on Linux. When I build dynamic library my app missed some of the symbols.  And no I didn't forget to compile *.cpp file which contain it. If it was so easy I wouldn't spend hours on resolving it. But this won't be topic of this post. The topic is about understanding of problem that we try resolve. I talking especially about this weird situations when something happening and we don't know why. I know different schools how to deal with this hard problems :]  Conclusion 1: It's for sure not in my code.  And this issue wasn't in my code :]  I didn't believed that this code was wrong from start. It was my fault for sure. Question only where.  Of course I'm not always was this way. In my younger days very often after hour of searching I were deciding it's for sure not my fault. Of course in 99% of time I was finding out later that I was wrong. Well privilege of being you...

Lets play : Good code / Bad code

If you try to find answer what good/bad code is, you won't find it in this post. I don't try to sell my beliefs and I'm sure you wouldn't like them anyway. To show you that, check this simple pieces of code: ////////////////////////////////////////////////////////////////////////// void   CAnimationResource :: release (  void  ) {      SAFE_DELETE ( m_privateData ); } I use void when function don't use any arguments. I know this useless and do nothing but I just like look of it (Personal preference). Other example: ////////////////////////////////////////////////////////////////////////// CAnimationResource :: CAnimationResource (  const   wrResourceID &  a_id ,  IResourceManager *  a_manager  )     :  CResource ( a_id )     ,  m_manager ( a_manager ) { } I using prefix  a_ for arguments of functions and use this style of organizing initialization...

Project generator

I like to experiments and have fun doing that. Right now I work on another crazy idea. You know because developing of game and technology behind is not enough. Don't worry this is just another side project connected with this one.  Project generator. I know that I could use some existing solutions (i.e CMake) but this wouldn't be so fun as doing it myself in python :] Well I started doing ... some time ago and returning to it whenever I had some time. Right now I'm at the level where Linux make support is better than previous generator I use. Sadly Microsoft Visual Studio support not exist there right now :D Well I fix this in future. But lets move to some details about new project generator which is wrote in python.

Singleton pattern

Singleton pattern ... People love it or hate it. There are also group of people who don't mind them. I'm still try figure out which I'm :] I'm for sure not the one who love them. I'm also cannot say that I rally hate them because I still use them in code (It is like with my Facebook account. After I created one I try not complain about fb. ). So probably I'm best fit to don't mind group. But my past experience showing me that I have bigger tendency to removing them from code than adding new one. And probably some colleagues from work will be happy about this because we spend a lot of time discussing about problem. I remove them because I put even more effort in good design of systems. In a lot of cases thanks to changes I just don't need global objects. Which is good. It allow me to better utilize multithreading thanks to encapsulation. Today sadly I had problem where I still don't know cleaner solution than global state: ////////...

Sculptures gallery moved

Image
To make my life simpler I moved my sculptures gallery to my deviant art account. You can find link in Arts page or here : http://angelusda.deviantart.com/

UI

It's funny that only with time and experience you start to understanding how hard UI code is. I remember a lot of situations when UI freeze in meantime of doing something. Whole window is locked and you just prying that its still alive. First version of my tools were similar: everything happening in one thread which was block when I was doing some longer operation. Because there was not too much to process it was not so painful. With time this changed, amount of data grow. To fix the issue I started adding progress bars to some operations and was happy. Sadly I was still wrong. This solution is still messy. I block whole UI and just update progress bar when some operations may be processed in background. Recent change of threading taught me beaut of asynchronous operations. Right now all my communication Engine UI is happening by events which cleaning my design of whole tools. All code where I mix UI with mechanics changing in creation of event and processing of it later. Be...

Dancing with code ?

I'm thinking if "dancing with code" could accurate describe my current situation with project. I started to think about it because I feel a little like student of dancing classes. You know this where they say you some things like: Three steps forward, two steps back, Three steps ... I'm still not sure if this is good phrase and also what kind of dance I would learning. But I know that with time it start to look better. So its my code. Sadly with each  new element I see there is still a lot for me to learn/do.

Code review story ...

Last week I took small break from project. I get out of town, visited friend, meet new people and talk in meantime of drinking beer. Big part of this talks were about game programming (Yes I'm a geek and even after work I still talk about games and programming). But why I telling all this ? Because this one week proved me how much I changed in last years and also how much I need to change in incoming ones. This post will be be story about : How I thrown childish pride and became who I am. 

Alien and painted Link.

Image
I updated my sculpture gallery with new two pictures : I have also two other sculptures in progress :] more info about them coming soon.

Coffe Monster page Update and new sculpture

Image
Let's start with forwarding info from Little Big Adventure progress. There were update of : coffemonsters.com There were two new post. Except that I was able to started new clay sculpture : This is base frame of it :] you can try to guess what is this. In rest of post you can find pictures how it look with clay on it.

Hydralisk is finished

Image
Finally after more than 18 hours of work I finished Hydralisk sculpture. Final result you can judge for yourself : Additionally I updating my collection with Broom sculpture I done for one of my friend:

Prison Stories and Clay figures

Image
There are few things I would like to share with you :] The first one is that I added new post about LBA:  Prison stories . The second one is new clay figure project:  Hydralisk for StarCraft. It's still work in progress so it's not ideal but well I think it's already look cool. The other one is that I finally finished painting Dino Fly : Before painting Painted version I think it's look nicer this way :] Greg

Changes ...

Image
Each day bring changes sometimes bigger sometimes smaller. Today bringing change that probably not a lot from you expected but well : after 4 years there will be no more posts about Little Big Adventure Remake development on this blog. But don't worry about this :] I moving officially development news on new blog: http://coffemonsters.com/ This is also day when I switch on using Coffe Monsters™ name for game production. So probably you wonder what about this blog ? It will still exist, but it will change a little bit it content. From now on you will be able to find here: Sharing knowledge about programming, 3D modeling, digital drawing. Information about my personal works : modeling in clay, painting and other weird hobbies. Some weird post about other things :] I want believe that this is next step in developing Little Big Adventure which will result in better contact with all people who are interested in project. Greg Wojciechowski

Progress page

Killah pointed out in comment of previous post nice thing: "Why don't you post an map progress of the mod, like percentage of level done, animation, scripting, on what you need help etc" So this state is already fixed. There is new page with progress of work. Right now I put there things I'm currently working on and I will update it with the future one when I will start them. Full road map will need to wait a little bit more because right now preparing it would take me a little bit to much time but still I want to believe you will like this new idea from "Killah" (thanks for it). Greg

New year, new problems, new announcements.

Image
Lets start with the best wishes for year 2015 :] 2014 Summary I'm still alive still active and I will do short summary of previous year : Looking back on all my posts in 2014 I need to say "I suck in writing posts" :| I didn't done too much of them. I will try to fix this this year :) I failed to release the demo which I announced - Sorry here :/ "Mea culpa" Company where I work:  Ubisoft Montreal released  Far Cry 4 In project itself changed a lot. Git statistics told me that I:  Done 440 commits Average in month:    40 Minimum in month:  11 Maximum in month: 83 Modified 247328 lines (without added/deleted files) added:     137386  removed: 109942 Modified 742856 lines (including added/deleted files) added:     288150  removed: 454706 This commits  included: New UI system. New resource system.  Switching to component objects. New serialization of data. AI use nodes...