Coder Social home page Coder Social logo

bevy_dev_console's People

Contributors

doonv avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

Forkers

godnoken

bevy_dev_console's Issues

Entity Queries

Currently, you cannot access entities properties. In order to access entities properties we will need entity queries. Entity queries will be a built-in parser feature that will allow you to query the entities you choose and modify them.

Design

Todo list for the design of the entity queries.

  • Design the syntax.
    • Id queries
      • This should probably be just the entity id, very simple.
    • Single queries
      • Queries for a single entity and provides access to all of their components.
    • For-each queries
      • Queries for a group of entities based on their components and executes a command on each of them.
  • Figure out how to create dynamic reflection-based queries at runtime.

Implementation

After the design has been finished, we can start the implementation.

  • Parsing
    • Id Queries
    • Single queries
    • For-each queries
  • Execution
    • Id Queries
    • Single queries
    • For-each queries

Additional number types (and type inference)

Currently, the built-in parser only supports f64 numbers.

We can easily separate numbers into f64 and i64s by if they have decimals or not.

But what about other sizes? This is where it gets a tad complicated because we want type inference. Technically we don't need type inference but needing to specify the type of a number every time gets annoying pretty quickly.

Solutions

Rust uses whats known as a Hindley–Milner type system, but the Wikipedia article about it seems quite complicated. So I think that's a no-go (unless someone else decides to contribute it in, help would be appreciated)

An easier approach would be to look at what the function/variable assignment is expecting and use that, if that doesn't help then default to i32 / f32.

Remove todos

As of writing this, there are 60 instances of the todo keyword in 10 files. These todos should be solved eventually.

Loops: for and while

What problem does this solve or what need does it fill?

There is no way to create loops.

What solution would you like?

Add for and while loops.

This is a low priority feature.

Improve parser (and lexer) errors.

What problem does this solve or what need does it fill?

I've implemented proper error messages and span highlighting with CommandHints for the runner/executor's error messages. But I haven't done this yet for the parser and lexer.

What solution would you like?

Implement proper error messages and span highlighting for the parser and lexer.

Pressing shift causes mouse scrolling to not work

Pressing/Tapping the Shift key causes mouse-wheel scrolling to not work.

Causes

  1. Pressing the Shift key causes Bevy's input system to think the key is still pressed even after releasing this, this will be fixed by bevyengine/bevy#10702. When Bevy 0.13 releases.
  2. Holding the Shift key causes egui to turn the vertical scroll into a horizontal scroll, but since the console window cannot scroll, it does nothing. (emilk/egui#3624). When bevy_egui updates to a version of egui that includes this PR.

Tuple Indexing

What problem does this solve or what need does it fill?

You cannot index specific elements in tuples.

What solution would you like?

Add the ability to index specific elements in tuples.

This is a bit difficult due to Expression::Member only taking in identifiers. We would have to split the String type to support more types of indexing. Bevy Reflect's Access type could help with this, but it will be private until bevyengine/bevy#11029 gets merged. So in the meantime we will have to use our own type.

Tuple and StructTuple types

What problem does this solve or what need does it fill?

  1. There are no tuples in the built-in parser
  2. There is no way to set tuple variants in enum resources.

What solution would you like?

Add Tuple and StructTuple types.

Lists/Vectors

What problem does this solve or what need does it fill?

There are no lists/vectors in the built-in parser. And no way to access vectors in reflection contexts.

What solution would you like?

Add Lists/Vectors.

Add Functions/Closures

What problem does this solve or what need does it fill?

There is no way to make your own functions/closures inside the built-in parser.

What solution would you like?

Add a way to create your own functions/closures.

I think only implementing closures is actually the right move, mostly because its less work.
But I also kinda prefer the closure syntax for creating functions in a console. Heres an example:

my_func = |a| a + 5
my_func 5
> 10

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.