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

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.













   

Monday, June 8, 2015

Nooby Unity tip - why you need prefabs.

Some people will tell you to use prefabs for safety and some will tell you for convenience when assembling scenes. Both reasons are true and more than enough, but I like prefabs for one more reason.

It makes it really easy to select complex elements in your scene that are made out of multiple gameObjects. Even if you have a label on your complex element, it will only select the whole thing if you click on that label. But if it's a prefab, it will select the whole thing anyway instead of the individual gameObject that is right under the mouse pointer. If your complex element doesn't have a prefab connection, it will select the individual gameObject that is directly under the mouse pointer. Want to select a single object in your prefabbed element? Just click again. (Or just directly double click on that object in the first place.) Handy for moving things around the scene.


Left object has a prefab connection, right one doesn't. I'm only clicking once on them, both have labels. Click on the GIF for a better look.
Adventures of a Rubber Ball thread.

Monday, March 23, 2015

"Videogames for gurlz"...

I keep seeing all those that keep using equality as an excuse to actually perpetuate gender inequality. Or rather i don't even know if they are serious about it or that perhaps they are not even aware that they are going against the very issue they are trying to promote.
I saw a post somewhere titled "Games for girls" and it was basically all pink and a nail saloon simulator and had text like along the lines of "wanna be beautiful", "party up" and the like. You don't see "games for boys" explicitly even if they are marketed as such, because of course, gurlz don't play any games other than prettifying up an avatar or spending time in a virtual saloon or shops. I'm not saying that there aren't or that they should't, I'm just saying that it's not the rule. "But look at how many downloads the app has!" When compared to which leading downloaded "boy-app"?

Lets not forget about developers being harassed with the reason being that they are women. Just go over to any multi-player game with guns in it. There are more women in them than most realize, guess why they are not using their mics...

I'm no feminist, far from it, but sometimes "stupid is stupid" and don't realize the pain they are causing. The first person I played video games with is my mother, 25 years ago give or take a couple, can't remember exactly how old I was. But it was on an Atari 2600 clone and that didn't have "girl games" on it. It had planes with bombs, sharks eating divers and frogs hopping on logs.

Friday, September 12, 2014

Design/graphics cheat #2 - Mobile gaming

Mobile gaming is all the rage now, and companies are showing their latest phones, tablets, phones the size of slippers and chipsets for 3D graphics on-the-go.
Everybody are now showing off some awesome looking shaders, effects and high polygon (for mobile) models making sure you realize that it's rendering in real time. There's something that they don't show a lot though and that's real time - level wide shadowing. And there's a good reason for it as well; it's probably one of the more resource intensive stuff to pull off well enough, so people making games are resorting to all sorts of trickery like "baking" lighting, drawing the details in the textures instead, using shadow "blobs" for stuff that's moving... in general cut using realtime shadows in mobile gaming as much as possible.
(It can be done of course, but most of the time you'd be better off faking it and pushing your savings on making the game run at more fps or implementing some more resources into your enemies.)

So where am i going with it? 
Be smart in hiding things and using simple geometry to make shadows. Like the image on the right; those two things are just some of the obstacles in a game i'm trying to make that spew snow balls. 
I really wanted to have some slight shadowing/ darkening effect in those barrels. Light mapping wouldn't work of course because ... that's not how it works... and real time shadowing would be no-no. 


On a game you are trying to include as many devices as possible after-all to potentially have a larger install base. So it's back to old-school tricks, back to basics if you like. The barrels simply have 3 simple planes, with just 2 polygons each, and a simple black texture. Then the texture's alpha channel is set as semitransparent. Each plane will progressively make it look as if it's darker and darker the deeper you look. Of course this will only work for stuff that aren't out in the open.

For things that are out in the open, what someone could do is mark areas with simple trigger boxes that are placed in shadowy areas. Then have a simple script that would smoothly make the texture of the object that enters the box's volume darker, and lighter as the object exits. A poor man's light probe if you like. These things do require tweaking though, but the plus is that your game's speed won't suffer and you'll get some nice looking stuff.

Monday, October 7, 2013

Troubling iOS...

So Paddle Trouble is out in iTunes as well now.

https://itunes.apple.com/us/app/paddle-trouble-free/id717289648?ls=1&mt=8 Free iOS version of Paddle Trouble

It seems that now is a perfect time for people to make their own little game that think is just perfect, right?
Well the tools may be there (and seriously, there are some pretty amazing tools now available to the masses) but unless you know how to promote the app, you'll be in deep water.

Sunday, August 4, 2013

Paddle Trouble update.

Just a small update on Paddle Trouble. It's now posted in 2 other app stores other than Google's Play;
Amazon's Appstore and SlideMe. (And between you and me - and anyone with internet access) SlideMe and Amazon, both have done a great job in promoting things, and supporting a lot more countries for paid apps; a lot more than Play.
So to those wanting to make their own stuff, consider 3rd party appstores from the get go on top of the 1st party one.


Free version at:

Get it on Google Play
Get it on Amazon appstore



Paid version (no ads and leaderboards if you have Play Game Services installed and a G+ account) at:

Get it on Amazon appstore



And yes... i know i should make a small site aiming the game instead of posting here... :P

Wednesday, June 26, 2013

Paddle Trouble

Muaahahaaaa. My 1st video game is out (Click for tablet version) :D It seems the time is perfect now for someone to make a game if they want to. The tools are there, the outlets are there...
(For phones: https://play.google.com/store/apps/details?id=com.paddletroublemobile.game)


Monday, June 10, 2013

Visual cues

Since we don't have radar or distance sensors embedded in our brains yet, we need to rely on our eyes and ears for cues on where something is, and this is even more important on video games since unless you use a 3D monitor, the view you are seeing is 2D. (Yes, even with 3D games. The monitor is still a flat 2D plane where everything is squashed into a single,flat view, so there goes your stereo vision)

So what can be done visually wise? Shadows someone might say. Well yeah, that is number one in the list but it's not just that. There are a couple things more that can be done in the levels themselves to show the spatial relationship of things. (Spatial relationship, bet that made me look smarter than what i am). Take a look at the image below for an example.

The image shows a level from a game that you have to stop the blue balls from falling in the pit, a pretty basic premise with no story behind it. The top part has the shadows disabled. It looks as if the balls are just pasted on top with little to tell you the distance from the ground at a glance and you don't really have time to observe because that thing is coming at you and you need to throw it back. The bottom half has the shadows enabled and the player can see exactly where on the playing field the ball is and how high.

But that's not the only cue. The pit is textured in a checkerboard like pattern. That makes it even easier to tell where the ball is going to be the in the future (since the balls fall towards the centre, you can use the pattern as a guide) and give you time to turn the paddle at that angle to throw the ball back. There is also a trail effect. That not only shows the general direction of the ball but also if the ball is going up or falling down, its angle and its speed.


(The shadow may look as if it's a bit ahead of the ball but actually it's right under it. The camera used is wide so it makes it look like that, a tiny bit - sort of - fisheyed).

P.S. Since this is for a mobile game, the shadows are not real time.The shading on the level and glove/paddle are baked (drawn) into the texture and the blob under the balls is from a script solution from Unity's Asset store.