Freitag, 30. September 2016

How Games Can Teach You that You're the Most Valuable Asset You have

A while ago, I started a new game in 7 Days to Die. For those who don't know: it's a game similar to Minecraft, just harder and with zombies that tear off your house. I enjoy playing it because of that difficulty.

A New Home


I spent a few hours creating a nice base, grinding all the resources required to make it. The design I was using I have trialed and tested. It provided a good basic shelter.

It was a basically a roofed platform, supported by four pillars, each one about 4 blocks thick. In the middle below the platform, I would usually place some spikes. And when the hordes come, place myself in the middle of the platform with the zeds following me (they will be leaving the pillars alone).

It was a stable design and easy to maintain. Sadly I didn't make any pics.

A Terrible Mistake


And so it was, the base was almost done.  I just got done placing the roof, but I left the blocks in the middle unfinished. I made the base extra large this time to fit my needs.

This turned out to be a terrible mistake.

So it was horde night with an extra dose of zombies that spawn and are out to get you. And the moment I placed a torch in the middle of my platform, my entire house started falling apart.

First the wood in the middle.

Then ate its way to the outside. 

With a horde of +30 zombies down below me.

Leaving only the stone pillars on the edges.

Everything was in vain...


I too, fell down as my house collapsed. I was in shock because the base I spent hours just completely vanished. Including all my stuff I had in my chest, which too was destroyed.

Quite frankly, I ragequit very soon after. I mean, with +30 running zombies going to get you, you can prepare your bum to run or die. Normally the latter. Repeatedly. Because you have limited stamina and the night is long. And that's no fun.

FFS I can't see shit pls help :'((

(Before continuing, you must know that 7 Days to Die has its own skill system. So even if you die, you keep all your skills and crafting recipes.)

...or was it? A Realization


So recently, I got back to this saved game. What happened next is very interesting.

It was still horde night with those many zombies coming for me. Just as I left it. I already died once and respawned somewhere random. My bed at my base collapsed too so I was practically homeless. However as I ran through the night, not knowing where to go or to escape the horde, I had a realization:

  • Despite of all materials I lost -
  • Despite of the home that I lost -
  • Despite of the lost time that I spent gathering and building...

...I still had my skills, my recipes, a partially explored map. The knowledge to create things better and safer.

And then it occurred to me: this is exactly how real life works.

You can lose everything and still have everything - for the sole fact that you still have yourself:

The knowledge, skill, talent to create and rebuild.

You are the most valuable asset you have.

Thanks for reading!

Sonntag, 18. September 2016

6 Tipps Boosting Your Productivity With HackNPlan

The tool Hack 'N' Plan is a very sophisticated project managing tool made by gamedevs for gamedevs. I have been working with it for about 5 months and my productivity sparked ever since. I am more focused and notice when my game is suffering from the infamous scope creep syndrome.

In the following I want to present you 5 tipps how to work with this piece of software. These may work without making use of Hack 'N' Plan, too!


  1. Plan out the most important features first. Focus on those.

  2. Avoid spontaneously added tasks as much as possible.Bugs and improvements of existing code/assets are an exception. This serves mainly the purpose to prevent a scope creep. I know it's tempting to add one idea after the other, but like this you will never get your game done. Ever.

  3. Use the game model feature to set a design direction(e.g. game mechanics you want to have). This will be your focus. Do not add tasks that do not support your game model (except bug fixing)! Push them down the abyss of the forgotten mercilessly if you find any.



    Or just dump sidetracking tasks into a "unimportant brainfarts" milestone if you're not a ruthless task-murderer like me.



    In fact, I'm still trying to find a most effective way on how to use this.

  4. Make many milestones with small scope.Keep it 10 tasks and below, add a max of 5 tasks spontaneously (thus a maximum of 15 tasks in total). You need ruthless focus and this will help you establish it.

  5. Cut tasks into the smallest chunks.You don't have to (and shouldn't) plan out every detail of your project, but if you notice you need more tasks, make them small.

  6. Group together tasks that cover a similar topic.Not doing so has a chance of making you feel scatter-headed because you are jumping from one section in your code to the other. This is ok when you fix bugs, but not when you need focus to do progress.

    Do not make a clutter like this:



    ...but keep it more like this.



    Those are all UI-tasks I got done very quickly because I grouped them ruthlessly. Kept the scope of these tasks small, too.

I hope this helped with your gamedev endeavours. Keep on rocking, keep on coding!

How Introverts and Extroverts can get along

I have a very close friend of mine who I have been friends for almost a decade. We couldn't be more different, as he is mostly extroverted, a persuader, a good joke teller, and I am more of an introvert who is shy and withdrawn. But despite of that, we get along very well. Heres some tipps on how (these points may pose as dating advice too).


Extroverts dealing with Introverts Introverts dealing with Extroverts

Introverts need a lot of time to process what happens around them as they feel often uneasy and overwhelmed by a sudden influx of attention, or information. Give them time to think and process what you are saying. If you overload them too much, they may try to escape and avoid any further conversation. To them, this is the natural way of dealing with things. They may be able to react better and give you more useful information the next time as they may have processed the previous conversation and prepared themselves for it. So for you when discussing important issues, it may be better to approach them twice.
They also may say something to you, but the fact they are not repeating that doesn't mean they stopped thinking that way, e.g. when you do something they do not like. They won't say anything, but that doesn't mean they suddenly started liking it. When an introvert says something to you, you should generally take it seriously - they do not say it primarily to persuade or negotiate with you, they say it because it's the way it is. But even then, they may something very clumsily and come off wrong saying something completely different than they wanted to say. It's hard for them and it's even harder to read them right, but that's why it's important to communicate.
Not everything extroverts say is objectively truthful. They exaggerate or sugarcoat things to persuade you, get you into doing something, test you, figure you out, or simply to get out of trouble. That's not a bad thing at all - just a reminder for an introvert that they may say things that seem negative to you, when its them trying to gain your support or trust. Sometimes lying is the right way for them to do this, too. This may seem wrong from a introvert's point of view. From the outside, introverts often communicate on a very factual level, and want to say whats important and true, while extroverts focus on negotiating and persuading. I think that's something you can learn from an extrovert. Market yourself better!


Introverts only say something when its absolutely necessary, when it constructively contributes to the discussion, and when they want to enhance it with meaning. They are often quiet observers. They acknowledge what is being said, but they do not chose to comment on it. They enjoy having their thoughts for themselves as it deflects undesired attention that makes them feel uneasy. If you as an extrovert want to have a meaningful conversation with an introvert, you should chose a quiet place with not too many people around you, ideally just you and the introvert. If they feel comfortable with you, they may open up and tell you their deepest secrets. Once they are familiar with you, they will not get enough from your attention.
This is probably one of the hardest to understand for an introvert. An extrovert generally carries their thoughts and emotions outwards. So if an extrovert is mad or angry, they will let everyone know they are. But that's reckless and unfair to take out your anger on others, right? As long as they aren't taking it too far, no. It is really just the way they deal with their feelings and thoughts. They often don't even know what tumult they may cause in an introvert by directing their emotion towards them. So next time you find yourself in this situation ask yourself: did they really mean that or could they not find another way of processing their emotions?
The fact that introverts are easily overwhelmed with information, causes them to require a lot of time for themselves, putting a lot of energy to reflect and process what is happening around them. Because of this, introverts do not have this much energy and often appear lazy. They also do not like it when you tell them they are lazy - when in fact their mind is in a "healing state" of daydreaming, thinking about the world, and doing mind experiments in their heads. They need this to stay sane in this insane world. Since their attention and energy is so limited, its truly a gift to be in the world of an introvert. Extroverts like attention. A lot. They like to be around people because it gives them security and confidence. They love their community and are devoted to keep it strong and motivated. They enjoy hearing praise when they did a good job, because this is the language they speak. And that's exactly the catch as an introvert: How do you compete with all these people for an extrovert's attention? How do you do appreciate an extrovert's friendship when you're directing your thoughts and emotions inward? So the best thing you can do about maintaining a friendship with an extrovert, is to show or tell them you want them as a friend as often as you can (and feel is appropriate) by complimenting them, approaching them, offering them support etc. etc. I know for one that I often have positive thoughts about people, but I am voicing that too rarely. Be more open towards your extroverts. Of course, it has to be the right person in the right moment (which can be hard to figure out as an introvert) - but they will appreciate it.

Samstag, 27. August 2016

Vote & Help Developing CamoTactics!


Involving the gaming community is important making a great game. For this purpose I have created two polls that allow you to share your thoughts on CamoTactics.



Future Content


The first poll is all about future content to be added to the game. You can give it a shot on Google Forms. By filling this out you help me focusing on the feature you would like to play most. Make sure to share your ideas, no matter how silly they may sound! They may lead to other interesting ideas. :)

Your User Experience


The second poll is about your gaming experience with CamoTactics. If you played the game you can submit your feedback here on Google Forms. If you didn't play CamoTactics yet, go do it nao!


Happy voting and thank you for playing CamoTactics!


Freitag, 26. August 2016

Life is like Gamedev

It happens to me when I code all the time: Create something just to later discard it and start new from scratch. You make two steps forward just to make one step back again. It's frustrating sometimes.

Come to think of it, it's just like real life. Sometimes you're trying to make a change in your life, trying to adapt some habits, like trying to stick to your marketing schedule or diet plan. Then there's times when things happen, you slack and fall back to your old habits.

It's a bit like marble in a funnel that's slowly rolling towards the hole in the center. You're trying to roll towards the center, but sometimes you go too fast and bounce back to the outer edge. You do this until you finally achieve your final breakthrough: when your good habits finally stick and your code finally works (well... mostly ;) ).

Just like in gamedev.

So when you practice going through this with gamedev, it will likely spread over other parts of your life.

Code away, never stop creating and keep making awesome games!


Donnerstag, 25. August 2016

CamoTactics Arena Mode & Missions in 7.2!

Despite of delays because of real life stuff (I HATE moving twice within two months D;) progress was still made on CamoTactics!

Prepare your sitting device for new features, pics and gifs:



For one, enjoy feeding your foes some lead in arena mode! This isn't just a dummy feature, this has functionality and the character/weapon you've chosen will be carried into the arena.





Sail through the tutorial mission with ease! Missions now feature a very handy command line style trigger handling that lets you do almost anything on mission/objective start, success or failure. This is very important for the campaign of the game.





Your positional awareness is now provided by this very useful HUD aiming aid! You will see why you need this when moving around and shooting...





A few fixes and improvements include but are not limited to:

  • Better infantry graphics
  • Fixes for picking up items
  • Fixes for mounting vehicles
  • Fixes for wrong light positions
  • Faster renderer (very noticable if you compare it to 7.1)
  • Mission and Statistics Screen
  • Better Camouflage implementation
Making this game is a lot like wading in deep water not knowing what features fit and which to discard, considering a lot of that is experimental (not to mention lost time when discarding one). That process takes ages but the results are promising already and I have no doubt the end product will be amazing!

These features are to come very soon with CamoTactics Alpha 7.2. Until then, please check out CamoTactics Alpha 7.1 here:


CamoTactics Alpha 7.1

Samstag, 16. Juli 2016

Why PokemonGo is such a success

Only a few weeks in after its release, PokemonGo has become a hit for gamers world wide. It even goes so far that people are paying less attention and getting themselves hurt and deputies making demands to regulate the game.
 
But what exactly made it such a success?

First off, the player base of Pokemon is huge. Pokemon has been around for decades and influenced generations of gamers and accumulated a vast following during that time. It's a game that can be played with your smartphone everywhere at anytime (that is if the servers aren't shitting the bed). Another side effect is, you also connect with people as they venture to the same Pokemon hotspots as you.

While the gameplay isn't much at the moment, it still taps into the desire of discovery and collecting all Pokemon - or collecting enough Pokemon candy to level up your favorites. What is genius about it is that it takes the act of catching them to real life - no doubt that for some gamers, dreams came true!


So in other words, you have:
  • a high accessibility mobile game
  • a giant following of fans of all ages
  • bringing a well-selling gaming franchise to real life
  • game mechanics that stimulate the urge to collect and discover (Pokemon and their spawning points, in this case)
They really got out the best of what they already had and struck a real hit on the mobile market.

I remember back a year or so Nintendo's decision to go mobile was generally met with skepticism. Now they have managed to create a hype that will not only change the game industry, but also society. Forever.

Well done, Nintendo. Well done.


Mittwoch, 6. Juli 2016

Creating a Mission System in Java


So... how do you create a Mission System?

I asked myself this question twice so far and recently I came up with the following approach. This system is relatively simple but you can do most of basic missions with it. It consists of a tree with depth 3: Mission, Objectives. Conditions. Each of the components has a mission state, consisting of PENDING, SUCCESS and FAILURE.

First, I will describe the classes needed, which is then followed by their java code at the end of this article.


The general structure is as follows:






Mission:
  • A Mission has a title, a debrief description and a short description. 
  • A Mission has multiple objectives.
  • As general rule, a mission is deemed a success if all its child objectives are deemed successful.

Objective:
  • An Objective has numerous conditions.
  • Objectives have a different behavior per type, described below:

    Default: All objectives must be set to success for a mission to return success.
    Failure: If this objective is failed, the entire mission fails.
    Optional: The objective is effectively ignored by the mission, but can be used to, say, determine a score.
     
  • By default, they are not being updated once a condition was met or failed, but you can change them to run permanent updates.
 
Conditions
  • All conditions must be met for an Objective to be successful. Behavior types (default, failure, optional) do not apply here to keep it simple. To make up for that, I've added the possibility to invert them.
  • Conditions are implemented by you via an interface and an abstract helper class. 
  • For GUI purposes, there's also methods to display the condition as string for the end user.

To use it, you setup your Mission, Objectives and Conditions and call Mission.update() each time you update your game.

Here's the code:



Mission


/**
 *
 * @author B5cully
 */
public class Mission {
  
    public String title;
    public String debrief;
    public String summary;   
    public LinkedList<Objective> objectives = new LinkedList();
    Objective.State state = Objective.State.PENDING;

    public Mission() {
    }
   
    public Mission(String title) {
        this.title = title;
    }

   
    public Objective.State getState() {
        return state;
    }
   
    public void addObjective(Objective obj) {
        objectives.add(obj);
    }
   
    public void start() {
        for( Objective objective : objectives ) {
            objective.start();
        }
    }
   
    public void stop() {
        for( Objective objective : objectives ) {
            objective.stop();
        }
    }

    /**
     * Updates this mission's state
     * @return
     */
    public void update() {
        int i=0;
        boolean success = true;
        boolean failure = false;
        for( Objective objective : objectives ) {
            switch (objective.state) {
                case SUCCESS:
                    if( objective.constant_check ) objective.checkState();
                    break;
                case FAILURE:
                    if( objective.constant_check ) objective.checkState();
                    break;
                case PENDING:
                    objective.checkState();
                    break;
            }
            switch( objective.type ) {
                case NORMAL: {
                    success = i == 0 ? objective.state.equals(Objective.State.SUCCESS) :
                                   success && objective.state.equals(Objective.State.SUCCESS);               
                } break;
                case OPTIONAL: {
                    //ignore the objective
                } break;
                case FAIL: {
                    //only consider fail state
                    failure = failure || objective.state.equals(Objective.State.FAILURE);                       
                } break;
                   
            }
            i++;
        }
        if( success ) {
            state = Objective.State.SUCCESS;
        }
        if( failure ) {
            state = Objective.State.FAILURE;
        }
    }





Objective

/**
 *
 * @author B5cully
 */
public class Objective {
  
    public enum Type{
        /**
         * The objective contributes to success of the mission.
         */
        NORMAL,
        /**
         * The objective counts as fail condition of the mission.+
         * If one objective of this type closes with failure,
         * the entire mission fails. The pending state of
         * FAIL objectives are ignored in the total outcome.
         */
        FAIL,
        /**
         * The objective is optional, it has no effect
         * on the total outcome.
         */
        OPTIONAL;
    }
    public enum State{
        PENDING, SUCCESS, FAILURE;
    }
  
    public String title;
    /**if this is true, the objective is constantly validated. If false,
       the objective is validated once and succeeds permanently once triggered.*/
    public boolean constant_check;
    /***/
    public Type type = Type.NORMAL;
    State state = State.PENDING;
    /**
     * All conditions must be met in order for na objective to
     * succeed.
     */
    LinkedList<ConditionImpl> conditions = new LinkedList<ConditionImpl>();

    public Objective() {
    }
  
    public Objective(String title) {
        this.title = title;
    }
  
    public void addCondition(ConditionImpl condition) {
        conditions.add(condition);
    }
  
    public void start() {
        for( ConditionImpl condition : conditions ) {
            condition.start();
        }
    }
  
    public void stop() {
        for( ConditionImpl condition : conditions ) {
            condition.stop();
        }
    }
  

    @Override
    public String toString() {
        String s = "";
        int i =0;
        for( ConditionImpl condition : conditions ) {
            s += condition.getName() + ": " + condition.getDisplayedText();
            if( i > 0 && i < conditions.size()) s += "\n";
            i++;
        }
        return s;
    }

    public State getState() {
        return state;
    }
  
    public void checkState() {
        boolean success = false;
        int i =0;

        //check the conditions
        for( ConditionImpl condition : conditions ) {
          
            state = condition.getState();
          
            if( !state.equals(State.PENDING) && constant_check) {
                //still update the condition if constant check enabled
                condition.checkState();
            } else
            if( state.equals(State.PENDING) ) {
                //pending: simply update. No updates if failed or succeeded.
                condition.checkState();
            }
            success = i == 0 ? state.equals(Objective.State.SUCCESS) :
                               success && state.equals(Objective.State.SUCCESS);
            switch( state ) {
                case FAILURE: {
                    this.state = State.FAILURE;
                    return;
                }
                default: break;
            }
            i++;
        }
        if( success) this.state = State.SUCCESS;
        else this.state = State.PENDING;
    }
}



Condition 


/**
 *
 * @author B5cully
 */
public interface ConditionImpl {
  

    /**
     * Invoked on condition start.
     */
    public void start();
   
    /**
     * Gets the name of this condition
     * @return
     */
    public String getName();
    /**
     * A Localized, properly formatted display
     * text for this condition.
     * @return
     */
    public String getDisplayedText();
   
    /**
     * @return the state of the condition
     */
    public Objective.State getState();
   
    /**
     * Evaluates the state of this condition. This normally involves
     * calculations.
     */
    public void checkState();
   
    /**
     * Invoked on condition stop (e.g. when
     * it has failed or is being reset)
     */
    public void stop();

}

Here's the helper class for Condition, followed by an example implementation. 


/**
 *
 * @author B5cully
 */
public abstract class Condition implements ConditionImpl {
  
    protected Objective.State state = Objective.State.PENDING;
    protected boolean inverted = false;
    /**
     * The name of this condition.
     */
    protected String name;
    /**
     * A format string to display the condition.
     */
    protected String format_string;
    /**
     * The string returned for display. This is usually
     * name + String.format(format_string, args), where
     * args is relevant info about the condition.
     */
    protected String displayed_text;

    public Condition(String name, String format_string) {
        this.name = name;
        this.format_string = format_string;
    }
   
    @Override
    public String getName() {
        return name;
    }
   
    /**
     * Inverts the result. E.g. Instead of delivering
     * SUCCESS by default, FAILED is being returned.
     * @param inverted
     */
    public void setInverted(boolean inverted) {
        this.inverted = inverted;
    }
   
    @Override
    public void start() {
    }

    @Override
    public Objective.State getState() {
        return state;
    }

    @Override
    public void stop() {
    }
}


/**
 *
 * @author B5cully
 */
public class ConditionKilledEnemies extends Condition{

    LinkedList<Entity> enemies = new LinkedList<Entity>();
    LinkedList<ListenerEntityImpl> listeners = new LinkedList<ListenerEntityImpl>();
    int size = 0;
   
    String current_displayed_text = "";
   
    {
        format_string = "%d/%d";
    }

    public ConditionKilledEnemies() {
        super("Killed", "%d/%d");
    }
   
    public void registerEnemy(Entity enemy) {
        //add enemy to list
        //add a entity listener that tracks the enemy death
        //and adds to the counter here
        ListenerEntityImpl listener = getListener(enemy);
        enemy.addEntityListener( listener);
        enemies.add(enemy);
        listeners.add(listener);
        size++;
        current_displayed_text = String.format(format_string, enemies.size(), size);
    }
   
    public ListenerEntityImpl getListener(Entity enemy) {
        return new ListenerEntityImpl() {

            @Override
            public void onDeath(EntityMobile object) {
                super.onDeath(object);
                int index = enemies.indexOf(object);
                if( index >= 0 ) {
                    enemies.remove(index);
                    listeners.remove(index);
                    current_displayed_text = String.format(format_string, enemies.size(), size);
                }
            }
        };
    }
   
    @Override
    public String getDisplayedText() {
        return current_displayed_text;
    }

    @Override
    public void checkState() {
        //success if the list is empty
        if( enemies.isEmpty() ) state = Objective.State.SUCCESS;
        else state = Objective.State.PENDING;
    }
   

Donnerstag, 23. Juni 2016

How to Make Leaving Your Comfort Zone a Habit

In an earlier article, I talked about how important it is to get out of your comfort zone. But how do you actually get out of it?

Before I start, it's important to keep in mind the following:
  1. If you want to achieve goals, you must acquire habits that help you accomplish them. 
  2. Nothing will change if you don't stop making excuses. If the time to make a change isn't now, then when?


These two things are essential in understanding what I'm about to tell you next.

"Getting out of your comfort zone" may be one goal in a larger chain of goals you have in mind.Once you achieve it, all other goals can be accomplished with greater ease. So how could a habit look like that helps you get off your lazy bumcheeks?


Find something...
  • that doesn't require a huge effort to start doing (highly accessible)
  • that pushes you to the limit, at your own discretion 
  • lets you explore and expand said limits.

Let me show you two of these habits I acquired:

  • Taking cold showers. Cold showers expand your blood vessels, thus giving your metabolism a rush of energy. They may help if you are struggling with making physical exercise a habit, too. The fact you are forcing yourself to cold water exposure is a perfect way to teach yourself to get out of your comfort zone (and defeat the "innere Schweinehund" - the "inner lazy skunk" - as we Germans say). If you shower everyday make it a habit! That being said, you don't have to jump right into cold water. What I do is to wash myself normally, then proceed with cold shower, gradually making the water colder - and remain in the shower for a maximum of two minutes. Next time I'd shower I will try to make it even colder, trying to push my own limits. Keep in mind that if you notice you start shivering or feel your limbs are getting numb, you should stop with the shower and get yourself warm as soon as possible. Push your limits, but never drive it too far!

  • Physical exercise. Similarly to taking cold showers, it fires up your metabolism. Besides it keeps you fit and healthy. To make exercise a habit, I started doing situps before going to shower in the evening. For me personally I choose a familiar environment for exercise (the bed in my room), which meant less effort for me to start doing it. You can do whatever exercise you feel most comfortable with, like stretch lessons, situps, yoga - simply chose the lesser evil ;). Just keep in mind that workout - if done wrong - can be damaging to your health (like kickboxing with limb weights on). So if in doubt, I highly recommend seeking professional advice.

With these two habits I am fostering I basically got used to getting out of my comfort zone. Slowly I am expanding this to other parts of my life. I must say it helped me getting to know the unknown called "discipline".


But beware: Do not ever think about slipping on any of these habits. If you don't have time for them now, you're not going to have time for them later - because you are more inclined to find an excuse for not doing them at all. Try to remember this: If you're not investing in good habits now, then when? 


What will remain if you lost everything you have? You. So invest in yourself. Because you are the most valuable asset you have.

Samstag, 18. Juni 2016

How to avoid bad Color Schemes

Notice: you may want to get Krita in order to follow the steps described below.

I've adviced a few indie programmers with their games already. And all of them had a common issue: color choice. Good old infamous programmer art. How do you get better at it?!


Now I could bombard you guys with dry color theory in this post. But eventually this is all just "theory" and not necessarily helpful for you in practice (especially if you lack the understanding for it).

So let's start off with applied color theory. I'll show you some pics while explaining the basic concepts, adapted to gamedev.



Contrast



Every picture can be minimized to black and white, right? You have hotspots here and there that attract your attention. You have dark areas that create contrast and can be used to create multiple effects in the audience (like emotion or tension).



In the above picture, there seems to be a dark blue cloud luring over what appears to be a yellow valley. Notice the white areas on the right and left top corners of the picture that surround the darker areas. The contrast of the cloud is rather prominent, creating a tense scenery. The tilted angle adds to the dramatic display.


Now the interesting thing about this is, that a lot of this can be applied to games. You want your enemies to stand out, peaceful items also needs to be highlighted (the white areas) and obstacles that cannot be passed (dark blue cloud). And then you have your environment, that balances out those two elements (yellow/purple valley).



You do not want to have a very similar contrast for your background and your walls, for example. Or all your backgrounds, obstacles and player in the same brightness of color. It will look mushy and they won't stand out, making your game look worse and harder to play.


Look at this picture here:


This looks like a ornamented floor, right? Let me show you what happens when I make the green tiles darker.



Now these tiles actually look more like walls that encase a tiny room. Darker. Impassable. Something you probably should not even bother messing around with!

Contrast is an important tool to set apart different elements in your game. If you have moving entities, they must be distinguishable from the rest of the environment.

Let's take a look at this screenshot of Sonic The Hedgehog (Genesis).



The overall environment is relatively bright, happy even. Yet the enemies are still easily to spot and distinguishable from the rest because they have a very strong color (red) that does not appear in the rest of the environment. Sonic himself has a different hue than the water, too.



Color


So much for contrast. How to choose the correct color?


You can choose colors using color wheels or similar provided by graphics programs. If you keep moving the color wheel towards cyan in Krita and pick one color every now and then, it's a very good starting point to figure out rough colors that fit.



Like this, I've chosen this color palette. Let's imagine I want these colors in my game. These aren't perfect, but definitely usable.

The color picture looks like this:



So let's apply the contrast lesson here. I put the color picture layer over the contrast the black and white contrast layer. Then I applied blend mode "Darken" in Krita on the color picture layer. You can download this file here, by the way!




So the result looks like this:


...which is a pretty solid color scheme to use for your game. To modify it, you can use the HSV tool of Krita to make further adjustments. Keep in mind you will have to readjust colors to the correct contrast if you do that. The second color of "player, enemies" is too similar to the first color of "backgrounds" and may make problems in a final game!




Getting Color Schemes


You don't have to do this process all the time. There are numerous websites and tools that help you chose a fitting color palette. One of these tools is paletton:



Another website that is very useful is www.colourlovers.com. It provides very handy, user-created palettes. The palettes displayed below are actually very interesting colors to use in a game already.





Choosing the right Color Scheme for your game


So how do you choose the correct coloring scheme for your game? 

It always depends what kind of game you are making and what kind of atmosphere, experience and emotion you want to create. Colors can be a very powerful tool to help achieve this, as they have a strong subconscious effect.

If you make a post-apocalyptic game, you should probably use pastel colors (colors without high saturation) - as long as it looks rotten and pale, you're good to go!
When making a horror game, you may want to do the same. Or you maybe want to use dark colors only, with red being the only brighter color.

But not only the colors themselves are important, but also the context they are perceived. If the gameplay makes it clear there is danger near, I will perceive a red-black color scheme differently than say, a blue-black. The cold, blue colors may even create a sense of despair!

In the picture below, I created a few color combinations and listed the words that came to my mind when looking at them.


You can do the same experiment by looking at other games, movies or art and asking yourself how what you see make you feel. That also helps you figuring out a good color mood for your own game.


I hope this article helped you figure out more about colors and color schemes! What are your favorite games in terms of colors and atmosphere?



Donnerstag, 16. Juni 2016

Good reasons to get out of your Comfy Zone

I often see opportunities. Opportunities like, working together with someone to make a game, someone from the press asking indiedevs to send their games over to getting them covered on their website, people messaging me about my blog and whether I want to write for them.

Life is giving me MANY possibilities like this if I really think about it. Possibilities I could use to grow.

The thing is: I often don't even know how to respond or react to that. Things like this make me feel anxious. Scared to do it, even. It triggers an escape´mechanism inside of me. Often, I silently opt out pretending these opportunities never happened.

But then I realize that if I don't do things that are out of my comfy zone, I firstly waste so many opportunities to be a more successful indiedev, and secondly I will never ever grow beyond the limits my fears impose on me.



So I try to take my chances, allow myself to be a complete noob and just do it.

I will likely fail for everyone to see, on the internet that never forgets, but you know, you do it wrong until you learned how to do it right. If you're not doing it, how are you supposed to get better? The entire process is important - not just the end results (= you being successful).

The struggle can be exceptionally hard if you've had a trouble past like me - but know if you manage to do this, keep at it with outstanding persistence, passion and determination, you can say of yourself you went from "living in a dump" to "happy and rich".


Allow yourself to fail. Allow yourself to be rewarded for what you do - that's the only way to grow. 

And don't forget those who helped you along the way, too.

Why You shouldn't Always Translate Advice to Your Own Life

Some motivational sites claim that if you want to be successful, you sleep much less than the average person. The argument is that if you sleep less you have more time to get work done and be productive.




I have a few problems with this type of advice. I have no doubt people who can pull this off exists. But you have to adjust that to yourself individually, to the tasks you perform and to your schedule.

I have a dayjob and are ~9 hours per week in the office (including commute).  I still can squeeze in a few hours of gamedev into my schedule depending how draining the task at work were. In my experience, sleep deprivation is extremely bad for my productivity and will eliminate these few hours of gamedev in the evening. Instead, I spent these hours taking a nap because I am exhausted, later unable to go to bed at a reasonable time.




From the start of this month my productivity hit a low because I have screwed with my sleeping schedule, sleeping an average of 5 to 4 hours per day (6 including naps) this and last week. You can probably tell by the fact I haven't written many blogs this month so far. In order to be productive (whether it is coding or writing blogs), my brain needs to be in good shape in order to perform them.


That means: enough sleep, enough sun exposure ("recharging" my nerves), a bit of workout (taking a walk and doing sit-ups in my case), healthy diet (lotsa bluebewwies!) and being in peace of mind (I can't code when I am emotional distress). If one or more of these things are lacking, I am simply not in the shape for these kind of tasks. When tired, I am much better at doing art or music, which flows much better then.


Contrary to the initial advice (sleep less, get more work done) sleeping less actually impacts my ("logical") productivity negatively. However, your aim should create the conditions and environment required that enables you to be productive. If getting enough sleep is one of them, you shouldn't ignore that.

(There may be other reasons why sleep is a requirement for me to be productive, namely that my energy in general is low; it can be raised by correct posture or working out more. Still working on myself :])


It's always good to foster good habits to grow. See the basic point in advice given and see what you can adapt, keeping in mind your own strengths, weaknesses, daily routine and habits.

Just keep in mind not every advice is useful to you or directly applicable to your life. You are on a unique journey and your journey is never the same as someone else's.


Samstag, 11. Juni 2016

CamoTactics: Where will it go?





CamoTactics is a top down shooter set in a futuristic and turbulent future, where mankind has ventured into the depths of space and crashed into a planet with strange and bizarre alien life. Despite the hostility of this world, mankind finally has managed to get over its blood-thirsty past that exploited its environment - Until events turned around and tensions between two countries, Rubia, known as the cradle of mankind, and Panta rose again. Someone has gotten hold of ancient war technology and is trying to stumble the entire planet into chaos. Can you identify and stop the evil forces trying to disrupt the fragile peace?






Read more about its gameplay concepts below. This article applies to CamoTactics 7.1.


Environment, Stealth & Camouflage:

What's already in: Enemies won't see you if you are well camouflaged or behind them. How well you are camouflaged depends on how well your current camouflage color matches the terrain color. It also depends on the distance from the target. A sensor system makes sure that even if you cannot be seen, you still can be heard. The soon to be released demo version 7.1 features day and night cycles and lighting effects.

What's to come: hiding in bushes and being in the shadow will make you harder to spot. Appropriate sound design, weather conditions like fog, rain, thunder, snow, many strange and bizarre plants and animals that you may encounter (who may eat you alive while you sleep) are planned. The game plays on a alien planet and as such I want to display an adequate atmosphere and make the impression of a whole new world for you to explore. I want this game not only be fun, but also an unique experience for YOU.


Detailed Combat:

What's already in: Weapons have attachments like scopes and magazines that can be edited. They affect overall weapon performance. I want players to discover and collect new guns and mods. This mechanic is very similar to weapon modding in Fallout 4. Weapons overheat and break as you use them, too. To shield you from different types of projectiles you can equip armor. It's possible to use health kits and repair kits as well. If you're not boarding and driving them, vehicles explode if you destroy them.

What's to come: The possibility to freely assemble your own guns is subject of future versions. Earlier versions included rocket launchers and shotguns, which will definitely come back. That will include close combat weapons.


World and Character Depth

What's to come:
The game gives the player a whole new world to explore. It's a futuristic society that sometime 2000 years ago crashed on an alien and hostile planet (that happened to be home planet of an ancient precursor alien race). That also means: spaceships! Well, ancient wrecks for you to explore, that is! With notes, dialog, and speech bubbles the player can explore the characters, animals, plants, locations, technology, history and structure of society humanity has adapted in this strange world.

The story is written out for the most part and was as described as "inspirational" and "giving a different perspective" by some proofreaders. It will be delivered via missions and presentation-style cut scenes.



Inspiration

CamoTactics started out as simple prototype that has grown a lot in two years. Many games inspired me to make it what it is today. Let me list the most prominent ones:

  • ARMA II
  • Thing Thing Arena
  • Metro 2033
  • Metal Gear Solid 3
  • Fallout 3

During those two years developing this game, I've readjusted it quite a few times. There was a huge setback, too, considering I switched frameworks halfway through which delayed its release. But it's back, being better than ever.



Sonntag, 29. Mai 2016

Game Localization using Java Bundles


I toyed around with two ways how to implement Localization in Java. Let me present you the two ways I've implemented and which are better for you to use. I am assuming you know how to use Java Resource Bundles. If not, the check oracle the tutorial here or check this video I made here. In my examples, I will be using LibGDX, however, the code is almost the same.


The methods have both up and downsides which I'll discuss later.


Using Object Reflection

This method I worked out runs over all fields of one class and translates String types of fields (including fields in superclasses). The value of that field is being used as localization variable. Fields to be translated are marked with an annotation. This is helpful when you don't want to translate every single String in a class, and say, use untranslated Strings for object IDs.

You have a localization annotation like this:

/**
 * Marks a field to be localized.
 * The content of the field is being used to localize it.
 * @author B5cully
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface Localized {
   
}


A very simple class. It's just a marker, after all.

The object is being localized like this:

  
    private static I18NBundle translations= ... // init the the bundle. This is libgdx specific, 
                                             // but works the same with a java resource bundle
                                             // the call may look a bit different
    /**
     * Localizes an object.
     * @param o
     */
    public static void localize(Object o) {
        Class current = o.getClass();
        do{
            try {             
                Field[] fields = current.getDeclaredFields();
                for( Field field : fields ) {

                    //the following is a hack to make the field temporarily accessible
                    boolean accessible = field.isAccessible();
                    field.setAccessible(true);
                    //check if the annotation exist
                    Localized annotation = field.getAnnotation(Localized.class);
                    if( annotation != null ) {

                        //localize the content of the field here
                        String localized = translations.get((String) field.get(o));
                        field.set(o, localized);
                    }
                    field.setAccessible(accessible);
                }
            } catch (SecurityException ex) {
                ex.printStackTrace();
            } catch (IllegalArgumentException ex) {
                Logger.getLogger(Localization.class.getName()).log(Level.SEVERE, null, ex);
            } catch (IllegalAccessException ex) {
                Logger.getLogger(Localization.class.getName()).log(Level.SEVERE, null, ex);
            }
            current = current.getSuperclass();
        } while( current != null );       
    }


An object I want to translate may look like this:

public class CTWindow {

    @Localized
    public String title = "loc_window";

    public String id = "Window001";
}

Using this code, only the title will be translated by the localize() method. However, this may not work as elegantly for switching languages in a live system.



Using Field Names as identifiers

The other method is to use canonical names in your properties file. For example, your property file has an entry like this: com.neutronio.Infantry.hitpoints = Hitpoints. When you translate the field of an object, all you have to do is to get its class and field to obtain the localization.

What sounds nice in theory, isn't as easy in practice. We need multiple methods to achieve this.

    private static I18NBundle translations= ... // init the the bundle. This is libgdx specific, 
                                             // but works the same with a java resource bundle
                                             // the call may look a bit different
    /**
     * Gets the standard file path for a locale. This is required to

     * to turn a path of a properties file into desired format using its tag.
     * @param locale
     * @return
     */
    public static String convertPath( Locale locale) {
        String tag = locale.toLanguageTag().replace('-', '_');
        return tag;              
    }
  
    /**
     * Obtains a localized variable by
     * a simple field name and class.
     * @param field
     * @return
     */
    public static String localizedVar(Field field) {
        if( field == null) return "";
        return field.getDeclaringClass()

                    .getCanonicalName()+"."+field.getName();    
    }
  
    /**
     * Gets a field by name and class. Null if none was found.

     * This method works recursively in all superclasses.
     * @param name
     * @return
     */
    public static Field getField(Class clazz, String name) {
        Exception exception1 = null;
        Exception exception2 = null;
        Class current = clazz;
        Field result = null;
        do{
            try {              
                Field[] fields = current.getDeclaredFields();
                for( Field field : fields ) {
                    boolean accessible = field.isAccessible();
                    field.setAccessible(true);
                    if( Objects.equals(field.getName(), name) ) {
                        result = field;
                        break;
                    }
                    field.setAccessible(accessible);
                }
            } catch (SecurityException ex) {
                ex.printStackTrace();
                exception2 = ex;
                Logger.getLogger(Localization.class.getName()).log(Level.SEVERE,
                        "No acess to Field " + name + " in " +           

                         clazz.getCanonicalName() + ".", ex);
            }
            current = current.getSuperclass();
            if( result != null) break;
        } while( current != null );
        return result;
    }
  
    /**
     * This is the method that ultimately translates the field.

     * Obtains a statically defined localized string.
     */
    public static String getLocale(Class clazz, String name) {
        Field field = getField(clazz, name);
        if( field == null) return name;
        return translations.get(localizedVar(field));
    }


While this sounds like a handy approach there is one huge downside to it: Say my CTWindow class is extended with a MainMenuScreen. So what happens? Due to the nature of this algorithm, I can't define anything like MainMenuScreen.title = Main Menu instead of CTWindow.title= Some Title in my properties file. That means the String in the CTWindow.title local variable is stuck and cannot be redefined by subclasses. That is because of the field.getDeclaringClass() part in localizedVar(). You can work around this if you change the methods by providing the class of the object instead class where the field is being declared, like so:

    /**
     * Obtains a localized variable by
     * a simple field name and class.
     * @param field
     * @return
     */
    public static String localizedVar(Class declaring, Field field) {
         if( field == null) return "";

         if( declaring == null) return "";
         return declaring.getCanonicalName()+"."+field.getName(); 
    }

I haven't tried this out yet, so I cannot say for sure if this works! Let me know if it does. ;)

You also can still use the localize() method ontop of this, as described further above, so both of these methods can be combined together. If combined, they may actually offer the possibility to change language in a live system, as the field names are used directly for translation.

But how do you treat lists or collections of Strings?!

That's a topic for another article!


I hope I brought you closer to the topic of localization. Thanks for reading! I hope you enjoyed it.

Samstag, 28. Mai 2016

7 Ways to Boost Your Productivity

We've all been there once, wasting our time then wondering where it went. So how do you actually boost your productivity?

I collected a few helpful tips here:


  1. Get rid of all distractions. Get your focus right! Log out to all your social network accounts. Turn of your phone. Turn off internet, too, if it's not crucial. Spend a few hours doing what you planned without any distractions. DO IT!


    https://i.ytimg.com/vi/Z6gG3tKDBlk/maxresdefault.jpg

  2. Find a way to organize yourself. Keep a to-do list. If you're an indiedev, you can use HackNPlan. Don't lose track of what you're doing - which leads me to the third point.

  3. Review how far you've come and ask yourself if it helps achieving your goals. You HAVE to do this no matter what you're trying to achieve (no matter if you want to become better as a person, live a better life, or fulfill your biggest dreams). Dream big and make it happen!

  4. Make sure your work environment is well-lit. Bright light encourages your brain to focus more. Too less and you get in sleepy mode!

  5. Make sure your work environment is tidy if you work on tasks requiring a lot of brain juice. For creative tasks, a bit of a chaos may actually help finding ideas.

  6. Make sure you don't work with a full belly. That's when all your blood is in your intestines instead of your brain. The best time for mental work is with empty stomach after a walk, workout, or cold shower, when your metabolism is all fired up, feeding your brain with valuable oxygen. Breathing exercises in fresh air may help, too.

  7. A cup of blueberries and other fruit can help boosting your mental capabilities.

    https://upload.wikimedia.org/wikipedia/commons/0/0b/Blueberries-In-Pack.jpg


How do you keep your productivity high? How do you keep it? Let me know in the comments!

CamoTactics 7.0 is out! [+Download]

I am very happy to announce the CamoTactics 7.0 Build is FINALLY online. Get it here!

CamoTactics 7.0


I hope you enjoy stealing your enemies' stuff...



... and sneaking up behind them!



After you have finished them off, of course!

animation 1


Got praise? Got suggestions? Got something you don't like? Please share that with me!

Make sure to check out my blog. Follow CamoTactics official twitter for updates or my personal twitter for&nbsp;indiedev ramblings!

Donnerstag, 26. Mai 2016

Censorship in games: A Means of Control & Power

There have been quite a few outcries in the gaming scene lately. People have asked developers to remove the suggestive animations of Mika from Streetfighter and Tracer from Overwatch. Now disregarding the hilarity of people getting offended by moving 3D models of women and considering the scope this phenomenon seem to have acquired - I personally do not think this is about "sexual objectification of women" anymore. This is about control. Control over content creators (here: game developers) and their creative decisions.

Let me elaborate and put this into a bigger context.

Society needs ideas and information to grow. In order to figure out the ideal living circumstances, and mind set for their personal growth and the ideal, humans need both of these things. Because humans are gregarious creatures, we are always often in contact with others and learning from those around us. Not only we learn for ourselves, but also as a community. We are in a constant state of "collective learning".
The more information we have, the likelier we are to connect the dots - and thus find new ideas and perspectives (if equipped with the appropriate intelligence). I think you can call this an "evolution of ideas": the more diverse these ideas, the better. They evolve faster than laws, rules, hierarchy and (infra-)structure of a society, too.

And this is where it gets interesting.

An attempt to control this process is an attempt to control humans and the society we live in.

Individuals with their own thinking capability can have powerful thoughts. Thoughts that may pose a danger to established rules and holders of power. Remember: ideas evolve faster than laws and rules. It's why we are still stuck with fossil fuels (coal and oil) that have been around society for 200 years or more. And that's exactly what suppressing new things does: make society slow down or even move backwards.


If an idea gets enough momentum, it may pose a danger to the current status quo.

See why censorship is a powerful tool, no matter the form? (Not only in gaming... just look over to the tech scene...)

If game developers give in to "sexually objectified" 3D depictions of women, they will easily give in to other demands as well. Give them mobs a finger - they'll take the entire hand. Happens a lot if you raise children the wrong way, too.

It is important to censors to feed and maintain an angry mob of cronies (mentally unstable, desperate people) that transform into a state of outcry when something is not going as they want. Then, they will fire up their outlets and moles disguised as independent journalists to mobilize the mobs and fabricate outrage. Gaming isn't the only media this is happening to, either.

It does not matter what political spectrum this mob aligns itself with. They are all pawns in the same game.

Feeding these angry mobs is an invaluable asset, as it kills multiple birds with one stone. For one, it thwarts those whose ideas are ahead of their time (or at least attempts to). It distracts people from the real issues and the ones pulling the strings. Someone who is in distress and seeking comfort in authority and being part of a cult group cannot form critical thoughts themselves - and therefore cannot become a dangerous wolf in the process.

The aim is to create a downwards spiral of negativity, outrage and despair to keep as many people as possible away from the feat of creativity and critical thinking.

After all, you wouldn't want those wolves to destroy your shitty click-bait site business you've built up over the years.

Oh wait...

https://pbs.twimg.com/media/Chj35u3VEAAx_aB.jpg 


So if you are a creator let me tell you this. Create whatever you want with whatever ideas you have, even if they are controversial - know that controversy is needed for human society to evolve.

Know that just because someone has a megaphone doesn't mean they are the majority or an actual or potential costumer (or in other words: matter). 

If you piss off the right people, know that you're doing something right: namely standing up for yourself and what you believe in.

And that's what life should be all about.

Cheers!