Coder Social home page Coder Social logo

brian-catcow-b / tetrisn-t Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 0.0 5.36 MB

Multiplayer Coop Tetris with a max of 64 players all on one playfield; also an alternate gamemode: Rotatris

License: Other

Rust 100.00%
tetris-game cooperative-game gamepads keyboard-control-schemes rust xinput-controller

tetrisn-t's People

Contributors

brian-catcow-b avatar wcampbell0x2a avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tetrisn-t's Issues

piece colour (before snap)

It would be helpful if pieces had specific colours, to help with lookahead. The colourscheme can be nintendo, tengen, or whatever you want, I'm sure you can find a logic behind that choice.

However, I think it's nice that the board is a single colour (like in Tengen I think), because it helps thinking about the actual state of the board, and not about the “history” of how it came to be. (I hope this makes sense!) So I'm recommending specific colours only before pieces snap.

fix game quit

the “down + cw + ccw + esc” action doesn't work for me (also it's super awkward!)

I suppose a simple resume/quit selection screen in the pause menu would be better

piece change feedback

The game is missing some kind of visual feedback to help the user feel the timing for piece snap and piece change. This makes slow play feel a bit weird imo. (Like you're waiting for something to happen as the piece locks in place.)

Controls and overall feel are nice at high speed though.

Line clear feedback

Biggest gripe: please add some kind of visual feedback when lines clear! It feels so weird to have no feedback that my heart skips a beat every time hah

Crash on mouse over window

On master and dev, the game crashes anytime the mouse is over the window (either at startup or later):

thread 'main' panicked at 'attempted to leave type `platform::platform::x11::util::input::PointerState` uninitialized, which is invalid', /build/rust/src/rustc-1.50.0-src/library/core/src/mem/mod.rs:659:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Controllers implementation

  • Make separate controls texts for gamepads vs keyboard
  • Add to control.rs an array of gamepad_profiles and change the vector of keyboard controls to an array with (Option<...>, Option<u8>)'s
  • Implement gamepad stuff into game.rs, setting the first GamepadId detected to the lowest index player with profile 1, second GamepadId detected to second lowest index player with profile 1, etc.
  • Change location of redundant key error
  • Update README for controller specific stuffs
  • Add redundancy checks within each profile building process
  • Add a check for unknown button/axis, cite README

My code is broken

Option<> wrappers are the bane of my existence, but it's necessary to use them when adding completely different states the program can be in (or at least it works really well this way, lmk if I should use something else). Branch: main_menu. Errors:

temporary value dropped while borrowed
cannot move out of `self.game.0` which is behind a mutable reference
cannot move out of `self.menu.0` which is behind a mutable reference
temporary value dropped while borrowed
cannot move out of `*state_returned` which is behind a shared reference

and more! very exciting...

TODO's

1. Make a game over thing that quits to main menu when ESC is hit
2. Make pieces auto fall at a speed based on the current level and move down every other frame if down is held
3. Implement DAS left and right (difficult)
4. Level up on enough line clears and make text appear for lines cleared and for current level
5. Make the Vec<ControlScheme> be stored as part of Control so that it survives after each game (or maybe store the other type that is used to build that)
6. Implement GamePads (see gilrs)
7. Config file to hold the control schemes
8. Save file to hold scores (and replays someday?)
9. Fix yet another line clearing bug (2 tetrises scored one right after the other, but not after the clear delay is up for the first)
10. Make pieces random
11. Fix weird thing with saving controls
12. Test DAS more and make sure that it's right
13. Add changelog file

Blurry image?

When made large, the board seems to be blurred.
This can probably be fixed by scaling the tiles to their correct tile size and placed in their relative positions as they're added to the sprite batch as opposed to scaling the whole sprite batch after drawing the board with a tile size of 8 pixels.

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.