Lua & Love2D Game Engine GALAGUH

Slides:



Advertisements
Similar presentations
How to Make a Game Like Space Invaders. What IS Space Invaders? a SHMUP (shoot-em-up) Player has one ship, enemy has many Player and enemies interact.
Advertisements

Video Game Design Game Maker Ms. Scales. What is game design? Is it art? It is all about artistic expression. Is it technical? Just follow some deign.
Teaching with Greenfoot
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
How do games work? Game Workshop July 4, Parts Sprites/pictures Map/background Music/sounds Player character Enemies Objects.
Lecture 2Slide 1 Event Driven Computing Basic Interaction Handling –Interactive programs - must pay attention to the user interface.
Game Design and Programming. Objectives Classify the games How games are design How games are implemented What are the main components of a game engine.
Lecture 1 CS171: Game Design Studio 1I UC Santa Cruz School of Engineering 5 January 2010.
Introduction to UML (slides adapted from Michael Mateas)
Windows 8 Windows Phone 8 Web Mobile … and WakeUpAndCode.com.
GAME:IT Junior Bouncing Ball Objectives: Create Sprites Create Sounds Create Objects Create Room Program simple game.
GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.
Guide to Programming with Python
Microsoft Visual Basic 2005 CHAPTER 8 Using Procedures and Exception Handling.
Construct 2 Game Development Shahed Chowdhuri Sr. Technical Evangelist
CSE 380 – Computer Game Programming AI & Collision Strategy Erin Catto’s Box2D.
Creative Commons Attribution 3.0 creativecommons.org/licenses/by/3.0 Key Abstractions in Game Maker Foundations of Interactive Game Design Prof. Jim Whitehead.
Microsoft Visual Basic 2012 Using Procedures and Exception Handling CHAPTER SEVEN.
GREENFOOT CLUB RESOURCES Brian Cullen – Rossett School
A 2-D, multi-player tank game developed in PLT Scheme ~ ~ ~ Ben VandenBos, Tim Reeves, Justin Hall, and John Ericksen ~ ~ ~ Senior Project - CS496 Spring.
Backgrounds, Inheritance in GameMaker (BrickMania 1 of 2) Foundations of Interactive Game Design Professor Jim Whitehead January 28, 2008 Creative Commons.
Canyon Adventure Technology David Maung, Tristan Reichardt, Dan Bibyk, Juan Roman Department of Computer Science and Engineering The Ohio State University.
CONCEPTS OF OBJECT ORIENTED PROGRAMMING. Topics To Be Discussed………………………. Objects Classes Data Abstraction and Encapsulation Inheritance Polymorphism.
Chapter 8: Writing Graphical User Interfaces
Developing the Game User Interface (UI) Lesson 5.
Spong Bluetooth game Developed by: Erik Matzols Fredrik Lindberg.
Description, Classes, Interfaces, Hierarchy, Specifics George Georgiev Telerik Software Academy academy.telerik.com Technical Trainer itgeorge.net.
Dr.C Needs time for reflection. Away From The Rut.
XNA An Introduction. What XNA is… Microsoft® XNA™ is composed of industry- leading software, services, resources, and communities focused on enabling.
Game Maker Terminology
Game Maker – Getting Started What is Game Maker?.
Reference: The Game Loop Animation / Game loop 1. Update variables 2. [Get input from the user] (GameLoop only) 3. Draw (using variables)
Senior Design 1 Project Dynamite Team Untraceable –Muhammad Alraddadi –James Ailes –Kai Jorgensen University of Portland School of Engineering Advisor.
Additional Design Patterns for Games For CSE 3902 Matt Boggus.
More on GLUT Programming Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Monday, September 15, 2003.
Final Project Proposal Space Invaders By Jordan Mahaffey.
Game Maker Galactic Mail Advanced Group: Complete Galactic Mail, then start developing an independent project.
Visual Basic for Application - Microsoft Access 2003 Programming applications using Objects.
Group 3 – Karo Progress Wendy Dominik Job Janita Erik.
Word 2003 The Word Screen. Word 2003 Screen File Menu –Holds the options for creating a new document, opening a document, saving a document, printing.
Programming Games Show your rock-paper-scissors. Demonstrate bouncing ball. Demonstrate and examine Bo the dog. Homework: Modify Bo to make your own.
CMPF114 Computer Literacy Chapter 3 The Visual Basic Environment 1.
Lesson Nine: Miscellaneous Items. Shooting in Both Directions Used when you want your character to shoot things in multiple directions. You need to have.
Visual C++ Programming: Concepts and Projects Chapter 10B: Recursion (Tutorial)
Construct 2 Game Development for Kids Platformer Tutorial: Part 1 Shahed Chowdhuri.
GAME:IT Mario Creating Platform Games Level 4 with GML Game Maker Language (GML) allows users more flexibility in game design. GML is similar to how real.
The Stingray Example Program CMT3311. Stingray - an example 2D game May be useful as a simple case study Most 2D games need to solve generic problems.
11. Skier Let’s Learn Saengthong School, June – August 2016 Teacher: Aj. Andrew Davison, CoE, PSU Hat Yai Campus
Game Maker Tutorials Introduction Clickball IntroductionClickball Where is it? Shooting Where is it?Shooting.
Flash Session 3: Events Shiny Yang special thanks to Alex
Additional Design Patterns for Games
PYGAME.
Chapter 1: An Introduction to Visual Basic 2015
Keyboard Input.
Game Loops + Part II Reference:
Game Description Story Goals Controls. Game Description Story Goals Controls.
Tools Communication: Google Code Version Control: SVN UML: LucidCharts.
Using Procedures and Exception Handling
Introduction to Events
Animation Scrolling Screens.
2D Game Pitch Cave Explorer (FINAL)
Explain what touch develop is to your students:
Arrays
Game Loop Update & Draw.
Week 6: Time and triggers!
Object-Oriented Programming: Inheritance and Polymorphism
Learning the Basics of Microsoft Word 2010 for Microsoft Windows
HIBBs is a program of the Global Health Informatics Partnership Learning the Basics of Microsoft Word 2019 and Microsoft office support TFN
Construct 2 Game Development: Flapping Bird
Presentation transcript:

Lua & Love2D Game Engine GALAGUH Bradley Carey

LOVE2D Review – Callback Functions love.load() – Ran once at program start love.update() – Called continuously, used to update any game data. love.draw() – Called continuously, used to draw and update graphics. love.quit() – Called once upon exit of the program. love.keypressed(), love.mousepressed(), etc.

Object Oriented Programming in Lua Recall: Lua does not natively support OOP. There is a workaround to do pseudo-OOP using code snippets from the official Lua handbook. See: class.lua Our program creates 2 subclasses that our player/enemy class will be derived from: drawable and updatable.

OOP in Lua pt. 2 Drawable: If the object is a superclass of this class, this means that it is a drawable object. The drawable class stores the current x, y, and z values which are used to do so. Updatable: If an object is a superclass of this, this means it will update in love.update(). Throughout our program’s execution, we have lists containing: The items needed to be updated. The items needed to draw on the screen. The items that need to be removed from these lists.

GALAGUH - love.load() Initializes all global variables. Sets images, font, and graphics settings. Initializes and creates the game window. Creates an instance of the player and the collision tables for collision detection.

GALAGUH – love.draw() Our game has 5 different states, which are: 1. Game is in progress 2. Main Menu 3. Pause Screen 4. Game over Screen 5. Options Screen Using the values of the current game state, we draw only the appropriate graphics for that screen.

GALAGUH – love.update() Use the dt var to update the current game time. Remove all items from the updatable, drawable, enemy, player, weapon lists. Run through the updatableList and call the update() function of each object contained within. If no enemies are on the screen, spawn more at random. If game is paused, update the pause label.

GALAGUH – love.keyreleased() Depending on the current game state, keypresses may have different outcomes. This callback function is used to switch between game states and toggle miscellaneous items such as the items contained on the options screen.

GALAGUH – player.lua Contains all information regarding the player. Contains member functions used to spawn a player, handle collisions, and update the player’s movement depending on current keyboard input.

GALAGUH – enemy.lua Similar to player.lua, except it holds info on currently spawned enemies. Contains member functions to spawn enemies, initialize its variables, handle collisions, and update the enemy to perform simple movements. There are 4 different types of enemies, each with different behaviors.

basicWeapon.lua & enemyWeapon.lua Contains member functions that spawn a new bullet, destroy one that is offscreen, handle collisions, and movement. BasicWeapon.lua contains the code for the player’s weapon enemyWeapon.lua contains the code for the enemy’s weapons.

GALAGUH – background.lua Member of the updatable class. Tiles images together in the background, which continually scroll. Background:new() – creates a list of backgrounds that is used by the update function Background:update() – scrolls the background at a rate specified by the var scrollSpeed

GALAGUH – functions.lua Contains many common functions such as: removeItems() drawBackground() clearScreen() resetPlayer() newGame() newEnemy() toggleOptions()

GALAGUH – collisionManager.lua Checks the x and y values of the two objects to see if there is a collision. If there is a collision, it calls the member function ObjectName:collide(), which then handles the events that occur after the collision.