Giter Club home page Giter Club logo

emerald's People

Contributors

bombfuse avatar gcardozo123 avatar milimthetrueone avatar nezvers avatar psteinhaus avatar sapir avatar yuvitz1 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  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  avatar

emerald's Issues

Memory Leaking

This has been a problem since the beginning of the project. Whenever an asset is loaded, it is never release.

Need to find a way to count the number of reference to an asset in the cache, then release it when there are no references to it.

This should ideally not break the current Api, where a user is able to clone handles to textures and sounds.

Keep2d scalar

Keeps that aspect ratio of the game, draws borders on top/bottom left/right when necessary.

Add Touch API to Input Handler

Something like

let touches = emd.input().touches();

where touch is

struct TouchInput {
   id: usize,
   point: Position,
}

and you can check for drags easily with

struct TouchDrag {
   previous_points: Vec<(Position, f32)> /// f32 is the amount of time elapsed before the previous point
}

let touch_drag = emd.input().get_touch_drag(touch.id).unwrap();

Audio Engine

Audio is currently not implemented.

  • Loading/parsing audio files
  • Playing audio files

Aseprite

  • Parse out aseprite animations
  • Rendering Engine needs to correctly draw/animate aseprites based on their selected animation.

Make packing assets simpler

I have probably about 600 lines of code just packing game assets into the binary. This is extremely tedious and eats up more time than I'd care to admit. Make this easier.

Idea 1: Asset packing macro

#[pack_assets("./my_assets/folder")]

Packs all assets in the given folder into the binary using include_bytes!()

Reading/writing to user directory

When a file save is attempted to the default user directory for each platform, it should attempt to create the default user directory if it doesn't exist.

Default user directory should follow this format platform_unique_save_data_path/crate-project-name/.

Hot reloading assets

Hot reloading assets during development is a big quality of life improvement, we should add a feature hotreload that tracks asset files.

Sprites - Track texture files, reload them in the rendering engine on change.
Aseprites - Track both animation files and sprite files, reload them in the rendering engine on change.
Sounds - Track sound files, track sound progress, reload them at the point they were playing at on change.

Abstract out all backends into "Runners" and public traits

I want everything to be plug and play.

emerald-core will be the core API.

emerald will be the default implementation of the engine.

Users should be able to swap out emerald for emerald-core and be able to plug in their own implementations for Rendering, Audio, and Input.

Modular

  • --no-physics
  • --no-world

No reason for people to deal with code they don't use.

Update README

Currently out of date, need to update Assets section and pack_bytes section

Server only

Need to be able to run Emerald without graphics. This means creating an abstraction over miniquad, and having an implementation that opens a window and draws, and having an implementation that only updates.

Hotreload Fonts

Same functionality as hotreloading textures, but for fonts

platform icons for dark theme

This is a very minor thing, but as a dark theme user, looking at your repo I noticed that the icons for the supported platforms are nearly invisible for me (and other dark theme users).

Since I was already fiddling with them for something else I took the liberty to add a white background, if you're interested: icons.zip

Conditional code for WASM

Packing textures/files isn't necessary for almost anything but WASM. The "pack" API and loading from memory should happen only if the target is WASM.

Fonts

Need to be able to render a font via a Label component.

Need to rasterize fonts into font textures, then based on characters in a string, render portions of the texture in sequence.

Remove paintbrush dependency

Paintbrush should really just be a color mod inside of emerald. No need to download to another crate and waste compile time.

Automated Asset Cleanup by Reference Counting

We can store an Arc<Asset> in each FontKey & TextureKey. This allows use to create a feature autocleanup, which checks the reference counts for each asset store in the engine. When the reference count hits 1 (the engine itself is referencing the asset), then the asset can be safely freed.

This will be hidden behind a feature because it's very possible that a user would never like their assets to be freed until the application exits. Additionally, this feature is essentially an asset garbage collector which some users may dislike.

Tilemap Component

Tilemaps are an essential feature for many engines, Emerald needs an easy to use Tilemap component.

This tilemap should be easy to use directly, and easy to wrap over it.

let mut tilemap = Tilemap::builder()
.with_size() // Default: Vector2(100, 100)
.with_tileset() // Default: Default texture
.with_tilesize() // Default: Vector2(32, 32)
.with_spacer() // Default: Vector2(0, 0)
.build();


// Set the tile at 0,0 to the tile of index 1 in the tileset
tilemap.set_tile(Vector2::new(0, 0), 1);

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.