GithubHelp home page GithubHelp logo

dm6153-apr2-examples's Introduction

Examples from April 2 Class

CubeEscape

This scene demonstrates multiple parts of a game triggering the same action, in this case killing the player. The code originally just destroyed the gameobject, but we found this to be redundant and low level, making it difficult to expand on down the line.

By moving the kill code into its own function in a component, we created a single place where we can make updates or edits, and are now coding in terms of the game, not Unity's functions.

Chessish

This scene implements its coordinate system in terms of the game board. The BoardPosition component converts between 2D, integer board positions (the high level position, in terms of the game) and positions in 3D space (the low level positions, in terms of Unity).

Asteroids

This scene was prototyped using gizmos and art was later added. I made an effort to separate the input logic (found in ShipKeyboardControls, BreakOnCollision), the output logic (found in AsteroidGizmo, ShipGizmo, and the Art GameObjects with sprites), and the game logic (found in ShipEngine, Fragile).

The input and output logic are written in terms of Unity's semantics, and the game logic is written using Unity's transform and collider components. We decided in this case that using Unity's functionality to implement our game logic made sense. We still defined a clear boundary between our game logic and the 'outside world' (the Break, Thrust, and Turn functions).

dm6153-apr2-examples's People

Contributors

nasser avatar carlosabauti avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.