Jump to content

  • Log In with Google      Sign In   
  • Create Account

Calling all IT Pros from Canada and Australia.. we need your help! Support our site by taking a quick sponsored surveyand win a chance at a $50 Amazon gift card. Click here to get started!


Sacaldur

Member Since 25 Mar 2013
Offline Last Active Aug 26 2015 06:33 AM

#5237650 what is best way to check a code is more effiecient and runs faster than others

Posted by Sacaldur on 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.


#5237632 If-else coding style

Posted by Sacaldur on 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".


#5236891 Setting up a basic engine: Rendering + Physics

Posted by Sacaldur on 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?


#5232331 Salary expectations when relocating to other countries

Posted by Sacaldur on 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).


#5220460 how compeletely free games,apps,services,sites, libraries make money?

Posted by Sacaldur on 31 March 2015 - 05:11 AM

Some projects are completely free and the developers do it just because they love coding cool stuff.

Another reason for making a game completely free (of payments, advertisement, sold user data, and so on) is ones portfolio/reputation. Having a good piece of work on his/her portfolio could give a good impression to potential employers, clients (e. g. contract work), or investors. The Android App Timely is for all I know a good example, since the company was bought after releasing this app (without any previous releases). Another one is Öffi, which is developed by a freelancing developer.
A developer could also aim to get some media coverage by making a game related to a hot topic. An example would be "Abbruch Bayer" (which translates to something like "Bavaria demolition", in contrast to "Aufbruch Bayern"/"upswing Bavaria", the original game made by a political party about some numbers and values of Bavaria). Sadly, the linked article is only available in german, since the covered topic only has a local significance.

These are reasons a person, team or company could consider, but there are much less games (and applications) release with this intent, instead of "free" ones with some kind of monetization.


#5219330 Unity3D and open source project

Posted by Sacaldur on 26 March 2015 - 09:13 AM

I'm sorry if my post was a bit misleading. I didn't want to accuse you of demanding openness of the engine. But if you would need to upload (Git/SVN/...) something related to the engine, i. e. the engines source code or standard scripts/assets, in order for your project to be executable, you would implie these files to be open source licensed (and thus demand the engine to be open source).
You still need to follow the conditions of the assets license(s), which could disallow you from uploading them.
If this is not a problem, you would still need to list exactly what licenses apply to what files.

Making your project openly available is not a problem, as long as you don't publish something you're not allowed to publish.


#5211652 Making small ideas work

Posted by Sacaldur on 19 February 2015 - 04:19 AM

Don't confuse small ideas with small execution. Small ideas rarely works. Also don't confuse number of features with a deep & complex gameplay.
 
Check my "WizTowerSim": http://www.silverlemur.com/minigames/
Is this game simple or complex? How long would it take you to implement something like that?
 
You can make a complex & interesting game in a few days/weeks. If you use dirty tricks of course smile.png

 
It's funny because the little game I have right now looks a bit like this or I should say has the same basics. It's some stuff where you build your base and every random amount of times you get a random attack and you have to survive it. At least that's the final goal but it's not finished yet (almost tho when it comes to programming).
 
I think the main idea is not bad but random events part of it sucks, I wanted to make it multiplayer but I am not good enough at coding networks. So this is the kind of thing that pisses me off a bit.

Do not escalate smile.png  No multiplayer, you are not looking how to add yourself more work but how to remove some work smile.png
If you have a working concept, go for it. Do not add unneeded things.

"No multiplayer" isn't a good general advice. It should be more like "no networking"!
"Multiplayer" doesn't automatically imply networking, since local multiplayers are possible, too. Also, many multiplayer games are much easier to create, since you don't have to implement an AI, you most likely won't need that much content, but the game could still be fun to play.
You can overwhelm yourself with a multiplayer game to big for your current skills, but you can do the same with singleplayer games. But in the end, it depends on the game.


#5211142 Making small ideas work

Posted by Sacaldur on 17 February 2015 - 03:29 AM

If you didn't play some smaller games, you should just play some of them. You should have played games like simple platformers, tower defenses, pong, snake, breakout, puzzle games, and other mini games.
Another problem about your ideas is: they are just ideas, but you can only find out for sure if your game idea is fun, when you're able to play it, e. g. by having a playable prototype. Also it's possible to make almost any idea fun, just by iterating over it and searching for aspects to improve on.

Keep in mind: a game isn't necessarily "fun" because it implements a "good idea", but most games are fun to play because it feels good to play them. In this regard you should take a look at e. g. the Talk "Juice It or Lose It" (by Martin Jonassan and Petri Purho) or the talk about game feel (by Jan Willem Nijman). By listening to the talks you should recognize: you can make almost any game a fun to play game.


#5210489 Article Idea- 2D lightmask with shadows

Posted by Sacaldur on 13 February 2015 - 09:09 AM

There are already comparable articles, but you maybe took a slightly different approach. It would be interesting to see your article about this topic, as well as the differences between your approach and e. g. the approach described on redblobgames.com. Even if there are no differences at all, you still could make an article about how to implement it, or how to use specific (language) features to implement it.


#5209057 Programmer vs Artist

Posted by Sacaldur on 06 February 2015 - 08:26 AM

The programmer should have the most knowledge about the targetted platform, and thus has to give requirements to the artists, e. g. regarding the texture resolutions, polygon count, shaders, file formats, and so on.

The artists (2D and 3D) either want to integrate their graphics and models into the game, or give them to the programmer. Letting the artist integrate his assets by himself would be the best option, since this way the artist would not only be able to embed all assets in the game, and to adjust some settings on them, but he would also be able to check, in what way he might has to rework his assets.
If you're not already using tools for the game to integrate the assets, the programmer either has to integrate them, or he has to build the required tools. The artists will either have demands for the tools, or they will find new requirements during their daily use of the tools.

If the 2D artist creates textures for the 3D models, the 2D artist will either give the textures to the 3D artist to include them in the model files, or the textures will be combined by the programmer or using the mentioned tools. The 2D artist needs to know, how to create the textures - how they are mapped onto the models.


That's at least what came to my mind right now, so there still could be some more aspects.
And the title is a bit... misleading. You don't want to let your programmer and your artist fight each other (and you don't want to make a game about this). ;)


#5207112 Best Way to Save Player Information?

Posted by Sacaldur on 28 January 2015 - 03:21 AM

There are Libraries for a huge variation of languages for both, XML and JSON. For the latter one, just take a look at json.org for a list of librearies for JSON parsing and serialisation. It's not hard to use these libraries, but it could require lot's of code. There are also more advanced libraries to not only parse and store XML or JSON, but they also analyse your data structures, e. g. by checking for annotations, and automatically generate and read XML or JSON, just from your data structures. At least in my opinion the problem about this automatic serialisation is the generated structure. Some libraries generate a child node for each list/array, containing the child nodes themselfes, even though there is only 1 list and all entries could be put into the element itself. A simple example:
<playlist name="My Playlist">
  <tracks>
    <track [...]/>
    <track [...]/>
  </tracks>
</playlist>
instead of
<playlist name="My Playlist">
  <track [...]/>
  <track [...]/>
</playlist>
But still: these libraries reduce the amount of code you have to write.

You can store any kind of Text in a properties file. This way, you're able to store numbers as well, but you need to store them as text - just as you have to do with every other text based file format - and you would have to parse them yourself - by calling Integer.parseInt().
Also: the order of the entries in a properties file shouldn't matter at all. You're reading the values using the keys, but you don't have to know the exact order.

Besides Properties, XML, and JSON, there are INI files as well. They are comparable with Properties files, but have some more features (e. g. sections) by default, but the set of features varies depending on the implementation.
And you could use your own file format, but since you would need to implement the file parsing yourself, you should just stick to one of the mentioned file formats.


If you don't know, which format to use for your files: just stick to what you already have (properties I guess) until you encounter some seriour issues regarding the format. Then you'll be able to make a better decision, since you know what problem you'll have to solve with another.


#5168370 Thinking in Javascript

Posted by Sacaldur on 22 July 2014 - 08:03 AM

The main problem of many programmers is, in my opinion, the desire to do everything just like they did it in other languages. Best example: object orientation.
In JavaScript, there are no classes. The only JavaScript thing which is close to be what a class in other languages is, are the constructors. (And constructors are regular functions which are used for object instanciation elsewhere.)

While working with JavaScript, keep in Mind: there are no private members. Every member is public. (Same goes for Python: "private" members will only be translated, e. g. from "__privateMember" to "_MyClass_privateMember". Knowing this, you can still access private members, but it's evil...)
In general: instead of relying on specific types you should just use objects as if they are what you expect them to be. For at least some type safety or "method overloading" you could do some type checking, but for objects of types other than the primitive types you should just check if they provide the features (methods and/or members) you need.
This also means: you have to use inheritance much less compared to other languages.

You should definitely take a look at what closures are and what you can do using them in JavaScript. Those are used frequntly to hide implementation specific functions to keep the global context clean. (-> Anonymous function containing all library setup calls, which is called immidately.)
Also Closures are used to have some kind of private "members", but due to what a closure is, those are no members ob the object. You will run into some troubles if you want to combine it with inheritance. ;)


@gretty:
var someVariable = {"key":"value"}
This is not a map, it's an object. (You can assign values to an array usign a non numeric key as well, but it still would be an array.)


#5093314 What programming language to use?

Posted by Sacaldur on 11 September 2013 - 11:12 AM

You could try Mono (.NET for other platforms) and MonoDevelop (an IDE).
If you're familiar with C#, you might want to have a look at Unity, too. Using Unity you're able to create 3D (and also 2D, but many people doesn't like Unity for 2D) games quite fast.


#5092061 What type of game can One person make ?

Posted by Sacaldur on 06 September 2013 - 05:44 AM

jbadams and David Ga11agher already pointed out the important things so I don't have much to say about the possibility of these projects.
But I want to add one point: don't focus to much on the genre! The genre says some kind of nothing about the final game as mentioned in one of the Extra Credits Episodes (I'm not sure about which one it was, but you could have a look at Extra Credits: Combining Genres). In an other episode if not the same they mentioned the difference between genres in film and literature. When you see a movies genre you know quite exactly if the movie is interesting for you while game genres focus on a specific mechanic or the point of view (_first person_ _shooter_, _plattformer_ (btw: in other locations referred to as "Jump'n'Run"s) and so on). I'll have a look fore the right EC video later...

As mentioned: the content will take a lot of time so you should not make a game which depends on much content. Shooter, RPGs and adventures (also action adventures) need much content to some extent. (Local) multiplayer games doesn't need much content or much mechanics in general to be very enjoyable. You may could have a look at these games. ;)
And don't forget about the sound and music!

Oh and by the way: Zelda is not an RPG, it's an action adventure! (Except for Zelda II maybe...)


#5091795 Why are static variables bad?

Posted by Sacaldur on 05 September 2013 - 09:08 AM

(I have to admit I didn't read everything...)
There are some slightly different statements which should not be mixed up.

1.) Global variables are bad. They infringe the object oriented design, no one likes them, and they don't have any friends!
2.) Dependencies should be validated during the objects initialization by passing corresponding objects as constructor arguments or by initializing them inside the constructor. There should be no initialization Method to be called from the outside after the object was created. The object already has to work.
3.) Other stuff, the object ist not dependent on should not be passed to the contructor.

In my opinion the 1. statement is true. There are in most cases other different and better solutions.
While talking about the 2. and 3. statement it's important to know what is an object depending on and what it is not depending on. A player may need to know his environment (map/level/world/...), but a wizard wand or warrior sword refining machine doesn't depends on these objects the same way. Thats why the world may should be a players constructor parameters, but a weapon should not be a refining machines constructor parameter - instad it should be the "refineWeapon"s method parameter.

An other example for a dependency could be Character and the CharacterState's subclasses. A character always needs to know his state - what the character is doing. "Nothing" could be one of the subclasses so a null pointer would be an invalid state. The constructor should set an initial state no matter if there is a parameter for the state or not (the questen would be: is there a default character state in your game?). A SetState Method would still be a valid possibility, but it's not a setters job to initialize the object.

In my opinion passing an object to the constructor and passing an object to a method are suitable for different cases. Both should be used, but not exchangable.


PARTNERS