August 12, 2020
  • 12:52 am Hướng dẫn đánh số thứ tự tự động bằng hàm trong Excel
  • 12:23 am Hướng dẫn sửa lỗi java nộp thuế điện tử 2019
  • 12:03 am Cách Kết Nối Mạng Lan,Chia Sẽ Dữ Liệu, Mạng Nội Bộ win 7 ,mạng lan choi game,nối 2 máy tính với nhau
  • 11:42 pm Cách Xoay Ngang Và Dọc Trang Giấy Trên Cùng Một Văn Bản Word-Portrait and Landscape in Same Word
  • 11:21 pm Thám Tử Lừng Danh Conan – Tập 2 – Thám Tử Bị Teo Nhỏ – Conan Lồng Tiếng Mới Nhất



How to deal with multiple animations within a single game object. In this example walking left and right and idle using RenderCopyEx to deal with flipping textures. Learn how to make your own game from scratch!

Download the player_anims png to use in this video here:

Other wise if you would rather follow along/or create your own asset in pyxel edit watch a tutorial here :

If you wish to keep up with new episodes don’t forget to subscribe!

To catch up on the how to make a game series you can view the entire playlist here:

To download the up to date version of this code visit my github here:

Nguồn: https://thechecklistmom.com/

Xem thêm bài viết khác: https://thechecklistmom.com/game/

admin

RELATED ARTICLES

16 COMMENTS

  1. Anthony Holder Posted on July 10, 2020 at 7:08 pm

    I'm getting an exception in the TextureManager.cpp,

    void TextureManager::Draw(SDL_Texture* tex, SDL_Rect src,SDL_Rect dest)

    {

    SDL_RenderCopy(Game::renderer, tex, &src, &dest);

    }
    Exception thrown at 0x6C78EC5A (SDL2.dll) in BirchEngine.exe: 0xC0000005: Access violation reading location 0xCDCDCDCD.

    Most of the stack just says about trouble reading the dll files. It all worked fine until I tried to use multiple png for different animations. Could anyone help please?

    Reply
  2. Woozer Posted on July 10, 2020 at 7:08 pm

    I'm getting an error in Game.cpp telling me that (my line 59) map = new Map(); variable is ambiguous. I'm not sure why this has happened and I honestly don't know how to fix this at this point yet. It is the underhand "map" that is underlined in red and has the error. I think it started happening after modifying SpriteComponent.h but I'm not 100% certain.

    Reply
  3. INSIGHT. Posted on July 10, 2020 at 7:08 pm

    Very imp questions
    From which book you had learnt this plzx tell me
    I want to learn this all

    Love from India

    Reply
  4. Shawrex Posted on July 10, 2020 at 7:08 pm

    11:52 , I was waiting a sentence like " He's not facing in the direction he's walking.." or something like that …
    And whe I " He moonwalks " so naturaly said it semmed so hilarious ! Thank you for this great moment !

    But don't be scared ! All of your tutorial are good moments !

    Reply
  5. Justin Honey Posted on July 10, 2020 at 7:08 pm

    You are a legend Carl

    Reply
  6. Sai Surisetti Posted on July 10, 2020 at 7:08 pm

    I fukin love you dude.

    Reply
  7. Eduardo Rodriguezarias Posted on July 10, 2020 at 7:08 pm

    way to go. pat on the back.

    Reply
  8. SeppuKun Posted on July 10, 2020 at 7:08 pm

    One of the best C++ game dev tutorials I’ve come across! Awesome stuff!

    Reply
  9. Mic li Posted on July 10, 2020 at 7:08 pm

    like from Hong kong!
    Nice video:) ,very useful to me!!!
    but there are few problems,
    should I rotate the image to make it look like walking on the different directions or make the new image sequence for different directions?
    also, would you like to make a menu tutorial?
    sorry for my poor grammar 😛

    Reply
  10. Tiago Oliveira Posted on July 10, 2020 at 7:08 pm

    Great tutorial man! Could you give me a hand, I am trying to create a parallax effect, I mean, I want the background to scroll forever, and over time increase the speed, could I create one using the Sprite Component ? What would you recommend? Thanks about the great work you have done so far! =]

    Reply
  11. Skill Spieler Posted on July 10, 2020 at 7:08 pm

    Hi again. Firstly, nice vid dude!
    I have a rather general question regarding the use of the entity component system. As I have said (at least I think I did), I am writing my own game engine using SFML and I am encoperating a good chunk of your logic as well (mainly ESC and collisions so far). My code is slightly more complex since I am trying to make my api as generix as possible (so lots of templates and inheritance there). Now the actual 'problem': Whats the best way to remove entities once they have been added and how do get them from a different module. Further, if i remove an entity, whats the best way to make sure I won't be using invalid references. Lastly, how should I manage collections of references to entities e.g. all buildings or GUIObjects? (appart from just std::reference_wrapper). I think you get the point…

    Thanks in advance!

    Adrian 🙂

    Reply
  12. Rubberduckycooly Posted on July 10, 2020 at 7:08 pm

    Nice video! These tutorials are the best I've seen so far!

    also when do you plan on completing the collision? (stopping the player from walking through it)

    Reply
  13. Fry GG Posted on July 10, 2020 at 7:08 pm

    Hi ty for this video mate, but i have question, how to play only 1 times one animation ?

    Reply
  14. 2thinkcritically Posted on July 10, 2020 at 7:08 pm

    I must say I've enjoyed this series thus far. I hadn't touched C++ in many years — I always fell back into C — and over the past several years my work has been with PHP and JavaScript. I wanted to get back into C++ and try out SDL2 as well. This series has hit that sweet spot for me.

    I take it you'll move the creation of named animations out of the SpriteComponent constructor in the future so that different entities can have different named animations?

    Also are you planning on incorporating SAT collision detection? It's not something that people usually think of when building a platformer, but it allows for a much more interesting map than relying on AABB.

    Reply
  15. Daniel Cory Posted on July 10, 2020 at 7:08 pm

    Awesome! Just so you know…this is my favorite series on all of youtube that I watch. When I see that you make a new video, I get excited, and you never let me down! Thank you for your videos!

    Reply
  16. SmartGamer Posted on July 10, 2020 at 7:08 pm

    Really awesome video! solved a lot of problems, been waiting all week for this. Big thumbs up to you mate, looking forward for the camera one 🙂

    Reply
LEAVE A COMMENT