Giter Site home page Giter Site logo

wase-engine's Introduction

Wase Engine logo banner

Website badge Discord badge Mit License badge Issues badge Lines badge Stars badge

Wase Engine is an open source 2d game library made with C++17. Wase Engine can be used to create all kinds of 2d games. The main goal for Wase Engine is to give you the tools you need for creating games while keeping as much control as possible.

Setting up Wase Engine

You can choose to build Wase Engine yourself from the source code or you can download the pre-build libraries on our website.

Requirements:

  • OpenGL
  • GLFW
  • spdlog

CMake

mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug
cmake --build .

To include tests add -D enable_test=1 to the cmake .. command. To change the build type to Release change CMAKE_BUILD_TYPE=Debug to Release

Included dependencies

Compatible platforms

  • Windows
  • Linux
  • MacOS

Documentation

You can head over to the documentation for more information about Wase Engine. In the documentation there is a detailed description about how Wase Engine works.

Contributing

If you want to contribute to Wase Engine you can head over to the contributing page for more information.

wase-engine's People

Contributors

jaimievos avatar rajeckmassa avatar requizm 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

wase-engine's Issues

Continuous Integration tools

Is your feature request related to a problem? Please describe.
We should add it to see if there are errors in pull requests.

Describe the solution you'd like
We can use github actions, travis-ci etc.
Currently the following can be done on windows:

  • MinGW 8.1.0 or up
  • MSVC 2019

Tests

Is your feature request related to a problem? Please describe.
When you work on a feature you might break another one without noticing.

Describe the solution you'd like
Tests that test certain features and/or methods that run when new code is being merged

Linux support

Describe the solution you'd like
Wase Engine should be compatible with Linux.

Particle system

Describe the solution you'd like
There should be a particle system. I don't know yet what it should contain and how it should be but I will fill up this issue soon with more information.

Resource manager

Is your feature request related to a problem? Please describe.
Currently when you want to add an audioclip to an AudioSource or a sprite to a SpriteRenderer you have to pass the path to the audioclip/sprite and then the component loads the file in. But when you have multiple components that use the same file it loads in the same file multiple times, this is unnecessary.

Describe the solution you'd like
A resource manager that loads in files/assets once and then stores it and then multiple components can access it via the resource manager.

Buttons

Describe the solution you'd like
An UI component for a button.

Additional context
For this the Label component can be used.

MacOS support

Describe the solution you'd like
Wase Engine should be compatible with MacOs.

Mouse position gives wrong position when fullscreen with blackbars

Describe the bug
When the window has blackbars because of a higher resolution the mouse position isn't correct anymore.

To Reproduce

  1. Set up a window that has a lower resolution than your screen and add the fullscreen flags to it.
  2. Make an entity with a sprite renderer that renders a simple cube.
  3. Assing the entity position to the mouse position

Expected behavior
The cube will have an offset to the mouse position because the blackbars aren't calculated with it.

System information:

  • OS: Windows 11

Log timestamps

Describe the solution you'd like
It would be nice if logs in the log_utils namespace had timestamps.

Fullscreen mode and minimize/maximize

Is your feature request related to a problem? Please describe.
Currently you can only have 1 screen size. If you want a full screen game you can't maximize it or get it borderless.

Describe the solution you'd like
A way that you can choose if the window should be fullscreen or not. Also an option to enable the possibility to minimize and maximize the window.

CircleCollider2D

Describe the solution you'd like
A collider in the shape of a circle.

SetParent to null

Is your feature request related to a problem? Please describe.
If you set a parent for an entity you can't undo it later by setting it to null

Describe the solution you'd like
The possibility to remove the parent from an entity

Rendering order

Is your feature request related to a problem? Please describe.
Currently there is no way to decide which sprite gets rendered in front of the others. This can cause the problem that certain sprites are not visible.

Describe the solution you'd like
A render order / order layer for the sprite renderer where you can decide in which order the sprites are shown.

Additional context
https://docs.unity3d.com/Manual/2DSorting.html

IO writing methods

Describe the solution you'd like
A namespace that contains methods to write information to the filesystem

  • copy: copies the source path to the target path
  • remove: deletes a file/folder
  • createFile: creates a file at the target location
  • createFolder: creates a folder at the target location
  • write: write to the target file

Vector2 and Vector3 magnitude, dot and cross product

Describe the solution you'd like
A Vector3 class should be added. To the Vector2 class should be added: magnitude, dot and cross product calculations. The Vector3 should have the same methods as the Vector2 class.

IO reading methods

Describe the solution you'd like
A namespace that contains methods to get information from the filesystem

  • fileExists: returns a bool
  • folderExists: returns a bool
  • getFiles: returns the names and extension of the files at the given path
  • getFolders: returns the names of the folders at the given path
  • readFile: returns a string with the contents of the file

Allow all types for the logs

Is your feature request related to a problem? Please describe.
Currently when you want to log an integer you can't. Currently only strings are allowed.

Describe the solution you'd like
Being allowed to log more than only strings.

Additional context
As an example, you can't do this currently or something similar.
log_utils::info("Amount: " << number);

There should be a way that it is possible to do this.

Input manager

Is your feature request related to a problem? Please describe.
There is no efficiënt way to get information about inputs

Describe the solution you'd like
A input manager that is easy accessible to get information about input actions.

Additional context
For now it is fine to only implement keyboard and mouse support, later it would be nice to add support for joysticks too.

in engine.cpp the at line 122 "m_SceneManager->addScenes(m_Config.scenes);" does not add a scene to the m_Config variable.

Describe the bug
In the file "engine.cpp" at line 122 in the function "bool Engine::initializeSceneManager()" the line of code "m_SceneManager->addScenes(m_Config.scenes);" does not add a scene object to "m_Config.scenes".

To Reproduce
start wase-engine

Expected behavior
A window should appear when I start wase-engine

System information:

  • OS: Ubuntu
  • Version: 22.04

Additional context
I was able to run wase-engine before input was added but I don't think the bug has anything to do with input.

Camera target

Describe the solution you'd like
The possibility to add a target to the camera so that it will follow the target.

AudioSource weird sounds and memory access violation

Describe the bug
When playing audio with the AudioSource component it gives a strange sound. If you try to play a longer sound on awake file then you get a memory access violation error and the program crashes.

To Reproduce
Steps to reproduce the behavior:

  1. Create a scene
  2. Create an entity inside of the scene
  3. Add an AudioSource to the entity
  4. Set the playOnAwake to true or use play() to play the audioclip

Expected behavior
When you play the sound you will hear a weird sound that doesn't sound like the original sound at all. When you try to play a longer sound with playOnAwake set to true you get a memory access violation.

System information:

  • OS: Windows 10
  • Version: x

Mouse events on colliders

Describe the solution you'd like
All the colliders should have some mouse events like onclick, mouse hover enter, mouse hover exit. This could be used for detecting if a certain entity is being interacted with with the mouse.

Memory leaks when being forced to quit the program

Describe the bug
When the program is forced to close and doesn't complete the game loop there are memory leaks.

To Reproduce

  1. Create an entity
  2. Use the getComponent() method on the entity (or another component that is not part of the entity)
  3. Run the program, it will quit and have memory leaks because destroy in engine.cpp doesn't get called.

Expected behavior
Quit the program without any memory leaks.

System information:

  • OS: Windows 10
  • Version: x

Scenes and a scene manager

Describe the solution you'd like
A system with scenes and a way to easily swap between them. Scenes should have different methods such as start and update for certain events that occur during the game loop.

Resource manager

Describe the solution you'd like
A resource manager that loads and keeps track of all resources such as images and audio files in an efficiënt way.

BoxCollider2D

Describe the solution you'd like
There should be a BoxCollider2D component. This component has a width and height that is used as a region for collisions and mouse interactions.

Additional context
Collisions don't have to be added yet, only the marking of the area. Would be nice if there would be a debug option too to show the outline of the collider.

Vector2

Describe the solution you'd like
New features for the Vector2 struct

  • up(), right(), down(), left(), one(), zero(), returns for example on up() Vector2(0, 1)
  • getNormalized()
  • getMagnitude()
  • getSqrMagnitude()
  • distance(), return the distance between 2 vectors
  • dot()
  • operators

RigidBody2D

Describe the solution you'd like
A simple RigidBody2D component that handles simple falling gravity for an entity and stopping when colliding.

Program crashes when trying to switch between scenes

Describe the bug
When you try to switch to another scene you get a nullptr error.

To Reproduce
Steps to reproduce the behavior:

  1. Create a scene
  2. Create a second scene
  3. Add the following code:
// Update method
void ExampleScene::update(float dt)
{
        // If space is pressed
	if (input::getKeyDown(SDLK_SPACE))
	{
                // Switch to the second scene
		SceneManager::setActiveScene("Game");
	}
}
  1. Run the program and press the space key to switch to the other scene

Expected behavior
A clear and concise description of what you expected to happen.
The window should update with the new scene

System information:

  • OS: Windows 11 Pro 10.0.22000 Build 22000

Networking

Describe the solution you'd like
Some kind of networking, no details for it yet but it would be nice to have in the future.

Animations

Describe the solution you'd like
A component that can load a spritesheet and loop through it to make an animation.

x86 and x64 build support

Is your feature request related to a problem? Please describe.
I'm using MinGW-64 on Windows. Since my working environment is vscode, i can't build with that command:
cmake .. -G "MinGW Makefiles"

Error:
mingw makefiles does not support platform specification win32

Describe the solution you'd like
We can remove that line:

set(CMAKE_GENERATOR_PLATFORM win32)

Also, why only x86 build support?

Camera viewport

Describe the solution you'd like
A camera object/component that you can move around. It would be nice if you could add a target to follow to it too.

Text renderer

Describe the solution you'd like
A text renderer that can draw text to the screen.

Multiple scenes / Scene management

Is your feature request related to a problem? Please describe.
If you want to make multiple levels you want a clean scene to build your level in. Currently that isn't possible.

Describe the solution you'd like
A scene system where you can create different scenes. There cannot be multiple scenes loaded in at the same time.

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.