CS/INFO 3152: Introduction to Computer Game Development

Demos

On this page we have provided several samples illustrated various technical challenges in game development. These samples include many examples that are commonly requested in this course. All of these samples come with source code. You are allowed to use the code here as reference or directly in your own games.

This page has all of the demos that we will show in lecture throughout the semester. You are encouraged to look at them ahead of time to give you a jump start on your project. We find that these demos cover most of the major issues that you might run into when developing your game.

With that said, we are always looking for more demos. If you discover something cool that is not here, let us know. We are more than willing to add more demos for students to look at.

Ship Demo

This example demonstrates image drawing, rotation and scaling, and background drawing from an image. It also has sound effects and simple mathematics for physics. This is the code from the first programming lab.
Memory Pool

This example shows how to use free lists to keep control over your allocations. Free lists are supported by the Pool class in LibGDX. These are particularly useful for particle systems.
JSON Demo

This example shows how to use JSON to define your level format. Modifying this file allows you to change the level without recompiling the demo; just hit start.
Parallax Scrolling

This example shows off parallax scrolling to give your game some feeling of depth. Parallax scrolling does not actually give you 3D game play, but it does make the game look nicer.
Box2D Physics

This example shows off how to use the Box2D physics engine for movement and collision. It is much simpler than Lab 4 because there are no joints involved. This shows the bare minimum that you can do with the engine. Use the number keys 0-9 to change the various settings in the demo.
Box2D Lights

This example shows off how to use Box2d to make a top-down game with simple lighting effects. It requires an additional library called Box2DLights, which was an option when you set up your game. Like the JSON Demo, this example defines the level layout with JSON files, allowing you to reset the lights on the fly. There are multiple light settings in this demo. Use the keys P and N to page through them all.
Texture Mapping

This example shows you how to do sophisticated texture mapping, beyond what is done in the basic SpriteBatch class. This required us to make an alternative class to SpriteBatch classed VertexBatch. The application itself is simple and displays a single textured polygon. Press = or - to change the number of vertices on the polygon, and press T to then texture on or off. You can distort the polygon by clicking on a vertex and dragging it.