tetris2022's People
tetris2022's Issues
Block collision
When a block collides with any tiles on the gameboard (that aren't owned by this block), the block effectively disbands and the tiles become static.
*SPIKE* Investigate and select a framework for graphics and windowing
There are a few libraries we can leverage for graphics and window management.
We need to do some googling and select one.
Best candidate is probably not necessarily the most feature-complete, but certainly one which we can quickly setup and get the ball rolling with.
Block implementation
Tetris won't work without grouping tiles together into their full-blown tetris blocks.
Go ahead and implement the basic skeleton for blocks, or groups of tetris tiles.
- The datastructure, along with some helpful helper functions.
- One way or another, a block will have to have its tiles mapped onto the gameboard.
- Blocks should be able to "rotate" their grouping of tiles on the game board.
Implementation notes:
The datastructure itself could either be via abstraction, with each type of block being made by inheriting the base.
Alternatively, it could use composition, where there is a single Type (think: class, but rust doesn't have a notion of "classes") for a block, and helper functions which create the different types of blocks using this Type.
Tile datastructure
We need a way to store some information about individual tiles, or blocks that make up the tetris pieces.
Some things such as:
- Color
- Position
'Hold block'
The player should be able to 'hold' the current block upon pressing a key, which stores this block for later use.
Upon holding a block, the next block should spawn.
To retrieve the previously held block, the player should hold the current block which effectively swaps the held block and the current block.
Need to prevent exploitation of this. If the player rapidly presses the key to hold the current block, then the blocks will avoid falling down and thus giving the player extra time.
'Next block' preview
The player should have the ability to see what the next block will be.
Tile representation
Gui
Implement a gui for the game, including a highscore table, an options menu, etc.
Draw gameboard
We need to draw the game board's background and any other graphics associated with the playing area (ie, borders)
Render tiles
We need to be able to visually see the tiles (or individual pieces of the tetris blocks) in the game.
They should be drawn at the appropriate x/y position on the gameboard.
New blocks
As a result of the collision implemented in #11, once a block is disbanded a new block should spawn in at the top of the gameboard.
Create rust project
We need to scaffold the rust project and add it to this repo.
Board representation
Sound
Add in background music and sound effects.
Datastructure for the game board
We need a data structure to represent the game board.
Something to keep in mind when implementing this is that the board needs to be mutatable and provide line clearing functionality.
Level clearing
When a row on the gameboard is completely filled with tiles, it should clear the row and all tiles above (except those owned by a block) should be moved down by a single row.
Highscores
Save highscores.
"Falling" blocks
Blocks need to be able to fall down the gameboardm, as if with gravity.
Ensure block rotation doesn't break as a result of this story's work ๐.
Player controlled block movement
Blocks need to move left/right with player input, as well as rotation.
Game progression
As the player's score increase, so does the fall-speed of the blocks.
Basically make the game more difficult as the player scores points.
We can do this linearly, for each row the player clears increase the speed.
Or level-based. For every x rows cleared, the player increases the level. Each level then has a significant increase in speed.
Remember to render the level the player is on somewhere?
Score
We need a scoring system.
Traditionally, the player receives points for clearing lines.
Also render this score on the screen somewhere.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.