GithubHelp home page GithubHelp logo

Tetra 0.7 about tetra HOT 4 CLOSED

17cupsofcoffee avatar 17cupsofcoffee commented on June 10, 2024 3
Tetra 0.7

from tetra.

Comments (4)

tesselode avatar tesselode commented on June 10, 2024

My thoughts:

  • Find a way to make graphics settings not rely on global state (blend mode, stencil state, etc.)
  • Rename functions like get_window_size to just window_size (more idiomatic naming in the Rust community)
  • Change API to use mint instead of vek

from tetra.

17cupsofcoffee avatar 17cupsofcoffee commented on June 10, 2024

Find a way to make graphics settings not rely on global state (blend mode, stencil state, etc.)

Good call - I had a go at trying to implement something like Love2D's state stack before and trying to do it in a non-breaking way seemed like it'd be an absolute nightmare. Can't guarentee I'll find a nice solution for 0.7, but I'll give it some thought (if you have any ideas of what this API could look like, I'm all ears!)

Rename functions like get_window_size to just window_size (more idiomatic naming in the Rust community)

This is definitely idiomatic for field getter methods on a struct, but I'm less sure what the consensus is for free functions? I'll have a look at what other libraries do there.

Change API to use mint instead of vek

I'm open to this if it doesn't make the API more awkward to use - I've never really tried mint so I don't know how it works in practice!

from tetra.

tesselode avatar tesselode commented on June 10, 2024

I've never really tried mint so I don't know how it works in practice!

In ggez, functions that take vectors or other math types are generic and they let you pass in anything that implements Into<mint::Vec2> (or the appropriate mint type). That way you can pass in types from any library that has mint support.

from tetra.

17cupsofcoffee avatar 17cupsofcoffee commented on June 10, 2024

I think taking mint types as parameters would be okay, the bit I'm less keen on is the cases where we return stuff like Vec2 - could be a bit gross to have to convert the return value back to your own type every time. But might be worth it for the improvements elsewhere, I'll give it a go and see how I feel about it :)

from tetra.

Related Issues (20)

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.