Jump to content

  • Log In with Google      Sign In   
  • Create Account

C0lumbo

Member Since 02 Nov 2012
Offline Last Active Aug 09 2016 03:48 PM

#5298653 how to differentiate performance on android devices

Posted by on 30 June 2016 - 11:40 AM

This is a hard problem, and one of the reasons that more people make their games free on the Play Store than on Apple's app store. There's just so many devices out there it is effectively impossible to avoid selling your game to a customer who won't be able to play it.

 

One tool in the manifest to add to Nanoha's suggestion is the screen size: <supports-screens android:smallScreens="false" /> ditches tiny phones which are probably underpowered. But in general it's hard to do much in the manifest beyond OS version, screen size and GLES version.

 

At runtime, I assess device's graphics capabilities mainly by proxy, I look at information like:

 

* Number of CPU cores

* Amount of RAM

* Whether highp is supported in fragment shaders

* Whether GLES3 is supported

* Whether depth textures are supported

 

And I choose a graphics option based on that - I let the user override my choice.




#5297176 Generating Provinces From A Map

Posted by on 18 June 2016 - 11:24 PM

Is it possible to flip it around and create the land map from provinces instead of trying to break-down a pre-existing land map?

 

That's what I ended up doing in my title to avoid having to solve this problem. My landmass generation looks something like:

 

for (number of provinces that I want)

1. Pick a single sea cell as a start point (after rolling a dice to decide whether to start attached to existing land, or start a new island)

2. Grow the new province, adding one extra sea cell at a time until its a suitable size

3. If we managed to grow large enough, then accept it, otherwise back to #1 to pick a new start point.




#5296060 how to solve z-fighting

Posted by on 11 June 2016 - 05:31 AM

I always avoid depth bias style approaches because they're never very portable across different rendering APIs. I prefer to use a different projection matrix with an ever-so-slightly reduced field-of-view for decal rendering.




#5293970 New Cryengine/Unity/Unreal 3rd/2nd/1st person shooter

Posted by on 28 May 2016 - 03:28 PM

Possibly the most relevant piece of research you could do for your project:
https://en.wikipedia.org/wiki/Dunning–Kruger_effect

I think this is the more appropriate link: https://en.wikipedia.org/wiki/Poe's_law




#5292216 Vulkan and mipmap generation

Posted by on 17 May 2016 - 11:19 PM

I think vkCmdBlitImage is likely to be a superior option for mipmap generation than using a render pass per mipmap level. Not sure how vkCmdBlitImage stacks up against a compute shader though.




#5291459 Android development best tool

Posted by on 13 May 2016 - 04:04 PM

If you're setting up a new project, I'd definitely skip Eclipse and go for Android Studio, otherwise every tutorial or set of guidelines you come across will be for the wrong tool.

 

From google's developer blog on the launch of Android Studio 2.0

 

 

If you are developing for Android, you should be using Android Studio 2.0.

 

(http://android-developers.blogspot.co.uk/2016/04/android-studio-2-0.html):

 

Edit: FWIW, I currently use https://developer.nvidia.com/codeworks-android which integrates with Visual Studio and builds are Ant based, I want to switch over to Android Studio, haven't got around to it yet.




#5289743 Pixel Shader Uniform Cannot be Found

Posted by on 02 May 2016 - 08:56 AM

Are you using the uniform? If not, then possibly it has been stripped out (not 100% sure DX9 will do this, but it's a quick thing to check)




#5288903 Generating command buffers each frame issue

Posted by on 27 April 2016 - 06:30 AM

I don't think there's an alternative to recording command lists per frame. Ideally, you want to use pre-recorded ones as much as possible, but too much stuff changes per frame in a real-world app to avoid recording some stuff on the fly.

The only time I saw a similar accumulating frame-rate drop was when my memory manager was leaking like crazy. I'd look into whether you are leaking anything.

Also, from what you've posted, it looks like you're re-recording ALL your command lists every frame. Surely you only want to be recording one command list per frame  as the others might still be being consumed by the GPU.




#5288039 KitKat 4.4 writing to external SD etc.

Posted by on 21 April 2016 - 02:02 PM

I dont use any fancy android local storage things, i need a clear way to write, read into internal/external memory as user chooses on which he wants to install it. Problem is kiktak (android 4.4) doesnt allow third party apps to write to external sd cards (and maybe to internal too) so what opportunities do i have?

 

Are you talking about your app reading/writing files in external storage?

Or are you talking about your users wanting to move your app to external storage in order to save space?

 

I think people think you're talking about the first one, in which case WRITE_EXTERNAL_STORAGE should do it as they have said.

 

But I think maybe you're asking for the latter. If so, then it's a simple change to the manifest.

<manifest xmlns:android="blah" 
		  package="blah" 
		  android:versionCode="1" 
		  android:versionName="1.0.0"
		  android:installLocation="auto"
		  >

Adding the android:installLocation="auto" allows users to move your app install to their SD card.




#5280854 Reducing Compile/Link Times

Posted by on 12 March 2016 - 03:24 AM

Andy Firth wrote a series of blogs about his experiences in optimising the compile and link times at Bungie. Unfortunately, they were originally published on AltDevBlogADay, so they are very hard to track down:

 

http://web.archive.org/web/20140719071550/http://www.altdev.co/2011/09/20/codebuild-optimisation1/

http://web.archive.org/web/20140719091139/http://www.altdev.co/2011/11/04/code-build-optimization-part-2/

http://web.archive.org/web/20140719083140/http://www.altdev.co/2011/11/21/code-build-optimisation-part-3/

http://web.archive.org/web/20140719073415/http://www.altdev.co/2011/12/26/code-build-optimisation-part-4-incremental-linking-and-the-search-for-the-holy-grail/




#5277017 New Studio Name, Thoughts?

Posted by on 19 February 2016 - 02:31 PM

Queen's Bishop makes me think of that bit at the end of Aliens where the android gets cut in two. Not sure if there's a good or bad thing.




#5275628 Signed Distance Field Text Rendering: some questions

Posted by on 14 February 2016 - 10:31 AM

  • I advance the cursor on the x-axis with the value of "xAdvance" (should be self-explanatory), but the space between two characters seems to be wrong (see screenshots). How can I fix this?

When you create signed distance field fonts, there's an extra amount of fuzziness around each character. It looks like in the hiero gui it's defined as 'spread' and you need to add an amount of padding to match the spread value. You don't mention that you're setting spread or padding in your config file, so I presume it's just taking a default value. Basically, you need to remove whatever spread/padding value that's being added from the xadvance to sort out the spacing.

 

  • It occurs that the visual font thickness depends on the background color (see screenshots, in the upper one, the font seems to be clearly thicker). Why does it happen? (Due to alpha?)  And how can I prevent this behaviour?

 

I think that might just be an optical illusion. Some sort of drop shadow (easily implemented by rendering a dark, offset version of the text before the light text), or an outline/outer glow (best implemented in the fragment shader - it's one of the strengths of SDFs) would probably sort it out.




#5272218 Will launch game on PC first ruin the console sale rate in future?

Posted by on 22 January 2016 - 12:41 AM

This reply is a bit speculative because I don't have any experience on the non-mobile publishing side of things.

 

I doubt a PC release will have any impact on console sales, as the two markets are pretty isolated from one another. Lots of game developers play games on PCs and consoles, normal users typically don't.

 

However, a PC release might limit your ability to negotiate a beneficial exclusive (or timed exclusive) console release with one of the big manufacturers. If you have limited reach and marketing budgets, then exclusivity might be a good way to get some level of featuring and visibility in the online stores. It might be worth talking with your Xbox/Sony/Nintendo account managers before releasing on PC to make sure you're not missing out on any golden opportunities.




#5271661 How long should I sleep the Cooperative Pathfinding Thread?

Posted by on 18 January 2016 - 01:42 AM

What exactly is the thread doing? Waking up every 16ms to see if there's some work that needs doing, and if not, going back to sleep?

 

If that's it, then I would probably sleep more like 1ms, because the cost of waking up to poll for some work is pretty cheap. But if you're still worried about performance, then you might be better using a better construct like having the thread wait on a semaphore, then when some work is scheduled for it, signal the semaphore and the thread will wake up and do it.

 

Or maybe you're worried that the thread is taking up too much CPU time and it's affecting the overall performance of the game? In which case, I'd be surprised because I'd have thought pretty much any piece of hardware you might be talking about should have plenty of CPU threads to spare and you probably needn't worry too much about it. I don't think we could tell you how much sleeping would be necessary to free up enough CPU resources for your title without knowing anything about the engine or even the target hardware.




#5269157 Article on Lockstep Multiplayer

Posted by on 04 January 2016 - 03:15 AM


Deterministic lock-step has an inherent flaw (openy admitted in the article) that it goes with a speed of the slowest player. What about (ab)using deterministm in a different way - to send all the inputs to the server, where the server will timestamp them, and to send them to all the clients where the input will be "replayed" based on determinism? In other words, the only thing which server will do, is timestamping+forwarding.

 

Actually, I omitted it from the article for brevity but this is what I do in Rapture World Conquest.

 

The reason I do it that way isn't really because I'm worried about slowing everyone down to the speed of the slowest connection. In fact that might not even be helped in my case, because I don't have a good solution to identify the individual with the best connection to make them act as server, so I'm as likely to pick the worst choice as the best choice.

 

The reason I do it is to simplify handling what happens when one player disconnects. If everyone was sending their input messages to everyone in the fully connected mesh, and someone disconnects, it's hard to manage things so that all players agree on exactly when the individual disconnected. With more of a server-client approach (I have a fully connected mesh, but someone is an arbitrarily designated server) it's a little simpler because clients inform the server what the last step they received was, and the server tells clients the step that it knows everyone has received, then when a server disconnects and a new server is chosen, the first act of the new server is to tell all the clients to rewind to the point that it knows everyone reached.

 

I remember now why I left this out of the article! I'm not sure the above paragraph is very clear. TLDR version: Disconnect handling in a peer-to-peer input sharing scenario is very complicated, using a server-client model and host migration is also very complicated, but slightly less so (IMO).






PARTNERS