430 likes | 892 Views
Minor Programming Games. Introduction. Intro: who is who. Lectures: Jan Verhoeven & Leo van der Ploeg. Students: who are you?. Some from abroad? Please introduce yourself shortly. Previous knowledge (needed!). Programming in C++, C# (dot.net) and Java Algorithms and Data Structures
E N D
Minor Programming Games Introduction
Intro: who is who Lectures: Jan Verhoeven & Leo van der Ploeg
Students: who are you? • Some from abroad? • Please introduce yourself shortly
Previous knowledge (needed!) • Programming in C++, C# (dot.net) and Java • Algorithms and Data Structures • OO design and programming • UML • Software engineering • Some basic math • Soft skills: presentation and communication and cooperation
Today’s menu (by Jan) • Contents of Minor Gaming • Some theory about Tile Based Games • Explanation KBS-1 in detail • Game Architecture • And: some videos
Tomorrow’s menu (by Leo) • Some math • Some physics • Programming in WIN32 and C++ • Exercises (laptop (!) and paperwork)
Our first video An example of an 2D scrolling game: http://nl.youtube.com/watch?v=8fTEqlzcuMs
Contents Games Semester • First Period: • ISGPKBS1: KBS, part 1: an 2D scrolling game • ISGPAI: Artificial Intelligence for games • ISGPAD: Algorithms and data structures • Second Period: • KBS, part 2: a “thinking” game • 2D3D graphics with XNA • KBS, part 3: graphical 3D interface
ISGPKBS 1: an 2D scrolling game • Design and program the game in groups of 5 students • Program language: C++ using “native” GDI in a WIN32 environment • Weekly 2 hours classical reviews • More details and specifications later on
Artificial Intelligence (for games) State and goal based behavior, inter-agent communication, individual and group steering behaviors, team AI, graph theory, search, path planning and optimization, triggers, scripting, scripted finite state machines, perceptual modeling, modeling memory, command queuing, goal evaluation and arbitration and fuzzy logic http://www.ai-junkie.com/
Some videos Simple soccer: http://nl.youtube.com/watch?v=2UpOtlS_t7w Swarms of robots: http://nl.youtube.com/watch?v=xLdc703WSMI Boids in action: http://nl.youtube.com/watch?v=GUkjC-69vaw
AI Demo’s • Chase and Evade: • Just one mouse • Some more mice • Simple Soccer: • In Win32 C++ • With XNA C#
Contents of ISGPAI • Moving Game Agents lecture 1 • Simple Soccer and Raven lecture 2 • Graphs and Path Planning lecture 3 • Scripting and Goal-Driven Behavior lecture 4 • Fuzzy Logic lecture 5
Course plan • 5 weeks 2x1 hour new theory • 5 weeks 3x1 hour classroom training (practice)
Course plan • Module is 112 hours, which is equivalent to 4 EC • Exam (study books not allowed, open questions in English, English dictionary allowed): 50% • Homework and practices: 50% • The programming languages are C++ (Win32) and C# and Java • Blackboard
Algorithms and Data Structures http://users.cs.fiu.edu/~weiss/dsaa_c++3/code/
Some videos Barack Obama - Computer Science Question: http://www.youtube.com/watch?v=k4RRi_ntQc8 The sorter: http://www.youtube.com/watch?v=2HjspVV0jK4
Contents of ISGPAD • The Disjoint Set Class lecture 1 • Algorithm Design Techniques • Greedy Algorithms lecture 2 • Divide and Conquer lecture 2 • Dynamic Programming lecture 3 • Randomized Algorithms lecture 3 • Backtracking Algorithms lecture 4 • Advanced Game Algorithms lecture 5
Course plan • 5 weeks 2x1 hour new theory • 5 weeks 3x1 hour classroom training (practice)
Course plan • Module is 112 hours, which is equivalent to 4 EC • Exam (study books allowed, open questions in English, English dictionary allowed) 50% • Homework and practices 50% • The programming language is C++ and C# and Java • Blackboard
Blackboard Please enroll as soon as possible: • KBS van de Minor gaming • Algoritmen en Datastructurenvoor games • KunstmatigeIntelligentievoor games
Minor Games, 2nd period • KBS, part 2: Design and Program a thinking game AI engine (KARO) in C# • 2D3D with XNA • KBS, part 3: Design and Program an 3D graphical interface for the KARO game in C# and XNA • Ends with a match and presentations
XNA, some videos XNA Collision Test: http://www.youtube.com/watch?v=Zbk8R25xbB4 Goku XNA Game: http://www.youtube.com/watch?v=mN8CgJtzhto XNA Stress Test: http://www.youtube.com/watch?v=rII5iRLN_lw
Requirements -1- • The game consists of at least 3 levels that make up the game world • Each level is at least 3 screen-widths long and the height is minimal one screen-height • Each level has a specific theme • The game world is based on small bitmaps (tiles) that are put together through a so called: “level-map” • Bitmaps of the game world can be animated
Requirements -2- • The main character in the game should have the following degrees of freedom: walking left, walking right and jumping • The character should always face the direction it is walking or jumping • The movement of the main character is handled by the arrow keys of the keyboard. • Falling of the main character/enemy should be natural i.e. the character/enemy falls when there is no supporting structure of any kind at his position
Requirements -3- • There will be minimal two background layers to demonstrate parallax scrolling • In each level there will be several gadgets that make up the game play • Gadgets can be a variety of elements in the game: energy points, enemies, trap-doors, water, puzzles etc. Creative use of these gadgets should make the game appealing to play!! • Gadgets can (must?) be animated
Requirements -4- • All the graphics for the bitmaps may be obtained from the internet or other sources. • When a player collides with a gadget, action should be taken (getting points, die, getting extra lives or changing the world map) • When a player collides with a gadget (collision detection), that gadget should disappear (except enemies)
Requirements -5- • Enemies can move around in the playfield and the range should be adjustable • The main character and the enemies must have environment awareness i.e. they can bump on to walls or other constructions of the game world (boundary detection) • The main character should always be in the centre of the screen during game play except when entering a level or leaving a level (player always enters a level from the left side) • When the main character runs out of lives the game should end
Requirements -6- • When the game starts/ends there must be a splash screen • At each stage of the game the player should be able to jump to a menu screen where he can save that game and see the high-scores or resume playing • The game should start with this menu after the splash screen • Each layer is separated by a splash screen reflecting the upcoming theme • The game should have sound effects for several features in the game (third party product)
Requirements -7- • The game should be programmed in C++ in WIN32 • The game program should make intensive use of a state machine pattern. • Most constants in het game program are parameters in a configuration file (something like params.ini). • The characters in the game should have AI behaviors.
Demo parallax scrolling See XNA demo: http://www.youtube.com/watch?v=l3wq67W3fFg See Wikipedia: http://en.wikipedia.org/wiki/Parallax_scrolling
Preparation • Please construct groups of 5 students each for KBS-1 NOW • Start this week by choosing the subject of the game, making a plan of approach, and so on …
Tile Based Games Theory (in Flash): http://www.tonypa.pri.ee/tbw/start.html Tile Engine (you don’t have to make it): http://www.youtube.com/watch?v=jnHo1bC_suU
Yet Another 2D Scrolling Game • Tile game in Java:
One more amazing demo • Tile Based Games in C++ Win32
Last demo and …. HOMEWORK • Pac Man Game with a little AI • You are asked to implement a stronger mister Pac Man (in your KBS-group)
What to do this week?! • Study this presentations • Follow tomorrow’s workshop • Program a “clever” Pacman • Think about your KBS gameplay
Final Have fun with the Minor Game Programming