برچسب: Kodeco

  • Debugging Projects in Godot | Kodeco

    Debugging Projects in Godot | Kodeco


    It might come as a surprise, but not all code works on the first try. (Insert surprised copyright-safe yellow electrical rodent here)

    For this reason, most integrated development environments (IDEs) include a debugger that allows the developer to spot and solve issues during the several development iterations. This is illustrated by the following pseudocode:

    while developing == true:
        code
        test
        debug

    When developing a game, however, there are other issues to think about, such as game balance or verifying behaviors that might be too fast or subtle to notice during gameplay.

    Think about it. You carefully crafted your game’s challenge level, so you want to make sure it’s up to the challenge. But how can you count the number of enemies in a game when they’re moving around and shooting at you?
    You might want to check the game balance. Is the number of enemies spawned at a given instant what you expect? Did the power-up add the damage boost you expected?

    These are just a few of the questions you might want to answer while testing your game. This is where Godot’s debug tools come in handy, helping you test and verify all that.

    Getting Started

    The example project is the same from the Publishing Your Godot Project to itch.io tutorial. However, for this article, the code was changed to enhance the gameplay experience. Unfortunately, the game broke in the process and you need to find what’s wrong with it using the debug tools. How convenient! :]

    You can download the project using the Download materials links at the top and bottom of this article. Note that this project requires Godot 4.3 or newer to run.

    The starting project has the same structure as in the previous article, but three files have changed: projectile.gd, enemy_ship.gd, and main_game.gd.

    Now is a good time to download and run the project to review how it’s working and notice how the bugs influence the game. The main issue you’ll notice is that it’s impossible to destroy the enemy ships, although they can destroy your ship, so it’s debugging time!

    Overview of the Debug Tools

    Godot has a set of powerful debug tools you can use to review code for logic errors, or graphics for performance issues, or even to get an x-ray of how the game is using its processing time.

    Although there’s a Debug menu at the top of the screen, this article will focus on the tools accessible through the Debugger panel at the bottom of the screen, because these are the tools that gather information when executing the project through the Run the project button.

    Debugger Panel

    The debugger panel, located at the bottom of the screen by default, is accessible from the Debugger option at the bottom of the window, to the right of the Output option. The following picture shows the debug panel:

    The debug panel

    At the panel’s top, you can see a few tabs. From left to right, the tabs are:

    1. Stack trace: Shows the execution stack, the context and its variables, and allows for controlling how the game executes during the debug session. You’ll learn more about this tab later in this article.
    2. Errors: Shows the error and warning messages during the game execution.
    3. Profiler: Shows which code is running and how it affects the game performance. You’ll learn more about this tab later in this article.
    4. Visual profiler: Displays a graph showing which code is running and how much time it takes for execution. You’ll learn more about this tab later in this article.
    5. Monitors: Contains graphs of game information, such as frames per second (fps), memory usage, scene nodes, and more. The data from the debug session is saved even after the session is over, so it’s possible to review it even after execution.
    6. Video RAM: Shows a list of resources and how much video RAM they use while running, as well as the grand total at the top of the panel.
    7. Misc: Monitors and identifies the control nodes clicked during runtime.
    8. Network Profiler: Contains the list of all nodes communicating over Godot’s multiplayer API and how much data each one of them received or sent during the debug session.

    This article focuses on tabs 1, 2, 3, 4 and 5. However, feel free to examine the others using the same project. Some of them, such as Network Profiler won’t have any interesting information, though, as the game doesn’t use the multiplayer API in any point.

    Using Breakpoints

    After executing the game, you should have noticed that the main issue is that it’s impossible to destroy the enemy ships. So, logically, there must be a problem with the function invoked when damaging the enemy ships — maybe the ships don’t take damage when they should?

    To test if this is true, examine the function that deals damage to the enemies: open projectile.gd and find the damage_body function. The function code is:

    func damage_body(body: Node2D) -> void:
        # 1
        body.take_damage(3)
        # 2
        create_explosion() 
        # 3
        queue_free()       

    This code does the following:

    1. When the bullet collides with the enemy ship, it reduces the ship’s health by 3 points;
    2. An explosion appears on the point where the collision happened;
    3. The bullet is removed from memory;

    This is a straightforward function, and its logic seems to be correct. How can it not be working? Wouldn’t it be great if there was a way of getting a deeper look at how the code is working? That is where breakpoints come in, allowing you to halt the code execution and dig deeper to discover the problem.

    Breakpoints

    When analyzing code, the error might not be obvious just by looking at the code; you might want to have a look at the code during runtime. To do just that, you’ll need to use breakpoints and watches, which work together to assist and verify what the code is doing.

    When you define a breakpoint, Godot knows it will need to execute the project normally up to that point. After that, it halts execution and allows you to control how fast the code should execute, and lets you see which code executes in case of conditionals or loops.

    The description should be kind of abstract now, but you’ll see that in practice it’s very simple and handy!



    Source link

  • Kodeco Podcast: All the Conferences – Podcast V2, S3 E3

    Kodeco Podcast: All the Conferences – Podcast V2, S3 E3


    Thank you for your patience as extraordinary life events turned our schedule topsy turvy. Here, at last, is our All the Conferences episode, featuring iOS community luminaries Mikalea Caron and Matt Heaney. Whether you’re a seasoned speaker or just conference-curious, this episode is packed with insights on how to choose the right events, travel smart, and even lower your costs—sometimes all the way down to zero!

    [Subscribe in Apple Podcasts] [Listen in Spotify] [RSS Feed]

    Interested in sponsoring a podcast episode? Check out our Advertise With Kodeco page to find out how!

    Show Notes

    Join Suz and Dru as they sit down with indie iOS developer Mikaela Caron and Atomic’s new mobile engineering manager Matt Heaney. These two are not only passionate conference attendees—they’re frequent speakers, community leaders, and strong advocates for developer connection and growth. From how to break into speaking, to choosing your first conference, to eating your way through the Swift world tour, there’s something here for every dev.

    Highlights from this episode:

    • How submitting a CFP (Call for Proposals) could get you into conferences for free—and help launch your speaking career.
    • Tips for discovering new conferences, including the magic of CocoaConferences.com.
    • How to network at conferences, even if you’re introverted—and why just saying “it’s my first time” can be a superpower.

    Mentioned in This Episode

    Contact Matt, Mikalea, and the Hosts

    Follow Kodeco

    Where to Go From Here?

    We hope you enjoyed this episode of our podcast. Be sure to subscribe in Apple Podcasts or Spotify to get notified when the next episode comes out.

    Hoping to learn more about a particular aspect of mobile development or life and work as a dev? Please write in and tell us and we’ll do our best to make that happen! Write in too if you yourself would like to be a guest or your have a particular guest request and we’ll see what we can do. Drop a comment here, or email us anytime at podcast@teamkodeco.com.



    Source link

  • Kodeco Podcast: App Marketing Secrets – Podcast V2, S3 E2

    Kodeco Podcast: App Marketing Secrets – Podcast V2, S3 E2


    In our final episode of 2024, we’re thrilled to welcome fellow podcasters Malin Sundberg and Kai Dombrowski of Triple Glazed Studios. With a decade of experience in iOS and Mac development, Malin and Kai share how they’ve built thriving indie apps, established roots in new communities worldwide, and achieved repeated App Store features. Tune in to learn actionable insights that can help you grow your indie app business too!

    [Subscribe in Apple Podcasts] [Listen in Spotify] [RSS Feed]

    Interested in sponsoring a podcast episode? Check out our Advertise With Kodeco page to find out how!

    Show Notes

    Join Suz, Jenn, and Dru as they chat with Malin and Kai, the creative minds behind Triple Glazed Studios, to explore what it takes to run a successful indie app business. They share how they’ve combined their passion for creating great features with marketing strategies that feel natural—even for developers who’d rather code than pitch.

    Highlights from this episode:

    • Align your development cycles with Apple’s release calendar for maximum impact.
    • Research bylines to find writers and creators who are passionate about your niche.
    • Attend or host meetups to network and connect with like-minded developers (and make great friends along the way!).

    Mentioned in This Episode

    Contact Kai, Malin, and the Hosts

    Follow Kodeco

    Where to Go From Here?

    We hope you enjoyed this episode of our podcast. Be sure to subscribe in Apple Podcasts or Spotify to get notified when the next episode comes out.

    Hoping to learn more about a particular aspect of mobile development or life and work as a dev? Please write in and tell us and we’ll do our best to make that happen! Write in too if you yourself would like to be a guest or your have a particular guest request and we’ll see what we can do. Drop a comment here, or email us anytime at podcast@teamkodeco.com.



    Source link

  • Swift Apprentice: Fundamentals | Kodeco

    Swift Apprentice: Fundamentals | Kodeco


    This is a book for complete beginners to Apple’s modern programming language — Swift.

    All the code in the book works inside of Xcode’s easy-to-use playgrounds.
    That means you can focus on core Swift language concepts, such as classes, protocols,
    and generics, instead of getting bogged down in the details of building apps.

    This is a companion book to the SwiftUI Apprentice;
    the SwiftUI Apprentice focuses on building apps, while Swift Apprentice focuses
    on the Swift language itself.

    This is a book for complete beginners to Apple’s modern programming language — Swift.

    All the code in the book works inside of Xcode’s easy-to-use playgrounds. That means you can focus on core Swift language concepts, such as classes, protocols, and generics without getting bogged down by extraneous details.

    This…


    more

    This section tells you a few things you need to know before you get started, such as what you’ll need for hardware and software, where to find the project files for this book and more.

    The chapters in this section will introduce you to the very basics of programming in Swift. From the fundamentals of how computers work up to language structures, you’ll cover enough of the language to be able to work with data and organize your code’s behavior.

    The section begins with some groundwork to get you started.
    Once you have the basic data types in your head, it’ll be time to do things with that data, and finally, you’ll learn about an essential data type, optionals, that let you express potentially missing data.

    These fundamentals will get you Swiftly on your way, and before you know it, you’ll be ready for the more advanced topics that follow. Let’s get started!

    This is it, your whirlwind introduction to the world of programming! You’ll begin with an overview of computers and programming and then say hello to Swift playgrounds, where you’ll spend your coding time for the rest of this book.
    You’ll learn some basics, such as code comments, arithmetic operations, constants and variables. These are some of the fundamental building blocks of any language, and Swift is no different.

    You’ll learn about handling different types, including strings that allow you to represent text.
    You’ll learn about converting between types and get an introduction to type inference, which simplifies your life as a programmer.
    You’ll learn about tuple types which allow you to group values of any type together.

    You’ll learn how to make decisions and repeat tasks in your programs using syntax to control the flow.
    You’ll also learn about Booleans, which represent true and false values, and how you can use these to compare data.

    Continuing the theme of code not running in a straight line, you’ll learn about another loop known as the `for` loop. You’ll also learn about switch statements that are particularly powerful in Swift.

    Functions are the basic building blocks you use to structure your code in Swift. You’ll learn how to define functions to group your code into reusable units.

    This chapter covers optionals, a special type in Swift representing either a value or the absence of a value. By the end of this chapter, you’ll know why you need optionals and how to use them safely.

    So far, you’ve mostly seen data in the form of single elements. Although tuples can have multiple pieces of data, you have to specify the size upfront; a tuple with three strings is a completely different type from a tuple with two strings, and converting between them isn’t trivial. In this section, you’ll learn about collection types in Swift. Collections are flexible “containers” that let you store any number of values together.

    There are several collection types in Swift, but three important ones are arrays, dictionaries and sets. You’ll learn to apply custom operations and loop over collection types. Finally, you’ll revisit strings, which are collections of characters.

    All the collection types share similar interfaces but have very different use cases. As you read through these chapters, keep the differences in mind, and you’ll begin to develop a feel for which type you should use when.

    Arrays are the most common collection type you’ll run into in Swift that keep an ordered list of elements of the same type. On the other hand, Dictionaries let you look up elements efficiently using a key. Finally, Sets maintain an unordered collection of unique elements. You’ll learn all about these three types in this chapter.

    Once you have collections of items, you will want to perform operations with them.
    For example, sort them, filter them, add them up, etc. Swift gives you a powerful
    language construct, the closure, that lets you infinitely customize the behavior
    of such operations. In this chapter, you will learn about Swift’s most common
    collection algorithms and customize them with closures.

    Text processing is an essential application for any computer language, and String is Swift’s powerhouse type for text handling. Strings are bi-directional collections of Character types that balance correctness, performance and ease of use.

    Searching for patterns in text is a common task you’ll encounter in your programming travels. Swift provides a power type called Regex to perform that task. Using standard syntax, you can express complicated matching patterns to extract information from text. You can use an all-new regex builder syntax for improved compile-time support, which maximizes clarity and readability.

    You can create your own type by combining variables and functions into a new type definition. When you create a new type, you give it a name; thus, these custom types are known as named types. Structures are a powerful tool for modeling real-world concepts. You can encapsulate related concepts, properties and methods into a single, cohesive model.

    Swift includes four kinds of named types: structures, classes, enumerations and protocols. You’ll learn here how other named types use the concepts of methods and properties, how they differ, and where you want to use each.

    You’ll also learn about protocols & generics, which are types and methods that take as input other types instead of just methods, as well as custom types to build larger and complex things!

    The standard library has many useful types like Int, Double and String. However, it sadly does not include a Pizza type. Structures are types that can store named properties and define actions and behaviors. In this chapter, you will define your custom structure types and begin building a Pizza empire.

    In this chapter, you’ll learn about stored and computed properties, along with some tricks, such as how to monitor changes in a property’s value and delay the initialization of a stored property.

    Methods are merely functions that reside in a structure. You’ll look closely at how methods and initializers help you build full-featured, custom types.

    Structures let you define your own named types with custom properties and methods. In this chapter, you’ll get acquainted with classes, which are much like structures but have important differences that make them an invaluable addition to your toolbox.

    This chapter continues with class types describing how Swift supports the traditional concepts of inheritance and polymorphism. You will also learn about two-phase class initialization that you will need to build proper class hierarchies. This discussion will lay the foundation for using these concepts with Swift’s value types.

    In this chapter, you’ll learn about enumerations, a type that groups related, mutually exclusive case values. You’ll also learn about uninhabited types and finally discover what an optional is under the hood.

    Protocols are a type that can bridge common behaviors between structs,
    classes, and enums by defining an interface or template for an actual concrete type. Protocols enable polymorphism across all types and overcome the single inheritance limitation you saw with classes.

    In this chapter, you’ll learn what generics are, how to write generic code, and loop back and look at the generic types in Swift – dictionaries, arrays, and optionals – from this new perspective.



    Source link

  • The Story of Kodeco (raywenderlich.com)—A Journey of Passion, Learning, and Community

    The Story of Kodeco (raywenderlich.com)—A Journey of Passion, Learning, and Community


    Fifteen years ago, I was an indie iOS developer, creating my own simple apps like these:

    It was a fun and exciting time, but there was one big challenge—iOS was still brand new, and good documentation was hard to come by. Learning the platform often felt like piecing together a puzzle without all the pieces, and more often than not, I found myself feeling stuck and, frankly, a little stupid.

    To make things easier—not just for myself, but for others facing the same struggles—I decided to start a blog to document what I was learning. And with that, raywenderlich.com was born!

    The Humble Beginnings: A Blog and a Small Team

    When I first started the blog, I made myself a deal: I would write one tutorial a week. The plan was simple—spend one day each week writing tutorials and use the rest of my time working on my own apps.

    That worked for a while, until I started polling my readers about which topics they wanted me to cover next. More often than not, they’d choose subjects I hadn’t yet explored for my apps. This meant extra research on my part, and soon I found myself spending more than my allocated day each week writing tutorials. It was beginning to take a toll on the time I needed for my own projects.

    raywenderlich.com Team - 2010

    I realized I needed help. So, I put out a call for authors to join me, and I was lucky to have some amazing people respond.

    Together, we began crafting tutorials using this simple, yet effective process:

    • My wife, Vicki, would create any necessary graphics and artwork for the sample projects.
    • Each author would write a first draft.
    • My friend Fahim Farook would tech-edit each tutorial.
    • My friend BC Phillips would do an English-language edit for each tutorial.
    • I would do a final edit and review to ensure everything was polished.

    By collaborating this way, we were able to produce a ton of high quality tutorials. As our team grew, we added more tech editors, editors, and artists, and by the end of 2014, we looked like this:

    Are you already on the map?

    The Power of Community: From Online Friends to a Real Family

    We all shared a deep passion for making apps and teaching others how to do the same. As we collaborated and spent time together, we became more than just colleagues—we became friends. And along the way, we had a ton of fun.

    I’ll always remember our daily hangouts on IRC, where we’d make memes and laugh together. One of our favorite activities was slapping Charlie with a trout:

    Then there was Tammy, who always led the way with creativity and humor:

    We loved pulling off April Fools’ pranks too. One year, we “discovered” an undocumented thermometer inside the iPhone and released a Thermometer App Starter Kit to measure your turkey’s temperature (among other things). To our surprise, a lot of people tried to buy it. :]

    Never overcook your turkey again!

    Each Christmas, we’d all come together to create a cheesy Christmas song with geeky iOS-related lyrics. They were always a bit amateurish, but always so much fun. One of my favorites even featured the infamous “Mic Dance.”

    https://www.youtube.com/watch?v=0koXSaOb0Dc

    For us, it was never just about creating great tutorials—it was about making memories and having fun with a group of friends.

    Breakthrough Moments and Big Changes

    While we were having fun, we were also building a business. Along the way, there were three key turning points that really shaped the journey.

    The first turning point came when I decided to shift all my focus to raywenderlich.com, leaving my own app development behind. This decision was sparked by our first book, iOS 5 by Tutorials, which ended up earning over $150K—far beyond any of our expectations. It was a huge success, and we realized we needed to create more books for the community.

    Another major turning point came in 2014 with the release of Swift. I remember sitting in the audience at WWDC, feeling a sense of panic: “Oh no! Our entire blog and all of our books are in Objective-C, and now they’re obsolete. What will we do?! Rewriting everything seems impossible.”

    But then I took a deep breath, steadied myself, and thought, “No, we can do this—and it will be fun!” We fully embraced Swift, updating all our books and tutorials to reflect the new language. My cousin, Ry Bristow, even made this music video to capture how we were feeling at the time:

    The final turning point was when we switched from individual book sales to a subscription model, offering video courses and online books. This change provided a much steadier and more reliable income stream, enabling us to grow and expand our content. We were able to dive into new topics like Android, Flutter, Unity, and more, creating a wider range of resources for the community.

    RWDevCon: Bringing the Community Together in Person

    One of the things I’m most proud of during this time was organizing RWDevCon: a live, in-person conference focused on interactive, hands-on tutorials.

    It all began with a suggestion from a few team members that we should run our own conference. I agreed, not really knowing what I was getting myself into!

    I still remember how nervous I was before the first RWDevCon. Vicki and I took the stage to give some opening remarks. As soon as we said, “Welcome to RWDevCon!” the crowd erupted into applause and cheers. We weren’t expecting that level of enthusiasm—what felt like an outpouring of love and appreciation. We looked at each other, smiled, and suddenly felt our anxiety fade away. We knew right then the conference was going to be a success.

    Putting on the conference was a tremendous amount of work for the entire team (I’ll always be grateful to everyone who participated and put up with me!). But despite the challenges, Vicki and I couldn’t have been happier with how everything turned out. It was such a joy seeing everyone having fun and engaging with the events. Those are days I’ll always cherish.



    Source link

  • SwiftUI Apprentice | Kodeco

    SwiftUI Apprentice | Kodeco


    SwiftUI Apprentice is a series of epic-length tutorials where you’ll learn to build three complete apps from scratch,
    using Apple’s new user interface technology: SwiftUI! Each app is more advanced than the one before, and together,
    they cover everything to make your own apps using SwiftUI. By the end of the book, you’ll be experienced enough
    to turn your ideas into real apps you can sell on the App Store. These tutorials have easy to follow step-by-step
    instructions and consist of more than pages and illustrations! You also get full
    source code, image files, and other resources you can re-use for your own projects.

    If you’re new to iOS and Swift, or to programming in general, learning how to write an app can seem incredibly overwhelming.
    That’s why you need a guide that:

    • Shows you how to write an app step-by-step.
    • Uses tons of illustrations and screenshots to make everything clear.
    • Guides you in a fun and easy-going manner.

    You’ll start at the very beginning. The first section assumes you have little to no knowledge of programming in Swift for iOS but still
    shows you how to build an entire fitness app from scratch using SwiftUI.
    SwiftUI Apprentice doesn’t cover every single feature of iOS; it focuses on the absolutely essential ones.
    Instead of just covering a list of features, SwiftUI Apprentice does something much more important: It explains how all the
    building blocks fit together and what is involved in building real apps. You’re not going to create quick example programs that
    demonstrate how to accomplish a single feature. Instead, you’ll develop complete, fully-formed apps, with beautiful,
    professionally-designed user interfaces, that are good enough to submit to the App Store!

    How is this book different than SwiftUI by Tutorials?

    Our other book on building apps with SwiftUI, SwiftUI by Tutorials, is designed for developers who have a solid background in iOS development and are looking to make the leap from building apps with UIKit, to building apps with SwiftUI.

    This book, SwiftUI Apprentice, is designed to teach new developers how to build iOS apps, using a SwiftUI-first approach. Its goal is to teach you fundamental development practices as you build out some fully-functional and great-looking apps!



    Source link

  • Building Robust ViewModels | Kodeco

    Building Robust ViewModels | Kodeco


    Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive
    catalogue of 50+ books and 4,000+ videos.

    Learn more

    © 2025 Kodeco Inc



    Source link

  • macOS Apprentice | Kodeco

    macOS Apprentice | Kodeco


    macOS Apprentice is a series of multi-chapter tutorials where you’ll learn about developing native
    macOS apps in Swift, using both SwiftUI — Apple’s newest user interface technology — and AppKit — the
    venerable UI framework. Along the way, you’ll learn several ways to execute Swift code and you’ll build
    two fully featured apps from scratch.

    If you’re new to macOS and Swift, or to programming in general, learning how to write an app can seem
    incredibly overwhelming.

    That’s why you need a guide that:

    • Shows you how to write an app step-by-step.
    • Uses tons of illustrations and screenshots to make everything clear.
    • Guides you in a fun and easy-going manner.

    You’ll start at the very beginning. The first section assumes you have little to no knowledge of programming in Swift.
    It walks you through installing Xcode and then teaches you the basics of the Swift programming language. Along the way,
    you’ll explore several different ways to run Swift code, taking advantage of the fact that you’re developing natively
    on macOS.

    macOS Apprentice doesn’t cover every single feature of macOS; it focuses on the absolutely essential ones.
    Instead of just covering a list of features, macOS Apprentice does something much more important: It explains how all the
    building blocks fit together and what is involved in building real apps. You’re not going to create quick example programs that
    demonstrate how to accomplish a single feature. Instead, you’ll develop complete, fully-formed apps, while exploring many of
    the complexities and joys of programming macOS.

    How is this book different than macOS by Tutorials?

    Our other book on building apps for macOS, macOS by Tutorials, is designed
    for developers who have a solid background in iOS development and are looking to make the leap to developing native macOS apps.

    This book, macOS Apprentice, is designed to teach new developers how to build macOS apps while assuming they have little to
    no experience with Swift or any other part of the Apple development ecosystem.



    Source link

  • Data Persistence with SwiftData | Kodeco

    Data Persistence with SwiftData | Kodeco



    Mar 19 2025, Swift 5.10, iOS 17, ipadOS 17, macOS 15, visionOS 1.2, Xcode 15


    Leave a rating/review

    Explore advanced techniques to build robust data management solutions with SwiftData integrated with SwiftUI,
    and how to use it with CloudKit. Understand how interoperability works between SwiftData and Core Data, and learn some
    advanced data persistence techniques.

    By Tim Mitra.



    Source link

  • Data Management & Optimization | Kodeco

    Data Management & Optimization | Kodeco


    Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive
    catalogue of 50+ books and 4,000+ videos.

    Learn more

    © 2025 Kodeco Inc



    Source link