Skip to content

A Visual Novel / Dating Sim game engine written in Python using Pygame, with a full editor written in PyQt5

License

Notifications You must be signed in to change notification settings

Cronza/HeartbeatEngine

Repository files navigation

Heartbeat Engine

ScreenShot License GitHub issues Python Version Twitter Badge

A Visual Novel / Dating Sim Game Engine Designed for Creative Developers

What is the 'Heartbeat Engine'?

The Heartbeat Engine is a Visual Novel / Dating Simulator game engine written in Python using the PyGame framework, with a fully-fledged editor built in PyQt5. It is meant as a lightweight, user-friendly engine that allows developers to focus more on making games, and less on worrying about coding them.

Getting Started

Currently, the Heartbeat Engine is in core development, so there may be issues during the setup process. There are no official releases of the engine or editor yet, so you will need to be able to perform the following to get started.

  1. Get the Project

    git clone <https://github.com/Cronza/HeartbeatEngine.git>
    
  2. Create a virtual environment (venv) in the repo folder

    Due to the engine being in heavy development, a number of scripts rely on a local venv with the modules defined in the requirements.txt to function

    python -m venv <repo_root>/venv
    
  3. Install from requirements.txt

    <repo_root>/venv/Scripts/pip.exe install -r <repo_root>/requirements.txt
    
  4. Launch the Editor

    This step has a few options. There is a simple launch script in the repo root called launch_editor.bat. This will launch the editor with a CMD terminal for debug output

    If you want more development tools, use an IDE of your choice to launch the editor project targeting the main.py script (I personally use and recommend PyCharm)

License

The Heartbeat Engine is licensed under the GPL version 3 (GPLv3) license. Details can be found in the LICENSE.txt file, but essentially any projects created with the engine are entirely, 100% yours. You may use your own license for them, keep them as private works, and release them commercially without worry.

However, if you decide to fork the engine and alter or extend its behaviour (which I wholeheartedly welcome!), then that code must abide by the GPLv3 license and remain open source.

Features

Data-Driven Workflow

ScreenShot

Fig 1 - A demonstration of dialogue with a choice prompt

The Heartbeat Engine leverages a data language called YAML, which was designed for human readability to simplify the process of creating all sorts of content, such as:
  • Scenes
  • Dialogue sequences
  • Renderables (Objects, interactables, buttons, etc)
  • Effects (Fades, scene transitions, etc)

An example of a block of YAML representing the action to create a background sprite:

action: create_background
key: Background
sprite: Content/Backgrounds/Background_Space_01_1280.jpg
position:
- 0.0
- 0.0
post_wait: no_wait

While the Heartbeat Editor acts as a wrapper for these files, anyone can edit these files directly if they need to perform a hotfix, or need to make changes through automation.

The Heartbeat Editor

ScreenShot

Fig 2 - The 'Dialogue Scene' editor within the Heartbeat Editor

Using the Heartbeat Editor, developers can stay out of a complicated IDE or set of code files, and stick to a comfortable environment tailored for content authoring. The editor acts as a wrapper for individual editors, such as:

  • Dialogue Scene
  • Point and Click Scene *TBD
  • Character Creator *TBD
  • Project Settings

The editor comes bundled with the engine, and provides all the tools and functions necessary for interfacing with the engine

Action Manager

The Action Manager was created in order to allow developers (and the engine) to access any number of possible in-game actions in a flexible, YAML-accessible manner.

'Actions' are defined as classes in the actions.py file. When an action is requested, such as by a YAML file (Dialogue, clicking interactables, etc), it looks to this file using Python's reflection capabilities for the corresponding action class. For example: class load_scene(Action). Once found, it calls it, passing it any additional pieces of information provided. An example of a dialogue YAML block:

- action: "dialogue"
  character: "Isea"
  dialogue:
    text: "Who are you?"
  wait_for_input: True

The above is an example of an action used to display dialogue text to the screen. The action name is called dialogue. In the actions.py file, there is a corresponding class dialogue(Action) class. The engine is capable of correlating these strings to the classes found in the actions.py file.

Additionally, each action is fed the entire data block that was provided when it was called. In the example above, we see that various parameters such as character are provided. For the above dialogue action, which is one of the provided engine default actions, character is used to determine the speaker's name, the color of their name, and the font for their name text.

About

A Visual Novel / Dating Sim game engine written in Python using Pygame, with a full editor written in PyQt5

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages