Categories
Uncategorized

Blog Post #3

Our capstone project revolves around developing a self-driving car simulation using the Bevy game engine. The goal is to create an autonomous vehicle that can navigate, process its environment, and make intelligent driving decisions. My role has involved implementing the line detection system, refining environmental interactions, and debugging system integration.

The most difficult challenge was working with the provided skeleton code, which lacked proper documentation and was difficult to navigate. Without clear explanations, implementing new features was frustrating and time-consuming. To address this, our team dedicated an entire week to studying the codebase and writing documentation. This process significantly improved our ability to modify and extend the simulation, making further development much smoother.

At the beginning of the project, I doubted my ability to contribute meaningfully, especially since I had no prior experience in game development or AI. The idea of building a self-driving car simulation seemed overwhelming. However, as I tackled challenges and learned new concepts from scratch, my confidence grew. Now, I feel much more capable and comfortable with the work, and I’ve realized that problem-solving and perseverance are very crucial skills to have.

The most interesting part of the project is the decision-making system. This is still in its early stages, but it is the most intellectually demanding and rewarding aspect. The system must process environmental inputs, determine optimal driving behavior, and respond to dynamic road conditions. Developing this has been both challenging and fascinating.

When I encounter difficulties, I first try to resolve them independently. If that doesn’t work, I turn to my teammates for support. Our biggest challenge so far was integrating WebSocket based input handling into Bevy, which doesn’t have built-in support for it. As a team, we collaborated to find a solution, experimenting with different approaches and seeking guidance from our mentor. This problem-solving process reinforced the importance of teamwork and adaptability.

As we continue working on the project, our primary focus will be on refining the decision-making system. Although challenges remain, I now feel more prepared to tackle them. This project has strengthened my technical skills, taught me the value of collaboration, and shown me the importance of persistence. I am excited to see how our self-driving car evolves and how we can push the limits of what our simulation can achieve.

Categories
Uncategorized

Technology

The project involves creating a simulation of an autonomous car, where we use Bevy to render the environment, visualize paths, and manage interactions within the simulation. This has led me to explore and experiment with various aspects of Bevy and Rust.

One of the best aspects of Bevy is its Entity-Component-System (ECS) architecture, which provides a highly efficient way to develop games. ECS works by separating data (components) from behavior (systems), allowing for efficient parallel processing and making it highly scalable. In comparison to class-hierarchy-based game engines, Bevy’s ECS keeps objects as independent components managed by systems, thus it is more versatile and efficient when dealing with heavy simulations. However, the worst aspect of Bevy is its UI system, which feels underdeveloped and lacks the intuitiveness of other UI frameworks. Simple tasks such as creating buttons or overlays require significant effort compared to established UI libraries like React or Unity’s UI tools. This limitation makes integrating UI-heavy elements more challenging than it should be.

When I first started using Rust, it was one of the most difficult languages I had ever worked with. Its strict memory management and borrow checker were initially frustrating, especially coming from more forgiving languages like Python or JavaScript. However, as I got more used to it, I started to appreciate the safety and performance guarantees it provides. Rust forces developers to think carefully about memory allocation and data ownership, thus leading to more robust code. This discipline has significantly improved my overall programming skills.

If I were to do this project again, I would strongly consider using a simpler game engine like Unity. The main goal of this project is the vision system, and game development is secondary. A more beginner-friendly engine like Unity could have reduced time taken and allowed me to focus more on the core functionality rather than overcoming Bevy’s learning curve. There are many advantage to Unity such as comprehensive documentation, established community, and ready-to-use assets, which could have significantly accelerated development. That being said, Bevy offers long-term benefits in terms of performance and flexibility.

Working with Bevy and Rust has been both a challenge and a rewarding experience. The modularity, performance, and parallel processing capabilities of Rust make it a fantastic choice for systems-heavy simulations. After this experience, I would definitely use Rust again.

Categories
Uncategorized

Clean Code and Code Smell

While working on this blog, I looked back at some old codes I had written to see if I could understand them. While doing this, I often find myself struggling to understand and remember what I was thinking at the time. This shows the importance of writing clean and maintainable code, especially when working with others. For this blog, I decided to read John Clifton’s article about tips for writing clean code, and Martin Fowler’s book on its insight to code smell. Reading them got me thinking about some habits I would like to reinforce and others I need to break.

Something that I would like to start doing is the usage of tools that can measure and improve code quality. Clifton’s article recommended the use of tools like SonarLint in the measurement of cognitive complexity to help developers write code that is functional but also more understandable. These tools can highlight possible complicated areas in code that might not be immediately obvious. For example, a method that has too many conditional branches might appear quite simple at this moment but may become a nightmare later on while debugging. Gradually, these tools will lead me towards writing more structured and readable code.

On the other hand, one thing that I want to avoid is big complex classes. The discussion on “Large Class” as a code smell by Fowler really resonates with my experiences because I often make them too big which made it really confusing to work with. A large class often does too much which is against the Single Responsibility Principle. Instead of having a large class handling multiple concerns, breaking it down into smaller classes focused on their specific responsibilities makes the code more modular and easier to test.

In conclusion, writing clean code is an ongoing process of learning and improving. From now on, I will use tools that can help guide me in my improvement in keeping high-quality code. Additionally, I will avoid large classes and functions to prevent unnecessary complexity. By implementing these changes, I aim to make my future self and my teammates much happier when working with my code.

Categories
Uncategorized

Blog Post #3

The capstone project focuses on simulating autonomous vehicle behavior using game development tools, specifically with the Bevy game engine. The main goal is to create a simulation where a driverless car can drive and interact with obstacles to test its decision-making and adaptability. Recently, our team faced an unexpected setback when one of our members had to leave, which meant that the responsibilities and workload increased for the rest of us. While this heightened the stress level, it also brought our team closer together as we adapted to the situation, reassigning tasks and finding new ways to work effectively together.

My contribution to the project has been implementing the UI for displaying the car’s speed and creating weather effects to add complexity for the vision system. At first, these tasks seemed straightforward, but they turned out to be more complex than I anticipated. Working with Bevy was quite challenging, mainly due to its UI framework which does not feel as intuitive as other tools I am used to. Additionally, coding in Rust a completely new language was a big learning step. Writing even a simple placeholder for the speed text felt really daunting. But after struggling with the syntax and fixing errors, I finally managed to get it done. The moment of successfully implementation was very satisfying and made me feel proud that I actually broke through the barriers.

In learning more about Rust and Bevy, I got new insights into these technologies. The focus of Rust on performance and safety makes it a really interesting to me, which explains its growing demand in the technology industry. Despite its complexity, it’s satisfying to know that I’m building skills in a language that could open doors to future opportunity. Working on Bevy is challenging but I feel that it holds a lot potential as a game engine. Its modular design and focus on simplicity make it very promising.

Although these experiences were hard, they have motivated me to explore these tools further and to improve my skills. The challenges our team has faced, from technical to logistical challenges have emphasized the importance of flexibility and cooperation. The loss of a member of our team could have hindered our progress, however we relied on one another and worked well together to keep our course. This has proven the vital role of teamwork in a project of this nature. It is very motivating to see everyone rising to the occasion, sharing their expertise, and offering each other support, as the demands of the workload intensified.

Looking back on this, it has been a wide path of learning and discovery. Tackling these complexities of Rust and Bevy has deepened my technical skills. Lessons learned from this project will stay with me for a long time after it concludes. I am excited to see the final simulation come together and am proud of the hard work that our team has put in to make it a reality. Moving forward, I hope to expand on these experiences and continue exploring game development and autonomous technology.

Categories
Uncategorized

Blog Post #2

My capstone project is a simulation of autonomous vehicle behavior using game development tools. Working on this project has been a mix of challenges, growth, and new experiences. I want to share some of my experiences and thoughts about it.

The project itself is focused on creating a simulation environment for driverless vehicles using the Bevy game engine. We’re building a system where a virtual car can navigate through different environments, interacting with various obstacles along the way. This not only tests our programming and problem-solving skills, but also introduces us to new technologies and concepts like autonomous vehicle vision systems and real-world vehicle physic dynamics.

One of the most fun parts so far is working with new technologies. I’m especially excited to use Blender to create the 3D environment for the vehicle simulation. It’s a fantastic tool for modeling and has a lot of potential for creativity. Additionally, the Bevy game engine, which runs on Rust, is a big step outside my comfort zone since I haven’t used Rust before. However, the challenge of learning a new language and working with a relatively young but promising engine makes it all the more exciting. Rust really is taking off in the tech industry due to its performance, so getting some hands-on experience now feels like an investment in future opportunities.

Additionally, the vision system presents a fascinating challenge. It’s designed to simulate technologies like LIDAR, radar, and camera-based object detection. Our goal is to have the car “see” its environment and make informed decisions, just like a human driver would. We’re also experimenting with machine learning components, where the car learns how to respond to obstacles like stop signs or traffic lights. It’s a significant undertaking, but I find it exciting to work on something at the intersection of game development and advanced tech.

As for my team, I really do feel very fortunate to be working with such a hardworking, supportive, and friendly individuals. Everyone pulls their weight on time, and it’s good to see how each contribution really makes a difference in the big picture. We always pick up tips from each other, be it coding, ways to make our environments look nice, or just keeping the mood light during our meetings. I believe that our collaboration is the reason why we’ve made such good progress.

The whole journey so far has been really rewarding, and I am eager to see the final product. This capstone project has boosted my technical skills and showed me how important teamwork, problem-solving, and staying open-minded when dealing with new technology.

Categories
Uncategorized

Introduction

Hello! My name is Brandon, and I’m an international student from Malaysia currently living in Corvallis while I finish my studies. I hope to find a job in the US after graduation.

My first introduction to coding was here at OSU. I originally started as a civil engineering major, but after taking ENGR 103, I realized I had a stronger interest in computer science. Since making the switch, my journey at OSU has been good, I’ve learned so much across different areas of computer science that will be useful in my future career.

One of my favorite projects in this course is building an online trading card game maker. I’ve always enjoyed card games like Slay the Spire, Magic: The Gathering, and Balatro, so getting the chance to create something along those lines will be fun and interesting.