Conjuration

A Ruby 2d game engine built on gosu/gosu.

Inspiration & Goals

As a Ruby developer, I want a toolset that allows me to prototype games quickly and easily. I want to be able to experiment with game mechanics and ideas without having to worry about the complexities of a full game engine.

  • Provide a opinionated set of tools to build 2d games in Ruby.
  • Focus on simplicity and ease of experimentation.
  • Provide clear examples and documentation to help new developers get started.

Installation

As the gem is based on gosu, you will need to install the gosu dependencies.

Add this line to your application's Gemfile:

gem "conjuration"

TODO: Add project generator. conjuration new my_game

Usage

You should setup your project with the following file structure:

.
├── src/
│   ├── assets
│   ├── game_objects
│   ├── scenes
│   └── game.rb
└── main.rb
  • main.rb

The entrypoint for your game. This is where you require the game file and start the game.

TODO: Pull this into a bin script. conjuration run

  • src/game.rb

The main game class. This is where you add your initial scene.

  class Game < Conjuration::Game
    def initialize
      super(title: "My Game")

      scene_manager.add_scene(:main_menu, MainMenuScene)
      scene_manager.set_scene(:main_menu)
    end
  end
  • src/scenes

This is where you define each of your game scenes. Each scene should inherit from Conjuration::Scene.

  • src/game_objects

This is where you define your game objects. Each game object should inherit from Conjuration::GameObject.

  • src/assets

This is where you store your game assets. This can include images, sounds, and other resources.

Examples

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/Nitemaeric/conjuration.

License

The gem is available as open source under the terms of the MIT License.