First steps


After two years working on my first project, I decided to go for something simpler now. Hopefully something I could finish in a couple of months.

I had this idea for a Wordle-like game with a few twists and it seemed small enough to take the role as my new project; specially after I found a nice tutorial that went through the creation of the Wordle mechanics themselves. All I had to do was add the onscreen keyboard, and then I'd be free to think of the different "challenges" that will slightly change the core mechanics on each stage.

For the keyboard, I chose to do it by code, which I assumed would not only be quicker, but also a more elegant approach.

So, I created a Control node composed of one VBoxContainer and 3 child HBoxContainer, each one row of keys:


Then, I created an array with all of the key values:

var keys = [["Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P"],["A", "S", "D", "F", "G", "H", "J", "K", "L"], ["entr", "Z", "X", "C", "V", "B", "N", "M", "bksp"]

So, keys[0] contains all the keys for the first row and so on. After that, I used "for loops" to add each key, consisting of a buttom, a label with the text equal to the key value and a panel for the background color.

-- Was it easier than creating the keys manually?

-- Definitely not.

-- Is it more elegant?

-- Hell no!

But now it's done...

Leave a comment

Log in with itch.io to leave a comment.