Posts

Showing posts with the label Thoughts

Hierarchy - UI improvement

Image
This time light topic of UI designing :] But before this let's discuss how the hierarchy in the engine works. So it was easier to understand these, let's look at the tooling of it:    We have there: World (ID:0) Loaded Stream (Citadel Island) Loaded SubStream (CI.Citadel) Unloaded SubStream (CI.Logic) Folders (f.ex. Park) Entities (f.ex. Ferry) If you are curious what a Stream is, you can think about it as a scene or a level. Now that we know all of this let's look a little bit closer at what we have.  Streams and SubStreams are exactly the same  I change the name based on their position in the hierarchy. The  Folders  may look different than Entities but they are exactly the same. They are  Entities  with a folder component. If we go this way streams are also just  Entities  with a Stream Component. This leaves us with a bunch of the entities under the World . Which as you can suspect is just an  Entity with ID equal to 0....

Configuration scripts - part 3

In  Part 1  I described the configuration system in the engine. In Part 2  I described the reason and thoughts behind the topic: Designing intuitive API that makes sense. Now time for Part 3. This time we will analyze changes in script and reason behind it.  Compute shader script Let's start with the simplest compute shader script that doing anything : Compute {      ShaderFile  =   "sys://Shaders/ComputeShader.glsl" } New version: Compute {      Shader .Bind ( "sys://Shaders/ComputeShader.glsl" ); } This may look like a small change but it brings consistency to script. From now on there is only function style calls with ';' at the end. Defines Let's now add Define to script. In original format this would look like this: Compute {     Define ( "MY_DEFINE" )      ShaderFile  =   "sys://Shaders/ComputeShader.glsl" } The new one is more flexible and allows to do it i...

Configuration scripts - part 2

In Part 1  I described how my configuration script system works. Part 2 will focus more on the real reason why I decided to write this post: Designing intuitive API that makes sense. The more I code and work on complex systems the more I see how important good API is. There is of course 1001 articles describing how to do that and if you are searching for one of them you are not in the right place.  My focus will be on my personal evolution in a way how I think about API. Whole thought came from improving compute shader scripts. They had a really simple form: Compute {      Define ( "MY_DEFINE" )     Reg (0) = UserImage (0, "Write" , 0)      Reg (1) = UserTexture (4)      Reg (2) = UserTexture (5)      Reg (3) = UserTexture (6)      Reg (4) = Texture ( "sys://Textures/Texture.dds" )      Reg (5) =  UserTexture (7)      ShaderFile ...

Configuration scripts - part 1

This may sound weird in days where everything needs to have some kind of UI but the recent time I spend upgrading some of my configurations scripts. My current workflow is to define parsing rules and generate from them parser. To give you an idea what I talk about this is simple rules for the logging configuration file: %name     = LogConfig   %% .input : /* empty */        | LogAllow .input        | LogBlock .input        | AllLogBlock .input        | AllLogAllow .input ; LogAllow        : 'LogAllow' '(' $(CStringID) ')' ';' ; LogBlock        : 'LogBlock' '(' $(CStringID) ')' ';' ; AllLogBlock        : 'AllLogBlock' '(' ')' ';' ; AllLogAllow        : 'AllLogAllow' '(' ')' ';' ; %% It allows me then to parse a file that looks like this: LogAllow("Crash"); LogAllow("Assert"); LogBlock("Scripts"); Lo...

Hobby or Work

Interesting topic for a post came recently to my mind when one of my friends commented on me taking a day off from work to relax as: "Anyway, you will wake up that day and work." This was, of course, comment on me developing LBA remake in my free time. What is interesting about it I'm not fully sure what to think about it. Because how what I doing in my free time is different than other people's hobbies? On another hand how it is different than what I do in a work? What is a hobby? All of this thinking brought me to this simple question on which I don't have really a definite answer. In the end, what is a hobby for one person can be a work for others. There is a lot of examples of that:  riding a bike, skateboarding, painting, drawing, writing stories, creating graphics, woodworking, restoration of items, fixing electronics, traveling, singing, dancing and even stuff like cosplay.  All of that and a lot more can be a hobby but at the same time, it c...

Good programmer ...

I don't know about you but after all this years that I'm into programming (18 year already) I'm still hesitate to call myself good programmer. I have some knowledge and experience but am I really good ?  This question really often return when you look around in net. You founding another awesome looking project that somebody done. In my case is even worse because most of the time it's also done a lot quicker ( I'm 7 years stuck in the same project). Always then I feel a little bit down because there coming other questions like: what you done in all this time, what you achieved and are you really good. I still don't have clear answer how to deal with this mood and thoughts. Do you have any ? If you have I'm really open to listen them. So far I start to thinking that we are in time when a lot of people want to show of their skills and show how better they are than others. I'm sometimes have pity for them when they doing that. Recently I was aske...

Engine interview question

My friend know someone who is going to have skype interview for a position as engine junior programmer. I was asked for some guide or hints for this person. I think that this topic is interesting enough to change my long reply into nice post and hear what you think about it:) My email to him looked like this: " First he should stop being stressful and asking question of others what can be on interview. If he has knowledge and luck he will pass. Sometimes is more about luck than knowledge but generally If he will get too stressful, even luck won’t help him. About question they can ask whatever they want from just: How are you? Where you were studding? What you were studding? Why do you decide to have interview with us? To more technical one like: What programming languages you know and how well? What engines you know? If he sent them CV there will be probably few question about stuff you put there. If he worked previously somewhere I would expect question like: What y...

Game development

Image
This time something inspired by this twit: I guess this illustrates a serious problem with how gamers see game development effort :/ #NoMansSky #gamedev pic.twitter.com/H0ZDxojWpk — Kornel Kisielewicz (@epyoncf) August 14, 2016 If you look really general on game development you can compare it to assembling puzzles. A lot of people know about game development from articles, making of videos and few other sources. They also know that there are different options that developer choose when they started: 5000 pieces - Making small game on ready technology. 8000 pieces - Making small game with technology. 12500 pieces - Making game on ready technology. 25000 pieces - Making game with technology.  This don't sound so bad, so why developer don't make their job properly? People complain about some bugs, some features, about how simple it would be to just add this one feature. This is so frustrating for them because this is so simple (like assembling puzz...

Code pollution

Image
Well time fly by and animation system starting take shape. Thanks to it I could do even some not bad looking animations in game (http://coffemonsters.blogspot.co.uk/2016/05/lba-preview-15.html) but well this is just another milestone in road to finished game.  Because of this thoughts I already moved to next issue: recovering of movie system. So far its going fine I added new movie resource, movie editor module. No I starting adding basic functionality: adding keys. This operation require list of selected objects in level. This part was designed great :D Because I can have N levels loaded in memory in the same time I created new level component which exist only in editor. It contain some editor specific data i.e. selection. It's added on loading from editor and it's not saved with level. When you want list of selected objects just pick component from level and I have access to selection. Great idea right ?  I thought this way when I was writing it. Right now I...

My little monster

This story started long ago while I was still student at University of Technology in Wrocław. It was probably year 2006 but I'm not sure right now. With time passing by all previous years slowly starting blending together but well I'm already at this age where this is pardonable. On one of C++ courses we got exercise to do program of our choice to show that we learned language. I decided that isometric game in SDL software mode will be great idea. And so I started working on it. What a great joy I had when everything finally started working together and I was able to send it to person conducting classes. I got passing marks and this was end of story.  Well at least for a lot of project this would be truth but in this cases there is a lot more. Some time passed and with friend we decided to make casual game. Code from course project was really useful but software rendering were too slow so I switched whole stuff on OpenGL and some time later we finished  "Pir...

My bookshelves.

I realize recently that I'm weird programmer. If you would look on my bookshelves you will find there: manga,  fantasy books, movies art books, games art books, books about drawing,  books about anatomy, books about animations, D&D manuals. What you won't find there is any programming book. My only book kind of in this topic is Showstopper about development of windows NT on my kindle. Which is in the fact not programming book but more story of people who created it and I'm still in middle of reading it :)  The other book I reading is  "The Animator's Survival Kit: A Manual of Methods, Principles and Formulas for Classical, Computer, Games, Stop Motion and Internet Animators." which is for me really interesting. So far I finding there a lot of interesting advice which some even apply to programming. And this is weird because as programmer I probably should read some books in my field of work. But I don't fell any push into ...

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

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.

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

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