Skip to content
/ 2d Public
forked from zzlee/2d

2D toolset for Project Anarchy that includes a demo game that uses the different plugins provided to demonstrate what to use.

Notifications You must be signed in to change notification settings

haoransun93/2d

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2D Toolset Sample (Alpha)

alt text

IMPORTANT: This is still very much in the alpha stage, so please be patient with us as we work out the kinks.

Although you can make 2D games with Project Anarchy out-of-the-box, it takes some custom code to get spritesheets working and doing basic 2D collision through LUA. This sample 2D toolset gives you a couple new entities and utilities to create 2D games entirely through LUA without having to write any custom C++ code. There is still a lot of work left before this can be considered polished, but this is the first step and we wanted to give you, the community, a first look at this so that you can provide us with feedback early on.

Features

  • Adds two new entities: Sprite and 2D Camera
  • Automated sprite generation using Shoebox
  • Runtime playback of spritesheets
  • Collision detection and LUA callbacks

Dependencies

  • Visual Studio 2010 - (Required) Needed for compiling and you can use Visual Studio 2010 Express
  • Python 2.7 - (Required) There are numerous helper scripts that are executed automatically in Visual Studio when you build, so you need to install this and put it in your PATH.
  • PyTools - (Optional) Useful if you want to debug Python scripts
  • Shoebox - (Optional) Needed if you want to generate new spritesheets using the provided Python scripts

Samples

  • Shooter (Assets\Scenes\Shooter.scene)
  • Impossible (Assets\Scenes\Impossible.scene)
  • Physics (Assets\Scenes\Physics.scene)

Compiling

To build on Windows, simply open Workspace\2D_Toolset_Win32_VS2010_DX9.sln and build either Debug DLL or Dev DLL configurations. It will automatically copy the binaries to the Anarchy SDK folder.

  • 2D_Toolset_Win32_VS2010_DX9.sln - Doesn't include PyTools projects, but requires a non-Express version of Visual Studio. This includes everything you need to build the 2D toolset.
  • 2D_Toolset_Win32_VS2010_DX9_All.sln - Includes PyTools projects and requires a non-Express version of Visual Studio
  • 2D_Toolset_Win32_VS2010_DX9_C++.sln / 2D_Toolset_Win32_VS2010_DX9_C#.sln - If you have Visual Studio Express, you need to build these two separately

Generating Spritesheets

We have a Python script Source\BuildSystem\spritesheet.py that can be used to generate a sprite sheet. Just pass in either a folder or set of files and it will call Shoebox, generate the spritesheet along with needed XML files, and copy it to the Assets folder.

Credits

Special thanks to Howard Day for the explosion effects in the shooter sample!

Remaining Work

###Beta

  • Example on how to use the 2D camera
  • Optimized rendering that uses actual mesh buffers
    • Already have a working version of this internally, but need to port it over
  • Finalize Havok Physics integration and convert to a component
  • Add support for Havok Physics on Android, iOS and Tizen
    • Need to implement serialization so that convex hull generation only happens on PC
  • Add blending modes for Sprite entity
  • Add a SetDirection LUA call for setting orientation of sprite
  • Convert the Sprite management LUA code over to C++ so that you can do SpriteManager:CreateSimpleSprite
  • Add support for Tizen and Android x86

###Wishlist

  • Support multiple physics worlds
  • Support tilemaps (e.g. Tiled)
  • Add custom shader support for Sprite entity
  • Add a broadphase / sweep-and-prune implementation for collision detection
  • Add support for using particle effects (as a child of the Sprite entity)
  • Add pixel-perfect collision detection
  • Add a transform rule that automatically creates the sprite sheet
  • Add support for Box2D
  • Add support for 3rd party animation tool like Spine
  • Spline mesh editing tools as seen in Rayman Legends

About

2D toolset for Project Anarchy that includes a demo game that uses the different plugins provided to demonstrate what to use.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published