Filling Furrows and Implementing Interfaces

Filling Furrows and Implementing Interfaces

Last fortnight has been a whirlwind! I barely even blinked since putting the final touch on the last post, yet here we are again! That said, though it happened fast, it happened efficiently I think. Shall we go over it?

Strays has been going through some serious game feel testing. We’re by no means there yet, there’s always more work to be done, but I’ve been putting a lot of time and effort into how it feels to interact with our little puppos. The movement has been tweaked again, I’ve taken a new approach to physics that essentially removes friction from the equation and relies solely on our control script to add forces, and I’ve rewritten how we grab objects with the bite to make it more consistent. The result? Visually it looks the same. But it is starting to feel a bit more together!

That’s no fun though! You don’t want me to show you another video of the same game looking exactly the same, do you? This isn’t a Call of Duty announcement trailer! So what have we done that you can actually see?

Well, a couple of very cool additions actually! You may remember in the last post I showcased the new dig mechanic? Well, I’ve taken things a step further with that feature, and we can now fill in the holes we’ve dug!

Exciting right? No? Ok then, how about this; you can also bury small items in the ground! If you put an object into the hole and bury it again, and it will take that object with it. You’ll also get a tasty chaos boost too! The kicker is that the item is now gone, it isn’t coming back, so be careful! If you can get more chaos using it another way, maybe that’s a better path to take. And who knows, you might even be able to bury it later when you’re done causing maximum chaos!

If you’ll allow me to indulge in a bit of tech babble here, I’m going to explain why I’m really pleased with this mechanic programmatically. Those of you not interested in the code feel free to skip on to the next bit, which will feature kittens!

The tech behind the dig spot I’m actually really pleased with. It uses a concept we’ve brought up a few times now, but have never really explained; interfaces.

Background for non-techies: An interface is a nifty way of allowing you to add versatile and easily replaceable code to your project. It is essentially a list of rules that a class agrees to conform to. Usually denoted with an “I” at the start (for example ICake) it tells the class that implements that interface what the rules are. For example, our ICake might have a function called GetCalories() (I’m dieting, can you tell?) which the interface declares, but does not implement. Anything that implements ICake then has a responsibility to implement GetCalories(). So a VictoriaSponge class, which implements ICake might make GetCalories() return 2000. A ChocolateCake might make it return 3500.

So why is this important? Well, to the code, it means that we can treat ChocolateCake and VictoriaSponge as an ICake, and as such, the code no longer cares which of the two it is. An Eat class will just ask for ICake.GetCalories(), and use the number returned by the function regardless of which cake it ate. This takes the code from something that looks like this:

To something like this:

In the first case, something would either pass in a ChocolateCake OR a VictoriaSponge, and we have to test to see what is eaten as one will be an empty object. However in the second instance, you pass the object in as an ICake which could be either ChocolateCake or VictoriaSponge so you don’t need to test anything or store an empty object. This scales exceptionally well, so good use of interfaces is a crucial skill to have in programming.

That was a bigger explanation that I expected, and I could honestly do a deep dive on interfaces as a topic (the above is by no means comprehensive!) But for now, that should be enough to interpret what I’m about to say.

The reason I’m so happy with the dig spots, is the way I’ve handled interaction with it. I have a DigSpotController, which keeps track of the input, and if there’s a dig related interaction in progress. Within that controller is an object of type IDigInteraction. When the user presses the dig button, the controller decides based on context what type of interaction to do. At the moment the options are to dig a hole, and to fill a hole. Internally they handle each of those tasks, and the dig controller doesn’t much care which of those tasks is ongoing, so it’s fully abstracted away. This also makes it easier to add new functionality, for example, I will need some location specific dig actions; a place you cannot dig in, a place where digging has a unique effect, or if I decide to allow unburying objects, something to handle that. All I need for each of these is a new class implementing IDigInteraction, and it will just slot in. It just needs implement the Setup, Process, FinishEarly, and IsComplete functions that the interface declares! It’s pretty darn neat!

Right! enough of this code nonsense! I promised kittens and I shall deliver! One of the highlights of my week was visiting my sister. I was running a small errand, but more importantly, I knew her cat had just had a litter! Let me tell you, I overstayed my welcome that day. I did not want to leave. And it’s easy to see why:

LOOK AT THEM! I’m dissolving all over again just looking at the picture. ‘Course, as with all kittens, soon they will be murdery balls of spikey fluff… But by the gods I will still love ’em to pieces!

Matt out.

54 thoughts on “Filling Furrows and Implementing Interfaces

  1. Привет игроманы!
    Я давно увлекаюсь онлайн казино и, как многие из вас, всегда искал платформу, которая бы соответствовала всем моим требованиям. Искал и . Перепробовал множество сайтов, но постоянно сталкивался с различными проблемами: неудобный интерфейс, задержки с выплатами, отсутствие нормальной поддержки, да и просто скучный набор игр. В какой-то момент я почти потерял надежду, но решил попробовать еще один раз и наконец-то нашел Telegram . Вот несколько причин, почему я считаю его идеальным:
    – Удобный интерфейс: сайт очень удобный и понятный, даже для новичков. Все нужные разделы под рукой, ничего лишнего.
    – Мгновенные выплаты: проверил на себе – выигрыш приходит на счет практически моментально.
    – Отличная поддержка: техподдержка реально работает и помогает решить любые проблемы. Причем они доступны 24/7.
    – Широкий выбор игр: тут есть все – от классических слотов до живых дилеров. И постоянно добавляют что-то новое.
    – Бонусы и акции: щедрые приветственные бонусы и регулярные акции. Всегда приятно получать дополнительные фриспины или бонусы за пополнение счета.
    Понимаю, что каждому свое, но лично для меня стало настоящей находкой. Если вы тоже устали искать, рекомендую попробовать. Возможно, оно станет вашим новым любимым местом для игры.
    Если у кого-то уже есть опыт игры на этом сайте, делитесь своими впечатлениями! Интересно узнать ваше мнение.
    Удачи и больших выигрышей всем!

  2. Wow amazing blog layout How long have you been blogging for you made blogging look easy The overall look of your web site is magnificent as well as the content

  3. I do not even know how I ended up here but I thought this post was great I do not know who you are but certainly youre going to a famous blogger if you are not already Cheers

  4. Your writing is a true testament to your expertise and dedication to your craft. I’m continually impressed by the depth of your knowledge and the clarity of your explanations. Keep up the phenomenal work!

  5. Thank you for your sharing. I am worried that I lack creative ideas. It is your article that makes me full of hope. Thank you. But, I have a question, can you help me?

  6. Good day!
    Athleisure wear is not just for workouts – it’s the perfect choice for all-day comfort and style. These functional yet stylish outfits can take you from your morning exercise routine to a casual outing with friends. Athleisure lets you look great while staying active, offering versatility and comfort. Upgrade your wardrobe with the latest athleisure trends and feel good wherever you go. Find your perfect athleisure look and stay active in style.
    More information here – п»їhttps://bikotebila.com/
    Recipes for a plant-based lifestyle
    Transparency in supply chains
    Athleisure clothing for both workout and leisure
    Plant-based lifestyle for a sustainable future

    Good luck

  7. Hello!
    The psychology of online gaming is rooted in the desire for social connection, emotional engagement, and mental stimulation. Why people play online games is largely based on the enjoyment of challenges and the need to connect with others. Seasonal eating has many health benefits, including improved energy levels and digestion when aligning your diet with seasonal produce. Digital games influence relationships by providing platforms for collaboration and building camaraderie among players. Time management for business leaders helps ensure that all projects are completed effectively and on schedule.
    More information here – п»їhttps://ginesavanza.com/
    time management for business leaders
    improving relationships through co-op games
    how to improve work productivity
    online gaming and teamwork skills

    Good luck!

  8. Good day!
    The psychology of online gaming reveals that it provides players with a unique opportunity for social interaction and competitive fun. Why people play online games varies, with many seeking connection, excitement, and challenges. Seasonal eating provides numerous benefits, such as increased vitality and better immune function when aligning your diet with seasonal food availability. The influence of digital games on relationships is significant, as players work together and form meaningful connections. Time management for business leaders helps in prioritizing tasks and meeting deadlines for business success.
    More information here – п»їhttps://cialisgf.com/
    leadership mentoring best practices
    financial planning in the gig economy
    role of mentoring in career success
    gig economy trends in 2024

    Good luck!

  9. Good day!
    The psychology of online gaming reveals how emotional rewards, competition, and social interaction shape the gaming experience. Why people play online games is often because of the sense of achievement, connection, and competition they offer. Seasonal eating provides benefits such as better digestion, stronger immunity, and more energy by eating seasonally available foods. Online games can impact relationships by creating communication channels and fostering teamwork. Time management for business leaders ensures they can meet professional deadlines while also prioritizing personal well-being.
    More information here – п»їhttps://peopleskillsnetwork.com/
    optimizing productivity for leaders
    balancing leadership roles and personal time
    strategies for leading remote teams
    pet travel: what you need to know

    Good luck!

  10. Greetings all!
    The psychology of online gaming explains how players are emotionally engaged through competition, achievement, and social interaction. Why people play online games is often driven by the excitement, challenge, and opportunity for socializing. Seasonal eating offers various health benefits like better digestion, stronger immunity, and increased energy levels by consuming foods that are in season. The influence of online games on relationships is strong, as they promote teamwork, communication, and the development of lasting friendships. Time management for business leaders ensures that tasks are completed on time and that both professional and personal commitments are met effectively.
    More information here – п»їhttps://firsatdenizli.com
    mentoring strategies for young leaders
    digital transformation in the gig economy
    time management tips for entrepreneurs
    designing pet-friendly vacations

    Good luck!

  11. Greetings all!
    The psychology of online gaming focuses on how rewards, competition, and social connections keep players engaged. Why people play online games is often because of the sense of achievement, excitement, and the opportunity to connect with others. Seasonal eating offers benefits such as stronger immunity, better digestion, and increased energy by consuming foods that correspond to the seasons. Online games can positively impact relationships by building teamwork, communication, and trust. Time management for business leaders ensures that work tasks are prioritized while maintaining personal balance.
    More information here – п»їhttps://peopleskillsnetwork.com/
    gaming’s role in building friendships
    self-improvement through gaming
    gaming’s impact on emotional intelligence
    online games and emotional well-being

    Good luck!

  12. Greetings all!
    Rediscovering classic games offers a chance to revisit some of the most iconic titles in gaming history. These games may have evolved with modern technology, but their original charm and gameplay mechanics remain intact. Whether through remasters, emulators, or reboots, rediscovering these classics allows gamers to relive their childhood memories while appreciating how far the industry has come. Classic games often hold a special place in the hearts of long-time gamers, and experiencing them again can feel like a journey back in time. The resurgence of these games highlights the enduring appeal of timeless gameplay.
    More information here – п»їhttps://hookup-local.com/
    pet travel tips for first-time travelers
    spiritual journeys for mindfulness
    connecting through multiplayer games
    gaming as a tool for stress management

    Good luck!

  13. Hello!
    Leadership mentoring best practices involve providing guidance, support, and feedback to help emerging leaders develop their skills and achieve their potential. Effective mentors listen actively, offer advice based on experience, and encourage their mentees to think critically and take risks. A strong mentor-mentee relationship is built on trust, respect, and mutual goals. Leaders who mentor others help to build a culture of continuous learning and growth within their organizations. By investing in leadership mentoring, businesses cultivate the next generation of strong, capable leaders.
    More information here – п»їhttps://amin-market.com/
    eating seasonally for optimal health
    influence of digital games on relationships
    using seasonal produce creatively
    voluntourism benefits

    Good luck!

  14. Good day!
    Making meaningful connections through games is one of the many benefits of online gaming. Multiplayer games allow players to interact with others from diverse backgrounds, building friendships and communities. These connections go beyond gameplay, as many players form lasting relationships and continue to support one another outside of the gaming world. Online gaming communities often become tight-knit groups, where players share experiences, offer advice, and collaborate on challenges. Games create shared spaces for meaningful interactions and provide opportunities to connect with like-minded individuals.
    More information here – п»їhttps://hookup-local.com/
    maximizing productivity with time management
    benefits of community volunteering
    strategies for successful time management
    self-improvement through gaming

    Good luck!

  15. Good day!
    Understanding digital gaming culture opens doors to a deeper appreciation of the gaming community and industry. The digital gaming landscape includes competitive eSports, casual gaming, streaming, and fan-based content, all of which shape the way players interact with each other. Digital gaming culture is inclusive and diverse, bringing together people from various backgrounds who share a love for gaming. This culture continues to evolve with new trends, technologies, and platforms, offering exciting possibilities for both players and developers. By embracing digital gaming culture, we gain insight into the broader social and technological movements that shape the world.
    More information here – п»їhttps://amin-market.com/
    classic games reimagined
    digital transformation in the gig economy
    emotional wellness through gaming
    essential travel tips for spiritual growth

    Good luck!

  16. Greetings all!
    Trends in digital gaming are constantly evolving, with new technologies and innovations shaping the gaming industry. Virtual reality (VR) and augmented reality (AR) are at the forefront of these changes, offering immersive and interactive experiences for players. Mobile gaming continues to grow, with developers creating games that cater to on-the-go players and integrating social features to enhance player engagement. Cloud gaming, which allows players to stream games without needing powerful hardware, is another trend transforming the gaming landscape. As technology advances, the gaming industry will continue to push the boundaries of creativity and accessibility.
    More information at site – п»їhttps://glseed-mall.com/
    effective leadership strategies
    benefits of spiritual journeys
    discovering new cultures through voluntourism
    planning a spiritual journey

    Good luck!

  17. Hello!
    Spiritual retreats for inner clarity provide a space for self-reflection and healing. Whether through meditation, yoga, or journaling, these retreats offer tools for deepening one’s spiritual practice. Set in peaceful and serene environments, spiritual retreats allow individuals to disconnect from the noise of daily life and reconnect with their inner selves. These experiences can help people gain clarity, release stress, and find new direction in their lives. Spiritual retreats are an opportunity for personal growth and renewal.
    More information here – п»їhttps://jerseystechnology.com
    classic video games modernized
    mentoring tips for business success
    digital transformation in the gig economy
    nostalgia-driven gaming trends

    Good luck!

  18. Businessiraq.com is your gateway to accessing the full potential of the Iraqi market. This comprehensive Iraq business directory provides extensive online business listings, enabling efficient networking and informed market entry. Discover the latest Iraq business news, explore diverse Iraq jobs, and leverage the tender directory to secure procurement contracts. With Businessiraq.com, you are fully connected to the Iraqi business landscape, facilitating growth and success.

  19. In the heart of the Middle East, Iraq is emerging as a landscape ripe for investment and entrepreneurial ventures. At the forefront of this growth is Businessiraq.com, an indispensable online resource that serves as the premier Iraq business directory. This platform connects local entrepreneurs with international investors, presenting a wealth of opportunities for economic collaboration and development. With its comprehensive suite of features, Businessiraq.com is not just a directory; it’s a gateway to unlocking the potential of the Iraqi market.

  20. Thank you for your sharing. I am worried that I lack creative ideas. It is your article that makes me full of hope. Thank you. But, I have a question, can you help me?

  21. is a carefully developed dietary supplement designed to naturally support individuals dealing with sciatic nerve discomfort while promoting overall nerve wellness.

  22. Здравствуйте!
    Уход за натяжным потолком не требует значительных усилий. Материал не впитывает запахи, устойчив к появлению пятен и загрязнений. Для поддержания первоначального вида достаточно иногда протирать его влажной тканью. Такая практичность особенно актуальна для кухонь, детских и ванных комнат, где потолки чаще подвержены воздействию различных загрязнений и повышенной влажности.
    Вся информация на сайте – п»їhttps://telegra.ph/Kak-gramotno-vybrat-natyazhnye-potolki-ehto-polezno-znat-01-08
    вставка в натяжной потолок, натяжной потолок цены калуга, натяжной потолок в дом
    цены на натяжные потолки, цвет глянцевых натяжных потолков, саров натяжные потолки
    Удачи!

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top