Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Sacaldur

Member Since 25 Mar 2013
Offline Last Active Yesterday, 07:32 AM

Posts I've Made

In Topic: what is best way to check a code is more effiecient and runs faster than others

30 June 2015 - 02:54 AM

By "i work with it as unity script" you mean you're using C# as scripting language in Unity, right? "UnityScript" is what the guys behind Unity call "JavaScript", without actually being JavaScript.
Then you should just take a look at the Unity Profiler first. I guess it's available for free, now that Unity 5 contains all engine features in the "personal edition" (in the free version).
Including any other profilers could be troublesome, since you don't have a Visual Studio solution to run the entire code yourself.

In Topic: If-else coding style

30 June 2015 - 01:25 AM

I prefer to handle the regular/good case in any kind of code first, and exceptions afterwards. So I'd do
return isValidCondition ? value : null;
instead of
return !isValidCondition ? null : value
I also know some people who do handle exceptions and break conditions first, and they write code like
foreach (MyType value in values) {
    
    if (!handleValueCondition) {
        continue;
    }
    
    //
    // doing stuff with the value
    // .
    // .
    // .
    //
}
On the other hand, I never omit braces for if and else (given a proper indentation, it's less about readybility, but more about not having to place them as soon as more code is required), and I always place an else, if possible. As an example, the code you currently use would be more like
SomeType result;
if (somecondition) {
    result = something;
} else {
    result = null;
}
return result;
(Don't get me wrong, I still prefer the initial solution or the solution including the ternary operator, depending on the complexity of the condition and the calculation.)


And in my opinion, when I look at the content of a method or a property, I first want to know what it's doing, and not what it's not doing. If you have many conditions for execution (or the other way around: if you have to many break conditinos), your code is just "complex" and you're probably better off simplifieng it, instead of hiding the complexity.

And you really should name properties the same way as vairables - without a preceding "Get".

In Topic: Setting up a basic engine: Rendering + Physics

26 June 2015 - 04:51 AM

1. How many of the big engine developing companies (the guys behind Unity, Unreal Engine, Source Engine, Havoc, PhysX, and so on) went bankrupt, or suddenly changed their terms and conditions to the worse? For all I know, using their engines got even cheaper over time with much less restrictions.

2. I don't think I need to be able to implement an optimized physics engine in order to use it - no matter whether I'm using it directly or my engine already includes it. Don't get me wrong: having knowledge about how it is implemented is beneficial, but you certainly don't need to implement it yourself. (And by the way: what's a "complex game" in your opinion?)

3. What is flexibility? In almost any good engine, the limits you have are fairly small. Even if an engine doesn't support you with certain aspects of your game (voxel handling), you're still able to implement it yourself. Why games are crappy is not only a matter of opinion, but there are many things involved. And engines are not even a minor reason. A good developer chooses his tools (engine or custom stuff) based on the design, not the other way around.

4. Many times the GPU is the bottleneck for your games, at least that's true - even though it depends on the implementation of the game. But in order to make things look good, you need people to make good looking assets (models, textures, shaders, animations, and so on). Since many programmers aren't good at creating these assets, the statement "It's not hard to make things look good" is just not right, even if the programmer could implement the entire rendering system. (And a genius can do things in more efficient ways, or just much faster.)

5. I already met many people who used Unity, and I can't remember anyone of them to "change Unity" in some way, or to switch to a selfmade "engine" entirely, just for a single game.


Maybe you just used the wrong tools? The reason for using already existing tools and libraries is to reduce the required workload to finish a game. At least in the real business, it's all about making games, not about making engines. Why should you e. g. write your own physics engine instead of using already existing ones? Why wasting hundreds of hours instead of a fraction for tweaking the physics values?

In Topic: OOP: calling overridden method C#

23 June 2015 - 07:19 AM

You should, whenever possible, assign the required GameObject instead of searching for it in the scene. This way, some one else could see the dependency in the inspector, since you have to assign the GameObject. (And it should be faster this way.)
If it's not possible (the GameObjects are in difference Scenes), you should make the GameObjet's name editable through the inspector.

Besides that: why are you using Keycodes? You can use the Axes of the input system as buttons as well, and you should do so.
Furthermore you check for inputs in the "Player" and in the "SpartanKing" Component, with the Player forwarding the informations to the PlayerShape (and thus to the SpartanKing). Only one of them should handle the input. (So you would only need to replace the "Player-Input"-Component by a "AI-Input"-Component.)

In Topic: Salary expectations when relocating to other countries

02 June 2015 - 02:48 AM

The location within Germany is very important. The difference in salaries e. g. between Berlin and Bavaria is huge, since the costs of living (like rents) are different.
I don't know in which city the company is located, but it's very likely one of Berlin, Hamburg, and Munich. You could try to find some informations about average salaries in different regions, or try to estimate what you'd need based on your future expenses (rents, public transportation, ...). If you can't find any numbers for gamedev related positions, you could still take a look at other IT jobs (but I heard many times, salaries in gamedev are lower compared to regular IT salaries).

PARTNERS