Oct 30 2014
Started on ladders today. But it’s late and I’m really tired so I’ll have to continue some other night.
Still happy with the result so far though! This will be awesome once I’ve tweaked it enough.
Try my ladder here
Oh, and by the way: the source code for this can be found here in case you wonder how I did stuff:
https://github.com/Tommislav/unity2dPhysics
Oct 29 2014
Been a while since last time I sat with this, but tonight I managed to get cloud platforms working.
So right now I have: Solid blocks, Cloud blocks and Treadmills.
Next up: Ladders and Elevators!
Planned after that (maybe): Gravity shift. Perhaps slopes… not sure yet.
Try it yourself!!!
Oct 29 2014
Last week at work we noticed a huge amount of OutOfMemoryExceptions being reported in the Android app that I work with through Crashlytics.
READ MORE >>
Oct 20 2014
Been working a bit here and there on tweaking the scripts to the way I prefer them. Not really getting any visual progress, more just shuffling code around.
Takes some time since I’m not used to how to work with Unity. I know on a conceptual level how I want my code to work. But it’s starting to feel nice. Soon time to add treadmill-colliders =D
Oct 14 2014
I have found a fantastic tutorial series on 2d in Unity which can be found here (it’s several hours in length).
Not only do they build a complete game (instead of the usual one-screen-tutorials most others do), they also tackle complex subjects such as slopes and moving platforms. And they do it with really beautiful code! It’s very obvious that the programmer is extremely talanted. He manages to keep the code very clean and readable, and keep the abstraction levels very well separated. This is one of the best game programming tutorials I’ve seen in a very long time! I highly recommend it!
And after watching through it I started writing my own custom 2d physics. Why? Because I don’t like the built in for 2d games. You cannot do obvious things such as cloud tile collisions for example.
<< Click to play >> (move with arrow keys, press shift to move faster)
Oct 01 2014
I was wrestling a bit with how to get my tiles 1:1-scale. Turns out this is the way to go:
-
Set camera to orthographic (2d), and set the size to screen height/2. Since I optimize for PS Vita screen (960×544) that’s 272.
-
Now the tiles are super tiny. That’s because I created the vertexes with 1 unit as spacing. My tiles are 64×64 so I can either re-write all my vertexes (multiply them with 64). OR we can keep the 1-unit vertexes and divide the camera size (272/64 = 4.25)
Bingo!
Will probably cause some problem when I have to move my sprites by 1/64 per pixel… That’s future Tommy’s problem though =)
Oh, and if you have a dynamic size of your screen you can use Screen.height;
Edit (2016-12-14):
here is a good blog post from Unity about pixel perfect 2d in Unity:
https://blogs.unity3d.com/2015/06/19/pixel-perfect-2d/
Sep 28 2014
I’m done witht the Tutorial now that I’ve spent the last week working on.
<< Click to play >> (req. Unity Web Player)
It was a very good tutorial, and I think it was good to make a complete project from start to end, including different screens, win/lose-conditions, sounds and publish settings. Highly recommend that tutorial for anyone who’s new to Unity!
I also found a cheat sheet to the keyboard shortcuts in Unity. Good one to note is Ctrl + P to test the current scene.
http://blogs.unity3d.com/2011/08/24/unity-hotkeys-keyboard-shortcuts-in-unity/
Sep 25 2014
Tired tonight. Only got one new part of the tutorial done, but it’s one long part left. Will have to be tomorrow:
http://www.raywenderlich.com/71029/unity-4-3-2d-tutorial-scrolling-scenes-and-sounds
The tutorial so far is actually really good! It goes a bit out of line in name of teaching, but I guess that’s ok.
There is no way I’ll be able to enter in that miniLD, but I guess that’s ok too. Better to go through a few of these tutorials instead and get to know all the quirks of Unity instead of trying to learn by bashing my head against it.
As soon as the tutorial is complete I’ll post a link to the final game.
Oh, and note to self:
I really need to get more familiar with MonoDevelop. It works when I copy-paste code from a website, but some methods just seems like they won’t autocomplete at all, like the
void OnBecameInvisible() {}
void OnBecameInvisible() {}
I also need to figure out the keyboard shortcuts for starting the game instead of having to click on that tiny button. Peferablydirectly from MonoDevelop.
But this is a common frustration when starting with a new editor =)
May 16 2013
Big bad wolf is a slot game with a nice twist. If you get a win, all symbols involved in that win will be removed, and new symbols will fall down – meaning that a win can trigger another win, chaining together huge combos (like bejeweled).
I was lead developer (and scrum master) on this game, which was produced by Quickspin.