Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jakubekgranie/wpf-tetris
"wpf-tetris" is my adaptation of Tetris based on XAML and C# languages, embedded in WPF.
https://github.com/jakubekgranie/wpf-tetris
csharp tetris wpf xaml
Last synced: about 2 months ago
JSON representation
"wpf-tetris" is my adaptation of Tetris based on XAML and C# languages, embedded in WPF.
- Host: GitHub
- URL: https://github.com/jakubekgranie/wpf-tetris
- Owner: jakubekgranie
- License: mpl-2.0
- Created: 2024-11-13T13:38:58.000Z (2 months ago)
- Default Branch: master
- Last Pushed: 2024-11-26T00:07:52.000Z (about 2 months ago)
- Last Synced: 2024-11-26T00:25:54.947Z (about 2 months ago)
- Topics: csharp, tetris, wpf, xaml
- Language: C#
- Homepage:
- Size: 58.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# wpf-tetris
(C) jakubekgranie 2024. All rights reserved.1. Introduction
"wpf-tetris" is a Tetris game implementation made by jakubekgranie on GitHub, issued as a school assignment. The project features C# and XAML languages. The user interface framework used is WPF (Windows Presentation Foundation).
2. The game
The objective of the player is to gather as many points as possible until the game ends by overflow. On a grid of chosen dimensions, they must align the incoming shapes into horizontal lines by rotating, swapping and vertical movement. The more score you have, the harder the game becomes, but fortune favors the bold...
3. The level system
The formula
The points are added using the formula below:
points = previous + amount * horizontalMultiplier * level,
where previous equals the past total score, amount is the unparsed amount of points, horizontalMultiplier is a temporary multiplier growing with consequent horizontal lines detected in one scan and level is responsible for level achievement gratification.
Acquisition
How to get points (unparsed):
- horizontal line creation - 500 points
- Voluntary block descent - 2 points
- Voluntary block descent (full) - 2 * empty spaces traversed points
Level thresholds
Each level threshold can be calculated using the formula below:
threshold = previous + n(1000 + 200 * level),
where previous is the previous threshold, n stands for the number of iterations and level is self-explanatory.
Timer intervals
Timer intervals are relative to the current level, and trigger automatic block descent, see the formula below:
time = 1250 - 150 * level,
where level is self-explanatory.
The unit of time is ms (milliseconds).
4. Controls
-
A - Move to the left -
D - Move to the right -
-> - Rotate to the right -
<- - Rotate to the left -
S - Voluntary block descent -
Space - Voluntary block descent (full) -
Z - Swap (TBD) -
F5 - View save manager -
F9 - Reset
5. Internal documentation excerpts
TBD
6. License
See LICENSE.txt.
I, the creator of the project, reserve the right for proper notification of this project's external usage and denial of such.
Visit jakubekgranie on github for more awesome solutions!