160 likes | 176 Views
JAWS is a game design language focused on simplifying game development by eliminating the need for in-depth programming knowledge. It allows casual designers to create any type of video game, with easy syntax and powerful features such as entity types, point representation, movement, attack algorithms, and map layouts. Unique functionalities include the distance operator (~) for collision detection, entity types managed as arrays, and a user-friendly super funk accessor operator ('s). The structured program includes declaration and engine sections to define rules and game mechanics. JAWS is implemented using ANTLR and outputs in Java, employing Java Swing/Java2D for graphics.
E N D
JAWS Space-Shooter Game Design Language Justin Lu Guoxin Andy Lin Winston Chao Shoaib Anwar
The Riddle of all Riddles? • Why do kids become comp sci majors? • Answer: To program financial software… • FALSE Real Answer: To make GAMES of course
The Problem So what the Motivation behind a Game Programming Language? DesignersVSEngineers Pros: Pros: • Creativity - Able to implement technical Details • Innovative Ideas Cons:Cons: • Lack of Technical/Programming Skill -Dull and uncreative in Game Design -Ideas too nerdy to appeal anyone
The Solution • JAWS • Eliminate the need of in-depth game programming knowledge such as graphics manipulation, collision detection etc. • Allow casual game designers to create games
Original Ideas • JAWS should be able to create ANY kind of video game. • Ha… • This would require making a languages like C++ or Java • RPG Adventure a la The Legend of Zelda (original) • That’s very similar to space shooters in terms of collision and movement. Generalize to a Space shooter language
Goals of the JAWS Language • Create a simple language with easy syntax similar to popular languages such as Java so it can be picked up easily • Allow the designer/programmer the most freedom and power and design while still keeping the language simple
Data Types • The usual: • int, double, string, boolean • New: • entity: represents an interactive entity (player ship, enemies etc.) • point: represents a point in 2D space (x ,y) • movement: describes the AI of an entity • attack: describes the attack algorithms of entity • map: a layout of the background of a level
Special Features of JAWS • Distance Operator: ~ • Can be applied interchangeably between point and entity types • Facilitates collision detection while still leaving freedom for the programmer Example: if((playerShip[0]~enemyShip[0])==0){ statusBar[0]’s label = “YOU LOSE” }
Special Features of JAWS • Entity type implemented as an array • Why? • Because. • In space shooters you are dealing with a large number of enemies at once. Example: Entity small_alien[10]; small_alien’s location’s x +=5 //move all 10 small aliens 5 //spaces to the right small_alien[3]’s location’s x+=5; //move a single //small alien 5 space to //the right
Super Funk Accessor Operator • ‘s • We tried the old “.” operator • It makes more sense to a non-programmer this way. • Example: Bob.hat = “ugly”; Bob’s hat = “ugly”;
First an Example… • Here’s a code example defining movement of “metroid” monsters in the game: // now lets create some enemy aliens, lets make 5 entity metroid[6]; alien() { Image = “metroid.gif”; // we will set their AI to dumb_ai, // a movement class we will define ai = dumb_ai; } … // lets set our enemy AI now // it will be a dumb AI which just moves the enemy downwards movement dumb_ai( ) {location’s y -= 1;}
Program Structure • A JAWS program is divided into two main parts • The declarations sections • The engine section //A sample JAWS program declarations { //all code and no play //makes jack a dull boy } engine { //all play and no code //makes jack fail PLT }
Program Structure • Declarations – • all point, entity, movement, attack and map classes are defined here • Basically the rules and tools of the game are implemented and coded here • Engine – • engine is the main game loop which keeps iterating during the execution of the game. Generally, you would use this section to describe the level progression of a game, the winning conditions etc. • Really Simple games can even leave this part out
Implementation • Language designed and specified using ANTLR • Output Language: JAVA • Platform for graphics: JAVA Swing/Java2D
Testing Plan • PHASE 1: • component testing to examine basic functionality of each module parser, lexer, walker, and graphical engine. • PHASE 2: • component integration testing. • PHASE 3: • functional testing with sample codes. • Incremental testing was implemented throughout all phases of the project.
Lessons Learned • Trying to make another assignment operator and getting rid of ‘=‘ sign is a bad idea. • Difficult to get out of “config” trap while making a game language. • Having a group member with access to the EE comp lab and the ability to install any application you want is key.