Showing posts with label game. Show all posts
Showing posts with label game. Show all posts

Tuesday, 19 January 2016

App Improvement

This week I was busy in adding more features to the medicator app. As of now its a very basic app but with some more features (which I don't want to reveal at the moment) it will be much more useful and complete.

You can expect this update to be rolled out in the first week of february.

At present I've changed my priority from game development to app development. First I want to focus only on this app and then I'll work on the game which I was building.I don't know how much time will I spend on this one but its a very good learning experience for me.

For first 2 days of the week which I spent on SpinIt . I learnt how to add swipe movement to the game screen by changing camera using lerp function in c# unity. I was having some problem in implementing it correctly but in the end I got it right. I am planning to redesign the levels and make them more interesting than just plain blocks.

I'll try my best to resume my game project just after completing the app.

Thank you.

Thursday, 31 December 2015

Writing Again !

I stopped writing on this blog for around 1 year. I was trying to do a lot of things simultaneously and not able to handle them properly.

But now, I am starting to write again.

The year 2015 was like an eye opener for me. Got to learn a lot of things which includes basics of HTML, CSS, Machine Learning, Game Development. Python, Android App development, Git and Github.

For past 1 month I was busy in taking courses from coursera regarding these things and right now I am making an android app "Medicator" this includes a medical dictionary for various disease plus a quick check up feature which can tell what kind of disease a person might be suffering from. Its still in development and may get completed by the end of Jan 2016. I'm not so much excited about this.

The reason is that  I've started making games ;)

I've learnt the basics of unity game engine and want to make my own games.
I've made a game 'Box Shooter 3D'. Its a shooter game which starts with a 15 seconds timer, you've to shoot green boxes for score, shooting white boxes increase the time and shooting yellow boxes reduces it.  Here is the link if you want to play. This won't open in Chrome as Google has decided not to support unity plugin.

I've taken help from a game development course in order to build the basic part of this game and then I've increased the difficulty level because it was too easy without it. I'm planning to build more levels of this game.

There is one more game under development 'Spin It !' Its an exciting third person game. I want to make this one a major game with lots of stages and upgrades. This one will take a lot of time because I''ve very limited time during college but I am planning to deploy this in google play store before April at least . Let's see if I can meet this deadline.

Stay tuned for more updates. A very Happy New Year in advance ! 

Thursday, 19 June 2014

Time for some Maths...

We lost humblefool this week in a car accident , he was a great coder(The first Indian who became red on Topcoder) he was excellent at coding and a nice person as well .It hurts a lot when a great person dies may God rest his soul in peace.

This week I was increasing my mathematical knowledge . Learnt many concepts regarding game theory especially Nim game after going through the rules of the game I came up with my own style to solve the game for ex - this game is played between two players A & B . On each turn the person will subtract a number given in the set lets say S = {1,4,5} from a given number N until we get a Zero the person which will not be able to subtract from the no. he gets will be the loser . N will be our starting number from which we will subtract 1,4 or 5 so that the player subtracting will win. Like every other player both A & B will try thier best to win this game so they will play optimally .'Optimally' in the sense that they will try some maths in their head to come up with the best solution i,e. to subtract which no. so they will win .

I came up with an idea like lets create a function for this game

 P(N)
 {
     if (N =1 or N=4 or N=5) return 1(denoting win with 1)
    else if(N=0 or N=2) return 0 (denoting loss with 0)
    else return ( P(N-1) or P(N-4) or P(N-5) )
 }

As we can clearly see if a person gets 1,4 or 5 he can directly subtract 1,4 or 5 from the no. he gets to arrive at zero and thus the other player won't be able to subtract any no. from a zero.
so in first if statement 1,4 and 5 are returning a WIN

for N=0 the first player won't be able to subtract any number so he will lose .For N=2 we can see that the person will be left with only one choice i.e. to subtract 1 from it so the 2nd player will arrive at N-1=1 so he will also subtract 1 from it thus arriving at Zero so that will be a loss for the first player so we return LOSS on 0 and 2

For rest no. I am taking OR from all the possibilities of subtracting 1,4,5 because if we get a 1 from any of these possibilities this will mean that the player will choose the winning move (Well that is the meaning of playing optimally).

So this function will give us the right result for this game.
We can optimize our function by memoizing our results using an array like we do in top up approach of Dynamic Programming ... that will save us a lot of time ..

Today morning I understood how to implement the Sieve of Erastonethes.That was amazing algorithm .
It was efficient O(NloglogN) as well as simple by logic Enjoyed implementing it.
I'll be increasing my maths knowledge as maths skills are very handy while programming.They can simplify one's code to a very large extent thus one just can't ignore maths while coding.

Thanks for reading.