Sunday, July 31, 2011

NVIDIA and ATI

Few day ago I bought netbook with ATI Radeon graphic card. Before I always used cards from Nvidia and Intel. After day of installing tools to programming and profiling I ran for test L.B.A. Remake. And of course it didn't work. But after removing CUDA support that I needed to my thesis work, it started without problems.

But when app started i saw other problem: There were some weird stuff on my screen, they didn't look like they should. After two days of searching reason behind it I found that:

  • Nvidia allow more then it should. - I had invalid code (I probably write it very late in night because it was so stupid and when I saw it I thought how I could wrote it :] ). Code for each type of input to shaders (position, normals, texcoord0, ...) set glBufferData with size of all inputs and data set to NULL. On NVIDIA worked fine on ATI not.
  • NVIDIA and ATI have different bindings of Inputs - POSITION is always ATTR0 but other not. On end I decided on using in shaders defines with ATTRi that I bind for each type. I think that this will be safest and most efficient way.
  • Default value of input data -  if there is no binded input NVIDIA set input COLOR0 values on (1,1,1,1) but ATI use value (0,0,0,0).
There are probably other difference in them but right now I didn't found in working of program. If I find any then I share them.

On the end of work yesterday I was happy that I finally get hand on ATI card. Thanks to that I found some stupid code and for now I have hope that game will run on most of the graphics cards.

Friday, July 29, 2011

Why there is no next preview of LBA

I thought about adding new preview from around two weeks. I had very evil plan to create from it some kind of parody what I don't want to do. But I endure this thoughts and in final create it in somehow normal way. But get to the point.

What is happening ? Is project still exist is it grow ? And answers are yes and yes. Project is growing well but probably not the way that could be topic of full preview. Because how to show that I fixed system of object managing or extended mechanic of engine ? There is no way that I can do that.

Of course I could do like some other projects (how I hate post like that):

I could create on fast some sketch and put very detailed information what I will do in final release. I will write it but in some next post I probably would wrote other things about how this all would look. But who care ? I wrote my vision that changed in a  few weeks. But where project ?

I could make other movie about models I created but how long I can do that ? For each movie I should then create some good looking models which would take long time. Of course I could add post in each week: I created stone, I created sword, I created one pot. Of course all that without textures or in wip state from graphic program or put in editor from ready engine (i.e. UDK). You can find many post like that, I think that they are stupid. And when I see news like that I always close tab in my web browser or press button back.

In this place I will say that some groups do great thing publishing news where they show progress (not necessarily big i.e. Overgrowth or recruits in indiedb. I think that many groups should learn from them all.

And of course how could I forget to post that show the same scene as last 10 post but with minor changes. And say that the projects develops great (of course without showing any mechanics development).

I could do all that ore one of them but is boring to force myself to create something special for only such post. On the end I probably would change them to put in game or even recreate from scratches. I have of course some things that I could show but there would be no effect wow project grow in month. More then that it would be effect: again I show almost the same thing as last. And if you think about this as a few hours to put such a movie on you tube you will understand why I sometimes prefer to do something to game in this time.

On the end I will say that this post probably should have name: Which type of news in indie developing I hate the most or something like that. But I decided to connect it to previews topic because there weren't many post wrote about them from Preview 8.

Tuesday, July 26, 2011

The Humble Indie Bundle #3

This time short post for people that didn't know (like I) that run 3rd edition of action Humble Indie Bundle. Where you can get 5 Indie titles and in the same time support some charity foundations. More info on:



How this all works: Part 3

This time some more details about architecture of engine. First thing that I need to mention W.R.E. is not engine for L.B.A. project, I create tools that will be use in next productions. Because of that I take some decision that make it's structure more complicated but in the same time more flexible.

In this moment W.R.E. is based on four modules:
But as you see there is five elements :] Why ? Exe is only wrapper to game dll and do nothing else so I don't count it as module. Ok, so from begin:

  • W.R.E. - Is main part of engine it's managing window, taking care of rendering, physic, sounds, file, materials and things like that. 
  • Game Engine - It's the frame of game. Contain all templates for objects i.e. Models, Characters, Action objects. Other important function of this module is editor functionality.
  • Editor GUI - It's interface of editor based on Qt. It's mostly call function that are inside Game Engine.
  • Game - This is DLL so it could be simple connected to exe and editor. It's contain all definition of objects specific for game. 
As you can see when I will decide to create next production I will only change Game part and everything else will still be compatible with it. And this is one of my biggest goal in this structure. To be able quick create other game without rewriting everything.

In this place I don't know what to write more. Maybe you have some interesting thoughts about this structure or have even better in yours engine/game. If so share it, I will be glad to read it.

Saturday, July 16, 2011

How all this works: Part 2

In last post I wrote about how all this started. In this post I try to focus more on games and way of work on them.

Lba is not my first game I played. But it have very special place in my memory. I tried to finish it at last twice. At first I think that I was to young to understand this game. But second time I was in haven when I played it. And from long ago I thought about remake, there was "Lba Remake" now is "Little Script Adventure" and there was and will be many other groups that try to create remake of this game. But I think that way of how they do it is somehow wrong. So I decided to create my own remake.

I started to write games more than 11 years ago. This is one of many projects that I was developing in this time. On begin everything look quiet simple: you have some libraries and game and this is enough. What you need else to write "Noughts and Crosses", "Tetris" or simply plane on scrolling map (from right to left). But as time pass the construction of your games must change. First game that was pretty serious was "Tony The Rat":




In this project I used text file to define map, simple animation system, some scripts like files to talk and  other weird things. I still like this project very much and I plan to return to this idea later.

It's fun to write about old projects but this is not a post about projects I made. So lets do small postmortem.


What went right:

  • Team, in which I worked had 2-3 people. And on end I finished on lead position.
  • Idea, I think that this was one of my first game that have some idea behind it and it was not to ambitious on begin.
  • Technology:
    • Animation system (based on body parts) with some simple editor.
    • Graphics, as you see it was pretty good (project begin in 10.2000).
    • In one version there was riding a car in city.
What went wrong:
  • Work, it is easy to create game on your own but when there is more than one person there shows problems. Because others don't always have time when you do. So you prefer than do something yourself and problems multiply that way.
  • Team separate and on end I ended working alone.
  • Growing ambitions, when you develop game you have big desire to change some elements on better. And if you don't know when to stop sometimes you end rewriting everything from begin which don't help at all.
  • Growing locations. This was other problem, I didn't had technology to support what I wanted to do, and when I projected game I always wanted more. Now I would create game that I could create on engine I had. 
  • Not enough time and strengths. This is one of problem about which you always need remember, but then I didn't. Game started to grown, my ambitions to, so I changed technology and started to rewriting everything. And on end I had less then on begin so my motivation was smaller. And on end I decided that I'm to stupid to create such a big game.
So as you can see this didn't were so simple as it's look. But after that I begun some work on simple engine on my own. But then one of my friends invite me to work on New Dawn:



 I will not write too much about this game. It was big production on some point there were around 15 people in team. And of course I ended as leader of programer. So what I learned from this project:

  • Big team == big problems. There is always problem with communication in big teams. Especial when you talk by internet and don't have money behind you .
  • Never work on unfinished engine where you don't have sources or any good documentation. This can kill your work in the end.
  • This is not job and you don't need to see it this way. People work when they have time, not when you want. Because of that you don't have to put big expectation about amount of work they do.
  • Don't be too ambitious because on end it's hard to finish all your plans.
  • In cases somebody don't show to much progress, do things you plan yourself. Because on end you can spend long time on waiting to finished work.
  • Start work with smaller projects to "unite" the team and learn some ways to speed up developing of project.
  • Using the SVN and bug report system like Mantis is great things. You can add to it some wiki like service with details about game, later you can quicker find things you need.
Later begin my 5 year long developing of actual engine W.R.E. In next post I will try to covers in details how changed structure of engine and it's tools. I will try to find some of old projects I done on engine and talk about them. 

If you want's to read about some part of all post or you just don't agree with me. Just write and I will try to write about them in more details or discuss your opinion.


Saturday, July 2, 2011

How this all works: Part 1

This post will be beginning of series of posts about how L.B.A. remake is made. So lets starts with first part where I will try to talk about development of technology I use.

Game is based on home made engine w.r.e. that use OpenGL as rendering environment. In this moment everything is controlled by shaders wrote in Cg. 

But not always was this way, I started to write this engine five years ago on begin of study. In that time this was a merely 2D isometric game written in pure SDL. It was written on one of subjects and when I think about this now, earlier I wrote 10x better games. But it's was finished and from this everything starts. 

Some time later after talk with friend which is very good graphic we decided to create 2D game. We based it on modified code of earlier production but this wasn't enough. Pure SDL is too slow so we switch to OpenGL. This was big step because engine from simply software 2D engine changed to fast 2D engine with support of some 3D objects.

But came another semester and so another subjects and on one of them I decided to create support of physics to engine. In this time came another changes, now engine support mostly 3D with bullet as physics engine. But this was only begin.

On one of later seminary I get some kick in my ass from (now my friend) Kornel. And I think it's a great thing to get something like that, because in this moment I started seriously think what I done so far. I had some skills, knowledge about graphic and programing but I was still 10 years behind this what is really happening in real game scene. So at last, I added shaders support. Writing which wasn't on begin so easy but somehow I learned how this all works.

If you ever study or will study in Wrocław on WPPT. You will learn one thing, knowing programming language is nothing special. This is only tool, what is really important are algorithms and maths behind them. If you know them and understand you can write them in any programing language. And so thinking that way I read about visualization algorithms and I came to one conclusion: they are all pretty easy. All this thanks to knowledge I gain on all kinds of subjects.

And In this moment came L.B.A. remake. Thanks this game I started do developed real tools. I wrote editor and many others things to make my life easier or maybe not :] 

And why I spend so much space to write this all. There is not to much about how I wrote L.B.A. Remake and I know about this very good. But there are things that are shown here. I don't do all things that you see in week or even month. It's take long time, many hard and frustrating moments when you think about throwing this all and start doing something else. I had moments like this and I will have them in future but they are need to do next steps and gain experience which help in future.

And on end of this part I will write my own thought about creating games:
Writing games is fun as you can see in all talk with developers, but not always. This is only part of truth, there is other part when you write or do some things which are simply boring but needed to develop of project. And one more thing you can never stop in developing your knowledge and not only about programming or computers. There is math, physics, and other things that can help you very much, in writing good games.