Category: Programming
-
Tetris 03 – Board scene
Create a new Node2D scene. Rename the Node2D to ‘Board’. Save the scene as ‘board.tscn’ Attach a script to the ‘Board’ scene and save it as ‘board.gd’ Open the ‘main.tscn’ scene. Right-click ‘GameRoot’ Node and select ‘Instantiate Child Scene…’ – Select ‘board.tscn’. Click ‘OK’. At this point, our ‘main.tscn’ should look like this. Save ‘main.tscn’.…
-
Tetris 02 – Main scene
Create a new Node2D scene. Rename the Node2D to ‘Main’. Now add a Node2D node to ‘Main’. Rename the new node to ‘GameRoot’. Your scene should now look like this. Save the scene as ‘main.tscn’ Attach a script to the ‘Main’ node and save it as ‘main.gd’ Introduction
-
Tetris 01 – Create project
Open Godot. Click ‘Create’ in the top-left corner. Name your project – ‘Tetris Game’. Select your project path. Then click ‘Create’ Introduction
-
Setting up a python virtual environment in Linux bash terminal.
My development platform Python venv setup in my platform February 8th, 2025 – Updated to python 3.13 I will be explaining the venv setup as off python 3.4. Tested and verified with the newest python 3.13. Let’s jump right into it. Open a terminal window. To get the latest python builds I use the ‘deadsnakes’…
-
Parsing xml file in python
Today I’m going to show you how you can relatively easy parse and extract data from xml files, using the standard xml module. The xml document we’ll be parsing has the following structure. Start by importing the xml.etree.ElementTree function.Then define a function to parse a xml file. The expected output would be something along these…
-
Desktop application using pyqt6
To start with, it’s recommended to do this in a virtual environment. For information on how to set this up on linux mint 21.2, see this post Going forward I assume running python 3.11 in a venv. So in the virtual enviroment, install the pyqt6 module. (p3.11)someone@somewhere:~/venv/p3.11$ python -m pip install pyqt6 Now we create…