• Content count

  • Joined

  • Last visited

Community Reputation

254 Neutral

About Lithander

  • Rank
  1. How to "smooth" a path

    Here's another easy but very natural looking solution. The trick is to not smooth the path but to follow it in a smooth manner.   1.) Get the position on the (unsmoothed) path that is closest to your character. 2.) Starting from that position move along the path towards the goal by a small distance to get the target position. (1m works well for humans) 3.) Let your character approach that target position. 4.) Next frame when the characters position has changed repeat with step 1.   The smoothness of the resulting path depends on your agents agilty and the ahead distance but it's usually very natural and easy to tweak.
  2. Stop worrying about your career for now an make games. Try to get some friends on board to play your games or even help with the development - that will make it a lot more fun. Fun is important, helps you maintain the spirit to become really good at something and being really good at something is your best bet at making people want to pay you for working for them. There are other factors like being someone that people want to work with and have around, but having a couple of successful projects under your belt is a real confidence booster, so it helps with that too. So yeah, the next step on your career path is definitely to continue what you've been doing: Make stuff.   That said: you're 14. You're in the fortunate position that you can do what the fuck you want in your considerable amount of spare time without having to think about real life shit like careers and degrees earning money and stuff. Try to enjoy that time, will you? If making games is what you enjoy most then do that, but don't do it for your career. If you're still making games when the time comes to decide what you want to study you'll be able more qualified to answer questions like "What job in the games industry will I be best at?" then we are now.   Here's a book you might enjoy:
  3. potatoe

      Agreed. Unity devs, we're looking at you! :P
  4. potatoe

    Real-Life Anecdote: Just last week I've been hunting a very strange and hard-to-reproduce bug. When testers were playing our game for several hours the heads of our characters would sometimes disappear. Loading a savegame would help but eventually another head got lost, more and more frequently until the game was virtually unplayable.   We had a lot of wild theories involving summer heat and general bad karma but the actual reason was that the fact discussed in this thread: that floating point precision degrades with larger numbers. Every frame we would record some sample data, storing the current value and the seconds since startup as a float. Later we would evaluate these samples in the following fashion: take consecutive samples, calculate the time difference beween them and do some calculations with that delta time. Now for some odd reasons every couple of seconds there are frames where the deltaTime calculated by the engine was claimed to be only 2-4ms instead of the usual 16ms you should expect when rendering with 60hz. Add that small delta to the accumulated time and when the value you add to is big enough then - surprise - the accumulated time doesn't change anymore. The reason is of course that the next bigger float is actually farther away from the result of the addition then the current value. So our code would later calculate a delta time between consequitive samples of zero. A value divided by zero yields infinity. Some steps later we'd end up with a quaternion containing NANs and that quaternion happened to be the neck bone of our characters. Bam... head's blown off!    I found this applet incredibly helpful to understand the details of the problems: Just toggle the last bit of the mantisse to see what the difference between representable numbers are at different values.
  5. C# for Noobs

      Most games these days are made using a game engine (Examples: Gamemaker, Unity or Unreal Engine) and as a rule of thumb you can expect the game engine to be written in C++ whereas the users use a scripting language that might be everything BUT C++. So I'd suggest to stay clear of C++ as a noob and start with C# which is a very modern, fast (both in terms of compile times and execution) and elegant language. If you work on Windows then the development environment of choice for both C# and C++ is Visual Studio. It's telling that Visual Studio does a lot better at providing code completion and runtime debugging services for C# then for C++. Iterations happen a lot faster too. This makes so much of a difference that coding C# is just a lot more FUN then C++ nowadays.   My 2cents.
  6. Turn Based AI Technics

      Any reading suggestions to get a quick overview how utility based systems differ from behaviour trees with "smart" metric-driven transitions?
  7.   Actually gradients, outlines, shadows etc can be quite easily added to distance field fonts by writing a custom shader.   Here's a screenshot from the opening credits in our current project. The text rendering is based on a single 1024x512 sized distance map containing about 120 glyphs.   Click for the unscaled image: [sharedmedia=gallery:images:5480]
  8. Stuff

  9. bout2 text rendering

    From the album Stuff

  10.   The addiction to high fidelity becomes a limiting factor of it’s own. All that high quality content is very expensive to make. Development of a AAA title keeps large teams of specialists busy for years. Millions of investments are at stake in a hit-driven business. Smart money looks for franchise potential. An environment like that doesn’t promote taking chances. Worse, for the sake of quality you rely on content that is very inflexible. Static level geometry, baked lighting, hours of canned animations, hand-animated or performed by human actors, thousands of lines of text has to be voice-acted, too. Don’t forget the lip syncing! In a fierce competition you can’t afford the player to miss out on millions worth of content just ’cause you want to provide some room for meaningful decisions. So the real challenge is to fake the player into believing he’s in control, when in truth every turn of events has been carefully planned and scripted to maximise asset-use. Interaction is predetermined or insignificant.   There’s always a balance to maintain between player and authorial control. If movie-like aesthetics is your goal the current approach makes sense but let’s not forget that photo realism isn’t required to create immersion. Our mind is capable of forming a mental concept of things not actually present. Media is engaging the recipient on a creative and emotional level by guiding his imagination. On the surface books offer only language encoded in little symbols but the story that unfolds is not constrained by that. In comic books the action takes place between the frames. Our mind provides closure to missing elements. We build an internal model of the fictional world based on the input we receive. As long as we can interpret and integrate it effortlessly the degree of abstraction does not matter. But all parts of a piece of fiction have to fall into place or immersion is broken. Of course there’s room for surprises but they have to make sense in hindsight. What happens has to accord to the laws of the imaginary, second world. The moment disbelief arises, the spell is broken, and you’re back in the primary world. In modern video games, the contrast of pseudo-realism and the emptiness behind it’s surface makes suspension of disbelief hard to maintain. Welcome to Uncanny Valley!   (This is from a rant that I wrote a while ago but I think it fits this discussion, so excuse me for not trying to reword it)
  11. HLSL Bump Mapping Problem (Solved)

    The problem would be easier to solve if you could upload a sample where we can make changes to the shader and immediately see the results. I just changed the existing code to use tanget and binormal, but what stainless points out looks odd indeed. Probably there are multiple issues that influence each other.
  12. Stuck in a rut, need some advice!

    I'd get rid of your current job and look for a position that fits your education even if it's not in the game industry. Your current job suggests to potential employers that you might not be a good software engineer because there aren't many reasonable explanation why anyone with a master degree in software engineering would be stuck selling phones. (at least not in my country in the current economical situation)
  13. OpenGL will you buy this?

    Wouldn't buy it. Why don't you offer it for free? Establish a user base first, worry about monetarization second. If I were you I'd even open source it, then earn some cash by providing "premium support" or some such. That's a proven model.
  14. Turn Based AI Technics

    I recently wrote an AI system for a turn based game called Battle Worlds : Kronos and neither Neural Networks nor building and searching of a game tree in the classical sense had a part in the solution. Neural networks are interesting but hard to control and debug. If the AI behaves in an un-intended way you can't just step into the code and change it because the workings of a NN is opaque even to the developer. Game trees are a nice idea but in their raw form impractical for complex games. Even with chess they hit their limits fast.   My solution builds upon the concept of intelligent agents that use a behavior tree of possible actions. Each unit is controlled by an agent and grouped in squads, squads help units sync their actions. In the scope of one-squad and one-turn it is possible to build a tree of possible actions and search for the optimal path. The strategic behavior of the AI is mostly scripted.
  15. HLSL Bump Mapping Problem (Solved)

    Try this: float3 GetBump(Pixel input) {  float3 N = normalize(input.Normal);  // Calculate the size of a single pixel in the bump texture.  float2 bumpTextureSize;  BumpTexture.GetDimensions(bumpTextureSize[0], bumpTextureSize[1]);  float2 pixelSize = 1.0f / bumpTextureSize;  float2 uv = UVTransform(input.UV, BumpTextureScale, BumpTextureRotate, BumpTextureTranslate);  // Get the height value of this pixel.  float3 mid = BumpTexture.Sample(TrilinearSampler, uv).r;  // Get the height values of all neighbouring pixels.  float left = BumpTexture.Sample(TrilinearSampler, uv + float2(-pixelSize.x, 0)).r;  float right = BumpTexture.Sample(TrilinearSampler, uv + float2(pixelSize.x, 0)).r;  float top = BumpTexture.Sample(TrilinearSampler, uv + float2(0, -pixelSize.y)).r;  float bottom = BumpTexture.Sample(TrilinearSampler, uv + float2(0, pixelSize.y)).r;  // Calculate the amount of height difference.  float3 p1 = ((bottom - mid) - (top - mid)) * normalize(input.Binormal);  float3 p2 = ((left - mid) - (right - mid)) * normalize(input.Tangent);  // Calculate the final offset to add to the normal.  float3 No = (p1 + p2) * -BumpDepth;  // Add the offset to the normal and normalize it.  float3 Nn = normalize(N + No);  return Nn; }