Workshop:SIGCSE2008

From FANG

Jump to: navigation, search

Using the FANG Engine to Teach CS1

Below is our plan for this workshop. We'll also be writing code during the workshop.

Click here for the code and examples made during the workshop.

Click here for the online evaluation for this workshop

The Powerpoint we briefly covered about coordinate systems and sprites.

Contents

What is the Freely Available Networked Game (FANG) Engine?

The Freely Available Networked Gaming (FANG) Engine is a Java gaming package designed for educational purposes. The major aspects of the FANG Engine that distinguish it from other similar game engines are:

  • It is entirely written in Java and is free and open source released under a GPL license.
  • Novice programmers can start using it in minutes without downloading or installing any software.
  • It is 2D and networked for multi-player games and students don't need to write any networking code.
  • Games can be played on most browsers without downloading or installing any additional software.
  • It has been field tested in classrooms since 2003 by 10 different instructors.

Currently, 150+ students are using the FANG Engine at the high school and college level at 3 different institutions.


Click here to view a matrix comparing the FANG Engine to many other game engines.

How has the FANG Engine been used in classes?

The FANG Engine has been used in a variety of settings:

  • College Level CS0/CS1 - Duke University, Georgia Gwinnett College, Western Carolina University
  • High School AP Course - North Gwinnett High School
  • Gifted Adolescents - Duke Talent Identification Program
    • 3-week Summer Program - Duke East Campus
    • Semester Online Courses - students from across the Southeast
    • Day Workshops for 5th/6th Grade - Durham, NC area students


Click here to view links to all of the courses that have used the FANG Engine.

Write your first FANG Engine Game

There are two basic ways to write FANG Engine Games:

  • Use a full featured IDE like Eclipse or NetBeans
  • Use JavaWIDE, the Java Wiki Integrated Development Environment.
    This enables students to collaboratively make and share Java programs online without downloading any software. The FANG Engine mixes very well with JavaWIDE since all games made using the FANG Engine can be run as applets. There are two sites where students can make FANG Engine games:

One of the basic first games students can make with the FANG Engine is Wackadot.

Click here to view a tutorial about making Wackadot.

Images

The FANG Engine can display png, jpg, and gif. In addition, it can detect the shape of transparent gifs, display animated gifs and can control which image of the animated gif displays at any given time. Images can be made as sprites:

ImageSprite image=new ImageSprite("imageFile.png");

Click here to view a short tutorial about adding images to games.

Sound

The FANG Engine can currently only play uncompressed audio wav files. Sounds can be created like

Sound sound=new Sound("soundfile.wav");

and played

sound.play(X);

where X is the balance (0 means all left speaker, 1 means all right speaker).

Calling the no parameter

sound.play()

plays a sound with equal balance (same as calling sound.play(0.5)).


Click here to view a short tutorial about adding sound to games.

Multiple Players

Each game has access to all players' input devices. Simply call

getPlayer(X).getKeyboard()

or

getPlayer(X).getMouse()

to have access to the player's keyboard and mouse respectively where X is the player number you want to access.

The no parameter

getPlayer()

gets the current player.

Click here to view a short example of multiplayer.

Click here to view a short tutorial about making the Wackadot game multi-player.

Alarms

Alarms make code execute at a given time in the game.

Click here to view a short tutorial about adding alarms to your game.

Trackers

Trackers are what makes a Sprite move on its own.

Click here to view a short tutorial about adding trackers to your game.





Views
Personal tools
Add to 
del.icio.usAdd to 
diggAdd to 
FacebookAdd to 
favoritesAdd to 
GoogleAdd to 
MySpaceAdd to 
PrintAdd to 
SlashdotAdd to 
StumbleUponAdd to 
Twitter

Games
Games