Project: Paper2D

Hello Guys! Please help to solve CPU stall problem) I’ve created level from pieces like :

and that’s what i’ve got:


So I put my character and just tried level out and noticed that it has some lags, like fps is low. I’ve used Profiler and noticed some CPU stall problems.

So what i’m thinking about:

  • CPU stall means it’s waiting for something (GPU) to continue working? If so would it be better to use 3-4 bigger sprites prepared in other program, than building level from pieces in editor? If I understand it right 3-4 big sprites = 3-4 draw calls, 50-60 smaller sprtites = 50-60 draw calls, which is no good? )
    I’ve got i7-4770 and GeForce GTX 770 - which are not so bad.
  • It says "CPU stall - Wait for event 16 " (or another number 8, 12) so how I can get information about what number means, what kind of event it’s waiting.
  • Probably there is another reason of problem.
    Need any advice) Thank you a lot!

Hi Henry,

Please report bugs on AnswerHub, not forums.

I’m not able to reproduce in 4.8. As long as snap layer toggle is enabled ( icon to left of layer choice drop-down, which looks enabled in your picture) then dragging things in from content browser snaps to active layer for me. What version are you on?

Cheers,

Things like message bus are other threads from editor that have no bearing on performance of your game. You want to focus on game thread and render thread. I’d actually start by using following exec commands rather than diving into profiler (use profiler when you want to go into more detail on specific things):

stat unit - displays frame time by thread, which can help determine if you are CPU or GPU bound
stat scenerendering - displays where rendering related time is going, and has a few things like # of draw calls
stat game - displays where game related time is going

If you have a lot of draw calls and are CPU bound, try out sprite groups in 4.8, they let you merge many draw calls together into one. You select a bunch of sprites in level editor and press Merge Sprites in details panel to create one. You can always break it back apart later if needed.

Beautiful scene BTW.

Cheers,

Also worth mentioning that you should usually do stat commands like these outside of editor (either in a cooked build, or when running editor with -game (which can also be done using ‘Play in New Process’ option under play button), since they will include time from editor GUI, etc… as well otherwise.

Cheers,

Thanks ! I looked at stats and realized that everything is working really fast, so I got lag problem solved by looking at project settings (just out of curiosity) > general setting, and there just increased ‘min desired frame rate’ from 35 (I guess it was default) to 65, and set ‘smoothed frame rate range’ from 60 to 120. Now when I run with character through scene everything looks really good and smooth )) I think I was to serious about cpu stall, I mean found a problem where was no problems ) Thank you again!

Drag not snap to 2D Layer Problem.
I posted it to answerhub before forum post.

https://answers.unrealengine.com/questions/254433/drag-assets-directly-from-content-browser-to-scene.html

Something I picked up on in original “stall” question:
For 2D games, number of “draw calls” is almost never problem (unless you have one draw call per particle in a big particle system ir something.)
In 2D games, you’ll almost always start stalling on fill rate before you stall on draw calls, so if you can split your geometry into smaller total overdraw, that’s almost always a win. Especially on majority installed base hardware, like Intel HD series.

Hello .

Spartan has been Greenlit! :slight_smile:

I wanted to share good news with you more than a week ago but i was so busy working with Unreal and Creature that i lost track of time… Unbelievable!
I helped guys over Kestrel Moon to make it usable with unreal and paper2D (specifically) and results are simply jaw dropping. Finally we can use one Png for a million animations. Wait till you see it in motion inside our game!

Today i started playing around with sprite merging and i discovered a few bugs that you need to know. If you have a number of sprites within a layer and you try to merge them, then system freaks out and either disappears half of them or/and places a few ones on top of other.
It also removes newly created sprite (merged) from that layer.
And if for any reason you want to break them apart because it does not store anywhere original Z order number, you have to redo everything from scratch.
And it should also auto insert Z order value from individual sprites as long as they do not have multiple values of course.

I believe that it is finally time for you to give us a proper 2D layer option that locks sprites so we cannot move them around accidentally. current workaround that i am using is so limited and time consuming that sometimes is more trouble than good but it is nearly impossible to create a 2d game without some sort of toggling on/off layers so i have to use it. For example you can insert same sprite in as many layers as you want (some times it happens by mistake) and good luck if you want to make it invisible. You need to search all available layers, remove it from there and then add it to one you want.
Small but time consuming annoyances nevertheless. :slight_smile:

Thanks!

  • We are starting to use Paper2d for an ios project - thank you for all your work on it…

Quick question regarding atlasing:
notes say " feature is not ready for use yet…", but Trello board indicates “A decent chunk of work made it into 4.8 but they’re still considered experimental for now.”

We are using 4.8.1 and have enabled Sprite Atlas Groups. Will enable packaged builds to generate atlases?

Thanks for any feedback/advice

Hello there.

is a nice project. I wonder if is only focused on rendering or if you’re planning to add 2d-based logic? I see that there’s a tilemap feature, do you plan on adding for example AI stuff (A* pathfinding, block-dependent sensors, etc.)?

Hey , I have a question.

I’m currently working on an isometric game and I’ve switched to 3d top down template and refactored my project to take advantage of tile map and nav mesh :wink: (thank you for that!)
so now I’m working on attacks for my character and I wanted to know if I could get some insight on how to handle these attacks.

character faces 8 directions but only attacks in 4. Up, Down, Left, Right.
I currently have animations for attacks but I would like to create some outlandish combo animations that have specific collision at those 4 directions, so I’m not sure if collision on sprite itself is right way to go. Do you have any advice for me?

Right now I’m using sprite collision but I was wondering if traces might be better option? I have yet to really mess around with creating custom collision on sprites as well.

Thank you for your time,
Batista

Looks like Box2D support has been freezed indefinitely? At least according to trello board :confused:

One thing I noticed while working with Paper2D is that in BPs, there have been no sprite functions exposed to blueprints?! I can’t get any information about a sprite. Neither width/height nor anything else.

Hi, any word on tearing issue? Driving me nuts!!

Ty :slight_smile:

It’s finally fixed!!!

any news about spine character animation tool integration?

Hello !

Thanks for your great usage and support of Creature, your game is looking really good with all smooth animations so far :slight_smile:
Also I want to say a big THANK YOU to and Sinister Cyclops for giving us required feedback & opportunity to fine tune Creature UE4 runtimes for actual game dev work.
As mentioned, a lot of effort has been made to make runtimes work with UE4 and his Paper2D pipeline… more updates and enhancements to follow of course.

Here is link to runtimes if anybody is interested in having smooth skeletal + mesh deformed 2D characters in UE4:

I believe has a hybrid scheme where he uses some Paper2D elements combined with Creature runtime characters.

Cheers!

We have an issue with atlasing in 4.8.3 - broken only on ios devices. Seems like uv-coords get broken - only a subset of texture shows in sprite. Eg top left of a tree is mapped to tree sprite instead of whole tree.

New projects created in 4.9 preview work on device - converted projects still broken.

Has anyone gotten atlasing to work on ios in 4.8.3? Or is a known issue that is fixed in 4.9?

Hellooooo, anyone home

After 4.8 paper2d update 4.9 is as dead as 4.5, 4.6 and (a little)4.7.
Why is whole engine moving forward and paper2d gets occasional treatment? I see our guru answering and fixing everything, but paper2d stuff.
We are working 24/7 with paper2d and our game’s success is directly tied with progress of . It is not a nice feeling wondering every month if we will be able to finish and ship our game or paper2d will be left to rot and with it all hopes we have for future as a studio…

With 4.9 i am facing again excessive amounts of jitter and shutter when i move around. Even though game runs >160fps i can see every few tenths of a second something like a little pause in backgrounds (not a CPU stall). It is like they are pausing for a millisecond and resume again. Or like it cannot render everything correctly and skips frames. same if i cap it at 60fps or 30fps.
I am trying to figure out what is going on and any help to right direction would be welcome but i believe there is something wrong with way paper2d renders things. I do not have technical expertise to back up my claim (although debug numbers seem more than ok) but as a paper2d user for more than 365 days i can tell you that 32gb or Ram with a gtx980 and an FX8350 at 4.6ghz should be more than enough to be able to run a freaking 2d game at 1080p buttery smooth! And 12gb of memory consumption for a 2d game with one map open its just absurd!

Marquee does not seem to work for me in 4.9 and placing a sprite/blueprint in a level is problematic as well. Another thing that i am not able to find is “merge sprites”.
In general 4.9 does not seem very promising (at least for me) regarding 2d. :frowning:

Another huge headache for me has to do with collisions. Even if a sprite has its collision disabled and i import it to my level it still has a block all behavior.
If i forget to change it you can imagine chaos it will cause but that is not my biggest problem. Even if i do manually set it again to no collision then when i cook my game it still has a block all behavior.

Please someone tell me what to do to fix all these things. I cannot work anymore.
Marquee+sprite placement + collision + jitter+shutter+ crushes+ another million things= Mental institution!

@, Judging from commit messages in both Master (4.10) and 4.9 branch, there’s only few updates on Paper2D in last couple weeks. I might be focus shift or on vacation. Is 4.8.3 give you all problems or it’s 4.9 only?