Git Product home page Git Product logo

tetris24h's Introduction

Tetris24h

Purpose

To build a mostly fully featured tetris game in 24 hours of work. This work will be spread out through 3 days lasting no more than 24 hours.
The project will be timed with a modern clock.
The project must be built from scratch with no additional SDKs or APIs other than the Windows API since it is required to create a window and access audio. The C++ standard library makes calls to the OS for certain functions such as threads so avoiding the Windows API would be basically impossible. Anything that can be done without the Windows API such as rendering must be done from scratch.

Tools

The tools used are as follows.

  • git
  • cppPS
  • Windows API
  • VSCode
  • Clang
  • Ninja
  • Windows Alarm Clock app
  • Live Split
  • Mixcraft 8 Pro Studio

Remarks

With the project officially finished, there are things that I wish I had done originally that would have helped the project along the way.
The project had decent direction but there were too many first time attempts for different functionality.
Scale, Rotation, and Skew for images took a considerable amount of time and did not get used due to a change in how the pieces
were to be rendered. The audio was meant to take a different approach than what it ended up taking.
The approach taken was unknown territory as well and also took a considerable amount of time.

AI is something I do not have enough experience with to attempt to create one for this project and my knowledge of tetris
is not good enough to create a believable AI for it. Some compiler debug settings would have assisted in debugging as the project
went along but did not get used until around the end of the project.

Because of these things, I think if I had not wasted as much time as I did on the additional Image Drawing function and used the right
compiler settings from the start, I would have finished in 24 work hours. I do not think I would have had enough time to create an AI.

The requirements were a bit much for 24 work hours with much time spent researching how to do different things.
Approxiametly 5 hours was spent on just getting audio to play and about 1 or 2 hours was spent creating the song.
Had I picked a simpler method for playing audio foregoing the need for audio adjustments, time on audio would have been at most 3 hours.

I still consider this project to be successful even though the version finished in 24 hours is borderline playable.
2 versions of the application are availiable as releases.
The 24 hour cut off mark and the more polished version which added 5 1/2 hours of development.

Note that the application may be removed for potentially being a virus. The application can be compiled from the source code using the tools listed.

tetris24h's People

Contributors

davidah121 avatar

Watchers

James Cloos avatar  avatar

tetris24h's Issues

Start of Audio programming

Implement a method to play sin, saw, sawtooth, and square waves at different frequencies and volumes. Must be on a separate thread.

Finish art assets

Any art that was not finished or needs to be added should be added.

Image Loader

Implement an image loader that reads a .bmp file. Let the color 0x000000 be alpha.

Create Title Screen

Should have a quit button, 1 player and 2 player button. Options button would be nice to control overall volume.

AI player

An AI that can play with the player in 1 player mode. Does not have to be perfect but must seem like a player. Potentially have difficulty levels.

Add Board Object

Add an object that maintains the tetris block and checks for a line of completion. Removes blocks when a line is completed. Validates if a tetris block can proceed. Adds an attack or defense when a row is cleared (Settled through points).

Create Window

Should be able to render to it, get input, close it, and it should be separated on a different thread.

Add global game controller

Manages who wins and who loses. Manages the time step of the game. Manages the tetris blocks that are added. Manages the attacking mechanic.

Add Tetris block

Contains an array of structs called SingleBlock. The array is 3x3. Contains functions to rotate the object, and move the object.

Image Rendering

Implement a method to draw an image that can be scaled or rotated by increments of 90 degrees. This will include a method to draw a rectangle due to its similarity and ease of implementation.

Add player object

Should have a function to save tetris block, move tetris block, and rotate block. The controls should each be a function (For AI purposes).

Background Music

Create the iconic Tetris A theme and have that play during the game.

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.