Scion is a tiny 2D game library built on top of wgpu, winit and legion.

Overview

Scion

Scion is a 2D game library made in rust.

Please note that this project is in its first milestones and is subject to change according to convience needs and big features coming. You can use Scion as you want although I just made this open source to serve the community not to be a competitor to the current Rust game engine eco-system.

Why this project ?

Well, firstly because it' a good way to learn.

Then because a lot of projects these days focus on adding a lot of feature pretexting feature parity with big editors or game engines. Here I focus on the features that I really need for my projects. I won't add things just because they are cool, but because I need them in a game project

Scion relies on a short list of principles that also serves as a guideline.

Goals

  • Strong focus on 2D only.
  • Easy and Fun to use.
  • Clean and readable source code.
  • Tiled integration

Non goals

  • Ultra/over optimized code and performances. For this, please try other engines or build your own !
  • 3D
  • Editor

Why ECS ?

Today, ECS is like a 'magic' word for games, game libs and game engine. But ECS is not and must not be considered as a universal answer to multiple questions. I believe that ECS has its strength and its weaknesses. The choice of it here is made because the main target games of this lib at its start were to be able to make :

  • a complex city building game.
  • a pkmn fan game with real time trainer progression and wild pkmn.
  • granular network packets representation && dot simulation games.

Notable dependencies

These are the dependencies this project is relying on. Thanks to these awesome communities, we are able to build this kind of tiny projects.

Comments
  • fix(tetris): move 2 lines down

    fix(tetris): move 2 lines down

    I don't understand why do you remove index to line : if a block is on a line upper than removed line, it should move down. This is independent of removed line index in 'lines2' array.

    I have tested with 2 and 3 lines removed and it work.

    If you are ok with that, I can also refactor this code to rename variables like lines2.

    opened by alocquet 4
  • Animation convenience constructors

    Animation convenience constructors

    I would like to add :

    Animation::running(...) -> Create an animation with 'RUNNING' status Animation::looping(...) -> Create an animation with 'LOOPING' status

    And delete the 'loop at start' boolean in the new fn

    enhancement good first issue 
    opened by grzi 4
  • Implement the Center pivot point for rectangle

    Implement the Center pivot point for rectangle

    Description

    Currently, we can set the pivot point only for Square shapes. We need this feature also on Rectangle

    How to do this ?

    The file to modify is : https://github.com/grzi/scion/blob/main/src/core/components/shapes/rectangle.rs

    The square with working center pivot point is here : https://github.com/grzi/scion/blob/main/src/core/components/shapes/square.rs

    enhancement good first issue hacktoberfest 
    opened by grzi 3
  • Plans for 0.3.0

    Plans for 0.3.0

    The goal here is to plan the next milestone (0.3.0) with a theme and a list of needed features. Starting from now, the milestone planning will also contain convenience issue detected when coding the mini game for the POC of the previous milesone.

    https://github.com/grzi/scion/milestone/3

    documentation 
    opened by grzi 3
  • Bounded concurrent messaging queue

    Bounded concurrent messaging queue

    Create an internal Messaging Systems that allow :

    • Concurrency (multi consumers, multi producers): This is needed because we don't want to duplicate the events.
    • Topics: One topic is dedicated to one event type.
    • Bounds : Optionally set a limit per topic. Convenience to be able to have a limited in memory size for the topics.
    • Pull based consumers: Consumers call the topic to get the new events using an offset. Each consumer has a pull size limit to know the maximum event it can pull in one call
    • Pausable: When pausing the game, switching layers, some topics may want to stop receiving && accept pull request from consumers

    That's all, then we use it to track event in the game engine and allow users to create topics, producers, consumers with either convenience functions or macros.

    enhancement Advanced 
    opened by grzi 3
  • create new color using hex code

    create new color using hex code

    Issue #219

    Added utility function new_hex(str) to create color using hex code. Additionally new code is tested in jezzball project by creating rectangle colors using hex codes

    opened by Yash-Punia 2
  • Color New from Hexa

    Color New from Hexa

    Describe the feature

    An utility FN to create a color from Hexa code

    Why do you need this feature ?

    To be able to use Hexa codes from figma or any tools actually. It's easier IMO

    enhancement 
    opened by grzi 2
  • Implement the Center pivot point for lines

    Implement the Center pivot point for lines

    Description

    Currently, we can set the pivot point only for Square shapes. We need this feature also on Lines We need to compute the center of the line using a formula to do this.

    How to do this ?

    The file to modify is : https://github.com/grzi/scion/blob/main/src/core/components/shapes/line.rs

    The square with working center pivot point is here : https://github.com/grzi/scion/blob/main/src/core/components/shapes/square.rs

    enhancement good first issue hacktoberfest 
    opened by grzi 2
  • Implement the Center pivot point for triangle

    Implement the Center pivot point for triangle

    Description

    Currently, we can set the pivot point only for Square shapes. We need this feature also on Triangle We need to compute the center of the triangle using a formula to do this.

    How to do this ?

    The file to modify is : https://github.com/grzi/scion/blob/main/src/core/components/shapes/triangle.rs

    The square with working center pivot point is here : https://github.com/grzi/scion/blob/main/src/core/components/shapes/square.rs

    enhancement good first issue hacktoberfest 
    opened by grzi 2
  • changed Transform2D to Transform in 10 files

    changed Transform2D to Transform in 10 files

    examples/tetris/layer.rs examples/tetris/system/piece_system.rs examples/tetris/system/score_system.rs examples/tetris/system/move_system.rs examples/tetris/system/rotate_system.rs examples/taquin/main.rs src/core/systems/ui_text_system.rs src/core/components/maths/transform.rs src/rendering/bidimensional/gl_representations.rs src/rendering/bidimensional/scion2d.rs

    opened by juanapatankar 2
  • fix: block I disappear during rotatation on right side

    fix: block I disappear during rotatation on right side

    The I block disappear when I move it to thé left and rotate it. The problème was that x coordinate was an unsigned int and it become max usize value instead of -1.

    opened by alocquet 1
  • Gravity ?

    Gravity ?

    Describe the feature

    Be able to apply gravity to an object. This still needs to be thought in depth but here is how I see it rn :

    • Implement basic gravity rules with different parameters that will

    Why do you need this feature ?

    A clear and concise description of the reason you suggest this feature

    Additional context

    Add any other context or screenshots about the feature request here

    enhancement draft 
    opened by grzi 0
  • Handle input pressure in the input controller

    Handle input pressure in the input controller

    Describe the feature

    When retrieving if an input is pressed, it would be interesting to be able to also retrieve a gauge that represents how long it has been pressed.

    Why do you need this feature ?

    It's usefull to handle acceleration and conditional actions depending on the pressure type

    enhancement 
    opened by grzi 2
  • Button component

    Button component

    UI Button

    Issue created in order to keep track of this new component

    Features

    • Button builder
    • Button events
      • on mouse enter
      • on mouse exit
      • on click
      • clicked
      • on release
    enhancement 
    opened by grzi 0
  • Collider shape

    Collider shape

    Describe the feature

    To be able to create quasi pixel perfect collisions, polygone colliders are needed.

    Maybe I should hide complexe polygons behind a feature ...

    enhancement 
    opened by grzi 0
Releases(0.6.0)
  • 0.6.0(Feb 19, 2022)

    https://user-images.githubusercontent.com/43185161/154801168-19c7430d-b153-4c67-8d44-2a96b9a1ca7c.mp4

    chore: prepare 0.6 (#228) (d750d4d) feat(minigame): Implement New bark town (ghost) to validate 0.6 (#227) (d267f12) feat(transform): Allow a transform to use screen as origin (#225) (c85ef1e) feat(tilemap): Add events on tilemap and rework atlas (#224) (1561b60) feat(tileset): Add tileset atlas and retriever (#223) (21cdc82) fix(transform): dirty child system was missing (ea357b9) feat(audio): Rework audio and switch to rodio (#221) (cccf4e0) fix(rendering): Filterable texture and winit to 0.26 (fd89fb0) feat: Single scene instead of pile of layers (#220) (1c64d54) feat: systems package (#218) (e61464c) feat: Implement the Center pivot point for triangle (#216) (5783661) feat: Text animation (#217) (2607bad) chore: wgpu 0.11 upgrade + dpi bug and issue patterns (#215) (272e1eb) feat: Implement the Center pivot point for lines (#214) (1e1165d) feat: Add collider offsets (#213) (2f64976) feat: Input controller V2 (#212) (2e5613c) fix: block I disappear during rotatation on right side (#209) (f7007e8) fix(tetris): move 2 lines down (#205) (ebdaad6) doc: fedora build packages (#206) (56cb078) feat: Add on conflict play config and some chores (#204) (77a7e60) Implement the Center pivot point for rectangle (#198) (c5aec99) Add function and events for stopping all sounds (#203) (2450ff7) chore: Upgrade deps and make compile on macOS (b411649)

    Source code(tar.gz)
    Source code(zip)
  • 0.5.0(Sep 2, 2021)

    jezzball

    chore: Changed link and debug config's app name (86a55d78e9f2d678225b7b95c227f1b4f9ecba3c) feat: Add asset hot reload (e317eda3f0f1ad107e8855a2f68b6bed409d9049) feat: Asset hot reload as a feature (b02559fe6309b3fc36f3d688e44f65571474244c) feat: Add Transform builder and more convenience to transform (4e9e53e340f9eb95f02295c95d036e9598700dee) feat: color animations (5b9eecbe2bf7be8a587ed8e4aff1a73ed9f47176) feat: Vector and cleanup (bbe84499c34ba7a9a1bb917aaa01151330e711f6) feat: Add legion resource extension to simplify code (a86855a669331a48d98e5188e608c74df74c9d51) feat: Default camera and mouse convenience (c510f398791c8213ff8a9e59c51b57be0a863d41) feat: Add hide & hide propagated components (8f8925974ef6d6461160d295b54047af735af424) feat: blink and layer to z (ee61b507d291f43c280065306acf2990e0f325cf) feat: improved animation constructors (0a0c081f41b42a79f035bdde097df676dd307b4a) feat: Add basic audio loader and audio player (Linux only) (be51cd3fe86bcf3302e830b9e26e58aec6bd8693) feat: Add pivot on square and some docs (15fbf9df0039f3ad6c676e9cc93c11b046f8be0e) feat: wgpu 0.10 && line component (880376a63de868c8b9ec62ae5617260e2a3fe232) feat: Add polygon component (581fb77e9a9098c0620a063c585f1b4c6b5ea83e) feat: Debug lines for colliders (6198cfbca8df7b3f8cc5b9867ed1a37b8ba8ca8e) feat: start a little world debugger (c924448fc2910a07092923f0a33775d45c8740b2) feat: Allow to change cursor icon (2b0e6890b484ebeceaae6022617504f6699a4a4c) fix: WGPU Pipeline by type instead of per components (1246f6d009d6d6d5ee9f5f0f9f88c172446267c5) feat: Implement Jezzball clone to validate 0.5 Milestone (688c2f3b67829fb0936caabde7c519298be9bdeb)

    Source code(tar.gz)
    Source code(zip)
  • 0.4.0(Aug 1, 2021)

    bomberman (1)

    style: Remove bad expect and modify readme (aeb0f138b94d22ffe567a83a8528ee40937be3ba) tech: Upgrade winit, wgpu, bytemuck and serde (07f744108eddb5cc680dca0db6769f75b42befad) chore: Move assets to examples (37de703b2877c69ac19bd86910e4437b2f25ee33) chore: use new features in examples (27cd885d0f493d73df2fbeb762aa358ab0aaa3ef) fix: UiText translation bug with parent (7271a1cb75f0bb3815d264da5363b65efb3d7cbc) fix: forgotten clean of Children component (f3ccdba45462cf039ff1f12449dbc4feaac62a65) feat: Move Camera to world and add bounds to Transform (61c54490661fef6185adbd69e029ef77780aca7e) feat: tileset material loadable in asset manager (fffecb8e138f23c2d28144c7947a6ff84b6abfa1) feat: configurable color to the clear color (5402b47d5edd912dbe5bac43d906a9125838cb86) feat: Optimize buffer creation and add a buffer cleaner (04ffc64b33b2a92a1bf68720b19a7bcb197e7fc3) feat: Global animations component and Transform animation (79345eb8b3f2b8dff9a06b19e9c346afbbe5a5cb) feat: Sprite Animation (loopable) (986f7650a9c1833946b6cdf4753ffa37dea7efba) feat: More Keycodes and convenience keyboard functions (8727298f35219132295cb234d30ad3d9af78d04a) feat: Multi layered tilemap (6742683df10b85b53c01eeb34f236a0901aeaa82) feat(animation): Animation can now loop at start (0d096cbb9dfec0d009f807d5f278c10a61aa3ff6) feat: Add 'any_animation_running' for animations (1ae1aa9b724b0fa95541e8ce3e4a8c0cabed55ef) feat: Bomberman like mini game (8533f2b7b537d0c4e9e99bc9e59fa7cc62906917)

    Source code(tar.gz)
    Source code(zip)
  • 0.2.0(Apr 6, 2021)

    tetris chore: Bump version to 0.2.0 by grzi (9418e6b) feat: Implement tetris by grzi (a006889) feat: Add basic keyboard inputs by grzi (9e41e0c) feat: ui text and bitmap font (#65) by grzi (e59ae42) feat: basic Parent/Children feature by grzi (9ba3d0f) chore: reorganize modules and fmt (#64) by grzi (9e0f6d4) feat: Timers utils by grzi (ca5a4aa) feat: UiImage and layer rendering (#60) by grzi (55d46b8) feat: Tetris Assets and CONTRIBUTING.md by grzi (eaa1545) feat: Texture blending (transparency) by grzi (9f6380c) feat: Add a way to push/pop layers by grzi (c3c5cb3) feat: switch to json instead of toml & Add an entry point by grzi (64bc15f) feat: Pausable legion systems base on GameState by grzi (feba786)

    Source code(tar.gz)
    Source code(zip)
  • 0.1.0(Mar 20, 2021)

    The taquin release

    This was the first release, made as a POC, where the mini game was a simple Taquin

    GIF TAQUIN
    • fix: Remove windows and macos from ci until open source (e4dcb4c)
    • fix: removed nightly and set dep to what miniquad needs (7047489)
    • feat: Camera and coordinates view in shader (#46) (095eaf1)
    • feat: Re-add missing WindowDimensions resources (de5d567)
    • feat: mouse position in 'inputs' resource (#39) (aaebd67)
    • feat: square component and indexes buffers (12bcdca)
    • feat: renderable2D genericity (e9c762c)
    • feat: Switch to winit and wgpu (#35) (4ad3a49)
    • feat: Add texture material (#30) (b687ecd)
    • feat: Add a file reader and app_path utils (9b8ea3b)
    • feat: Add vertices to the triangle struct (e8e3275)
    • feat: Add transform (#24) (e4a5e6b)
    • feat: add color and basic material (f9d4e09)
    • feat: add layers (#21) (7289e35)
    • feat: addition to the rendering trait and banner (0d2cf27)
    • feat: Renderer Trait, enum and builder fn (c295e02)
    • feat: add WindowDimensions resource and updates (bfb9e42)
    • feat: add WindowDimensions resource and updates (1455949)
    • feat: Switch to miniquad, minimalistic windwing/rendering (e3d1c4b)
    • feat: colored fern configurable logger impl (1d9df78)
    • feat: time and frame limiter strategy (4e6adeb)
    • feat: Window config & replace the loop with winit loop (105de9a)
    • feat: Add a config file reader for the Scion.toml file (c76126c)
    • feat: Add a first Scion App builder with a simple loop (5376115)
    • feat: generate project and add default ci (1ce5dce)
    • fix: Remove windows and macos from ci until open source (e4dcb4c)
    • fix: removed nightly and set dep to what miniquad needs (7047489)
    • fix: Remove windows and macos from ci until open source (e4dcb4c)
    Source code(tar.gz)
    Source code(zip)
Owner
Jérémy Thulliez
Currently working as a backend consultant at @Zenika. Passionate developper. And yes, I love zombies.
Jérémy Thulliez
game engine built in rust, using wgpu and probably other stuff too

horizon game engine engine for devpty games, made in 99.9% rust and 0.1% shell. this is our main project currently. the engine will be used for most i

DEVPTY 2 Apr 12, 2022
3d transformation gizmo built on top of the egui library.

egui-gizmo 3d transformation gizmo built on top of the egui library. Try it out in a web demo Usage let gizmo = Gizmo::new("My gizmo") .view_matri

Urho Laukkarinen 69 Dec 10, 2022
General purpose client/server networking library written in Rust, built on top of the QUIC protocol which is implemented by quinn

Overview "This library stinks!" ... "Unless you like durian" durian is a client-server networking library built on top of the QUIC protocol which is i

Michael 92 Dec 31, 2022
A modern 3D/2D game engine that uses wgpu.

Harmony A modern 3D/2D game engine that uses wgpu and is designed to work out of the box with minimal effort. It uses legion for handling game/renderi

John 152 Dec 24, 2022
Self Study on developing a game engine using wgpu as the rendering API. Learning as I go.

Fabled Engine Any issues, enhancement, features, or bugs report are always welcome in Issues. The obj branch is where frequent development and up to d

Khalid 20 Jan 5, 2023
A novel path-based approach to UI built on top of existing Bevy features

Bevy Lunex A novel path-based approach to UI built on top of existing Bevy features. A recreation of Cyberpunk 2077 menu in Bevy using Lunex Table of

Bytestring 4 Jun 29, 2023
Guide for using gfx-rs's wgpu library.

Introduction What is wgpu? Wgpu is a Rust implementation of the WebGPU API spec. WebGPU is a specification published by the GPU for the Web Community

sotrh 1k Dec 29, 2022
A curated list of wgpu code and resources.

Awesome wgpu A curated list of wgpu code and resources. PRs welcome. About wgpu https://github.com/gfx-rs/wgpu-rs matrix chat https://matrix.to/#/#wgp

Roman Frołow 283 Jan 3, 2023
3d Cellular Automata using WGPU in Rust (for the web and using compute shaders)

3D-Cellular-Automata-WGPU 3d Cellular Automata using WGPU in Rust (for the web and using compute shaders) The branches are very messy... I recommend y

null 18 Dec 18, 2022
My first attempt at game programming. This is a simple target shooting game built in macroquad.

sergio My first attempt at game programming. This is a simple target shooting game built in macroquad. Rules Hit a target to increase score by 1 Score

Laz 1 Jan 11, 2022
Simple profiler scopes for wgpu using timer queries

wgpu-profiler Simple profiler scopes for wgpu using timer queries Features Easy to use profiler scopes Allows nesting! Can be disabled by runtime flag

null 41 Dec 5, 2022
Rustcraft is a simple Minecraft engine written in rust using wgpu.

Rustcraft is a simple Minecraft engine written in rust using wgpu.

Raphael Van Hoffelen 110 Dec 22, 2022
Tic-Tac-Toe on the GPU, as an example application for wgpu

Tic-Tac-GPU A simple (cough cough) example on a tic-tac-toe game with wgpu. Why? Because I didn't find that many small applications which use wgpu as

multisn8 2 Oct 7, 2022
🍖A WGPU graphics pipeline, along with simple types used to marshal data to the GPU

renderling ?? This library is a collection of WGPU render pipelines. Shaders are written in GLSL. shaderc is used to compile shaders to SPIR-V. Defini

Schell Carl Scivally 5 Dec 20, 2022
🦅🦁 Fast, simple 2D text renderer for wgpu

?? glyphon ?? Fast, simple 2D text rendering for wgpu What is this? This crate provides a simple way to render 2D text with wgpu by: rasterizing glyph

Josh Groves 60 Nov 5, 2022
A barebones example of how to integrate OpenXR with wgpu (Vulkan-only)

wgpu-openxr-example a barebones example of how to integrate OpenXR with wgpu (Vulkan-only) It has four modes: cargo run --no-default-features: desktop

Philpax 21 Dec 15, 2022
Solana Game Server is a decentralized game server running on Solana, designed for game developers

Solana Game Server* is the first decentralized Game Server (aka web3 game server) designed for game devs. (Think web3 SDK for game developers as a ser

Tardigrade Life Sciences, Inc 16 Dec 1, 2022
A simple and minimal game engine library built in rust.

Neptune A brand new free, open-source minimal and compact game engine built in rust. Design Goals We plan to make Neptune a small and minimal engine,

Levitate 17 Jan 25, 2023
Tiny cross-platform webview library for C/C++/Golang. Uses WebKit (Gtk/Cocoa) and Edge (Windows)

webview A tiny cross-platform webview library for C/C++/Golang to build modern cross-platform GUIs. Also, there are Rust bindings, Python bindings, Ni

webview 10.8k Jan 9, 2023