Ai in Unity3D

2,216 views
1,986 views

Published on

(and a bit more)
TGF workshop – summer 2013
Please contact to giving sample in Unity3D
sh_omid_m@yahoo.com

Published in: Technology, Design
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,216
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
34
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Ai in Unity3D

  1. 1. AI in Unity3D (and a bit more) TGF workshop – summer 2013 08/15/2013
  2. 2. My Works  Parvaneh Game (AI Programmer)  Impressive Engine 2D (Lead programmer)  Impressive Engine 3D (Lead programmer)  Financial Automation and MIS (Programmer)  Active Vehicle Locator (Lead programmer)  ... 2
  3. 3. What does AI actually do ?  Heuristic algorithms  The most obvious is in the control of any NPCs in the game  Pathfinding  Is another common use for AI  Widely seen in real-time strategy games  Finding a path to a target while avoiding collisions with other entities (NPC, players...)  Dynamic game difficulty balancing  Adjusting the difficulty in real-time based on the player's ability  Bests in Game AI :  Halo (Combat Evolved)  F.E.A.R  S.T.A.L.K.E.R  Far Cry 2 3
  4. 4. What does AI actually do ? 4
  5. 5. Advantages and requesties of impl. AI from scratch  Time and budget in a project  In most of projects, we (programmers) have no enough time to impl. everything with a good operation  In other hand, budgets are limit, so the risk is not too logical...  Enough technical knowledge  Maybe you can impl. an AI engine from scratch with a few knowledge about it, but will it works fine ? even with good performance ?  I don’t think so  Good points on impl. ?  Don’t have to pay performance for some unsuable features in a pre-built...  Impl. everything what you think it works, even it’s fake ?!  Somewhere, you may move your AI-Bots on a Path or use Pathfinding, which one you’ll use ? 5
  6. 6. Existing Plug-Ins  Advanced AI Pro  A complete AI solution, it has an industry-standard enemy, NPC, and friendly AI behaviors  A* Pathfinding Project Pro  Write a TD, RTS, FPS or RPG game, this is for you with heavily optimized algorithms and a large feature set but yet simple to use  AI Behavior  Easily create and modify dynamic AI Behaviors for your game project  AIScriptsPackage  This package contains three different enemy AI types that can be used for shooter games  And some other are available in assetstore.unity3d.com 6
  7. 7. A* Pathfinding Project  Features  Graph types : Navmesh, Grid, Waypoint  Graphs can be saved to files  Source code included  Search thousands of nodes/ms  Multithreaded support  Runtime graph update  Fully Penalty-Area support  Uses Recast algorithm for Navmesh  Good custom inspector and tools in edit-time 7
  8. 8. A* Pathfinding Project 8
  9. 9. Let’s see a demo in Unity3D Hold on, please 9
  10. 10. A bit more... (Useful libraries and books)  So where’s my start point ?  Useful reading  Programmin Game AI by Example (Mat Buckland)  AI Game Engine Programming (Brian Schwab)  Search about Recast-Algorithm (If you didn’t before)  Impl. in Low-Level, Use in High-Level  Just do it with enough knowledge (To study, do it with basic knowledge)  Design it single-threaded and multi-threaded support  Alright, how ?  Let’s see 10
  11. 11. Platform Invoke  C code (Compile as DLL) #include <stdio.h> void PrintText(const char *Message) { printf("%sn", Message); }  C# code (Compile as EXE) using System; using System.Runtime.InteropServices; public class Test { [DllImport(“File.dll", EntryPoint="PrintText")] static extern void PrintText(string Message); public static void Main(string[] args) { PrintText("C# => C++"); } } 11
  12. 12.  I’m not FAN of Unity3D, just a simple developer !  Sometimes, AI can be so simple, even just a Plug-In  But sometimes, It should design larger  Everything is up to requesties  Don’t forget power of C/C++, Everything will be fine  Also, don’t forget GPU and it’s magical power, use it 12 Conclusion
  13. 13. Any question ?  Contact  E-Mail : sh_omid_m@yahoo.com  FB : fb.com/omid.shahbazi Kind regards O.Shahbazi 13

×