ASP.NET
  Home arrow ASP.NET arrow Page 11 - .Netterpillars: Artificial Intelligence an...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ASP.NET

.Netterpillars: Artificial Intelligence and Sprites, Part 2
By: Apress Publishing
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 4
    2005-01-11

    Table of Contents:
  • .Netterpillars: Artificial Intelligence and Sprites, Part 2
  • The Branch Class
  • Main Program and GameEngine Class
  • Second Draft: Coding the Player Character
  • Main Program and GameEngine Class
  • Third Draft: Coding the Game Engine and Collision Detection
  • Fourth Draft: Coding the Config Screen and Game Over
  • Coding for the Introduction Screen
  • Final Version: Coding the Netterpillars AI
  • The Main Program: Final Version
  • Further Improvements

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    .Netterpillars: Artificial Intelligence and Sprites, Part 2 - Further Improvements


    (Page 11 of 11 )

    We saved the best for last: What about creating new intelligent characters for your game, maybe some opposition—like a spider who eats the netterpillars?

    In the code for this chapter on the samples CD-ROM, you will find an almost fully working spider character. You already did all the dirty work: The Spider and AISpider class interfaces, the call to the moving functions at the MoveComputerCharacters routine and at the Render and Redraw method of the objGameEngine—almost everything is there. The code for ChooseDirection method of the AISpider class is empty, so your spiders aren’t going anywhere. This gives you the opportunity to create the AI from scratch, without worrying about the details. Will the spider attack the netterpillars’ heads and kill them? Or will they just eat part of their tails? Or, maybe make new mushrooms grow? Start making your proposal for the second version of the game, and enjoy!

    Summary

    In this chapter, via the .Netterpillars game sample, we explored some additional concepts related to game programming, including:

    • Basic concepts about object-oriented programming and analysis

    • Basic concepts about artificial intelligence, and ideas about how to implement it to solve different challenges when programming games

    • The difference between game AI and game physics

    • How to create a basic objects library and use its derived classes in games

    • How to produce high-performance drawings with GDI+, when you need to draw images with transparent colors

    • How to create computer-controlled characters that interact with the game engine like player-controlled characters, with the same physics restrictions

    In the next chapter, we’ll introduce you to the use of DirectX graphics with a sample program that will test many of the basic features of Direct3D, so you can use these concepts in the example games in later chapters and in your own games.

    Acknowledgments

    The authors would like to thank Steven Toub, who assisted in the conversion of the .Netterpillars game.

    This chapter is from Beginning .NET Game Programming in C# by Ellen Hatton et al. (Apress, 2004, ISBN: 1590593197). Check it out at your favorite bookstore today. Buy this book now.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

     

    ASP.NET ARTICLES

    - Adding Content to a Static ASP.NET Website
    - Building a Static ASP.NET Website in a Basic...
    - Develop Your First ASP.NET Website with Visu...
    - Run ASP.NET in Windows XP Home with Cassini ...
    - How to Test a Web Application
    - How to Add Code and Validation Controls to a...
    - Working in Source and Split Views to Build a...
    - How to Build a Web Form for a One-Page Web A...
    - How to Develop a One-Page Web Application
    - An ASP.NET Web Application in Action
    - Developing ASP.NET Web Applications
    - An Introduction to ASP.NET Web Programming
    - Introduction to the ADO.NET Entity Framework...
    - Completing an In-Text Advertising System und...
    - Programming an In-Text Advertising System un...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek