Introduction to Artificial Intelligence course with Processing

Hi,

This post contains the content of some classes I ministered in SESC Carmo/SP about creative code and artificial intelligence, based on Daniel Shiffman’s texts, Nature of Code.

The screen casts are on Youtube, but you can watch them down here. (I still need to write subtitles in English)

Class 1:

Class 2:

Class 3:

Class 4:

Class 5:

Parabéns Rogério!

Last Sunday, in Barueri city, Brasil, in a football match, a goalkeeper called Rogério Ceni, made history!
Rogério Ceni’s team, São Paulo Futebol Clube (SPFC: six times national champion, and tree times world, and continental champion) prevail over Corinthians.
In this game, the goalkeeper Rogério Ceni, scored his goal number 100!! Establishing an historical mark, which is gonna be very hard to be reached.
Congratulations Rogério!

The best written news about the fact (Folha de São Paulo):
http://www1.folha.uol.com.br/esporte/894692-rogerio-faz-100-do-jeito-que-queria-e-se-consagra-no-futebol.shtml

The best video:
Gol 100 – Rogério Ceni – Narração Éder Luiz – Transamérica

The best joke:
nota

Events and Inputs :: GameDev Panda3D cookbook

Inputs and events are common elements in software development as a whole. A user input is usually some interaction method given to the user be able to command the software. It can be triggered by a key, a mouse click, a voice detection system, a touch on the screen.
Events are commands exchanged between elements of software. In the case of a game, we can imagine the following situation: A character is walking through a castle, where there is a trigger of a trap. When the character goes through the trigger, the trigger signals the trap to shoot arrows that will kill the character.
In this short description, we can say that the trigger sent a message to the trap shoot. This message is what we call events.

Both user inputs and events between objects have a vital role in game development.

Let’s see how to catch a keyboard event, in this case, when the ‘W’ key was pressed.

sample 1:

User Inputs in Panda3D, are sent to the system as events. When a key is pressed, an event message is sent throughout the system, what developer must do, is set an object to “listen” to a specific event.

This procedure is done in two steps:
1- Set the event which we are interested in: self.accept( ‘event name’, function)
2- Define a function to deal with the event. Basically, “what must be done, after the event were triggered”.

In the sample above, the event created by the pressure in ‘W’ key, is caught and treated by the function ‘catchKeyPressed’.

sample 2:

In this second sample, we have new possibilities: parameters, and event ‘up’.

The event ‘-up’, is used to catch the event generated when a key is unpressed.

EVENTS——————————

Events, like said before, are a way to make game object to talk with each other.
In general, there are two steps to make it happens:
1- Define which event an object needs to be aware of;
2- Give the commands to send the messages.

In Panda3D, user inputs are events, so we can catch events in the same way we configure user inputs.
Now, let’s see how to send some event.

sample 1:

When the ‘w’ key is pressed, a task is created, and the taskFunction is gonna make the cube move towards right. As soon as the cube x position be bigger than 3, an event is sent to the system (messenger.send( “stopCuboEvent”) ). This event is caught by our class and executes the stopCubeFunction, which deletes the task, and the cube stops.

Published: Panda3D GE book

Panda3D game engine book coverI just received my copy of the book 1.6 Panda3D game engine, by David Brian Mathews (published by Packt Publishing), which I was a technical reviewer.

The book is suited for anyone who’s starting to learn Panda3D.

The Panda3D engine is very simple to use and flexible. I started studying the Panda3D during my specialization studies, and its simplicity leads us to choose Panda3D in our final project.

The book written by David, is excellent, and easy to understand, although it requires a minimum understanding of programming and logic. But readers, newbies at the game development will easily understand the Panda3D’s tools described in this book, which I think, is the only publication about this game engine, apart from and some blog posts, and the official Panda3D’s guide, and docs.

Soon, I expect to write some posts about this book: some specifics topics for Mac and Linux; some ways to solve the problems posed in the book; and a tutorial on programming using Panda3D.