Project: Paper2D

Hello and welcome to paper2d family!
If i understood correctly you are having problems making collisions work with flipbooks? If yes you must activate collision option within flipbook .It is a common misunderstanding that since you have collision for every sprite then flipbook that contains those sprites will have them as well as default.

Collisions do work with capsule components as long as they are in a different collision channel, otherwise all sort of funky things start to happen.

My problem isn’t on data side. I clarified my original post.

Hi VicariousEnt,

You probably don’t need to mess with body setup directly at all. Every component (strictly speaking every individual BodyInstance) can have a custom collision setup, where you can tell it to block (collide), ignore (just as it sounds), or overlap (record interaction but don’t stop it) on a per-channel basis. You can define custom channels and object types in project settings.

way, you can say ‘melee weapons ignore everything but overlap with melee targets’ (so they don’t hit collision capsule and stop there). You’d set collision on your flipbook component to , and bind a delegate to component OnComponentBeginOverlap and OnComponentEndOverlap events. These will get called whenever something passing filtering overlaps with shape in component.

[edit] Missed that you had already found filters / overlap stuff. second bit still stands, component overlap events are easiest, but you could also call UPrimitiveComponent::ComponentOverlapComponent manually if needed.

Cheers,

Hi , I’d just like to ask a quick question. I’m trying to make a micro management style 2D top down game but one of key things I need to be able to do is swap out tiles on my tilemap for alternative tiles when actions are performed by player. Is there any functionality for changing tile texture at a given grid location yet and/or is something you are looking to implement soon? Also, things such as getting grid co-ordinates of tile under cursor and small things like that would be amazing!

SCON importer Finally! <3 <3

Thanks for response . collision filtering stuff is pretty standard fare, I’ve got that working fine. I should have mentioned I have collision/overlap events working between correct objects, but character’s movement capsule is only thing colliding with melee collision. It appears per frame custom colliison isn’t getting generated at runtime. I can see it and movement capsule with “pxvis collision” enabled (you guys know that command doesn’t auto complete in console right? Took me forever to find it), but I can’t collide with it. I enlarged sprite collision frames too so they are bigger then movement capsule. I have tried every combination of options possible in editor. Someone in thread mentioned something about pre frame sprite collision not working with Movement components?

You can do so using SetTile on tile map component, but it will only succeed for instanced tilemaps (otherwise you’d be editing an asset from game world). There’s currently no way to ‘make editable’ a tile map component that started with an asset; I’ll add a call for in 4.8 (it’ll just clone asset UPaperTileMap into a per-instance copy that can then be edited).

UPaperTileMap has methods to get position of a tile, etc…, but they’re not exposed to BPs yet, I’ll bug that as well.

Note: Editing tiles causes a full rebuild of render data at end of frame (so many edits done in same frame should cost no more than a single edit). With a reasonable sized map should be fine, but you probably don’t want to be doing it per-frame to animate a tile or something, for example. For tile animation, I’d suggest laying out tiles in a horizontal or vertical strip in tile set, and using a material to add a wrapping UV offset to texture sample based on time.

Cheers,

Don’t hold your breath. Spriter SCON importer is a super-early experimental WIP that I wanted to get checked into source control. isn’t an officially supported feature and won’t make 4.8 (or possibly any future version).

Having said that, it does a pretty good job of parsing SCON and has data model in memory, but there are some missing concepts or bad fits on Unreal side to flesh out, and a lot of work to make stuff like authorable from scratch in UE4 as well.

Also, mostly unrelated, but I just had to say WTF @ Spriter for allowing animated hierarchy changes… (you can keyframe bone parent changes in it, but please don’t ever do that!)

Cheers,

Each movement component is independent and has it’s own assumptions/limitations. However, character movement component (what most people refer to when they say movement component) uses only capsule to determine when and how to move. You can use custom flipbook collision to check for overlaps or to block projectiles/line of sight/etc… in addition to capsule component (either inside or outside of it, depending on how you set up collision for capsule (i.e., does it also block these things), but it will have no impact on movement.

Note: is not unique to 2D. A 3D skeletal mesh can have a physics asset attached to it as well, and that has no bearing on how a 3D character moves either, it still just uses capsule.

Cheers,

Hey there guys, .

Is there a way to make a count-down timer like ? hqdefault.jpg

A flipbook is taking so much space from my atlas texture and i am wondering if there’s a better way to do it.

Thanks in advance

Hi ,

Any chance you could re-upload project? I thought I had already downloaded it but don’t see it on my machine and link doesn’t seem to work anymore.

Edit: Nevermind, I tried again and it downloaded time, I guess it was a transient failure.

Cheers,

Two options that come to mind:

  • Draw each tick as a separate sprite rotated in place
  • Create a mask texture for where ticks belong and then do a radial sweep in a material based on a material parameter TimeRemaining to highlight correct ones (you could also throw in a time-dependent pulse so they ‘breath’ as well).

Cheers,

Hi ,

I was able to reproduce with your project and spent some time digging into geometry generation to see if there were any gaps, but vertices across gaps are identical (to float tolerance), so I re-examined tile texture and that’s root cause even after your efforts to pad it. issue is that expansion areas have 0 alpha, so in cases where it would have previously sampled wrong color from an adjacent tile, it now samples 0 alpha, so it renders background instead of adjacent tile.

If I replace material with an opaque one, or fill tile map texture with a solid color, keeping all other things constant, gap goes away. See attached pictures.

OriginalWithGap.pngAllOpaque.pngSoldColor.png

I will investigate adding a ‘prepare for filtering’ command to convert a tile map with no padding into one that is appropriately filtered for some level of zooming. There’s also a possibility that there is a setting in Texture Packer that would feather alpha out as well.

Cheers,

I don’t have original tile images to try repacking one using Texture Packer, but ‘Reduce Border Artifacts’ option sounds a lot like what you’d want.

Edit: Nope, seems to bleed out color into border padding but it still sets alpha to 0.

Edit 2: Hidden under ‘Sprites…show advanced’ in Texture Packer, there is an option to Extrude. Using:

Extrude 2
Border padding 0
Shape padding 0
Inner padding 0
Reduce border artifacts enabled

Seems to do trick and fix at least case.

Cheers,

Thank you . Masked material worked as a charm and looks so good now.

Glad it’s working well for you. Making cool looking meters is one of my favorite polish bits for game jams, it’s an easy way to get a lot of impact for not a lot of effort :slight_smile:

first one has glasses knocked over once you’re in full danger zone where controls are basically unresponsive, and in second one, needle starts shaking violently when it reaches red line.

Cheers,

all,

As a heads up, I’m planning on changing default Pixels/UU project setting to 1.0 for UE 4.8. won’t affect any existing sprites, only newly created ones, and you can always go into project settings and change it back to 1.28 ( current default) or 2.56 ( default back when option was first added). Just wanted to get a quick read on if will upset anyone (and have something searchable if people are wondering why their newer sprites are a different size than their older ones).

Cheers,

I’m completely fine with it. A couple of thoughts though…

  • is there a default option in settings so we can set a per project default so that all new sprites take on that value?
  • There should probably be a dedicated section in docs which educate people on P/UU in relation to how big there sprites will be based on their resolution.

Yes, that is setting I’m talking about changing actually. It’s in Project Settings…Paper2D currently, but I will probably move it to Editor Preferences…Paper2D - Import as part of changing value, since it’s not a runtime concept (Note: It’s still a project setting, not a per-user setting, so it’ll do right thing when you collaborate with other people on a project via source control).

Totally agreed on doc. I’ll check with Wes and make sure concept of scale/etc… is covered.

Cheers,

As a tribute to man responsible for Paper2D we decided to post our “Spartan” game announcement trailer here! Thank you Mr.Noland. Without you, nothing would have been possible.

We hope that we can inspire more people to start using Unreal for 2D projects so we can show world what engine combined with our abilities can do!

We are a team of 2 (brothers actually) and name of our studio is [FONT=Comic Sans MS]Sinister Cyclops.Every aspect of our game - from animation to
game mechanics, from music to visual programming, from level design to creating video is all made by just two of us.
We hope that you will enjoy our work in progress and any feedback, good or bad is always welcome! :slight_smile: