• Advertisement

Luhan M.

Member
  • Content count

    18
  • Joined

  • Last visited

Community Reputation

4 Neutral

About Luhan M.

  • Rank
    Member

Personal Information

  • Interests
    Programming
  1. Command Pattern Review

    I think I understand now. I started studying about patterns because I see a lot people saying that everybody should use state machine, update (), etc, and after a light read about these, I thought they would facilitate to implement a game as you get further in the development
  2. Command Pattern Review

    @Rutin Thanks, that was one of my questions, and it's very clear for me now. About the books, what way you did learn some of the patterns? @swiftcoder So what I'm actually making is a base class which is focused only in these two objects: MoveUp and MoveDown right? Just to make sure I understood the second way to do it, it's means the object in this case (MoveUp and MoveDown) would have all the methods and the necessary logic to execute the action? P.S. : Thank you for taking the time to read my code.
  3. Command Pattern Review

    I tried to implement the command pattern explained in this book : http://gameprogrammingpatterns.com/command.html. I'm looking up for someone which could revise my code and see if I did implement it the right way, or even if I did deviate a lot from how it should be implemented. Here's the code : https://github.com/Luhanmacedo/Command-Pattern Questions: I didn't understand if the base class (Command) could be modified to introduce methods as I did to facilitate implementation details in the derived classes. What would be a good way to map the buttons according to the configuration the player wants to use, such as X for Jump and Y to shoot. P.S. : If it's not possible to review the whole code, tips in some parts are welcome as well.
  4. I'm new to game development too, and I focus more on the programming. I have to say when you think a game is easy to do, it's not. Things you didn't think in the start will do start appearing and you'll want to implement them to make it better, and as you do it, you'll see how much you did learn and it was worth it that you spent time working on it before something else, because you would feel overwhelmed and probably quit. Hope it helps.
  5. Should I encapsulate even in very small games?

    Well, my next game is going to be a worm, so probably not. The only reason I'm encapsulating things is because I think it'd create a good habit, would get some experience out of it, and help me think more before actually coding. But maybe it's a little overkill for a game such as pong.
  6. Should I encapsulate even in very small games?

    Here is the code in github, inside Pong file there is the header files and .cpp (tell me if you can see or if there is a better way to show it to you). https://github.com/Luhanmacedo/Pong I didn't try to encapsulate the physics yet, so it's all inside the main function, and still have to tweak the angles and the AI.
  7. Should I encapsulate even in very small games?

    Just one more question, how generally a physics class should be implemented?
  8. Should I encapsulate even in very small games?

    I already started doing it, so I'll finish. I have to say even being easier, it makes you think a little more about what you really need. Thanks for the help.
  9. I'm nearly finishing my Pong game, and I was wondering if I should encapsulate things such as physics, rendering, sound, in such a small game.
  10. Yeah, I did opened it in paint and used the coordinates, but I saw some people saying that an atlas should have come with the coordinates of each sprite. I thought there was some kind of way to retrieve each sprite more easy, instead of looking for the coordinates in the image editor.
  11. I forgot to mention that the pack doesn't come with the coordinates of each sprite, so there's a way to discover it? (seems like your answer depend on it)
  12. I downloaded a pack of sprites, and I was wondering how do you manage to get the exact coordinates of a smaller sprite in an Atlas.
  13. How to learn the math necessary?

    This helped a lot, thanks man!
  14. How to learn the math necessary?

    I'll try it before buying a book.
  15. How to learn the math necessary?

    I thought that most of the things applied in 3D somehow could be applied to 2D as well. I'm just looking for a basic book to start, because in most of them the prerequisites judged by the author I would have to wait a little bit until I advance in my study through khan academy.
  • Advertisement