Thursday, December 15, 2016

Surviving Dec. 15th (And it's always going to be "too early" - they'll still be telling you to be strong.)

So it's been exactly one year since my mother passed away from a chronic illness, and on her name day in-fact. Of course it hasn't been easy, it can't be easy. You see things that remind you moments.
What were you doing at the time you were told (i was snoring) and the moment that it got real (damn there were a lot of tubes...)

Btw, the way to know who really likes you and thinks about you is if they'll say "what do you need?" or "what can i do?" and stand behind you in case you need something (literally and metaphorically). Most other's will most probably just say "Be strong." and after the 100th time you'll be ready to pounce to the next one to tell you that because you'll be thinking "I want someone else to be strong for me for once." It's something people say when they don't know what to say, not realizing that there isn't much to say. Just hug it out.

And you don't forget, nor does it go away. You just accept it and get used to it. You'll be reminded of things and at times you may even turn your head waiting to tell'em something or even wake up and thing to tell'em something. At first you are just chocking, but after sometime you'll so "oh well."
You can't forget or let go; I mean just think about it, half your DNA is them and most of your ideas/morals are shaped by them one way or the other. Either by them forcing their own or in my case, with them looking after so that you get to form your own thoughts by thinking  (which basically should just boil down to "don't be an asshole". You don't need anything more and you shouldn't even have any need for a religion to tell you not to be an ass.).

Of course each one deals with this in their own way but one thing is for sure. Don't oyster up. People won't know how to behave around you at first but those that are close (and I don't mean relatives) will want to come over and check up on you or invite you to ... do something, anything.
Go. 'Cause you'll never be ready, it'll always be too early. Keep postponing just stepping out of the house and before you know it you won't even be turning on the lights when it gets dark outside. Just tell them that you are in a bad mood and if they push you too much you'll snap at them, but go.
Otherwise you'll just pushing yourself in a black hole. Listening to music the very next day or not wearing all black doesn't mean forgetting or disrespecting. My sister got a tattoo with their own phrase that they used to say to each other, I made my game so that on the 15th of December a dove appears in a secret place (Well, she was the first person that I played video games with so it's fitting). My dad is still a work in progress...

Eventually you'll be remembering those dumb things that they did and smile instead of the last time you saw them. And there's nothing better that you could've done if you were just there and just talked to them. Unless of course you drove a knife in them or something. That's not good. Don't do that.

But at least today we sharpened his chainsaw's chain, I did another bug report email to Unity and sis bought some presents. So yeah.

Here's some fire in slowmo. 
I didn't center to phone while taking the video unfortunately.

Tuesday, November 22, 2016

101 texturing aimed at mobile games. (Just bake'em all in there)

Yes, mobile GPUs have gotten really fast. Yes, they can make more things than consoles from some years ago. But there is still something that hasn't improved yet. Battery life.
Forcing more fps means less battery life and a hotter device. But more so does giving more stuff to the GPU/CPU to calculate. Of course they can do effects like normal mapping and real time shadows, reflections/ refractions... But when running on a device that its battery only lasts for one or two days when on standby, that isn't such a good idea.

So... what's usually done on the art department is to cheat a bit.
Consider the scene below. From certain angles the floor looks as if it has some overhang and a relief/sculpted effect. (It's used in fact in a lot of places in the project).


The most common way to do so in a 3D project would be to use a normal map in order to give the lighting information to the rendering engine and have it react correctly with the lighting.

But in a mobile environment you'd want to have the device have the least amount of work to do possible. Think of PCs and consoles good at marathons, with mobile devices good for sprints. Even though a Nintendo 3DS or a PlayStation Vita are mobile consoles running on batteries, they have chips with relatively slow speeds running as fast as they can, while mobiles are given fast, multi-core chips; and we are trying to give them as few things as possible to do, because the more you give those chips, the faster they'll go, and the more battery they'll eat up.

So back to the scene; see that chiseled effect that gives some highlights on the sides? Or that shadow effect? Well those are all baked into the texture, meaning basically that they were pre-drawn in the picture that gets wrapped around the 3D object. Lighting is faked as well, with only a couple objects actually using lighting calculations done in real time. (The ball is one of them since you will be moving it, faking it on the ball won't do as the highlights won't move. It has a small normal map to give it bumpiness. It's ok to do stuff like that if they aren't covering much of the screen.)



Above you can see the actual model of the platform blocks with no textures and in the lower right corner part of the texture atlas that has the texture info for all the platforms in this scene.
Which is another way to save on resources; placing as much stuff as you can on a single file so that the engine will only need to read one file once - but do that for things that won't be needed in a different scene. If you take a single object that uses this texture and put it into another one, then the engine will have to load the textures for that scene, plus the whole texture for that single object even if only a small part will be shown on screen.

All the shadows and highlights in the texture detail shown in the corner above were made in Photoshop, while the ambient light and shadows visible in the scene were precalculated by the engine and saved in their own image file as well. So that information is not being calculated while playing the game. That has its own limitations, but it helps in lowering the work needed. Since the light source and/or the platforms don't move, painting the highlights and shadows before hand saves on resources.



  




Monday, November 14, 2016

2016 Supermoon from Limassol (well kinda)

The time it was coming up and you could get the best pictures, this thick cloud was obstructing the whole thing. But i didn't care much because really, it was more interesting seeing that a lot of people were out and about just strolling by the beach. It was just a moon after all, only getting the importance that people decide to give it. Yeah it may affect the tide a tad more, but you're more likely to remember that you went for a walk with someone than you shoes getting wet.



A plane was passing at the time, leaving a trail. (It was leaving Larnaka from the looks of it.) 

I find this one more interesting than the moon though. Hope to catch the next full moon as it's rising and not when it's already up.

Tuesday, November 1, 2016

Looking from the other side.







I was just playing around with water reflections and upside down pics. Whenever I say that i won't need the camera, i always need the camera.

Wednesday, October 12, 2016

Quality settings on mobile VS battery life

(Repost from the dev blog)

It's always important to try and balance image quality vs performance in every project because when you get up to a certain point with a certain tech, then it'll stop giving out better perceptible image quality, while still eating up CPU and GPU resources. This is even more important on mobile platforms since they are powered by a battery and more strain on those components means less battery time.

When i was making my game i thought of adding an option to select the texture quality in the game in order to save RAM on devices that don't have a lot of that precious resource. All it does is if you set it "High", it will render the textures in their full resolution and have anisotropic filtering on, and if you select the "Low" setting it will render the textures in half their resolution and disable anisotropic filtering.

You can see the difference that the option actually makes. Left is High quality, right is Low quality. It may not look like much of a difference on a small screen, but it halves the amount of RAM used by the textures.


However: One my friends testing the game decided to do a small benchmark on battery life VS textures. Granted, the way it was done needs more refining and better controlled environment variables, but for what he wanted to check it's good enough. He just wanted an indicative value.

He took his iPhone 6s, went into flight mode and then only enabled the phone's WiFi. He then had just the game running and played the actual stages while timing himself.
The first run was done with the quality setting on High, and the second run on Low. He said that his times were very close with give or take just a couple of seconds. (And i trust him on that. He found exploits or "shortcuts" in the stages that i couldn't.)

And the battery life?
On High the battery went from 100% down to 70%.
On Low it went from 100% down to 89%

Granted, it does need a more controlled test with an automatic timer and standardized routes and video evidence, but this does show a bit how just changing the texture quality will affect battery life instead of just RAM usage. Personally i wasn't expecting such a difference on a device that is more than enough to play the game fine while the only thing that changes is the Texture memory use. No Level of Detail thing going on here or polygon reduction on Low setting.





On the left, Level selector for World 2 stages.
The texture on the "Low" resolution setting gets blurry as it is half the resolution of "High" mode.














On the right we have World 2 Stage 7. Same thing on this one as well. In some elements the texture resolution reduction is more evident than others, but it happens to all textures regardless.













   

Wednesday, October 5, 2016

State of journalism. [Rant]

So i saw this article in Forbes website, stating that apple is planning obsolescence in its products. What else is new, EVERY other company is doing that, and it's not nice.

However the article states that it's doing that with the iOS10 update and how it removed the "swipe right to unlock" thing and the users are now forced into pressing the home button and that it would wear it down faster. That shows how much research (wasn't) done into the thing. It's just a couple of clicks away to disable the push button and just have it unlock when you rest your finger on the ID sensor. Couple that with the capability of simply lifting the phone up and having the screen wake up, and you'll never have to push the button unless you reboot your phone!

The point is not to defend apple or the iphone, but to show how click-baity the whole thing has devolved into. If you go to that person's twitter, you'll see a "Great feedback!" tweet regarding that article. The feedback was every message telling how wrong the article is. But "Great feedback" has positive connotations and the comments to that article are not readily available once you go there to see the article, nor are they in the place you'd expect them. So it isn't apparent that the article was wrong! The comments are tucked away on the left of the screen and you have to click on a button to have a sort of drawer come out to see them.

Of course a "Thanks for correcting me" wouldn't be the same as "Great feedback!"...