Open Source Achievement: Completing My Third PR in Hacktoberfest
Participating in Hacktoberfest has been exciting and rewarding journey for me, as I've had the opportunity to contribute to meaningful open-source projects while honing my skills. This year, for my third Pull Request, I chose to contribute to a project that's more complex than my first 2 PRs, it is the ZTM-Quest repository.
ZTM-Quest Overview
ZTM-Quest is a project that is part of the Zero to Mastery Academy, a platform that helps developers improve their skills and build real-world projects. The project itself is an engaging interactive web app that allows users to complete quests, level up their coding abilities. In this blog, I'll walk you through my experience working on the ZTM-Quest repo, the challenges I faced, what I learned, and how I managed to complete my third PR for Hacktoberfest
My Pull Request
This week, I tackled an issue focused on enhancing the ZTM-Quest project by adding additional NPCs (Non-Playable Characters) to map_start. Currently, the project has only a limited number of NPCs per map, and the maintainers wanted to populate the map_start area further. Fortunately, the project already included some code for generating NPCs randomly, which provided me with a solid starting point. Additionally, the maintainer suggested that I could create custom NPCs using my own spritesheets, but given the complexity and size of the codebase, I decided to proceed with the existing assets to meet the project requirements more efficiently.
The ZTM-Quest project consists of three maps: map_arcade, map_city, and map_start. For this issue, I focused solely on map_start to align with the maintainer’s request. As someone who has never worked with a 2D game development library before, I initially found the task daunting. However, thanks to the maintainer’s guidance and detailed instructions, I was able to navigate through the codebase and identify the key files and structures related to the task.
I started by exploring the src/factories/npc.factory.js file, where the NPC creation logic is defined. From there, I began adding new NPCs by creating a file named randNpcsOnRestroomSinkCouch.gameObject.js in the src/gameObjects/map_start directory. My initial implementation placed NPCs in only one location (chairs), but upon further review, I realized that the maintainer intended for them to be distributed more dynamically across the map. To address this, I utilized the search functionality in my code editor to identify other relevant locations, such as sinks, couches, and washrooms.
Based on the positions of these identified objects on the map, I added two NPCs standing near the sink, two sitting on the couch, and three positioned in the washroom area, thus creating a livelier and more interactive environment in map_start.
My PR
Conclusion
Working on this issue gave me invaluable insight into the open-source community and game development. The ZTM-Quest maintainers have been incredibly supportive and professional, providing timely feedback and resources to help me succeed. When I first joined the project, I was invited to their Discord group, where I could reach out whenever I had questions. This made the experience even more enjoyable and collaborative.
Overall, this week pushed me out of my comfort zone as I took on a challenge in an area I had no prior experience in—2D game development. Despite the initial learning curve, I gained confidence in navigating unfamiliar codebases and problem-solving within a complex project. As I look forward to completing my final PR for Hacktoberfest, I aim to continue exploring new areas of development to broaden my skill set.
The above is the detailed content of Open Source Achievement: Completing My Third PR in Hacktoberfest. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Frequently Asked Questions and Solutions for Front-end Thermal Paper Ticket Printing In Front-end Development, Ticket Printing is a common requirement. However, many developers are implementing...

JavaScript is the cornerstone of modern web development, and its main functions include event-driven programming, dynamic content generation and asynchronous programming. 1) Event-driven programming allows web pages to change dynamically according to user operations. 2) Dynamic content generation allows page content to be adjusted according to conditions. 3) Asynchronous programming ensures that the user interface is not blocked. JavaScript is widely used in web interaction, single-page application and server-side development, greatly improving the flexibility of user experience and cross-platform development.

There is no absolute salary for Python and JavaScript developers, depending on skills and industry needs. 1. Python may be paid more in data science and machine learning. 2. JavaScript has great demand in front-end and full-stack development, and its salary is also considerable. 3. Influencing factors include experience, geographical location, company size and specific skills.

How to merge array elements with the same ID into one object in JavaScript? When processing data, we often encounter the need to have the same ID...

Learning JavaScript is not difficult, but it is challenging. 1) Understand basic concepts such as variables, data types, functions, etc. 2) Master asynchronous programming and implement it through event loops. 3) Use DOM operations and Promise to handle asynchronous requests. 4) Avoid common mistakes and use debugging techniques. 5) Optimize performance and follow best practices.

Discussion on the realization of parallax scrolling and element animation effects in this article will explore how to achieve similar to Shiseido official website (https://www.shiseido.co.jp/sb/wonderland/)...

The latest trends in JavaScript include the rise of TypeScript, the popularity of modern frameworks and libraries, and the application of WebAssembly. Future prospects cover more powerful type systems, the development of server-side JavaScript, the expansion of artificial intelligence and machine learning, and the potential of IoT and edge computing.

In-depth discussion of the root causes of the difference in console.log output. This article will analyze the differences in the output results of console.log function in a piece of code and explain the reasons behind it. �...
