Download

Improve 2D performance at least to the level of Unity 3D

Tappy Chicken should run at 60 fps in an iPhone 4.

As far as I know, Tappy Chicken isn’t completely 2D. The game was created using static meshes.

source: https://forums.unrealengine.com/showthread.php?985-Paper2D-Documentation-and-or-Tutorials

No 2d game nowadays is 2d, they’re quads (or polys with a shape close to the sprite) with textures on them. It’s exactly like that in Unity.

This is a game I made in Unity: http://m.youtube.com/watch?v=x6-5D6IkD5E. I’d like to be able to do something similar in UE but the performance I’m seeing so far is not reassuring.

Why on earth would you use f*** Unreal Engine to make crappy bird clones?!?! Or any kind of 2D game; I really can’t see why to use UE for this kind of ‘game’(urgh).

Because you’d get a simple way to do things way outside normal sprite animation.

If you take a look at the video I posted above you’ll see that all characters are rigs (there’s a skeleton of sprites for each character), it’s 2.5d, etc.

There are plenty of use cases for using a 3d engine for 2d games. Unity and Epic seem to think so too, since Unity now boasts its own 2d plugin (integrated in the engine) and UE has an experimental plugin called Paper2d.

Bruno, no reason to be so disparaging sir! I am sure there are quite a few 2D games that you appreciate. No need to limit folks who have a cool idea for a game they want to bang out in UE4, no matter how many dimensions it takes place in! =)

Alexr, we have quite a lot of 2D enthusiasts in-house (both as players and creators.) You are not alone in your desire to see 2D running super well on a broad range of mobile devices.

I’ll try to see if I can get one of our mobile guys to make a guest appearance, but you may have better (faster) luck getting a direct response from them by moving it over to the iOS section of the forums. =)

Cheaper price? Preferable GUI? Programming made simple with Blueprints? There are quite a lot of reasons someone would…

You are right. Sorry about that; There are 2D games I love, from the SNES era. Still I can’t see why so many want to make another flappy bird. If for just learning purposes I can understand though.

I agree, the Flappy Clone space is pretty washed out now and learning purposes are always a big thing. Before I started poking around in examples, I had no idea that it was the pipes moving D:

Tappy Chicken exists in the market place as a demo… Hence he’s using that as an example.

Yes, I thought that was clear, but apparently my post made me look like a Flappy Bird lover :). I make no judgement whatsoever on the merits of any game. I simply want to make 2D games using UE and the performance I’m seeing on a 2D example (Tappy Chicken) isn’t sufficient for me to consider UE right now.

Price and speed (Mono just sucks sometimes… I hate the GC) are what makes me consider UE instead of Unity. The price of UE is fantastic, the speed (at least in 2D) still isn’t.

I knew exactly where you were coming from, because I’m in the same boat :slight_smile:

what device are you running on and what is the average fps?

Between 30 and 40fps on an iPhone 4.

Two things worry me about Tappy Chicken, the fps and the CPU usage (between 40 to 70% on an iPhone 4). I haven’t even began to look at Tappy Chicken under the hood, so I don’t know what type of shaders it’s using (perhaps it’s possible to reach 60 fps easily, by just changing shaders), but that kind of CPU usage is also worrisome, since a game like this should take 20 to 30% CPU tops.

I’ll test on better hardware eventually, but iPhone 4 like hardware is still very common and a large piece of my market share. It’s also a good benchmark device, so I’ll probably see these performance differences between UE and Unity even on higher end hardware. For games like Flappy Bird it won’t matter, but I’d hate to be limited by an engine’s performance with more complex scenarios.

Ideally I’d like the same performance with UE, as if I was writing an app in Objective C or C++. With Unity it gets pretty close in some scenarios (minus memory usage), with UE it should be possible to get even closer to this goal.

The major problem is GPU (27 ms per frame), but even if I got that down to 16.6, Tappy Chicken would still be CPU bound (20 ms CPU per frame). I’ll stick with Unity for the time being, but I’ll keep improving my know how in UE, since I believe it’s possible to improve mobile performance a lot in this engine.

http://gamewhizzes.com/tappy.jpg

It would be interesting to compare the galaxy s3 to these results, I have one here so if I get time I will hook it up.

I installed tappy Chicken on my Galaxy S3 and it works flawlessly, not sure how to run performance profiling as this device is not a tegra device.

Part of the reason why Tappy Chicken is slow on the lower end devices is due to how the backgrounds are built with a lot of large overlapping areas of transparency.

Rather than panning a tightly fitting mesh for the hills/clouds/etc…, they are done as a solid band that is rendered transparently always, and the panning is actually done in the material. It’s not the most performance-optimal way to achieve the effect, but it is easy to make and understand by looking at it.

RE: CPU usage; it’s not as high as posted above, I think you are seeing the game busy-waiting on the GPU in that capture (e.g., it’s heavily GPU bound on the 4). 4S was something like 4 ms on the game thread, and 4 looks to be 11 ms or so (higher than I expected but still within frame budget).

Cheers,
Michael Noland

Your post does explain a lot of the slowness I’m seeing. Is it possible to have an Tappy Chicken that’s really optimized for mobile? I remember I saw somewhere that Tappy Chicken was optimized for mobile, but that’s clearly not the case, and it makes simple engine comparisons harder.

As soon as I have some time I’m going to try to do a simple 2d scrolling demo using the same techniques I used in Unity, and I’ll do CPU/GPU analysis.