Kodi Community Forum

Full Version: Tetris!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
Hi all,
I've been working on this a bit and thought I'd try to generate some hype about it Smile I still have some weird threading issues with my timer but I think I know a workaround.

The look was inspired by OSX widgets and I kind of think it might be cool to create a dashboard-like interface for XBMC where widgets can be moved around and added/removed relatively easily. I havent actually done this yet but am considering it.

I guess to make this a real widget I would make it smaller. What do you all think of the idea? I still have some layout issues with this but the final version will look pretty close. I guess if there are going to be more widgets on the screen I should make it smaller...
Image
Gah ... wheres the edit post button when you need it?
really cool!!, maybe you can add a online score feature. Combine with snake and space invaders (xbmc's gamercard). HEHE. Rolleyes
Good thinking... sent rockstar a PM.
Awesome!
I was waiting for this! Big Grin
You will get PMed...
I guess I did mention this a long time ago... man I've been away for a while... As far as the widget system goes, I'm going to have to give a lot of thought to a management interface. I have a half finished Sudoku script I can turn into another widget probably...

I don't suppose anyone knows a way to get at input from the analog thumbsticks?
Asteron Wrote:I don't suppose anyone knows a way to get at input from the analog thumbsticks?

like this?

Left ThumbStick 264
Left ThumbStick Button 276
Left ThumbStick Up 280
Left ThumbStick Down 281
Left ThumbStick Left 282
Left ThumbStick Right 283

Right ThumbStick 265
Right ThumbStick Button 277
Right ThumbStick Up 266
Right ThumbStick Down 267
Right ThumbStick Left 268
Right ThumbStick Right 269
nice script, will this be in svn anytime soon?

you can see an example of the left thumbstick by downloading ambient light control pad here where you uploaded the cnn script

http://xbmc-scripting.googlecode.com/svn/trunk/

Donno just added better support for them. (Angles)
Just put v1.0 into SVN... I'm considering this RC1 and would definitely like feedback... Especially on sounds, color scheme, etc.

I gave the scoring alot of though

Every 15 lines you level up (speed increases by 40%)
Every clear is LEVEL * ROW^2 (clearing 4 lines at a time is optimal efficiency)
At level up you get level * 15 bonus (almost as good as clearing 4 lines)!

I would like to know if you think the speed increases too slowly or quickly.
Works nice.

I just had some freezes when I used the right trigger to "slice" a block down.
And I would change the button layout to make it a little bit more intuitive.
X for rotate left, B for rotate right and down to move a block down a step for example.
I always press the wrong buttons Blush
Ohh yeah the triggers... those were originally for testing before I got the timer working.
Im doing all my recent dev on the laptop. I think originally I was going to keep B for exit but I guess back will do fine.

Do you think it makes sense to have two drop buttons? One to drop all the way down and one that will drop to just a little off the ground so you can slide it in?
Yes definatly.
Sometimes you have to switch a block sidewards on the ground to get it to the right position.
AlTheKiller in IRC informed me he has been working on his own tetris script and showed me this great database...
http://www.tetrisconcept.com/wiki/index...._Guideline
I won't be going with everything but I will employ the standard controls... also my field is too wide! I should be 20x10 and not 20x11. Thats what I get for not counting carefully.
Yay! Ok I finally figured out that thread bug. Apparently the main thread of XBMC (or at least whatever thread calls onAction) CANNOT be blocked waiting for a lock. It absolutely hates it! The fix is to spawn a new thread that does the real action handling and let the main thread return. Very very lame.

But this fix makes the program rock stable right now and MUCH more responsive. Before I was dropping actions like crazy to avoid deadlock but with these threads thats not a problem. I also changed the controller controls and fixed the width problem. Please try out the SVN copy! I think this might have just gone gold Smile

Code:
    def onAction(self, action):
        def SubProc(view,action):
            view.onActionProc(action)
        
        thread = threading.Thread(target=SubProc, args=(self,action))
        thread.setDaemon(True)
        thread.start()

    def onActionProc(self, action):
        lock.acquire()
You need to work on your changelog entries. Smile

Nice game, well done.

The MAME versions use A and B to rotate. I wonder if for games you should make the buttons configurable?
Pages: 1 2 3 4