02-Fundamentals of Game architecture

Homework required in preparation for this lecture

  • Write a blog post called "MVC example: GAMENAME" describing the underlying model for some video/computer/phone game you are familiar with. Explain how the view uses that model to generate the graphics on the screen, and how the controller modifies the model based on user input. Be prepared to present your analysis to class if called on. Does the model use some sort of simplified Physics engine? If so, what are the rules for how objects interact, what kind of objects are supported, etc. Comment on three other blog posts, critiquing their positions and/or suggesting deeper insights

  • Write a blog post titled (PA3 Extension: BRIEF DESCR) and comment on three others, describing some possible extensions for the game for PA3 which would enhance the problem solving attractiveness of the game. Describe the extension and explain how this could be used to create more interesting levels.

  • Finally, work through the introduction to libgdx wiki pages at http://code.google.com/p/libgdx/wiki/TableOfContents?tm=6 and work through the example "My First Triangle" which shows how to link java and android projects and write a blog post title "libgdx features: LIST SOME"on your impressions of libgdx - what seems cool and useful, what seems confusing.  Comment on three other blog posts.

First Hour:

Homework Cold Calls:
  • MVC Examples
  • PA3 Extensions
  • Libgdx impressions
PA2 Cold Calls

Second Hour:

Introduction to Libgdx

The Game loop - intro to the Game loop ...
  • Main UI Thread processes events on the EventQueue, handlers  complete quickly (or the OS freezes)
  • Game loop -   while true { updateModel(); drawScreen();}
  • Game Engines and Game Frameworks provide a scaffolding to make this easier
  • Game Engines also provide higher level game abstractions such as
    • Physics Engines
    • Tile Managers

Example of building an application using libgdx
Basic Architecture of Games using libgdx
  • Game extends Application  -- registers ApplicationListener loads textures, etc.
  • ApplicationListener - handles resume, pause, destroy callbacks
  • RenderListener - handles surfaceCreated, surfaceChanged, render, dispose
    • render is the main loop, it draws the screen fresh each time

libgdx extensions
  • Box2d a 2d physics engine http://www.box2d.org/
  • Tiled Maps http://code.google.com/p/libgdx/wiki/TiledMaps and http://www.mapeditor.org/
OpenGL rendering
  •  http://code.google.com/p/libgdx/wiki/GraphicsModule  basics on camera layout
  • meshes and transforms

libgdx tutorials

Other Game Engines on Android:  AndEngine

Other Game Engines elsewhere: Blender/Bullet