Overcoming 2D limitations in Unreal Engine [Paper2D ➡ PaperZD] - Dev Log

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 ธ.ค. 2024

ความคิดเห็น • 81

  • @CobraCode
    @CobraCode  2 ปีที่แล้ว +18

    At some point in the video I use an anim notify to set EndAttack and I mentioned this might not be a great idea... yeah turned out this was actually a horrible idea since I sometimes got stuck cause the notify wouldn't fire off. I went down a whole rabbit hole about anim notifies and turns out I've been doing this wrong for years and so are most people.
    Will talk more about that in the following dev log!

    • @MrLordR1
      @MrLordR1 2 ปีที่แล้ว +1

      Could you show me how to make an attack using ZD?
      I'm very new to unreal and your channel is really good!!

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว +3

      @@MrLordR1
      Thank you!
      I actually go through the process of adding an attack combo in one of the later dev logs using ZD. I also talk more abut the anim notify issue so I think this is probably what you're looking for: th-cam.com/video/aFIs2V5eqOg/w-d-xo.html

    • @game-dev-fun
      @game-dev-fun ปีที่แล้ว +1

      Hey! Which dev log should I watch for the notifying wouldn't fire. I believe I have been using it wrong as well. Thanks in advance

    • @CobraCode
      @CobraCode  ปีที่แล้ว +1

      @@game-dev-fun Hey, this was a long time ago, so I'm not 100% sure anymore, but I believe it's the following one:
      th-cam.com/video/aFIs2V5eqOg/w-d-xo.html

    • @game-dev-fun
      @game-dev-fun ปีที่แล้ว +1

      @@CobraCode Thank you so much. It was really helpful. I have been using anim notifies to trigger gameplay events but very bad practice. Turns out most of the people are still doing it. Will implement it differently.

  • @CarlosVGMEspresso
    @CarlosVGMEspresso 2 ปีที่แล้ว +48

    Hey! PZD coder here, reporting in.
    Excellent tutorial, really appreciate the use of the plugin!
    I'll be sure to show this to people whenever I can

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว +2

      Thank you :D

    • @deuswulf6193
      @deuswulf6193 2 ปีที่แล้ว +2

      @@CobraCode Just noticed PaperZD is showing as free on the marketplace. Intentional?

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว +1

      @@deuswulf6193 Yes I believe it's free to celebrate the newest update to Unreal Engine 5 which comes with a lot of new features.
      I'm not sure if it's only free for a limited time though or forever, so better grab it now.

  • @philzan3627
    @philzan3627 2 ปีที่แล้ว +6

    3:50 you can use the dot product between character and AI and decide on a +/- boolean for direction facing for AI instead since it will only ever face left or right.

  • @Glzmo
    @Glzmo 2 ปีที่แล้ว +2

    did not know this plugin even existed OMG getting it now. will save me so much time and energy

  • @EvilReFlex
    @EvilReFlex 2 ปีที่แล้ว +2

    3:00 -> you can set the rotation of the flipbooks from local to world to stop them from rotating.

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว

      Ohhh, that's a great suggestion, thanks.
      Have been doing something similar with the spring arm, but never though to use it on the AI.

    • @bobgratton2986
      @bobgratton2986 ปีที่แล้ว

      how do you do that ?

    • @bobgratton2986
      @bobgratton2986 ปีที่แล้ว

      how to set them from local to world ?

    • @EvilReFlex
      @EvilReFlex ปีที่แล้ว

      @@bobgratton2986 at the sprite/flipbook transformatin pannel is on the side of the releative rotation a small arrow, click this and set it from relative to world.

  • @YahyaDanboos
    @YahyaDanboos 2 ปีที่แล้ว +2

    Nice, the game is slowly coming along 😁

  • @TheSokkaYT
    @TheSokkaYT 2 ปีที่แล้ว +1

    Joel here,
    As someone who's developing a hand drawn beat em up rpg, Paper2D is quite cumbersome in the beginning stages. Of course in my case, I'm still using it as I had found my ways around it's limitations (and bugs), but I definitely have been wishing for a solution like this. But me being a C++ fanatic, I handle animation updates and animation state updates all in code. Not a genius at blueprints, but after learning quite a bit of it, this makes me wanna reconsider! Thanks for the video!

  • @DerpxGames
    @DerpxGames 2 ปีที่แล้ว +1

    Thank you so much for this man!

  • @Xiaoxiao738
    @Xiaoxiao738 2 ปีที่แล้ว +1

    The Dev of Paper ZD recently did a live stream tutorial with epic games which you can watch on the unreal engine youtube page.

  • @UTube2K6
    @UTube2K6 2 ปีที่แล้ว +3

    for unwanted rotation did you try to constraint rotation of your actor on a plane ?

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว +1

      I tried setting the rotation rate for Z from the default of 360 to 0 on Character Movement (Rotation Settings) since I believe this is what is used by the AI Controller.
      But that doesn't seem to do anything.
      Do you have another idea where one could set this instead?

  • @kajekage9410
    @kajekage9410 2 ปีที่แล้ว +2

    If I wanted to make a game similar to Hollow Knight graphics and gameplay wise would this do the job or am I better off trying another engine first? I wanted to try unreal as I eventually wanted to do some VR development and I have a background in c++,

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว

      If you aren't already an experienced developer with Unreal Engine I wouldn't necessarily recommend it for 2D games. I believe the only case where you'd want to use Unreal Engine for 2D is if you already have a lot of experience with it and really like the workflow.
      However since the PaperZD plugin became a free asset recently, making 2D games with Unreal has become a bit easier and better to manage.
      I personally dislike Unity for many reasons, but all in all it's probably a better choice for 2D games since Hollow Knight, Ori and the Blind Forest and many other 2D games that are successful have been created with it.

  • @CanalDojogames
    @CanalDojogames 2 ปีที่แล้ว +5

    Im loving how it appears so good. Im curious how you solved the light issue we have on 2d sidescroll BP project already done by ue4 that we can use. Or did you used the 3d sample style?

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว +1

      Hey!
      What light issue do you mean?
      I'm not sure if you've watched this video already, but here I start out from the 2d sidescroller bp project and set up the character and lighting for my project.
      Maybe the process described here will help you overcome the light issue you are having.
      th-cam.com/video/-xLl1PLPGS0/w-d-xo.html

    • @Glzmo
      @Glzmo 2 ปีที่แล้ว

      Normally Most lighting problem revolve around the Orthographic camera. Swap to perspective with a really narrow field of view and this will fix that problem
      a little finicky I know but unreal doesn't care about fixing the paper2d stuff which is really a shame

  • @mmmmmmmmmmm10
    @mmmmmmmmmmm10 2 ปีที่แล้ว +2

    Loving the art style. I think her run animation is a bit slow, looks like slowmo. Edit: subscribed, looking forward to watching future devlogs

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว

      Thank you so much for the support!
      The character is actually a free asset by an artist called clembod: clembod.itch.io/warrior-free-animation-set
      I just edited the colors and added additional frames for animations that weren't present. I'm still in the process of practicing pixel art so I can eventually make my own character from scratch instead of just editing this one.
      Thanks for pointing out the run speed as well, yeah looking back at it now it does look very slow 😅

    • @mmmmmmmmmmm10
      @mmmmmmmmmmm10 2 ปีที่แล้ว +1

      @@CobraCode by art style i mean the 3d background, 2d characters with pretty lighting and shadows, looks really fresh. not so much referring to individual store assets u can replace later tho clembods character is nice too. Also love the idea of playable enemies. Good luck with the pixel art learning

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว

      @@mmmmmmmmmmm10 Oh, sorry for the misunderstanding.
      Thank you :D
      Yeah I was surprised this ended up being so easy to setup. I really want to try to get edge lighting working on the characters as well soon through normal maps since that will probably make the game look even nicer :)

  • @guangkunzeng2805
    @guangkunzeng2805 2 ปีที่แล้ว +1

    Really love your work!

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว

      Thank you so much :D

  • @platinumgamer5062
    @platinumgamer5062 2 ปีที่แล้ว +1

    how did you set the variable for "is moving right"

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว

      Hey, this is how I'm setting the variable.
      blueprintue.com/blueprint/o3qqcifu/

  • @Pac-bq2sn
    @Pac-bq2sn 2 ปีที่แล้ว +2

    one thing that would be dope if u decide to implement in ur game to show how u did it would be either gear equipping reflecting in game for the character or color changing for let's say the hair or the armour. There isn't any tutorial for that in ue4 so it's totally something not as easy as we think

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว +1

      Yeah, I plan on eventually having color palettes you can unlock, but I'm still not sure what the best way of going about it is. All of my characters use indexed colors in Aseprite so it's actually easy to just change the blue hair to blonde in a single click for example, but then I have to import everything into unreal engine again -> make new sprites -> new flipbooks -> set up new events and everything so it's not very efficient. The best way would probably be to do something in the material of the sprite inside of unreal engine to allow changing of every pixel of color X into color Y, so I still need to figure out how to do that later. Project Unreal Fighter 2D has a full on palette system, so this video might have some helpful hints: th-cam.com/video/9tW79-m2uP0/w-d-xo.html

    • @Pac-bq2sn
      @Pac-bq2sn 2 ปีที่แล้ว

      @@CobraCode I found this vid on his channel th-cam.com/video/N5mjRIaDacU/w-d-xo.html another cool way of doing it

  • @bobgratton2986
    @bobgratton2986 ปีที่แล้ว

    for the rotation thing, i really dont understand how you can achieve to stop the ai to rotate. We are doing a game similar for school project, having a hard time here.

  • @TheSpinner7
    @TheSpinner7 2 ปีที่แล้ว +1

    How you did the character direction rotation?( sorry my english)

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว

      Hey I made another video that goes into details on how you can implement turning and character movement for 2D which is also applicable to this video!
      th-cam.com/video/g31NTpq9p-o/w-d-xo.html

  • @HediDev
    @HediDev 2 ปีที่แล้ว +2

    You should make a video about "2D tricks" in UE .

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว +1

      Thanks, that's a good idea.
      I still have a couple of projects I want to make first so I'll probably figure out a few more tricks along the way.

  • @3DeeFanatic
    @3DeeFanatic 2 ปีที่แล้ว +1

    Can 2D sprites cast shadows out of the box ? or does it need a special kind of setup like in Unity ?

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว +1

      I think it's set to off by default, but you just need to tick a box to activate it.
      On the sprite just search for 'shadow' and there should be a box with 'cast shadow' you can turn on.
      To receive shadows on your sprite you'll need to change the sprite material settings from the unlit material that is the default to any lit material!

    • @3DeeFanatic
      @3DeeFanatic 2 ปีที่แล้ว +1

      @@CobraCode Sweet. Sounds pretty straight forward. 👌🏻

  • @nikoladjordjevic4733
    @nikoladjordjevic4733 2 ปีที่แล้ว +1

    Can you explain in more detail how you solved the problem with sprites when they need to follow ai.
    I'm stuck and I don't know how to make the sprite look at the camera.
    I paused the clip and looked at how you connected the blooprints, but I don't understand where you got Spawned Rotation from.
    Can you please help?

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว +2

      Sorry for not going into detail on it in the video!
      This shows how I set spawnedRotation. I basically just save the rotation on BeginPlay so I can use that later:
      blueprintue.com/blueprint/cf_r7ggy/
      This is the relevant part on tick that will check if the npc is walking left or right and force the look direction:
      blueprintue.com/blueprint/jh-m3uom/
      This is the inside of the UpdateFocus function used in the blueprint above:
      blueprintue.com/blueprint/gwpd-r_i/
      Hope this will help you figure it out :)

    • @nikoladjordjevic4733
      @nikoladjordjevic4733 2 ปีที่แล้ว +1

      @@CobraCode Thank you so much for helping me !!!
      I have another question:
      How did you add the variable "Ai Controller" needed to connect to the "is valid" and "set focal point" blueprint?
      I tried to "cast to Ai Controler" but it doesnt work, i am doing something wrong.

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว

      @@nikoladjordjevic4733 No problem!
      So you need to create a new blueprint class of AI Controller and set up your behavior tree in there and then set it on the character.
      I'm using the same base character for both the player and the enemy so I only want to execute this for AI which is why I check for isValid on the ai controller.
      This video is about making a spawn system, but I also create AIC_EnemyGuard here which is an example of making an AI controller.
      th-cam.com/video/5egOU7wjfNA/w-d-xo.html
      Then on begin play you can get that ai controller, cast it and save it in a variable.
      blueprintue.com/blueprint/liq0ujlu/

    • @nikoladjordjevic4733
      @nikoladjordjevic4733 2 ปีที่แล้ว +1

      @@CobraCode Everything is working properly now, thank you very much for taking the time to help me!!!

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว

      @@nikoladjordjevic4733 Awesome, I'm glad to hear that!

  • @seam9074
    @seam9074 2 ปีที่แล้ว +1

    hi, how you set SpawnedRoatation?

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว

      Hi,
      I set spawned rotation on beginPlay by getting the current rotation.
      blueprintue.com/blueprint/cf_r7ggy/
      I hope this helps :)

  • @andhikaahmad8556
    @andhikaahmad8556 2 ปีที่แล้ว +1

    can u make full tutorial for the enemy

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว +1

      Hey, thanks for the suggestion.
      Paper 2D Ai is on my todo list, but not quite sure when I'll get to it.

  • @noskovdesign
    @noskovdesign 2 ปีที่แล้ว +1

    Hi! Mhm, how do you think, there is possible to make 8 ways direction sprite movement system?
    Seems it's pretty challenging with unreal.

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว +1

      Hey!
      Yes it's definitely possible, but Unreal Engine doesn't really give you anything to help with that.
      AFAIK the guys from the PaperZD plugin are working on something to make top down 2d games like that easier to develop. But for now you'd have to come up with your own system and make a state machine of sorts that runs on tick and always checks the X and Z velocity of your character to change the direction it's facing at or maybe do that whenever you get a directional input from the player.
      Probably needs some trial and error 😅

    • @noskovdesign
      @noskovdesign 2 ปีที่แล้ว +1

      @@CobraCode Thank you very much, thats exactly what i found, and now you confirmed that, this is funny moment)

    • @CarlosVGMEspresso
      @CarlosVGMEspresso 2 ปีที่แล้ว +2

      ZD Coder here, we just released the new version, should work for you... we have people making 8 directional games with it and they seem to be enjoying the tools

    • @noskovdesign
      @noskovdesign 2 ปีที่แล้ว

      @@CarlosVGMEspresso Sounds great! Thanks!

  • @andrewdyet8639
    @andrewdyet8639 2 ปีที่แล้ว +1

    Running into the same issues with rotation that others have had. I've followed the AIController videos you've done for the Spawn points (which are working correctly), and have put together the blueprints how you have them for SetFocalPoint, Update Focus, and the Behavior Tree. The rotation is still not correcting properly, do you have any advice? I believe the problem lies in whatever comes before the Is Valid before set focal point with connecting the correct target to the focal point.
    I've really enjoyed your videos though and thank you for all your work!

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว +2

      Hey, here's my full function for setting the rotation.
      blueprintue.com/blueprint/b2zpmqf-/
      I think most likely something is wrong with the values in combine rotators where it either has to be 180 or 0 for Y rotation.
      Or with setting the spawned rotation correctly on beginplay:
      blueprintue.com/blueprint/11q7rdw1/
      If this doesn't work you could give me a pastebin of that part of your blueprint or come into the discord and drop me a couple of screenshots.
      discord.com/invite/sPbqxRrqr5
      Thank you :D

  • @ZaynNaz
    @ZaynNaz 2 ปีที่แล้ว +1

    Does this plugin work for UE5 though?

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว +2

      Not quite yet.
      Just checked the developer's discord for updates and it looks like they already have a working beta and plan on releasing the ue5 compatible version to the marketplace in a few weeks. Apparently that version will also come with a lot of other new features.

  • @KnivesFrank
    @KnivesFrank 2 ปีที่แล้ว +4

    Nice as always, man!
    Paper 2D in unreal is... not perfect.. at all... That's the reason I gave up on my 2d game. Maybe I will change my mind after this video

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว +3

      Yeah it's definitely hard to work with.
      This made it a lot easier though.
      Also got a comment recommending the use of sockets to trigger events which also worked out great for me. Gonna talk about that in the next dev log.

  • @antoniocarlosleminske1964
    @antoniocarlosleminske1964 ปีที่แล้ว

    eu estou muito intereçado em ver como funciona a perseguição estou criando um jogo em plataforma adorei este plugin Paper ZD só tenho uma dificuldade na virada de 180° da um friso mais ok

  • @TheEightshot
    @TheEightshot ปีที่แล้ว

    Has any of this been updated in 5.2 or later? Or has Paper 2D been abandoned?

    • @CobraCode
      @CobraCode  ปีที่แล้ว

      It has been kind of abandoned by epic games, however the community is developing it further through plugins.
      PaperZD is the most well known one and it's free. They also got an epic mega grant, so epic games is indirectly supporting it.

  • @HediDev
    @HediDev 2 ปีที่แล้ว +1

    Your game looks nice , I've actually started a similar project back in 2020 , but because of the 2D limitations I moved the Dora Goken Storm project to Godot . (You can find the prototype in my channel if you wanna see it "2.5D game UE4 showcase" . I was 15 years old at the time . )

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว

      Thank you!
      I just checked out your old video. It looks really cool and the environment gives me river city rampage vibes.

  • @CreativeGamestv1
    @CreativeGamestv1 2 ปีที่แล้ว +1

    Please make a tutorial about 2D cameras of your projects

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว +1

      Hey, what exactly is it about cameras that you'd like to know?
      I'm actually releasing a video on Wednesday about how to set up a 2d game in ue5 from scratch now that the 2d side scroller template is gone.
      It also goes over how to set up a basic camera and the differences between perspective and orthographic. Maybe that is what you are looking for.

    • @CreativeGamestv1
      @CreativeGamestv1 2 ปีที่แล้ว +1

      @@CobraCode I'm studying the unreal engine 5 and I took some sprites to try to make a game model of the Power Rangers from Snes with a footprint like The Last Night and Replaced and Backbone, which has a sidescroller camera, only it's much smoother and far from the character...I looked for several videos and none of them did my duty

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว +1

      @@CreativeGamestv1 Thanks for clarifying, I understand what you mean now.
      From looking at the footage of the games you mentioned there isn't really anything specifically 2D about how the camera works, I think if you find a good tutorial about cameras in 3D that should suffice as well.
      I think also just activating camera lag and setting the pole arm length properly might already be enough for what you are trying to do. Like I said I'm releasing a new video on wednesday which also covers these topics, so hopefully that should answer your questions sufficiently.

    • @CreativeGamestv1
      @CreativeGamestv1 2 ปีที่แล้ว +1

      @@CobraCode I will definitely be waiting for this video, it can clear up many of my doubts, thank you very much

    • @CreativeGamestv1
      @CreativeGamestv1 2 ปีที่แล้ว

      I don't know if you've already done it, but you also do a tutorial on making textures in low resolution in UE5 or Photoshop