Code Monkey home page Code Monkey logo

spriteengineui's Introduction

Welcome To Sprite Engine

Welcome to Sprite Engine, a user-friendly 2D Game Engine designed for solo developers who want a straightforward yet powerful tool.

Table of Contents

  1. Welcome To Sprite Engine
  2. Tools Used
  3. Features
  4. Enhancements
  5. Quick overview
  6. Getting Started
  7. The Engine

Tools Used

  • SFML
  • Dear ImGui
  • CMake
  • Rene

Features

  • UI Editor
  • Scene Creation
  • Box Collision Detection
  • Parent-Child Collision Stopping
  • Physics
  • Animations (supported by the editor)
  • Scripting with C++
  • Project Creator
  • Automatic Project Builder
  • Lighting
  • Prefabs
  • Simulation in editor

Enhancements

  • Sound Manager
  • Additional C++ Functions
  • Cleaner Design
  • Box Collider Rotation

How to build

  • MAKE SURE TO RUN THE RUNME.sh file
  • This will create a Build folder, run cmake and build the C++ files.
  • It creates also a special Build folder in Engine/Template/ so the engine does not crash when creating a new project, the Engine/Template/Build directory is REQUIRED!!!

Getting Started

Note: This file may be outdated as I am working solo on this engine.

To begin, clone this github repository.

(Outdated) Watch an introduction to the engine on YouTube.

  1. Create a Project

    • Click the create button to initiate a new project.
    • In the file dialog, choose the project location and press the + button.
    • All files from the template folder will be copied to the selected project location.
    • I suggest opening the user project that got generated

    Tip: Pressing build or CTRL + B in the engine will automatically build the project so you can execute it directly in the editor.

  2. How Do I Script My Sprites?

    The engine calls the update and start methods of the Game class. If you create a new script, you need to invoke the update method from the script within the Game class. If you wish to share instances, simply pass them in the update methods or set a pointer to them in the start method. To access a sprite, call this->config.ptr_sprites->GetByName("name"); This method returns a pointer to the sprite in the SpriteRepository. You can now perform various operations with the sprite. Please be aware that the engine still has many bugs.

  • Open the project that got generated by the editor.

  • Right-click the hierarchy window and select New -> Sprite.

  • In the game engine, right-click on the asset folder and choose New -> C++ Script to create a script with update and start functions.

  • Create a new Sprite ptr in your class:

    class Game : public spe::IScript
    {
    private:
        Sprite* m_sprite;
    }
  • Assign an address to the Sprite ptr using:

    void Game::start()
    {
        this->m_sprite = this->configptr_sprites->getSpriteWithName("name");
    }
  • Change sprite properties in the update function:

    void Game::update()
    {
        if(Input::onKeyHold(KeyBoardCode::A))
        {
            this->m_sprite.transform.setPosition(spe::Vector(x, y))
        }
    }
  1. How do the sprites get managed?
    • All sprites are managed by an object called SpriteRepository.

    • Add sprites to the scene using the repository:

      void Game::start()
      {
          Sprite* spr = new Sprite();
          this->config.ptr_sprites.add(spr);
      }
    • Activate necessary components for basic collision detection:

      void Game::start()
      {
          Sprite* spr = new Sprite();
          spr->collider.exist = true;
      }

The Engine

Picture of the Engine Engine

This game is currently being developed, github link: DasynceSE

How does the SpriteRepository work? SpriteRepository

spriteengineui's People

Contributors

jkatsanis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

spriteengineui's Issues

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.