Custom Segmented Controller in Swift in iOS

This is the Custom Segmented controller made in Swift 3. It is totally customisable in the Interface builder and we can easily tweak and add more components in it.

I am really loving the ios development. Also I find swift/ios easy and fast compared to Java/Android

If you have any question feel free to ask me. Also if you have any cool ideas or want to see something particular, do let me know. I am all open for challenge

Happy coding 🙂

SegmentedControllerScreen Shot 2017-08-28 at 4.34.34 PM

Touch Inputs in Unity3D

This is the one of the most discussed topics in many forums. Even though Unity3D is a multi platform game engine and supports all the mobile devices, the touch input with Unity3D is still tricky and not so easy to achieve. Even when attempted, many a times its not a smooth user experience and sometimes quirky and laggy. After many trials and errors I have come across a way to get the touch input work and I am sharing my way with you. Hopefully it will be of some use to you guys and may be you can take it a step further and can modify it according to your needs.

Please not that this Touch Input is for “Tap Detection” only including Multiple Finger Taps, as most of the devices can now detect upto 5 fingers at a time.

Continue reading

Turbo C++ in OSX

Its been a long time since I’ve posted something in my blog. I have been super busy with all my works, studies, assignments and eventually I’ve had some time to update my blog. This is a technical guide on how to use Turbo C in OSX and not anything related to my work or gaming. I have been so accustomed to OSX that i hardly touch my PC now a days for work purpose. Its only when playing games (which is also very less as I prefer using my PS3). Mac is super smooth, I have been using it for a year now and have hardly felt any lags or hang issue while working on it, no matter how many apps i keep open in my system. The only problem I’ve faced was a low memory issue (even after having 16 GB of RAM) but i guess nothing is perfect. Mac doesn’t empty the RAM as soon as we close the app. Memory Clean app is perfect for that. Anyways, so, as I was saying, I was busy with my studies and assignments and I had to write lots of C programs to submit. Now C runs on DOS and so I started looking for a C Compiler in OSX. Unfortunately I couldn’t find any such Compiler but I was introduced to a lovely app called DOSBOX which lets u run DOS in Mac OSX. I have seen many post where people are trying to figure how to run Turbo C / C++ in OSX and they end up using terminal or xCode which is not very friendly (for this particular purpose). So this is a short guide on how to run Turbo C or Turbo C++ in Mac OSX. I will list the entire thing as I did it, so that if anyone is following this guide they will get a working copy of Turbo C / Turbo C++ installed in there Mac by the end of this tutorial. Continue reading

Setting Up Prime31 AdMob Plugin in Android game in Unity3D

Hi guys,

If you are also an independent Game Developer then it is very important to somehow make the game monetize so as to support you as a developer. Ofcourse We can always make our game paid, but then being an indie developer, if we do so we might lose lots of users as they might not just buy our game thinking whether its even worth buying it or not. The only way to make sure that people download our game is by making it free.

The current time has been very favaourable for the indie developers as we now have the option to make our game “freemium” which means that it is free to play but if the user really likes the game they can go ahead and buy some expansion or upgrades from inside the game and thus making sure to support the developer too in doing so along with us being very transparent in leting them know that “its worth it”. The other great way is “Ads”. I, however dislike ads but then its a very good source of revenue considering you have a moderate number of downloads and your game is really worth the replayability. As the more people play everyday, the more the chances of clicking on the ads. There’s lots of options for us in terms of ads like AdMob, MobClick, etc. I prefer to use Admob by google as its a very good option but then again its really very painful to integrate the AdMob SDK inside Unity3D, unless you are familiar with the Eclipse and Google Java Programming. I am not a hardcore programming guy and therefore learning eclipse and making my own plugin seems very time taking to me (though I have tried my hands in it just to see myself with no luck in the end) So I decided to use the Plugin made by Prime31 (http://prime31.com) Its a very good plugin and it says that its really easy to integrate it into the Unity3d Project but I dont think so. I have tried and tried and have failed to do so. There documenation is also not very friendly. So after doing lots of research in the internet I came with some luck and after some trial and error method I have managed to integrate it into my game.

So this is a small tutorial on how to inegrate it into the scene if, you also like me is having a hard time struggling with Prime31 setup.

Following is the step by Step instruction on how to set up the Prime31 Admob Plugin for Android Continue reading

Camera-Shake Effect in a FPS Game

Hi,

I have been wanting to write this post for a long time but as I was busy with my other work it just got delayed.

If you have played FPS games then you must have noticed some kind of effect which makes the user feel whenever his health is reducing. Such as the camera shake or the screen becoming red with blood splash. This kind of effect brings realism to the game and make the player feel the damage. If we don’t have any damage effect apart from just reducing the health count then somebody might be shooting the player from the back and the player would not even realise when he is dead.  Continue reading

Character Crouching setup in FPS or Third Person Adventure Game

Any person who have used Unity have also tried their hand in making a FPS/TPS game. Unity giving the inbuilt FPS Character Controller makes it as easy as just creating a plane and draging the Character Controller from the Standard Assets folder to your screen and voila we have a working game with our character in it who is free to move anywhere on the screen.
Even though Unity has an inbuilt Controller Movement Script but at the later point of time you might want to use your own character Script for the character movements.

As you do that you might achieve the basic character movements, jump, gravity etc but the problem where I faced was on the crouching or sliding ability of the character.
I had all the animation setup done for the character such as Walk, Jump, Sprint, Crouch/Slide but when tested, all the setup was working properly except Crouch. When I looked into the problem I noticed that it was still colliding with the enviornment which is above the charcter when in crouching mode and after some brain storming I found out that it is because we need to adjust the Character Controller to shrink in respect with the character animation.
Continue reading

Level Change Transition in Unity3D

In the last topic I covered how to make a loading screen in Unity3D and as we all know that it is very very important to make a loading screen and we find that in almost all the games. Now, in this topic I want to cover to make some kind of transition effect in starting of the level.

If we try to recall all the past games we have played so far, we might notice that almost all the games have some kind of transition as the level starts. And If we take a moment to think about it, we may see the benefit of making those effect in our game. Transition, somehow makes the player prepare for whats about to come in his next level. It gives the player few extra second to be prepared for the next level. Imagine yourself waiting to play next Level of the game while you see a loading screen and then just like that in a moment of mili-second you find yourself in between a jungle or a cave or whatever the level contains. The player might actually be confused but if the same thing happens and you get into that situtation after say 3 second fade-in effect, then that 3 second will actually prepare you and you will be able to adjust youself with the surrounding of the levels.
Continue reading

Making a loading screen in between Levels is Unity3D

Loading is one of the most considered thought while making Levels. We always have to be careful so as not to make our levels too heavy. Long loading makes the user bored from the game resulting in simple uninstallation or bad review. Though there are many ways by which we can optimize the game in order to make it load faster.
Whatver the case may be, it is always a good idea to make a loading screen to appear in between levels so as to make the user aware that the game is working on loading a screen rather than giving an appearance where it seems that the game has just freezed.

As with my progress in my current game I had to make a similar loading screen and was totaly unaware of how to do it in Unity3D. I have a experience in making games for Flash and it was pretty simple in Flash. After doing little experiment of my own I found that, in Unity too its as simple as making a seperate scene and just arranging the screen in a similiar fashion.

Following is the little guide on how to make a Loading Screen in Unity3D:
Continue reading

ShaderLab in Unity3D – iOS

Shader is a computer program that is used primarily to calculate rendering effects on graphics hardware with a high degree of flexibility.
Shaders are used to program the graphics processing unit (GPU) programmable rendering pipeline, which has mostly superseded the fixed-function pipeline that allowed only common geometry transformation and pixel-shading functions; with shaders, customized effects can be used.
– Wikipedia

Those who are not from the 3D Background are not aware of the Shaders, Materials and other related stuffs. This Post is for those people.
So, In simple terms, Shader is a Script which controls how the materials will look after assigning it to the 3D Objects. Shader is found in all the 3D application for example Maya, 3DS Max, Blender, zBrush, etc and is very very important in terms of the output of the the final Scene.
Similarly we have Shaders in Unity3D also which is very powerful and many kind of VFX related effects can be achieved using the shaders. There is very good article by MadFinger Games (http://madfingergames.com) who demonstrates how they have achieved some of the effects in their game ShadowGun using Shaders. (I will add a link to that article in the end)
Continue reading

Exploring Unity3D

This is kind of a late post as I have been exploring Unity3D since 2 Months and I must admit I have learned a lot. Which takes me to the point to desire more, explore and study the game which has already been made and released using Unity3D. I have been following Unity3D forum closely to keep myself updated with the interviews and Tips&Tricks.

I suppose with Unity3D v4.0 coming in a month its becoming more powerful and has more to offer to its users. Also as I have been using JavaScript( or UnityScript) till now, I have decided to move on to C#. I am new to C# but as I have done C and C++ long time ago in school, I guess It just the matter of time when I am comfortable in Scripting using C# as I am now in JavaScript.

I also hope to release few games which I have made in this two Months however all the games are entry level games with not so attractive look and feel but I am quite happy with the Gameplay. I really hope to publish and add the web version here in my Blog. I am also working on a few iOS games in my office and also planning to make a PC/MAC/iOS/Android Game along with my friend. I will update about it as soon as it comes in Action. We are still in planning stage 😉