Thursday, 30 October 2014

Game Idea: Untiy 3D texture packing

Unity 3D since 4.5 have awesome 2D feature like texture packing. It can be even more cooler if Unity will analyze game statistic and build sprites according to usage for minimizing memory usage.

Game Idea: UNITY3D physics

I can't understand why navMesh is totally physics not related. It make tons of problems and head ache. So don't use anything except physics when creating Unity game.

Tuesday, 28 October 2014

Game idea: Stars moving

Many 2D games have background with the sun or stars or clouds. But they always stay still when we are moving in 2D game. It's totally wrong cuz when I traveled by the train I have noticed that stars have complex trajectory of moving cuz we are moving not in one direction. So if we move in 2D game we move not in one direction straight we should calculate parallax moving more accurate.

Game Idea: Live assets

Imagine game where assets can be uploaded via internet with live web camera placed in real world location. Of course we need all the time internet access, but anyway.

Monday, 20 October 2014

Game Idea Walking tree

You are the tree. But you can walk by your roots. Water and sun make you feel better. We have location like jungles, city, pine tree forest. It is an Eco game and teach people to live in harmony with nature.

Tuesday, 14 October 2014

IT Unity

Today IT companies have too much ambitions. Google want to create mobile system that really sucks, Apple want to create maps that's sucks too, Microsoft creating search engine Bing that no one use. Seriously why not to deal and make good what you making good. Imagine cool Apple device with Microsoft OS and integrated with Google services. But this an old storie, they better prefer war.

Game Balance

Modern games have awesome balance. Like Skyrim, Risen 3, Witcher. They are so balanced that seems boring as for me. Never mind what skills do you improve result is the same. And whole gameplay of modern games is like Oblivion with auto calculation that depends on level. Old Gothic 2 have lot of bugs and not balanced things but element of randomnes make big fun.

Monday, 13 October 2014

Coding idea: methods inheritance

I know it can be done via simply calling base method, but wit oop it should be more natural to have such syntax:

void Initialize();

void InitializeAll() : Initialize;

Saturday, 11 October 2014

Game Idea: What is the most important in games ?

Some developers make an awesome graphic like Crisis, some make cool stories like Gothic, some have awesome sound, some of them have cool game play like Angry Birds. But lets think in project of time. Any graphics will be improved with time. Like 3D  graphics of 90th is much worse then 2010th. Same with game play. With time we will have cool things like physics or destroying everything or burning in fire. Lets be honest Angry Birds will suck without cool physics. I think there are 3 things witch will be less affected by the time:

Story, Characters. Music.

So I think this parts of the game should be the best to make game classic. But it's just my opinion.

Friday, 10 October 2014

Game Idea: Dinosaurs against Zombies

You are riding tyrannosaur Rex. You can launch fire, destroy buildings by your tail. Your task is to destroy zombies and protect peaceful people. Zombies believe that you are an invader and want some evil for them.

Be careful of zombies. They can attack together and have some small mind. You can move next if more then 60% of zombies are destroyed and you can move on. Also you can heal zombies and make normal people from them.

We have different locations like city, forest, cold desert.


Thursday, 9 October 2014

Unity 3D Anoxemia Heat Distort Tutorial



Hello. It is a part of Anoxemia tutorials. Here I want to share some experience of creating 2D game with Unity

What we going to do here:



DOWNLOAD:
https://dl.dropboxusercontent.com/u/106482752/Dvornik-Unity-Distortion.zip

Root tutorial: http://kostiantyn-dvornik.blogspot.com/2014/07/anoxemia-unity-2d-tutorial.html


If you ever want to create cool effects like hot air waving or thick glass refraction or some underwater streams you will came to Detonator package and HeatDistort shader.But as for me it looks very complicated, so write my own and use it well with latest Unity 2D system.

NOTE: it works only with Unity Pro and Deffered lighting on. It works the same way how Detonator'a works. It tooks image and project it correctly on a plane with texture distortion.

We will split tutorial into 2 steps.
1.Explain shader
2. How to use it.

1.
Lets take a look at the shader:

Shader "Dvornik/Distort" {
Properties {
_Refraction ("Refraction", Range (0.00, 100.0)) = 1.0
_DistortTex ("Base (RGB)", 2D) = "white" {}
}

SubShader {

Tags { "RenderType"="Transparent" "Queue"="Overlay" }
LOD 100

GrabPass
{

}

CGPROGRAM
#pragma surface surf NoLighting
#pragma vertex vert

fixed4 LightingNoLighting(SurfaceOutput s, fixed3 lightDir, fixed atten){
        fixed4 c;
        c.rgb = s.Albedo;
        c.a = s.Alpha;
        return c;
  }

sampler2D _GrabTexture : register(s0);
sampler2D _DistortTex : register(s2);
float _Refraction;

float4 _GrabTexture_TexelSize;

struct Input {
float2 uv_DistortTex;
float3 color;
float3 worldRefl;
float4 screenPos;
INTERNAL_DATA
};

void vert (inout appdata_full v, out Input o) {
  UNITY_INITIALIZE_OUTPUT(Input,o);
  o.color = v.color;
}

void surf (Input IN, inout SurfaceOutput o) {

    float3 distort = tex2D(_DistortTex, IN.uv_DistortTex) * float3(IN.color.r,IN.color.g,IN.color.b );
    float2 offset = distort * _Refraction * _GrabTexture_TexelSize.xy;
    IN.screenPos.xy = offset * IN.screenPos.z + IN.screenPos.xy;
    float4 refrColor = tex2Dproj(_GrabTexture, IN.screenPos);
    o.Alpha = refrColor.a;
    o.Emission = refrColor.rgb;
}
ENDCG
}
}

We have just 2 properties. It is

_Refraction -amount of distortion
_DistortText - texture according to what we gonna distort our environment. You can use any colored texture. To make distortion. But in fact only Red and Green channels are working as distortion vector.

Tags { "RenderType"="Transparent" "Queue"="Overlay" } - We set Queue to Overlay because we want to render this effect after everything.

#pragma surface surf NoLighting
#pragma vertex vert

We used custom NoLigthing model and custom vertex shader to have deal with vertex color that used in particle system. There is a little chunk, cuz we write only Emission to have absolutely No Lighting shader.

 float3 distort = tex2D(_DistortTex, IN.uv_DistortTex) * float3(IN.color.r,IN.color.g,IN.color.b );
 float2 offset = distort * _Refraction * _GrabTexture_TexelSize.xy;
 IN.screenPos.xy = offset * IN.screenPos.z + IN.screenPos.xy;
 float4 refrColor = tex2Dproj(_GrabTexture, IN.screenPos);

Here we read distort texture, calculate offset of the screen and project on the model correctly. That's it.

2. 
Create a simple material and apply that shader. Next if you use particle system apply particle render order script to that. Other way some object will be rendered after distortion so it will looks weird. You can use particle Color or Color Over LifeTime to make distortion more/less. I often setup it thats way:

to make distortion fade in and fade out. Thats probabbly all that you need to know about.

Know bugs:
1.

How to resolve:
Add particle order script to PS and set order to  bigger then foreground sprite.
Effect is not working with orthographic camera

2. To much distortion on large distance to camera
How to resolve: add script that decreasing material property distortion with distance to camera.

Tuesday, 7 October 2014

Mobile App Idea: Golden section

A lot of time I need to find a correct number in some interval. For example in [0..100] I need 30. I can do it via half dividing method, but golden section is much faster for finding solution. So all i need is to choose between two intervals divided into gold section and ability to move back. 60% 40%

Mobile App Idea: Interesting Way

You have a list. You can add words there. Any words or even phrases. Like "go to movie" "read a book" "clean up your room" etc. That application will combine activities that you put into a row, interesting way like game designers do. So every day you will get activity or any other word you have put. You can add dishes like "soup" "cake" "meat". That's way you will never forget something cool and make your life more interesting. By the way if that application will have a lot of users and internet connections we can manipulate a lot of people.

Monday, 6 October 2014

Saturday, 4 October 2014

Game Idea: Stop faking

There is a lot of fakes in game industry. Some of them:

1. Epic rendered trailer with extra awesome graphics and animaition
2. Cool posters also with awesome graphics

1.  Yes you can spent millions on render, but as Skyrim trailer madden on game engine proof that real can be epic too.

2.  2D painted art is mostly better than in-game graphics. Especially it about icons in App Store. I simply can't judge game by icon at all. It better to have animated gif of game actions that such representation that take my time to click and see and than back

So stay real please

Thursday, 2 October 2014

United States of Europe

2054:

Territory: Current Poland, Moldova, Belarus, Ukraine, Border West Russia
Capital: Kyiv
Language: English
Coat of arms: Tryzub
Population: 40 000 000
Model: Torrent
Philosophy: Knowledge, Art, Development
Flag: 23 White tryzubs on Red-Black stripes
Currency: Euro
Anthem: Epic ( 2023 )

Wednesday, 1 October 2014

Game Idea: Build and destroy everything 2D

It is a complicated task to make environment from peaces in 3D like Minecraft do, but it is much simpler to make in 2D.  I mean we can have natural physics for blocks and they can looks cooler and realistic, not cubed. With such structures we can explode everything or build everything.