Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 02 Nov 2012
Online Last Active Today, 03:25 PM

#5292216 Vulkan and mipmap generation

Posted by C0lumbo 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 C0lumbo 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.




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 C0lumbo 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 C0lumbo 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 C0lumbo 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" 

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

#5280854 Reducing Compile/Link Times

Posted by C0lumbo 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:






#5277017 New Studio Name, Thoughts?

Posted by C0lumbo 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 C0lumbo 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 C0lumbo 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 C0lumbo 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 C0lumbo 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).

#5267681 How to share review copy of iOS game?

Posted by C0lumbo on 23 December 2015 - 01:14 PM

After release you use promo codes. Prior to release, I believe it's possible with testflight. I think the reviewer would have to send you their device ID, and you add it to some permitted list.

#5267455 My code will not work when it is watched

Posted by C0lumbo on 22 December 2015 - 02:21 AM

My guess would be that Character_Health_Timer is an integer and that the term:


Character_Health_Timer += 20 * ( deltaTicks / 1000.f );


Is implicitly rounding, and ends up adding zero each frame when you play normally.


When your app is off-screen, deltaTicks is large enough that a non-zero value can actually be added.

#5266899 Why don't modern GPUs support palettized textures

Posted by C0lumbo on 18 December 2015 - 08:11 AM

I suppose texture size could be a factor too in the death of texture palettes. As texture sizes get larger and larger, the quality of block compression remains unchanged, but the ability of a 256 colour palette to do a reasonable job diminishes. Especially in the fact of texture atlases where unconnected textures with very different colours are munged together.

#5266678 Particle lighting : cos + sin is a good solution ?

Posted by C0lumbo on 16 December 2015 - 11:35 AM

You could replace a sin and a normalize with a sqrt:


n.z = sqrtf(max(0.0f, 1.0f - n.x*n.x - n.y*n.y))


I'm sure there's many other solutions. A texture lookup would probably be faster on mobile (but probably slower on desktop GPUs).