Replies: 1 comment
-
Hello! Sorry for the late reply - firstly, thank you very much for using any of my packages, haha! I hope you enjoy using them. I hadn't considered making a "full example" that uses multiple packages, but I definitely could do that - it sounds like a good idea, and could be good to make a simple starting game for people who want to jump in. As to your question, yeah, you'd probably be using IntGrid to mark cells as being solid or not - each cell in the IntGrid has its position, and can be retrieved either using Layer.IntegerAt(), or Layer.Integers (assuming the layer is an IntGrid layer) (though the width and height is set for the entire grid, not for each cell). For Entities, they do have their own width and height values. The sprite animation would be imported and animation updated using goAseprite, yep. You've got the general gist of it all, though I still would like to make a simple example, for sure. |
Beta Was this translation helpful? Give feedback.
-
Hello,
First off a BIG THANK YOU for providing such great golang packages! Really great work and very helpful for new gamedev gophers like me. I am trying to make a simple 2D RPG in the style of Zelda ALTTP (this is also my very first game project btw) and I am using the following stack:
Now, every single of those packages, they do have very nice examples and they were really helpful trying to understand how they work and implement things. What I am missing is how these 3 packages can work together, in a "best practice" sort of style, or at least since you are the creator of all of those, how you would have envisioned to make them work together.
Let me describe my plan/logic:
My plan is to start with creating first the tileset (with Aseprite) and then the Tilemap (with LDtk). I have to learn how to work with these programs in order to take advantage of any metadata they pass, so I can leverage this later in the program. For example, I suppose I can mark certain tiles with the
IntGrid
property, signalling that the player shouldn't be able to walk upon those (e.g. walls, houses, trees, etc). Then, at thefunc Init()
function, import the*.ldtkgo
project and have a loop going through all of its tiles. If there is a tile withIntGrid
property, it will add the tag "solid". Then, loop again through the "solid"-tagged tiles and create resolv objects out of them. Now, I am not sure how I can do that, (e.g. do I have to use the entity propery) but there should be a way to somehow grab theX
,Y
,width
,height
values of e.g. a house. Also, I assume the Space size should be equal with the Level Map size, right? Then do the same procedure for the player/hero. Import the player's sprite-animation using go-aseprite and create a player-resolv-object tagged as 'player'.Then at the
Update()
function, check for userinput (e.g. if right arrow key is pressed) and check if we can move or not, using again the resolv library for colissions. Note to myself: make sure to keep track of playerObject's X and Y coordinates. If the player manages to move, then update it's coordinates along with the space.update() as well. Then at the Draw() function, draw the animations.Is this correct? I was wondering if you can make an example using your packages, more of a starting point.
Beta Was this translation helpful? Give feedback.
All reactions