kroyee / SpeedBlocks

Fast paced tetris game cloned from Cultris II
GNU Lesser General Public License v3.0
11 stars 7 forks source link

[Discussion] Absolute placement (aka 1 key finesse) #74

Open Zyphdoz opened 7 years ago

Zyphdoz commented 7 years ago

Absolute placement is a control scheme that allows you to play the game using only one keypress per piece. Every key is mapped to a specific column and orientation like this http://i.imgur.com/DnVmf1g.png Pressing X would drop the piece with a 90 degree rotation one column away from the left wall. Pressing C would drop the piece with a 90 degree rotation two columns away from the left wall and so on.

Should this be implemented? Discuss.

zDEFz commented 7 years ago

I would like that idea since the name is called speedblocks and i wish everyone could start from new.

But if we do this we must know first what layout the user uses. Because otherwise the keymapping may not fit.

Just make a checkbox that is graying out other input options except hotkeys and name it 1 key finesse. Add a Dropdown menu where you can select your locale or otherwise auto grab the keyboard layout

ghost commented 7 years ago

I was thinking about this just today and playing with Blitz on Cultris: II :D He was helping me setup 1 key finesse with the use of his AHK (AutoHotkeyScript).

On Sun, Mar 26, 2017 at 7:27 PM, zDEFz notifications@github.com wrote:

I would like that idea since the name is called speedblocks and i wish everyone could start from new.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kroyee/SpeedBlocks/issues/74#issuecomment-289304327, or mute the thread https://github.com/notifications/unsubscribe-auth/AXVJOQCtWkMtOeOuHIcJcoOhcO9Ur6iBks5rpq30gaJpZM4MpcKV .

Noir- commented 7 years ago

I'd not build a user interface for this but a machine interface. This would open up more possibilities not only for 1-key finesse but also bot development while the code remains more clean. (We already have a code cleanliness problem here) If users want to optimize the 1-key finesse, they can implement a simple client for this interface.

zDEFz commented 7 years ago

I don't really get your argument @Noir- We could do something like this and gray the rest out except hotkeys You actually could do it according to you current keyboard locale.

Ticking the Circle activates 1 key finesse and deactivating it grays out other options except hotkeys

2017_03_26_23_17_58_discussion_absolute_placement_aka_1_key_finesse_issue_74_kroyee_speedbl

Noir- commented 7 years ago

Of course we could do it. We can implement everything somehow. That's not the problem. But I'd rather see a very stable, clean coded (In the meaning of: easy to contribute code to it. I argue that is a problem at the moment), user friendly and good looking game than a game with bugs in every feature and without love for the UX. As more features are implemented as more bug reports for it will come. Especially 1-key finesse is a feature which will be barely used by anyone so I'd stick to providing a rather minimalist but stable and hackable core.

kroyee commented 7 years ago

I think it would be fine to add this, but I'm also not entirely sure how much better this setup is compared to "normal" key-binding. Here are a few things that's gone through my head.

From what I understand Cultris has an "anti cheat" detection that forces the user to wait a certain time between each keypress or otherwise the game will assume you are cheating. If this was instead implemented into the game, would it be the case that anyone not using these kind of keybinding would just never be able to compete with the speed of someone who does?

If this is to be implemented I think it should be a strict macro of keystrokes programmed to each button being pressed. The reason I point this out is because me and @Zyphdoz was discussing the implementation of this yesterday, and one thing that came up is that when the playfield is high, these binding would sometime bug because the piece would collide with something.

We then talked about the possibility to make the game decide if a piece could be moved to a certain location ("rotated above" a high stack), to reach the edge for example.

To make it more clear, look at this example Here you could by first moving the piece left, then rotating it, and then moving it again get it to the right edge. So it is possible to get the piece there. How should this scenario be handled?

My personal opinion is that if you have a macro for key-placements like this, it should not have any sort of "smart" algorithm to it that can figure things out. To me that crosses a line where the game is basically making decision for you and by doing so giving you an unfair advantage.

zDEFz commented 7 years ago

What i know is that i didn't learn 1 key finesse yet. So even if i would try i would start as an amateur. I don't think much people can do it, but to learn it with some other beginners would be nice!

Also Autohotkey is less persistent than autoit (registering wrong keystrokes)

kb1900 commented 7 years ago

as someone who has recently started learning 1k finesse, I have to say that i would love to see its implementation in speedblocks.

it should 100% be "macro style" in that the example @kroyee should be impossible to "teleport" youre piece around the wall in the middle of your high stack. 1k finesse, in theory, can achieve very high speed, efficiency, and comfort and this is advantage enough to use it if one is willing to learn it.

Zyphdoz commented 7 years ago

@kroyee I tried to explain to you yesterday it is impossible to achieve correct behavior if you have a strict macro of keystrokes programmed to each button being pressed. Take the S key for example. It's supposed to place the piece one away from the left wall. For an O piece you would have to move left 3 times. For an I piece you would have to move left 2 times. So if you have a strict macro of keystrokes, one of these pieces would end up in the wrong place. This particular case can be fixed by moving the spawn of the O piece one to the left but once you start rotating the pieces you will have the same problem all over again.

It would be possible to hardcode some macros if the program is allowed to choose between different macros depending on that the current piece is. Also, hardcoded macros for everything is not a good idea because look at the size of this https://pastebin.com/StEAwxRg. It would be much cleaner to have one "smart" function that is able to figure out if the placement is possible, and does whatever makes sense in order to place the piece there with a minimal amount of code.

kroyee commented 7 years ago

It would be possible to hardcode some macros if the program is allowed to choose between different macros depending on that the current piece is.'

I think this is the easiest approach.

Otherwise you will have to start by moving the piece to the wall, without using possible() calls, determine that it's indeed in the right position by other means. Then move it as many columns as it should be moved and then after that you would have to make another check to see that the piece can actually be moved from starting position to the found position.

Noir- commented 7 years ago

We could implement a software interface like attached to this post to be not only prepared for 1-key finesse but also for adding bots to the game. Another advantage is that we could outsource this thing to players who are actually interested in this feature. I'd be careful with implementing this right away since for me it's very unclear how useful it would be. screenshot_20170327_135754

kroyee commented 7 years ago

Yes, I think this approach would be great. Solves all cases and let's the people who are interested take care of it in an easy way.

Noir- commented 7 years ago

I added the "help wanted" label so feel free to contribute by implementing a interface for this in the client for all our fellow macro and bot coders!