AI update…

So now that the old navgrid pathfinding system has been replaced by the new navmesh system, I’ve gone in and re-written all of the AI code for npcs and zombies.

The old code was messy and relied on too many navgrid functions to simply adapt to the new system, so I started fresh. I’ve now unified all AI-related aspects of the zombies and NPCs (rather than have separate AI code for each), and optimized things like the flocking system and Line-of-Sight checking (using kd-trees and BVH trees, respectively). This allows the game to run faster with more zombies on screen at once.

While the iOS version of the game will typically have around 50 zombies visible at a time max, I benchmarked the new code with 650 zombies at once and it still runs at +30fps. Keep in mind the old code could handle around 200-250 before getting too laggy. So it’s quite an improvement!

Here’s an animated gif showing part of a group of 500 zombies crowing around the player/environment, using the new AI system (keep in mind for illustration purposes, their attacks have been disabled):

 

 

14 Responses to “AI update…”

  1. topfries says:

    You are really good at optimizing 🙂

  2. Vincent says:

    Can you give us an Update for the Release yet?

  3. Jason says:

    This is amazing optimization!!
    Congrats Tyson!
    I think a year or so ago i asked if it would be published in 2013 and you said yes.
    I don’t want that you release it right away, but could you give us a little bit more information about the release date?
    I mean it hasnt to be precise (more like fall 2015, holiday-season 2014).
    Or could you spoiler us what do you want to implement or improove in your game?
    I also wouldnt be ,against a beta-release (like minecraft), but you unfortunately already denied that.

    I think the whole community would be thankful for that!

    Thanks!

    • Tyson Ibele says:

      Unfortunately I can’t say when it’ll be released, and it’s impossible to predict the future. I used to try and make predictions but then things would come up and development would have to slow down, pushing the date back. Now I just don’t say anything about when it’ll be out at all, to avoid people getting their hopes up.

  4. Doctar bren says:

    Tyson I’m so amazed of the dedication on the AI on both the survivors and the zombies as I wanted to ask is the gamg going to have a hard difficulty inputed because of the survival tasks.

    • Tyson Ibele says:

      I’ve considered the idea of having difficulty levels, but for now the difficulty will simply increase exponentially, as you head further towards the center of the city.

      Eventually I might add difficulty levels on top of that, for hardcore players.

      • Adam says:

        The more you add to this game, the more I want it! Zombox looks absolutely amazing, almost comparable to a console game even. I can’t wait for this to come out, I even have my friend always asking me to check this website for updates about it! Keep up the great work Ty!

  5. Anonymous says:

    This is my dream game man. I’ve been following this sight for awhile now and it looks better every update. Your a god in the game making world. I salute you sir. Quick question, where or how did you learn unity so well and how did you get to this point of programming and game making education wise, thanks

    • Tyson Ibele says:

      Hey, thanks for the compliment!

      I’m self-taught in Unity and programming, but the learning journey has been many years long. I started with QBasic as a kid, eventually moved to Visual Basic and then maxscript (3ds max’s scripting language). From there I learned Javascript, Python, C# and now am learning C++. The education might not have been paid for, but it certainly never ends!

      If you’re looking to pick up Unity, I’d suggest doing the tutorials that Unity provides. They’re what helped me the most when learning. Also don’t forget to constantly reference the scripting guide provided on the Unity site. It’s my #1 goto source when I’m having troubles.

      • Adam says:

        Hey Tyson, I have some ideas for Zombox.
        1. A co-op mode if you get the game approved on Steam.
        2. A powerful hidden weapon the player can find.
        Neither of these are really necessary, but would be cool to have in the game. However, if any of these were to be implemented, I believe multiplayer would be amazing.

        • Doctar bren says:

          I wanted to throw in an idea that there would be survivors that would be bandits and they will kill you for your loot. Also wishing it will be approved on steam as this game would get some top ratings

  6. George says:

    The vita untity dev kit is out! Any chance of seeing zombox on it?

  7. Aline says:

    You share interesting things here. I think that your blog can go viral easily, but you must give it initial boost and i know
    how to do it, just type in google for – wcnu traffic increase

  8. Ivey says:

    I read a lot of interesting articles here.
    Probably you spend a lot of time writing, i
    know how to save you a lot of time, there is an online tool that creates unique, SEO friendly posts in minutes,
    just type in google – laranitas free content source

Log in or Register

Leave a Reply to Vincent Cancel reply

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