Pages

Unity Gravity Sim

Made a very simple Gravity simulation between 2 bodies.

I just wanted to try out Unity 5. It feels really good to work with a full version doesn't it!

Was trying out attracting two objects, then googled here and there and found Force is inversely proportion to distance squared etc. Just put these into a scene and started playing around.

Then it suddenly hit me how slingshot and orbiting works. WTF.. so many years in school, never understood a damn thing!

Btw, Unity has WebGL deployment now - publishes a 30mb js file x_x


Physics 101

You know that feeling of spending years on something and not really getting it? Physics & Rendering is like that to me. Was reading this nice physics article - so many years of school & college physics summarized in one article. Pretty deep, I'm still in the Moment of Inertia thingy.. that's my moment right there.. x_x

Physics in game development is a big road block for me. For single-person / indie developers - you need to be "The Jack of All asshole" (go back and read it like John Constantine).

But the problem is - the moment you go beyond proto phase you start hitting major roadblocks in any game engine - usually graphics or physics. Either the frame rate suddenly drops and you have no clue why (I'm looking at you Unity) or Physics stuff don't work as you intend. Those times when your fucking 4 wheeler topples at 200 mph turns and you have no clue how to fix it, or things just become Kitty from X-Men.. no.. I didn't mean cute O_o


Smaaaarter than the average animator of those days



This is actually pretty neat. Never realized how much focus the head gets. I think Indie gamedevs should use this technique more.

Not all those who wander are lost

All that is gold does not glitter; not all those who wander are lost; the old that is strong does not wither; deep roots are not reached by the frost.

- J. R. R. Tolkien

Been a year now?

Guess it's been an year or so since my last post.

Tried a bit of web development over the last year. Tried my hands on NodeJS, ASP.NET MVC etc etc. 

Node + JS
While I really liked Node, JS part turned out to be a tricky little fuck!
I really love the simplicity of JS. But then there is the "this" pointer fuck-ups that keep happening x_x

ES6
Recently tried Traceur. Wanted to explore how the ES6 has changed the JS landscape. Welcome improvements, but to what end? Coming from C# background, LINQ lovers will love the new ES6 stuff. There's also better way to create classes, and don't forget - Futures and Promises, the Internet of 2014 Things.

But I really didn't like the way classes are gonna be implemented. Need to qualify every member variable / function with "this". WTF.. half of my class code will be "this". Fuck this, fuck that. Also, this context is lost as usual, and using ( ) => is the only way to fix the "this" context.

Heroku
Hosted my site on Heroku for a while. The command line upload, using Git and shit for deployment was fun. Not to forget, Heroku file system is case sensitive.

App Engine
Now my site resides in Google's AppEngine. They have a GUI to upload O_o
My site is static for now, cos I had no time to invest in Python frameworks.
Google is the new Microsoft - they won't support Dart in their own App Engine, and they call it the future (I know about the VMs.. they no free Senor). Also they fucked up Maps big time :P

C#, ASP.NET MVC
Yeah, all things Microsoft. Also Windows 10. 
C# and it's Async / Await took the world by storm didn't it? C# 6 didn't raise a single eyebrow.
Guess others have caught up to C#, now the cycle repeats.
And MS's definition of Cross-Platform remains Windows 8 + Win Phone only.
Windows 7 dead already? Nope, and fuck you MS and your Air-Space Issues in WPF.
Waiting for .NET native though (I meant on all platforms)

C++11
That was nice. Being able to see it in action, in blogs and videos.
Clang is the only, truly, really complete implementation yet - like it or not. 
And I gave up tryin to get Clang working with CLion
Also, Futures and Promises. Amazeballs right?
VS2013 has no fucking support to write u8"" strings, fuck this shit. It's 2014

Alright, enough of cynical shit. The good things...

Dart
Latest adventures. Pretty awesome language. Very very non-verbose. To the point language.
Very rare thing to come across. And I'm as of now, hooked.
Made a little game in Dart, check it out
Playing with ThreeJS & Dart for now

Unreal Engine 4
Best news of the year so far. And the entire source-code, for 20 bucks. Love those EPIC guys.
It was so so long since I saw those ugly MACROS in C++ X_x
My laptop though, hates it. Blueprints though, are really amazing.
UE4 is a step in the right direction from UDK.
But no scripting language :\

Rust
Rust is the most anticipated language for now. Like it or not. The syntax is again is lot less verbose for a native language. I've been dumping my learning on Github, Yeah you can read about pros and cons everywhere. The best part of Rust is the Reddit community. Fucking awesome, really nice people, best of devs.


HTML5
Videos play nice now don't they. Finally.
Most of the browsers now support HTML5 and WebGL (even IE! Woot!)

Microsoft
Ok, all things said and done, they have shown interest in open source software.
With Roslyn and Node tools (this was really cool)
Also MVC is open source now, & so is Typescript
Not to forget, Azure is becoming more cross platform than their SDKs

Azure is also very nice to work with (I mean nice like a fluffy cute bunny), but little expensive to begin with (fucking bunnies -_-)

Ok, so the following posts will mostly be about Dart & Rust I guess. Oooo.. and WebGL may be?
















LakeView - UDK Map

My 1st UDK Map - I call it LakeView. 
Here's a couple of videos.






Things I learnt :

1. Always, always block out the level first instead of going into details

2. Plan ahead if you are making multi-floor approach (like 2 floors or more)

3. Terrains are one-way objects.. means to say from below they are invisible

4. Design levels based on type of game. For something like Unreal Tournament don't waste time beautifying the level - players don't get a chance to enjoy them much, so focus more on elements that add up the fun.

5. If possible make copies of UDK assets in your custom package (don't edit the original)

6. Add bots and test out the level in the initial phase itself. You see, you can have this glorious imagination of bots acting like smartasses and doing cool things - but they don't.

7. Check out UDK documentation for path nodes and stuff. You can see the navigation map in the editor that shows connections and also color-codes the links. It's really helpful when bots don't use way points.

8. If you make a 3D editor - for fuck's sake don't use mouse right click for navigation.

9. Fog - very useful to blur out those distant objects. Use exponential height fog when possible

10. Never make a "forest" type of level for your first map. Foliages (grass, leaves, herbs etc) are hard to place - they can cause a hit on frame-rates. Experience will teach where to use and how much to use.

11. I use blender - use your scale properly. If the model is too small then even if you scale in editor, the lightmaps will still have issues. Also, if fbx is ASCII format - you can set default scale using notepad++ :P

12. These 3D level editors - any of them - be it UDK, Unity or CrySDK, they keep crashing. Always take backups of your files - multiple ones. Use them as check points. (For me, UDK removed a lot of foliages by itself and by the time I realized they were wrong I had made too many changes to just revert to old version)


NTFS: Recording game play, compressing and uploading videos is a fucking pain in the ass

Mecanim Tryout

Let's make Unity's Ethan shake hand with a very very hot invisible chick. Press 'X' to shake hands
Very simple state machine










Idle to Shake Transition




















Shake To Idle Transition




















Flowchart-
Idle keeps looping
When "Shake" is set >> transition to Shake
Stay there until exit-time has occurred and Shake is set to false (It should be play once)

So we do need to write some code for this, Mecanim can't variables and stuff I think (not sure).

The trick for using "Boolean" trigger in Mecanim is -
Check if we are in proper state.
Set Flag
Next loop - Unset flag

Animation re-targeting is cool and all.. but I'm not so impressed with the design / architecture yet. Looks to me like it's gonna end up being a big pile of mess with lot of patch-works everywhere. Hope I'm wrong for my own sake..

A long time ago

A long time ago, I was a student. I was in my 12th (means final year of schooling, next up engineering). I had an exam the next day. Like always, I thought "let me study later, the day is still young and I have all night long to prepare."

So I started watching some highlights of a soccer game I had missed. Then came Dragonball Z. Then came something else, something else and so did the evening. It was sunset. Suddenly lights went out. But why? My dad had got an inverter installed an year back, I had UPS backup? It was then I realized there was a major power cut from morning and I had used up most of the battery.

WTF! My exams.. So while I was still like "Meh.." my parents freaked out, sometimes power never used to come back till next morning those days (actually sometimes even now). So we decided, we'll use the power judiciously.

So when I was studying, other than the one light in my room everything else was switched off. Then when my mom went to cook, only the kitchen light was on - and I waited. So using 1 light the whole night long, managed to pull it off without tripping the inverter.

You are probably thinking why I wrote this now?
Well... Unity just released a new version and you can have 1 dynamic light in the free version ^_^
Just saying... 1 light can make a big difference.

Also, a contest [See what I did there? O_o]


jQuery Accordion

Trying out jQuery - here's an Accordion in less than 10 lines of javascript!



You can also see the demo / code here. [in case the iframe gets blocked]

How it works

Structure:
Accordion
-- AccordionPage
------AccordionHeader
------AccordionContent
-- AccordionPage
------AccordionHeader
------AccordionContent

Logic:
On-click of Header - hide all 'content' and display the 'content' which is a sibling of the header.

Javascript:

100 things you should know (game dev)

Found this excellent piece floating in my twitter stream - PDF. I feel it's not just for students.

Also, I learnt a new word today - HUBRIS

Are coders worth it?

This is a really well written article. Pretty impressed with his writing skills. 

Also comments are fun, reminded me about this joke - "Go away or I'll replace you with a very small shell script"

Language Trending

Was bored - thought I'll see how programming language are trending. Google Trends is a fun tool!

Popularity -





Ideas


Ideas without action aren't ideas. They’re regrets.
Instead of acting, though, I let “idea” be a noun instead of a verb.


Source: LinkedIn

Fish-Bowl Theory of Universe


Heads up - I'm totally fucking drunk.. so don't read this if you're one of those crazy-always-serious piece of shit. Boozing alone in front of a god damned fish tank makes u think.. think a lot. So...

There's a fish tank (called Aquarium for all you glorified drama queens). I see 3 different species of fish.. all grouping themselves like they are some heavenly piece of shit. They are acting like they are too awesome to mingle with other cheap ass fishes... well little do they know - nobody gives a fuck about any of them.

I see two little fishes (looks like gold fishes). They seem happy playing around, one chasing the other all over the tank. Nice.. puts a smile on your face. But then there are grown ups - fucking morons. Looking at their own reflections and dancing and shit.. trying to make themselves feel better or something. From where I see - either they are completely engrossed in useless crap or they realize that life is just this - might as well enjoy it. Well.. who's a moron now?

Then there's an explorer fish. Doesn't seem to care about anyone else in the tank - does what it likes. Always swimming around the whole tank, like Indiana Jones trying to find treasure in remote parts of the tank. Probably is the coolest fish according to the ladies in the tank? Well from my point of view - all it succeeded in doing was picking out dust and shit from the floor. Full marks for trying though. Funny thing is - unless the guy who maintains the tank puts some 'treasure', it will never find anything. But what if he did? Well, all that hard work finally pays off eh?

There's another gold in the tank. It only dances when someone's close, like when they put their hand on the glass. I'm not even sure if it can see or sense this. But still, it's a different dance - almost like it's done to just to please the one who's looking. I was thinking, poor bastard thinks it'll get'll food if it pleases the all mighty on-looker. Then the bartender who came to refill my vodka tells me, "That's my favorite fish. I put extra food for it when it comes to the surface.". I asked him why and he says, "Cos it dances when it sees me." Well... fuck.

One last fish, the dark thingy with funny pattern just floating on the floor, doing nothing. It made a pretty good statement - "I don't give a fuck about anything." Pretty cool if you ask me.

Now in case you're wondering what the fuck this rant is all about - I'm just thinking.. what if this universe is just a fucking fish bowl to some higher existence? I'm not religious, neither an atheist, yet. I'm probably confused and I'm not offended by any of your view points. I don't intend to prove or disprove the existence of god. All I'm telling is - no matter how hard the fish tries, it'll still live and die in the tank (Well, except for Nemo 0_o).

What if the universe is just a lab experiment for someone? What if we are not even the 'fish' but just some microbes on the surface that nobody even gives a shit about? What if it's technologically impossible to to look or go outside the fish tank from the inside?












What to pursue?

Pursue something so important that even if you fail, the world is better off with you having tried - 
Tim O'Reilly 

Two kinds of people


There are two kinds of people - People who like to play different games and people who like to play the same game in different ways - ME

NTFS: Comprehend the events that led to this philosophy!

Drawing Minnie Mouse

Hey Sam, this is how you draw Minnie.

Step 1:










Step 2:













Step 3:













Step 4:















Step 5:















Step 6:

















Step 7:

















Step 8:

















Step 9:

















Step 10:

















Step 11:

















Step 12:















Step 13:















Looks like Mickey right? Let's make it girly!

Step 14:
















Did we miss anything Sam??? Hmmm.. bow!

Step 15:
















Step 16:

















Step 17:

















Step 18:

















Step 19:
Keep practicing and coloring :)