TetWiis update (Part 7)

So tonight I fixed some of the bugs around checking whether the squares were empty or not.

First bug was the array dimensions that hold all the squares – stupid mistake really 🙄 !  Once I’d done this, and after drawing a grid on the screen, and writing to a debug log file to check, it all seems to be going pretty well, until I tried to rotate a block on the left, and it went outside the grid, then failed the isEmpty check and stopped half way up the screen! DOH!

So I now need to fix this in the isEmpty check.

Also realised I have a memory leak.  I’m still deciding what to do about it.  It exists because I create a block to move around the screen, and a block consists of 4 squares.  Once the block stops, I create a new one, and then redraw using the squares only.

I can’t decide if I delete the block before I create a new one, what this will do to the squares that belonged to that block.  In theory they should be destructed along with it, so I think I need to just keep a growing list (linked list) of all the blocks used during a game, and then delete/destruct them at game over!

Finally, I’ve added in an offset to move the gamefield over, and I’ve also put a background in place!


TetWiis Update (part 6)

I’ve finally run a test on the Wii now after the best part of a number of days solid coding (spread over a week)

Surprisingly, things aren’t too bad!

tetwiis-wip2

It seems to actually almost play like tetris.

I need to sort out the timer so that the blocks drop automatically, and I need to adjust the offset so it doesn’t start at o,0.  There also seems to be an issue with the redraw function.  I’m not sure what but I suspect it is to do with array counts/sizes.

I’ve had it crash once or twice whilst trying it, so it’s going to take some debugging to resolve all the issues, but hey – it actually works 🙂

TetWiis Update (part 5)

I’m finally working on the game loop/engine.

I believe all the code is done to move, rotate and drop blocks.  Drop only moves one line down and you have to hold it to make it drop, though I’d like to make up do an immediate drop – shouldn’t be difficult, just something on the todo list.

I’ve just started coding the game loop events, all of which seem to be going well so far.

I expect some pain when I come to test this!

Indiana Pwns

Yes – the title is right!

Team twiizers have released a new wii exploit to allow you to run homebrew on the wii.  This is useful if you haven’t been able to get bannerbomb working.

This means that right now we have, in chronological order, the following exploits

Follow the links for more information and downloads.

TetWiis Update (part 4)

All movement code is now complete, and I’m now onto the game engine routines.

All the individual squares of the blocks get added to a 2d array so I can continually draw them.  I’ve not tested this yet and anticipate a few issues around this, but once I’ve got this bit working, I might actually have a ‘prototype’ version that actually plays tetris!

I need to sort out the game states so that there is a start screen/menu, game, paused, and game over states also before I get too far into making it pretty.

This is probably the most complex C++ piece of code I’ve ever done, even beyond all the theoretical C++ crap I had to do at university.  I think years of OO java coding have enforced OO concepts into my brain much more than I understood when I was at Uni, so things are much clearer now I think 😕