Jump to content

  • Log In with Google      Sign In   
  • Create Account

Olof Hedman

Member Since 24 Aug 2011
Online Last Active Today, 01:08 AM

#5185278 Are mobile games revenues real?

Posted by Olof Hedman on 06 October 2014 - 07:21 AM

The revenue numbers are probably reasonably accurate.


I think the part you are missing in your calculation is how hard it actually is to reach that rank on the list.


Many many people try, only a few make it up there. (There are literally hundreds of releases _each_day_)

#5182337 New trends in gaming: voxels are the key to real-time raytracing in near-term...

Posted by Olof Hedman on 23 September 2014 - 01:44 AM

Or Comanche? (1992): http://en.wikipedia.org/wiki/Comanche_series  :)

#5181653 glsurfaceview in android layout xml

Posted by Olof Hedman on 19 September 2014 - 06:33 PM



a basic linearlayout should do the trick.

then another nested horizontal linearlayout for the button and text.

#5181235 glsurfaceview in android layout xml

Posted by Olof Hedman on 18 September 2014 - 04:57 AM

Ah, for inner classes you need to use the generic <view /> tag, like this:






More information about custom components and their xml can be found here:



#5176881 Life Like Graphics

Posted by Olof Hedman on 29 August 2014 - 05:36 AM

It's a lot easier to make a still image look life-like.


A lot harder when you add animation, not only get the motions right, but also get the (change in) lighting right.


Most 3D artists already use photos as a basis for their textures, but there is a lot more to it then that.

#5176673 Making simple floating/drifting animation

Posted by Olof Hedman on 28 August 2014 - 08:15 AM

And to make it look a bit more realistic, you can add together several sin-waves with different frequency and amplitude.


something like this:


x_final = x + a1 * sin(et * f1) + a2 * sin(et * f2) + a3 * sin(et * f3) + ... 


Though, in code, this is best done in a for loop, then you can add a bunch of them together.


The biggest amplitude and frequency constants is the most important to tweak, then you can calculate the rest by random subdivision. ( get random value between 0.3-0.7 (or something), then calculate f2 = f1*rand_value, and so on) 


Edit: Actually, for each step, you want to increase the frequency, but decrease the amplitude. So you get longer big waves, mixed with shorter small waves.  so for each step multiply the f-values with a random value around 2, and the a-values with a random value around 0.5

#5176142 Adding 9-patch resource android

Posted by Olof Hedman on 26 August 2014 - 01:02 AM

Those identifiers should be automatically generated for you, so you should not need to add it anywhere, they should "just work".


Maybe your IDE needs to be refreshed or the project cleaned at rebuilt.

#5175761 Strange ifstream crash

Posted by Olof Hedman on 24 August 2014 - 02:41 AM

Just a note, since this seems to be resolved already, but "if(file)" is not a proper way to check if the file opened or not.

I'm guessing the file actually fails to open


file will always be non-null, and you should use "if(file.is_open())" to see if it really is open, (or "if(file.fail())" to see if it failed)


Edit: oops, seems I need to read the spec more carefully before answering :P

#5175017 You're a witch/demon hunter/slayer. You're likely to carry...

Posted by Olof Hedman on 20 August 2014 - 09:04 AM

A really heavy duty crossbow.


With silver arrow heads.

Possibly blessed.


If an arrow is thick enough, its technically a stake :)

#5168487 Concern on "paying to enter" a project

Posted by Olof Hedman on 22 July 2014 - 04:25 PM

It doesn't even sound like he understood what he was applying for.


Nothing to think twice over, just politely send him on his merry way.

#5167830 First person perspective improvements?

Posted by Olof Hedman on 19 July 2014 - 12:47 PM

I don't think removing motion blur would be an improvement. Motion blur is not a purely cinematic effect, It is not just a result from limitations, or "eye candy" it is used to help your brain see motion better. In real life, the brain has a lot more input, from your inner ear and muscle feedback among other things, which is lacking when you just are presented with a series of still images on a screen in 30-60 frames per second.

If you add motion blur to those still images, the brain has an easier time "stiching it together", and can reduce motion sickness and makes it easier to see how objects move and make the motions feel more fluid.

#5165217 How important is localization?

Posted by Olof Hedman on 07 July 2014 - 03:46 AM

If you have 3 languages in a game, say English, German and French. Do you upload 3 different versions of the game or do you need to have all languages in the same game? Also if you are supposed to have a single version of the game containing all the languages how do you detect what country they bought it from so it starts up in the right language?


You usually have all languages in the same.


For text strings, this is usually handled automatically, you never use literal strings in code, but a string ID.

You then have several string lists, one for every language, and the device makes sure to load the right one.


If you can get it to work with just changing all strings, that is all you have to do.


Things like numbers and currencies has to be run through a number formatter, that format it according to the region. (currency symbol before or after,  using . or , as decimal divider, etc)


Sometimes though there is some minor code change needed for a particular language or region.

For that, all platforms have some API to ask what language the user wants, and you can then take any action necessary.

#5164560 How do you get ideas for new games?

Posted by Olof Hedman on 03 July 2014 - 07:41 AM

(and subtilted in deutch)


Not that it really matters, but those subtitles are Norwegian :P

#5162960 Using 3rd party libraries or code your own?

Posted by Olof Hedman on 26 June 2014 - 02:18 AM

The main advantage of a 3rd party library is not that the code is written for you. The main advantage is that the code has been tested and debugged for you. 


Although this is certainly true, it's also dangerous to assume it is extremely well tested for your exact cases.

Taking in 3rd party code is also a risk.

It could speed up development a lot, but it can also trip you on the finish line when some obscure bug in it appears, and you have to scramble to either have it fixed or work around it.

If you have the source code to it, you are a bit safer, but understanding a 3rd party library enough to safely make changes to it also takes some time.


Just wanted to underline that the choice isn't straight forward...

#5162269 Making a weapon feel powerful.

Posted by Olof Hedman on 23 June 2014 - 01:52 AM

What are some good, general ways to make a weapon feel very powerful without changing its practical effect on the target?


This is the question you posed to the forum.

Several people have tried to answer it, and it's unfortunate you don't feel like any of the standard ways are good enough for your game.




Or I can, maybe, get a recording of the real thing with echo, ( movie style, but it fits since you would get echo realistically out there) and crank the volume until it becomes alarmingly loud.


The "problem" here is that sound has the same issue that graphics has on a computer. 

It never is realistic. It will never be more then an approximation of the real thing.

It's not really practical to play a sound that should sound exactly like a gunshot, unless you make sure the player has an insane sound rig, and even then it would be very hard to get the sharpness of a real gunshot.

It will mostly just sound like a crackling mess.


So just as with graphics, you do it as best as you can, and do various "tricks" to compensate.


It's no longer strictly realistic, but it "feels" better, and can even feel more realistic then the alternative.