Tetris game by Igor Pro
A Tetris game by Igor Pro. All basic functions of a tetris game are realized such as automatic level upgrade.
Now you can have a try and see how many points can you get?
I can get about 7000:)
Some things you my be intersted at:
1 The tetris panel and blocks are simulated with a matrix and a curve.
2 The shape and movement of blocks are simulated both by an extra color wave and customolized markers.
3 Igor behaves really amazing: the graph window can always immediately respond to background data changes( the matrix size is 10x20,the curve is also 200 length) without any delay.
A small problem:
If I play a action sound(such as the sound when you clear one line of tetris), the background music have to be stopped. The PlaySound command can only play one sound at one time. Currently I dont find any way to work around this problem.
Project Details
Current Project Release
Release File: | tetris5 .pxp (2.95 MB) |
Version Date: | |
OS Compatibility: | Windows |
Forum
Support
Gallery
Igor Pro 9
Learn More
Igor XOP Toolkit
Learn More
Igor NIDAQ Tools MX
Learn More
Looks great! ?
August 28, 2021 at 10:43 pm - Permalink
Very nice! Just a small nit, space does clear the screen here and does not drop at once.
August 30, 2021 at 11:23 am - Permalink
Needs 2 changes:
String ctrlName
Button $ctrlName, disable=2 // so that the space key doesn't restart the game
startgame()
End
Function endgame()
ctrlNamedBackground task1,proc=RunningGame,stop
ctrlNamedBackground task2,proc=playbg,stop
wave bg0
Playsound/A=2 bg0
Button button0, disable=0 // allow restarting the game
End
August 30, 2021 at 06:39 pm - Permalink
In reply to Very nice! Just a small nit,… by thomas_braun
After starting, the input focus is on the start button.
So a mouse click at the playfiled is needed to redirect the it to the graph window.
This is of course not "good"!
I thought to put the button on a panel bar and use SetActiveSubWindow to avoid this problem... yet not have implemented.
Apparently JimProuty's method is better. I have updated it acordingly.
August 30, 2021 at 08:56 pm - Permalink