Legend Of Zelda Series - 02 - Godot Got Link Moving

 

You can find the most current iteration of the project code along with all sourced assets and planning materials at: https://git.alderautomation.ca/Matthew/Godot_Zelda

Please feel free to join me on Discord. I am there just about all day and every day: https://discord.gg/peDsUHYCBY

 

    This past weekend we went down to the Linux Fest North West (LFNW) which is a free convention that is held annually to celebrate Linux and other open source software. Here is a link the their page and one for their YouTube which is supposed to be getting all of the talks posted to as soon as they can. The Bellingham Technical College allows LFNW to use their grounds for the event, and Jupiter Broadcasting really helps to market and help out at the event. If you have never been and are interested in Linux and it ecosystem, then you really should check it out.

Images: Top: raffle draw with all of the people. Middle: a metal mantis wizard thing made from a transmission, totally unrelated to LFNW but very cool. Bottom: the hotel room.




















 

    What does this have to do with the Zelda game? While we were there we watched two talks about Godot, one given by Oscar Baechler and the other given by Justin Revelstoke. After seeing how quickly they were able to work with Godot and get things running and working, and how passionate they were about Godot, I have decided to change the project scope from Java to Godot. I am still going to keep majority of my planning steps and the targets of OOP and as NES-like as possible.

    On Saturday night, after Oscar’s talk, we all went back to the hotel and I started converting over to Godot right then and there. I started with moving my entity classes over so that I could have something to work with. Inheritance in Godot feels weird to me. Every object is a scene and then your next object scene inherits from the previous. I know, its inheritance, but as I haven’t worked much with node or scene systems my brain is getting all spicy about it, “What is this?!”. And to access parent attributes, you just access them, don’t need super commands or anything. I am sure the more I work with it the more I will get used to it, like anything else in life.

    On Sunday and yesterday I worked on getting Link’s sprite animated. This shouldn’t have taken as long as it did, It should have been done on Sunday, but the Sprite sheet that I was working with wasn’t in a proper grid and I could properly get everything to import properly. Keeping in mind, still very new to game development and the original sprite sheet may have been 100% correct. In the end, I opened up Aseprite and copy/pasted all the green Links into a proper grid to work with. After that it was simple to make the animations for his various walk patterns. I still need to go back and do the same thing for white and red Link but that can wait till I need them, same with the many enemies as well.

    If you are not familiar with Aseprite, you should definitely check them out. They are supposed to be the best pixel art software out there. Funny enough, I just found out from LFNW that Krita can also do pixel art and animating as well. Which is supposed to be one of the best digital art programs out there and is free. We watched Oscar’s talk about Krita as well and I really want to use it more, but I’m not much of an artist so we will see how that goes or if it happens.

Top Left: original sprite sheet that I found on the internet. Bottom Right: the edited green only Link sprite sheet.


















 

 

 

 

 

 

 

 

 

 

 

After I got link on the screen and animated, well I had to get him moving around. So that was the next thing I did. I struggled with this a little because I used the wrong node to house link, so I had to change that in my entity tree. Once I got the right node, (CharacterBody2d) I was able to get keyboard and Joystick control over our helpful Hylian hero. 

Images: Top Left: Movement code. Bottom Right: Video of Link moving around



















    I also tried playing with the output resolution to try and make it match the the NES as best as I could. Learn quite a bit about that. NES resolution is 256 x 240 but in NTSC format it was closer to 256 x 224 due to using 8 pixels over over scan on top on bottom of the screen. Luckily the emulator I am using to compare with can account for this. But the other issue I have found is that the NES pixels are not the same size as normal pixels, they are slightly taller. Here is a link talking about scan lines and non-square pixels. I am not sure how to account for this and I haven’t seen a setting in my emulator to change this. I am probably just going to have to ignore it, for now, in favor of progressing the project.


You can find the most current iteration of the project code along with all sourced assets and planning materials at: https://git.alderautomation.ca/Matthew/Godot_Zelda

Please feel free to join me on Discord. I am there just about all day and every day: https://discord.gg/peDsUHYCBY

Comments

Popular posts from this blog

Legend Of Zelda Series - 03 - Menu, Screens, and Bombs

Legend Of Zelda Series - 01 - Introduction