Sarper Soher

Independent Game Developer

The Genius Game Programmer

Since I’ve started teaching myself programming in my early ages, I’ve always been impressed by people who are said to be gifted programmers with advanced thinking, people who are at some level of this art where we can never even dream to reach, they have a level of information and experience we can never achieve. The so called “Genius” programmers. Well let me tell you this, from my current perspective, I deeply believe that this is a lie that aspiring programmers tell out of frustration that’s happening as the outcome of lack of understanding of the concepts and aspects of programming.

Now looking back to the years when I was just entering the teenage era of my life, I had an older friend I’ve met through a Turkish game developers forum. He was also self taught programmer and I remember how he helped me greatly through Skype, giving me tutorials  and teaching me the basic stuff with C++. He also had a simple RPG game demo where you could run around in an environment that includes a heightmap terrain, MD2 models and a random rain generator with particles. I was so eager to make something that looks like a game and his tech demo was all I ever wanted to realize, my goal and dream. No need to mention that he was a god and a genius from my standpoint. Over the years, my knowledge and experience grew and as I acquire more skills with various engines and programming languages, my idols changed in time.

Lately, almost about for the last two years, I’ve become a man who loves to learn and experiment with stuff. With no expectation from learning, now I learn just to learn out of my passion for the art of our work. And it’s not just programming but also other disciplines about what we do, like modelling, texture painting, animation, sound effects etc.

I think I can say that finally I understand those people who come up with great ideas, great bright ideas that revolutionize the way we look at things, the way we interact with the development tools and the games themselves. Those people don’t have a special advanced way of thinking that is given to them by birth. There is no enhancement in their brains. They just love to work. They focus on what they love. They love to put the things they learn into practice and come out with the wonderful results that we look in awe and declare them Gods among us “ordinary programmers” who do the “code typing” that any programmer does.

Anyway, what I’m trying to tell you is, learn to love the act of learning. Love to develop yourself. Don’t just work on the tasks your lead or director or whoever gave you, the time is passing and every single bit of information you gain is a huge plus, a step to become a god for other lazy ass programmers who tell themselves the lies about the myth of “Genius Game Programmer”.

Texture Import Settings for GUI & 2D Games

I’ll try to describe the best import settings for GUI textures and 2D games in Unity3D. I’m assuming that you are familiar with the options in the texture import settings window and techniques like mip mapping and filtering modes etc .

If you would like to skip the long reading, here is a brief version;

  • Turn off Non Power of 2
  • Turn off Generate Mip Maps
  • Set the Wrap Mode to Clamp
  • Set the Filter Mode to Point
  • Set the Aniso Level to zero
  • Set the Max Size to something equal or greater than your texture

 

In most games, GUI textures have no perspective and we are using orthographic cameras to render them. Their distance to the camera never changes. So the first thing we should do is to get rid of the mip maps.

Mip mapping is a technique where it automatically generates smaller versions -in quarters of the texture for each mip to be exact unless you use anisotropic filtering- of the given texture to match the amount of pixels it will cover on the screen thus it can adjust the best mip level on the mapped 3D geometry based on the distance of the geometry to the camera. It is used because when you map a 1024 x 1024 texture on an object that covers only 20 pixels on a screen, no matter what type of filtering you use, it will have poor visual quality.

Another thing we should do is, if we are working on a project that will run on more advanced devices like a desktop PC with a dedicated GPU, is to turn off the Non Power of 2 option. Most of the current generation GPU’s support npot textures. If you are working on a project for iOS or Android then it’s not an option. What you can do there is, use a square canvas for your texture with an alpha mask for your gui item. While it’s the easiest solution, it’s not the best idea because you will run into fillrate problems with such transparent geometry especially if your gui covers most of your screen. You can model an outline of your gui item instead of using a plane there to minimize the transparent areas if you are having performance issues.

We should also change the Wrap Mode to Clamp so our texture will be clamped to the uv limits of our geometry. It solves the single pixel row/column of repeating texture problem.

Filter Mode should be set to Point, Bilinear mode interpolates the colors of the four nearest texels to the pixel center so while it solves most of the mapping problems like blockyness it results in a kind of blurry rendering. (Our source texture and the amount of pixels it will cover on the screen should be equal so we won’t have any problems that bilinear filtering solves) And Trilinear filtering is just a technique where additional mips are generated between the default mip levels to remedy the problem where it is possible to see the quality change when the mip levels are changed from one to another. Point mode doesn’t apply any interpolation and if we did create our art assets in the pixel values they will cover on the screen, they should render crystal clear.

You can set the Aniso Level to zero if you are going to use anything other than Point filtering. Anisotropic filtering generates additional mip levels in rectangular or trapezoidal format to be used when the applied geometry is rendered from oblique angles. Imagine you are mapping a square texture to a rectangular geometry like a road. As we are using non mipmapped textures here, we don’t need anisotropic filtering. (It also makes me wonder why this option is still active after turning off mipmapping, any ideas? It obviously has something to do with Bilinear and Trilinear filtering. Let me know with a comment please!)

And finally Max Size should be set to something where it is equal or greater than our source texture’s dimensions.

So above information applies to all 2D game GUI and all the textures in a 2D game where the camera is orthographic and it’s distance is fixed. Hope it helps, and let me know if I have any misinformation there so I can learn and also edit the post!

My Little Gizmos

Lately I’ve purchased some stuff to increase the quality of the time I spend on my computer. Here, I’ll list them with small reviews from my experience.

Logitech Wireless Keyboard K360

I used to have an A4Tech G800-MU gamer keyboard. If you ever saw or had one of those, it’s a huge keyboard. So it was really painful for me to reach out for the mouse while it was occupying a big portion of my desk. So I was looking to purchase a compact, easy to type on keyboard. I’ve heard of the quality of Logitech products (never bought one before) and saw this one online. I’ve been using it for like 3 months now. While it gives me a bit pain after a long coding session because of it’s such small size (My wrists stay close all the time, applies a bit of stress on them), overall it’s a very nice keyboard. Allows you to type quite fast, the keys are not too soft and not too stiff either. It’s wireless and comes with a Unifying receiver which allows you to connect 6 logitech products to your computer. And it’s not that easy to pollute it due to the enclosed key spacing, finally a keyboard where I don’t try to clean with a pressured air spray so often.

Logitech Performance MX Mouse

This is the best mouse I’ve ever used. The only disadvantage I would say is the battery life. It lasts for at most 2 days of use. But it comes with an adapter to charge from either a usb port or from a power outlet so you can plug it in and use it with the cable until it’s fully charged. It also comes with a Unifying receiver, wireless, and allows up to 1500 dpi. Sculpted to fit a hand perfectly, has 4 customizable keys (one does the OS X’s Exposé on Windows 7, I love it) and a mechanical scrollwheel with two modes. Oh and one more thing, I think the middle mouse button (the wheel) is not very sensitive for clicks, just my opinion though.

Wacom Bamboo Pen

I’m not by any means qualified to review a graphics tablet yet. I bought it as a cheap option when I wanted to start the digital texture painting. It has been great so far for handpainting but the latest drivers have many problems (at a point where it will render your tablet unresponsive) so if you plan to get one of these, be sure to use an older driver from the official Wacom website.

Creative WP-350 Wireless Headset

Even though it’s shown as a big pair of headphones that cover your ears in the promotional images in Creative’s website, it’s a tiny one. Doesn’t cover your ears at all, but fits and sits nicely on them. It has it’s own internal battery and you can charge it with a standart usb cable that comes with it. A full charge lasts for 8 hours or so and an empty battery gets fully charged in about an hour. It doesn’t come with a receiver which is a bummer so you have to buy a seperate Bluetooth 2.1 receiver. The sound quality is satisfying but once you turn on the built-in microphone, it sucks and it sucks big time. It’s worse than an old cellphone. Maybe it’s just my receiver I don’t know but I hardly understand anyone when I’m on Skype and they tell that they hear me as I’m shouting from another room. But overall I like it for it’s lightweight, and the buttons on the right piece that allows you to play/pause skip the media you are playing. And the wireless technology that lets you listen your favorite song even when you are in the toilet :) And a final note, it’s great for office environments as it doesn’t give out a single piece of sound even when in full volume, which is quite high.

29th of February

My birthday is coming up! Who would like to buy me this baby? :)

2012 Goals

In 2012 I will,

  • Learn a ton of stuff, improve on the stuff I already know (I love learning more than ever, like the song “practice IS perfect”),
  • Ship at least 2 titles for various platforms,
  • Become one man studio by doing everything in a game by myself, including art, coding and everything else in between
  • Become a C# guru
  • Release a ton of new stuff on the Unity Asset Store and generate a steady income
  • Keep on doing the body building exercises every other day
  • Write more technical posts here about my development experiences and rant about Unity and programming in general
  • Move to a nicer house in a less frantic neighbourhood
  • Keep on eating healthy

That seems to be about it. I’ll keep updating this post if something comes to my mind. We’ll see how much of these I’ll achieve by December this year.

2011 Review

I’ll keep this post short as I didn’t have any goals laid out for 2011.  Here are some rather significant events happened in my life in 2011.

  • Found KillScreen Games
  • Moved from Istanbul to Eskisehir and started working at Ark Game Studios as a programmer
  • Became Lead Programmer at Ark Game Studios
  • Attended GDC Europe 2011 and Gamescom 2011
  • Released Touch Diver for iOS, a goalkeeper game by KillScreen.
  • Submitted Physis to Kongregate Unity Competition, didn’t win anything, but learned a lot from feedback
  • Generated an acceptable income from Unity Asset Store with couple of game starter packs
  • Migrated from Unity Script to C#, and I’m glad I did
  • Had my appendix removed due to appendicitis (ouch!)
  • Started digital texture painting which has been a blast so far, I loved it
  • Learned a ton of new stuff by experiencing, reading and from my colleagues.
  • Bought some toys, mostly cheap stuff but I’m very glad I did. My Bamboo Pen tablet, Logitech K360 keyboard, Creative WP350 headphones and all the other gizmos, all well worth the money
  • Never did much workout, I regret it highly

So, overall it wasn’t a bad year business-wise. But I should work harder to stay healthy. I’ll definitely come up with some goals for 2012 in the next post.

 

Happy Christmas by the way, for all you celebrate it!

Art and Engineering

For the last month or so, I’ve been enjoying doing some hand painting textures. By all means I’m a newbie but I’ve been wanting to get into it for a long time and I was intimidated by people telling me that it’s hard work and I really should get a serious art education even before I lay my hands on a digital tablet. In the end I said “What the hell? I can get the cheapest Wacom on the market and try it!”

I bought a Wacom CTL-460 Bamboo Pen and  since than I’m casually working on some random textures without using any Photoshop tricks, just pure painting. It’s really fun and not all that impossible or tiresomely difficult. I admit, I got some help from 3D Motive ‘s lovely tutorial series at start and it helped me develop the very VERY basic skills to get me started. Highly recommended.

What I love about painting textures so far is, there is always more space for improvements when you are working on something. Nothing is final and absolute unlike programming. And that’s where the engineering part I mentioned in the title comes in. In programming, you can always improve your code, optimize it, make it more readable, make it work faster etc. but there is an end to it, opinions doesn’t matter much in the engineering department. If it works the way it should in the most optimized and efficient way, that’s it.

But painting and art in general is a different story. The style and opinions always differ and makes the work better or worse all the time. I’ve been doing some stuff for the sake of improving the texture and end up screwing things but then again while I was thinking it looks like shit all of a sudden a couple additions made it better in the end.

So I love both coding and painting, I love the satisfaction of writing a clean, optimized code that works like a clock and I like the mystery of art, not exactly knowing how it will end up and ability to continuously improve the thing I’m working on. In my opinion it’s important to develop both perspectives.

By the way, there is a ton of stuff I want to improve myself on, the things that I keep in a list over here, things like Shader programming (Which I’ve found a nice vid tutorial series on lately, check it out!), math, network programming, etc. Anyway, I better get back to work, so much to do, so little time…

Cheers!

Sarper

Tree Trunk

I’ve made a quick model, a tree trunk to use as a weapon in a project I’m planning to work on after Physis. It took me about 2 hours from start to finish, remember I’m a programmer :) I’ve used Cinema 4D and Mudbox. It’s 202 tris with 1024 x 1024 normal and diffuse maps. Screenshots are directly from Unity3D. Hope you like it!

Trunk

Appendicitis and Physis…

I had the Appendicitis operation last week. Oh boy, whatever they say the recovery process is painful. I can actually sit in front of a computer just now after almost a full week. It is the biggest health problem I’ve faced in my life, and not being able to get out of the bed by myself have taught me something. Even the easiest of tasks like getting out of the bed or wearing a pair of socks -hell even farting- are the hardest stuff to get done if you are recovering from an operation. So now I’m thinking, lazyness is an illusion, a sickness. As long as I’m in good health, I will never postpone simple tasks day after day. I will always clean the dishes after I eat, make my bed when I wake up, brush my teeth before I go to bed etc.

I’ve also just realised this morning, I’ve missed working on Physis so I did some pretty awesome additions today. I’ve optimized and cleaned the old scripts (man, this always happens but “6 months earlier Sarper” sucks as a programmer!), added fade-in/out effects for the main menu transitions and player respawn, renewed the lame credits screen and worked on the mid-air controls, re-wrote the player shaders, I even modelled my very own “quad” and UV-mapped it :) Let’s hope I can sustain this level of productivity and with my appendix they’ve also removed everything that was lazy about me!

10 Seconds Fame

I’m in GDC Europe right now and a friend of mine already stumbled upon a random video shot by a random guy over there. I’m the short guy chatting with Tom Higgins about how awesome that application is (and if the flash export is coming, answer is not in the near future).