Tetris Update

Excellent meeting.

Check out the SVN for the 2 source files. PatchTetReload.cpp is the new gameplay functions to work with the graphics a bit easier.  Tetdisplay.cpp is the main function that needs work for OpenAL (audio). main.cpp is the current working source file where the functions from Patch work with (can be easily changed with Tetronimos, but I used this just for my benefit since it holds each individual pieces in the blocks rather then just one coordinate), but that is where the textures need to be worked on.

Most important is to get the textures and audio to work. Take a look at main.cpp for textures, and Tetdisplay.cpp for audio. Besides the OpenGL and OpenAL addons, there’s nothing else to add but the sources (again all gameplay functions I just made them as functions for main rather then a seperate class for ease of use).

For textures:

  •  Get a working texture on screen
  • Work with textures bigger then 256X256
  • Load and properly use JPG, BMP, and PPM files

For audio:

  •  Fix all linking errors between OpenAL and Visual Studio

All that done then the last things we would need are:

  • Add the score text in the boxes.
  • Add Jim’s wonderful flash beginnings to the start of the game.

After all that said and done, we can start throwing out ideas for our next project! Wouldn’t that be fun!

Happy programming!!!

2 thoughts on “Tetris Update”

  1. There is another problem. I don’t think you took into account making this cross platform, headers like windows.h won’t work on other systems. So a new task would be to clear cut the code for anything proprietary, to make it platform independent.

  2. For main.cpp the only things that would use windows.h is under loadBackgroundTexture under creating a BYTE variable. Since this is under texturing and textures aren’t working then the use of windows.h is not important once we find out how to properly get textures working, so that can be fixed while figuring out how to receive the data from the image file properly (this is will be under reading a JPG/BMP file). You can comment out windows.h and loadBackgroundTexture and any calls to it and it’ll still work.

    Unfortunatly if we want to use OpenAL then platform dependency will happen. Some of the function calls are different between Mac OS, Windows, and Linux, for example the function to load the wav file (alutLoadWAVFile) has different parameters on different OS’s (I commented that on tetdisplay where it says “// For Windows”).

    Other then that OpenAL is the only thing I see that will give us platform dependency problems. Well maybe adding the Flash animation, dunno yet how that will be handled

Comments are closed.