Giter Site home page Giter Site logo

xnautils's Introduction

XNAUtils

A library of classes meant to make life in XNA just a little easier.

Included Modules

  • ScreenManager - a simplified and annotated variant of the Microsoft Game State Management tutorial project
  • MenuScreen - Variant of the menu system found in the Microsoft Game State Management tutorial project
  • Sprite - Animated graphics using a sprite sheet
  • Configuration - Class to manage various XNA graphics and game settings
  • Particles - Simple force-based particle system
  • Camera - 2D camera class
  • UtilGame - Replaces the default Game class generated by XNA and sets up the game for use with ScreenManager, Configuration and Camera.
  • util_content - If using the above classes, make sure to import the files in this folder or replace the instances of these files with your own

Usage

This collection of utilities is distributed as source. To use, copy the desired parts over to your project and make sure to put the correct using statements in the files where you're using these utilities. Some of the classes use files in the util_content folder. You can replace these with your own instances, or use the ones provided in the util_content folder here.

The code is distributed as a XNA Game Class Library, but that project is mainly for code editing assistance. (You can create a library if you want, it does compile.)

Module Notes

ScreenManager and MenuScreen

Most of the documentation for this can be found in comments in the files themselves. I've added comments to the base project and rearranged things as needed to make things clearer. I have not needed to use all features of this, so parts of it aren't annotated as well.

Sprite

This class expects to be given a sprite sheet with no gaps, meaning that if you give it a texture that has room for 15 sprite frames (3 x 5) that each of those spaces are used. This might be a problem if you have a prime number of sprite frames, but you could write in some custom frame-limiting when those play back.

Configuration

Create the configuration object in the main game class, then fill in the desired settings, call configuration.apply and suddenly the settings are applied. It's like magic (but not really)

Particles

This component has a large number of tweakable parameters, so it's best to just consult the comments in source for it.

Camera

Manages transformation settings for a 2D camera. This can be used to manage screen resolutions, zoom in and out of screens, etc. It does not have a controller attached to it, so you'll have to write that yourself.

UtilGame

Replaces the default game object generated by XNA. Replace that object with this to set up the project for use with ScreenManager, Camera, and Configuration quickly.

xnautils's People

Contributors

ebshimizu avatar

Watchers

 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.