Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 04 Dec 2001
Offline Last Active Jan 16 2014 07:47 PM

#5110826 So frustrated - damn those interviews!

Posted by on 20 November 2013 - 02:25 PM

You seem to be finally realizing that job interviewing in the IT industry is a completely separate skill. Totally unrelated to the technical prowess you possess.



Since it's a skill, this means you can get better at it. You just need to work on it (as on any other skill).


As you already figured out, sitting in your chair at work, writing the code in your IDE, under the daily routine (coffee + music) is anything but even remotely comparable to the stress of having to "code" while standing in front of the person you never saw before, on the paperboard using a highlighter (or pen&paper).


It's great you realized something is wrong and it's even better that you figured it out while still having the old job. Trust me, you don't want to find that out when you're out of the job and doing the interviews (and waiting days/weeks till they schedule another round).


Now, I recommend doing a search and spending an evening or two with researching for what kind of questions are usually given at interviews (or just grab a book - plenty of those out there).

Then, grab a piece of paper and a pencil, and start coding on a paper. No IDE. No google. No music and no coffee.

This may take anywhere between 10-40 hrs of raw hand-writing, but you will get better at it.


What was the last time you spent a full hour writing just using your hand ? I found out my hand hurts like hell. Better to be prepared for things like that, than figuring them out when being stressed out at the IW.



Now, coding on paper is still way, way easier than on a big board with the highlighter. On a paper, you see easily 20-50 lines of a code. Not so much on a big board, where you gotta use bigger letters so that the interviewer can see it from distance.

There's no delete / enter on a paper with a highlighter.  It truly sucks doing a typo during an interview, but you just gotta embrace the feeling and go with it, completely ignoring it.



To improve the skill further, there must be someone in your room, could be from your family or a friend. It's ok they don't know sh*t about IT. During an interview, you will be given lots of "why" questions  anyway, so it's best to be prepared to be constantly interrupted, while you're trying to figure out how to insert a damn line between two lines already written on the big board.




10 months ago, when I was changing jobs, I did insane amount of interviewing (it's practically like two full-time jobs) and had a chance to really up the skills of interviewing, since some companies had 5-8 rounds of technical phone/online/on-site interviews.



In this world, no one really cares if you have the skills. But can you sell the skills you don't even have ? That's what really matters, regardless how crazy it sounds at first...

#5065877 [FFP] Lighting for terrain so dull (dark)

Posted by on 29 May 2013 - 11:53 AM

It used to be - about 7-10 yrs ago - that you could say that if your computer cannot run the game, you are probably not a target market.


These days, when even cheapest of laptops ship with SM 2.0 cards, the only PCs you can find that can't run SM 2.0 are the ones that are kept as second/third computer at home - which means that in that household is still at least 1 computer able to run it.



I do, however, understand, your unwillingness to learn the shaders. They are not really that straightforward and debugging them is, by default, PITA - especially compared to FFP.


Long-term, you can't avoid shaders, really.

#5064177 [FFP] Lighting for terrain so dull (dark)

Posted by on 23 May 2013 - 09:49 AM

You seem to want to get a high-contrast lighting. It is entirely possible to achieve using just FFP.


This is one of the best attempts of mine from the old days of DX 8 to achieve this goal:

I had:

- Shadows (prebaked in lightmap)

- Regular Diffuse + Ambient light

- High-intensity highlights for triangles under certain angle

- Material map blended with procedurally generated texture map





Obviously, I don't remember the exact combination of the TSS after all these years, but I remember very clearly that I had to use MULTIPLY_2X AND MULTIPLY_4X to achieve this, in combination with one of those states that let you specify if you want to saturate the result or clamp it.


Of course, if you already have a lot of (1.0f,1.0f,1.0f) colors in your base texture map, that is not going to get you anywhere, since no matter how you mulitply the 1.0f, you will still get 1.0f at most.


Thus, the trick is to make the majority of the scene darker, so that only certain parts get brighter - in my case, I wanted to achieve the dynamic light with the time-of-day feature, thus the terrain was dynamically lighted throughout whole day with varied direction of the light.


It is a lot of tweaking, though. You need to be able to dynamically, at run-time, change the intensity of Directional and Ambient RGB, either through key shortcuts or some UI.


It does take few hrs to come with the final look, but it is totally worth it.



To summarize, you need:

- A profile system where you keep good combinations in a code so that you don't have to spend half an hour to figure the best combination you had working 5 minutes ago. Copy/paste the combination into a separate codepath as soon as it looks good enough ( so that later you can choose between the best ones).

- Screenshot system, where you grab screens and compare different combinations of all parameters (texture, diff, ambient, TSS ColorOp)

- Base terrain texture in at least 6 different levels of Brightness / Contrast : Texture_10, Texture_30, Texture_50, Texture_65, Texture_80, Texture_100 (that you can switch between at runtime upon a keypress). I can change the texture by pressing 'T' at runtime and can see right away which brightness is best this way right away

- TSS ColorOp change upon a keypress (from ALL possible ones - see DX Docs)


When you have the system above, then all it takes is just few keypresses and you can come up with some pretty nice combinations.


#5063895 Career advice

Posted by on 22 May 2013 - 11:13 AM

as i've heard there's a demand for qualified software engineers

Oh, I must have missed that part in my previous post.


If you haven't spent last 7-10 yrs programming in your free time already, your heart is not at the right place for gamedev, thus you will find the gamedev as the worst possible fit.


Just go and choose some other area - Java, .NET, ...


GameDev is the worst possible SW area where you go to "earn money due to demand"...

#5063890 Career advice

Posted by on 22 May 2013 - 11:04 AM

in my free time i'd like to work on small game projects of my own throughout the whole thing, then perhaps one day become self sufficient, or use work history/qualifications/personal projects to break into the games industry

This is fantastic if you really plan to break into the gamedev.


It's not so fantastic, if you'd try to use that experience for some regular, 9-5,  SW programming job. Actually, gamedev exp might hurt you, since many interviewers (totally irrespective of how senior they really are in whichever language) will look at games programming as something totally inferior and "too easy", just because they don't know any better ("it's just a stupid game. It can't possibly be harder than some SQL!", "3D Engine ? I could write a 3D engine in less than a week, if I really wanted !", and so on ) .


I've done a lot of Interviews in my life, but the only time the interviewer really acknowledged the off-line / free-time gamedev coding results was when I applied to a 3D gfx / gamedev job.


In majority of other cases I used to get replies like those few above, plus "Well, it may be nice that you programmed 3d engine, toolset and several games by yourself, but that does not really say anything about your technical abilities. Can you tell me how to optimize this SQL query ? How many golf balls fit into  787 ?".


For these kinds of jobs, it's better to spend half of a weekend doing some quick/simple App with a lot of "hard business logic" smile.png


Now, I understand that at this time you can't possibly imagine not wanting to be in gamedev industry , but try and take a look into the turn-over rates (and the reasons) in gamedev....

#5062595 reuse 3d primitives

Posted by on 17 May 2013 - 09:05 AM

I successfully drew a 50x50 area one cube high. FPS is at a whopping 11 -.- so I obviously did something very wrong lol

I don't think so. This is your first working version that is doing something that you wanted. Do not ever delete it or break it. You will break the functionality plenty times later - but it is very important that you have something working anytime you need to go back and figure out how you did it last time.



Easiest way to do it, is just to copy paste the current render method into another (say, named "Render2 () ) and keep messing with the new one.



Now, to address the performance, let's check the most obvious issues first:

1. Check that you only bind the VB/IB every frame (not recreate VB/IB every frame).


2. What is the number of draw calls ? 50x50x1 would imply 2,500 draw calls - which is a lot, for sure. Can you try 10x10, 20x20 and post the framerate ?

The first thing to do here, is to create a version where you have all cubes in a single VB / IB and render that in one Draw call - and post the framerate then.

#5062359 What render engine/framework to use for development and extension?

Posted by on 16 May 2013 - 01:52 PM

You could grab an SDK from Unreal Engine or CryEngine (the free ones, under an indie license) and as an added bonus you would have a lot of very AAA art assets to test it on.


I'm not sure, though , if it is a good idea to skip the basics of the rendering and jump right into the lighting equation of the participating media - those are some pretty hardcore papers.

Perhaps you already have that low-level experience - just not in the form of the engine you wrote for yourself (e.g. at work) ?


I'm sure you will find lots of plugins and info on Blender - that gets mentioned every other day or so over the forums. Houdini - way less, though.

#5062277 Massive memory leak

Posted by on 16 May 2013 - 07:42 AM

Should a massive memory leak always be obvious to detect?

Absolutely. I take it you check the memory footprint in Task manager. There's no way you could miss a massive leak this way.


Then again, your definition of massive leak may differ from mine...



Are the leaks necessarily linked to "new" usage or should I look somewhere else too?

In gamedev there are two major types of leaks - Memory Leaks and Resource leaks, which are caused by unreleased graphics resources (e.g. textures, RTs, VB / IB, ...). Those are best checked by DirectX debug runtime (change the setting in Control Panel and enjoy hundreds of colorful messages in Output pane of Visual Studio).



Also, if you are not using Smart Pointers and are still trying to match new/delete, there's nothing better than the experience of rolling out your own _NEW, _DELETE and going through the logs and matching it all.


Usually, that exercise alone is enough to persuade one it's really time to move to Smart Pointers smile.png

#5061816 Super slow compiling?

Posted by on 14 May 2013 - 11:02 AM

To rule out any other potential SW, are you running only the Visual Studio or are there other apps (FireFox, Outlook, Photoshop, 3dsmax, ...) ?


I am asking since many years ago I suddenly experienced a very weird, regular (every 2 seconds) FPS dropdown in my 3D engine and spent 2 days profiling.


Turned out, it wasn't really my 3D engine but the FireFox [running in backgr] update that forced a CPU spike every 2 seconds. But since I've had the same set of tabs open for few months I didn't realize it until after one restart I chose not to run FireFox and the CPU spikes suddenly stopped.


It was an unfortunate coincidence that I was exactly in the middle of implementing A*, so my first hunch was that it's the A* causing the CPU spikes.



I'd try running just Visual Studio [for few days] to make sure it's not some other background app/process...

#5061783 c#

Posted by on 14 May 2013 - 08:10 AM

It does not really matter if it is a version older or not.


Trust me - by the time you become an expert on all the obscure nuances of both the language and framework (without having to consult the stackoverflow or MSDN), there will be at least one new version out there.


If you think you can learn one version/language and be done with it, you are in the wrong industry.



It's a constant - lifelong -  learning experience.

#5061779 having a hard time learning C++

Posted by on 14 May 2013 - 07:53 AM

I'm surprised nobody mentioned The Famous C++ FAQ - http://www.parashift.com/c++-faq/


Over the years, I fond it to be an invaluable resource to refresh the knowledge (before an Interview) and connect all dots - with only a few lines/paragraphs of text (instead of 10 pages in some book).


Once you can answer all those questions, it will mean that you understand the design and implementation of the language, and you will be a master of C++  - of course, for that level of knowledge, you will need to go through many books - Design Patterns, STL, Template Metaprogramming, ...


I'm not sure I'd recommend Bruce Eckel's Thinking in C++ at this early stage, though. It's a pretty heavy read that is best to enjoy once you have a basic grasp on the most basic low-level C++ concepts like pointers, virtual methods and templates (and no, Java exp. doesn't really count here).


And that's before we even touch the subject of C++11....

#5061774 Super slow compiling?

Posted by on 14 May 2013 - 07:34 AM

1. The most common problem that causes delays in compiling is your swap file. If you opened lots of programs after your last restart, and swap file got bigger few times, then anything you do will take exponentially longer (not just compiling) - it's simply an OS feature.


2. Also, compiling might coincide with some other heavy process/service being run (e.g. stuff like Indexing service or any other).


3. This is C++

#5061173 How to draw enemy death animation if its collision is valid

Posted by on 11 May 2013 - 05:29 PM

You definitely need two separates states in your FiniteStateMachine:


enum EnemyState



The Logic to make sure you handle the switch to Dying status just once (even if the laser will be on screen few more seconds):


if (Is_There_Collision_Of_Laser_With_Enemy ())
  if ((EnemyStatus !=Dying) && (EnemyStatus != Dead))
    EnemyStatus = stDying;
    Start_Dying_Animation (Time_Of_Current_Frame, Length_Of_Dying_Animation)




Now you need to switch from Dying to Dead, when Dying animation is over in the place where you handle the states:


if (EnemyStatus == Dying)
  if (Time_Of_Current_Frame >= Time_End_Of_Dying_Animation)
    EnemyStatus = Dead;



#5061163 Voxel-Engine | OpenGL + C++

Posted by on 11 May 2013 - 04:39 PM

If you want to use only OpenGL 1, you'll end up with a ... 1995 looking game... well

..well that's still not as bad as, say, Minecraft.


Few, pre-shader games of yesterday:





Quality Art Assets (if you can afford them) can go a really long way even on old tech...

#5061160 Voxel-Engine | OpenGL + C++

Posted by on 11 May 2013 - 04:25 PM

EDIT: We're not / won't be using STL!

Congratulations on this sound business decision ! If you are paid by the hour, you will certainly get rich !