09-12-2005 01:46 PM
09-12-2005 01:57 PM
09-12-2005 02:06 PM
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus
09-12-2005 03:28 PM
Sheldon:
You may also want to upload it to the games area:
http://www.ni.com/devzone/lvzone/games.htm
09-12-2005 04:24 PM
09-13-2005 08:04 AM
09-13-2005 08:05 AM
09-13-2005 08:25 AM
Nice share Sheldon!
I have included this thread in the examples listed in the Picture Control discusion that can be found here.
http://forums.ni.com/ni/board/message?board.id=BreakPoint&message.id=899
I appreciate your posting!
Ben
09-13-2005 08:57 AM
I don't have imaq, and I wanted to build this game...er...tutorial using only the basic LabView elements. I initially started using picture controls to make a block which was faceted and was comprised of a filled rectangle for the top. I drew 8 lines around this rectangle set to lighter and darker colors to simulate the lighting of the facets. The pieces made from these blocks looked really good. I created a sub-vi to create the block of a given color. I then drew the board by converting the block picture to a pixmap, then I unflattened the pixmap, and redrew the block at a specified position using "Draw unflattened pixmap". This worked, and looked quite nice. But the flattening and redrawing took too much time for this application. The board was changing (in the mathematical model) while the last state was still being drawn.
I couldn't find a quick way to do what I wanted to do without going through the flattening kludge. This method also seems quite slow in terms of performance. I guess that imaq provides a lot greater pallet of drawing functions that would solve my problem. However, LabView seems quite slow at doing these sorts of drawing tasks in general, which is unfortunate.
BTW, I'm working on a network based Pong game...
Sheldon
09-13-2005 09:10 AM
Hi Sheldon,
It sounds like you may be able to compute the images of the blocks ahead of time so that the cumbersome work is only done once. Then while the app is running it just has to to grab the "picture ready" images and stick them were they are required.
I hope this helps and thank you for sharing!
Ben