Recently I’ve pressed the ‘reset button‘ in my plans for my future. I’ve seen, and heard, a ton of interesting things which has led to me needing this recent break.
Without dwelling on how I’ve started to defend myself, finally, I’d rather focus on the positives. The short and sweet version is that I’m improving myself for the future again. Part of that happens to be registering for new courses, to get certifications past my matric, and part of it is feeling better about my personal projects again.
Today’s Goal
What I chose for step 1, happens to be something minimal. My one course, to feel better in general, is giving me the crash course in Godot 4.3. I used to use Unity, for my games, even swapped to MonoGame to try reliving the XNA days I started around, and even got to rendering without textures with Vulkan from scratch. I always want to “create more” and “go deeper” into every stack. I decided, amongst the other changes, that’s what I’m changing.
As part of my rules, I’ll finally stick to a single project for a while. For this reason, with the first course – Complete Godot 3D: Develop Your Own 3D Games Using Godot 4, I’m closing in on the first game of 3 as a refresher. While I will post the game when I finish the first section, I also need fun arbitrary project here to get back to regular posts.
Introducing the research step for my GPT model I’m starting to create and train: Godot 4.3 GPT2. I had to revamp my plans since I had hardware issues, but after the required fixes, I decided this morning to dive into my own training. To keep it super minimal I decided to not finish off my investigation in using Llama 3.2, but rather step back and use a smaller model for starters.
Using 311_fine_tuning_GPT2.ipynb I adjusted the minimal steps to fit my use case, and as per usual, my training runs offline. While slower, it’s wonderful to experiment with my own hardware.
Today’s training goal took around 4h 55m to take the text from Godot 4.3 documentation (links and info below) to train the model. I used a few sample ideas I got from Copilot, and a few I thought of myself, as the testing questions. While this doesn’t describe a lot, below is my ipynb output, and at the end I share my reviews and thoughts. The source shared is cleaner, and results may vary depending on your computer’s hardware.
The final result, while not great at all, is on HuggingFace: edg3/godot-4.3-gpt2. My intention is to take it further, in the near future, with better training. I’m just comfortable with the progress so far as I ran in slightly blind.

Steps
You will see, on the first experiment (01.train-gpt2.ipynb), I feel I could give tiny points for some of the answers. It wasn’t that they were accurate to the questions, rather the small points were from the training data the model learned. It went from a messy version to a slightly cleaner version, to just jumping into a manual version to achieve the best results as a proof of concept.
I was happy with the proof of concepts tiny training data style answers, so I decided I need to work out a better training dataset. Moving from 01.train-gpt2.ipynb onto 02 (shown below) it happened to see vast improvements, as well as way more excessive hallucinations, though I believe it’s alright. I tried to keep the structure in a readable, understandable, manner.

Note: I removed the warnings of things being deprecated, and not runnable on my system, as you wouldn’t need them to see what was done for this experiment.
Version 2: Train Godot 4.3 – GPT2¶
Plan:¶
Train GPT2 on the text off of the Godot 4.3 documentation for 25 epochs, then test the model.
System Used¶
This was done on older desktop hardware. Windows 10, WSL Ubuntu 22.04, i7 processor, Radeon 3050 8Gb OC, 16Gb RAM.
Warning:¶
Things are changing regularly, so if you try this yourself you will see warnings (if it still runs), mostly to do with deprecation these days.
Base Code Use¶
Used as a starter: 311_fine_tuning_GPT2.ipynb
Note: --break-system-packages
is required for my customised WSL2 instance.
Step 1: Packages¶
!pip install -q transformers torch datasets python-docx --break-system-packages
!pip install -qU PyPDF2 --break-system-packages
import pandas as pd
import numpy as np
import re
from PyPDF2 import PdfReader
import os
import docx
Step 2: Get Training Data¶
Got godot-docs
through https://docs.godotengine.org/en/stable/index.html
using the stable
variety. As of today it’s 319mb
.
Extract contents into godot-docs-html-stable
then run below to extract mostly cleaner text.
Time Required: couple seconds
%%time
import os
def get_all_lines(directory):
all_lines = []
for root, _, files in os.walk(directory):
for file in files:
file_path = os.path.join(root, file)
with open(file_path, 'r', encoding='utf-8') as f:
all_lines.extend(f.readlines())
return all_lines
directory = 'godot-docs-html-stable\\_sources'
lines = get_all_lines(directory)
print(f"Total lines collected: {len(lines)}")
lines = [line.strip() for line in lines if len(line.strip()) > 1]
print(f"Total non-empty lines collected: {len(lines)}")
lines = [line for line in lines if not line.startswith(':')]
print(f"Total lines after removing lines starting with ':': {len(lines)}")
lines = [line for line in lines if not line.startswith('==')]
print(f"Total lines after removing lines starting with '==': {len(lines)}")
lines = [line for line in lines if not line.startswith('--')]
print(f"Total lines after removing lines starting with '--': {len(lines)}")
lines = [line for line in lines if len(line) > 25]
print(f"Total lines after removing lines with less than 25 characters: {len(lines)}")
lines = [line for line in lines if len(line.split()) > 3]
print(f"Total lines after removing lines with less than 4 words: {len(lines)}")
lines = [line for line in lines if ' <' not in line or line.index(' <') > 5]
print(f"Total lines after filtering lines that don't contain ' <' or index of ' <' is greater than 5: {len(lines)}")
lines = [line.replace('.. ', '') for line in lines]
print(f"Total lines after replacing '.. ' with '': {len(lines)}")
lines = [line.replace('__', '') for line in lines]
print(f"Total lines after replacing '__' with '': {len(lines)}")
lines = [line.replace('::', ':') for line in lines]
print(f"Total lines after replacing '::' with ':': {len(lines)}")
lines = [line.replace('`_', '`') for line in lines]
print(f"Total lines after replacing '`_' with '`': {len(lines)}")
#print(lines[60:100])
print(len(lines))
with open('train-smart.txt', 'w', encoding='utf-8') as f:
f.write('All information provided is copyright to the parties associated and listed in the text. This GPT model abides by all those copyrights and falls under them as well.\n')
f.write('This training data is sourced from the Godot Engine documentation, which is licensed under the MIT license. The documentation is available at https://docs.godotengine.org/en/stable/index.html\n')
f.write('Important Notice at the end of every answer: `This information is provided as is and is not guaranteed to be correct. Please refer to the official documentation for the most accurate information. The idea started as an experiment, and will hopefully be usefull to you for thoughts, ideas, and finding what you might be able to use. (edg3)`\n')
f.write('\n'.join(lines))
Step 3: Setup training functions¶
from transformers import TextDataset, DataCollatorForLanguageModeling
from transformers import GPT2Tokenizer, GPT2LMHeadModel
from transformers import Trainer, TrainingArguments
2024-10-07 05:28:22.132553: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:485] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered 2024-10-07 05:28:22.148757: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:8454] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered 2024-10-07 05:28:22.153861: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1452] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered 2024-10-07 05:28:22.166403: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations. To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags. 2024-10-07 05:28:23.358533: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
def load_dataset(file_path, tokenizer, block_size = 128):
dataset = TextDataset(
tokenizer = tokenizer,
file_path = file_path,
block_size = block_size,
)
return dataset
def load_data_collator(tokenizer, mlm = False):
data_collator = DataCollatorForLanguageModeling(
tokenizer=tokenizer,
mlm=mlm,
)
return data_collator
def train(train_file_path,model_name,
output_dir,
overwrite_output_dir,
per_device_train_batch_size,
num_train_epochs,
save_steps):
tokenizer = GPT2Tokenizer.from_pretrained(model_name)
train_dataset = load_dataset(train_file_path, tokenizer)
data_collator = load_data_collator(tokenizer)
tokenizer.save_pretrained(output_dir)
model = GPT2LMHeadModel.from_pretrained(model_name)
model.save_pretrained(output_dir)
training_args = TrainingArguments(
output_dir=output_dir,
overwrite_output_dir=overwrite_output_dir,
per_device_train_batch_size=per_device_train_batch_size,
num_train_epochs=num_train_epochs,
)
trainer = Trainer(
model=model,
args=training_args,
data_collator=data_collator,
train_dataset=train_dataset,
)
trainer.train()
trainer.save_model()
Step 4: Specify Training Arguments¶
train_file_path = "./train-smart.txt"
model_name = 'gpt2'
output_dir = './model'
overwrite_output_dir = True
per_device_train_batch_size = 8
num_train_epochs = 25.0 # Should take around 9h15m
save_steps = 100000
Step 4.1: I didn’t want to use WANDB, this is how you disable it:¶
# I didn't want to use wandb
os.environ['WANDB_DISABLED'] = 'true'
Step 5: Run the training¶
Also used:
git lfs track "*.safetensors"
git lfs track "*.gguf"
This was for a later stage if I want to upload them to my repo.
%%time
train(
train_file_path=train_file_path,
model_name=model_name,
output_dir=output_dir,
overwrite_output_dir=overwrite_output_dir,
per_device_train_batch_size=per_device_train_batch_size,
num_train_epochs=num_train_epochs,
save_steps=save_steps
)
Step | Training Loss |
---|---|
500 | 1.242400 |
1000 | 1.090300 |
1500 | 1.009800 |
2000 | 1.007400 |
2500 | 0.978800 |
3000 | 0.980800 |
3500 | 0.937000 |
4000 | 0.927400 |
4500 | 0.922000 |
5000 | 0.923700 |
5500 | 0.897100 |
6000 | 0.899100 |
6500 | 0.846000 |
7000 | 0.796700 |
7500 | 0.845300 |
8000 | 0.824600 |
8500 | 0.831900 |
9000 | 0.809600 |
9500 | 0.789200 |
10000 | 0.799000 |
10500 | 0.824600 |
11000 | 0.796100 |
11500 | 0.779100 |
12000 | 0.783000 |
12500 | 0.792600 |
13000 | 0.756000 |
13500 | 0.723700 |
14000 | 0.751200 |
14500 | 0.748300 |
15000 | 0.741000 |
15500 | 0.713800 |
16000 | 0.735300 |
16500 | 0.748900 |
17000 | 0.714300 |
17500 | 0.730500 |
18000 | 0.709400 |
18500 | 0.705500 |
19000 | 0.710900 |
19500 | 0.649000 |
20000 | 0.661400 |
20500 | 0.674100 |
21000 | 0.691900 |
21500 | 0.660500 |
22000 | 0.674100 |
22500 | 0.672300 |
23000 | 0.661300 |
23500 | 0.689900 |
24000 | 0.670500 |
24500 | 0.677200 |
25000 | 0.687300 |
25500 | 0.629500 |
26000 | 0.627400 |
26500 | 0.614100 |
27000 | 0.631300 |
27500 | 0.624000 |
28000 | 0.614300 |
28500 | 0.614900 |
29000 | 0.635000 |
29500 | 0.624400 |
30000 | 0.614400 |
30500 | 0.618000 |
31000 | 0.647700 |
31500 | 0.626000 |
32000 | 0.577900 |
32500 | 0.572700 |
33000 | 0.582500 |
33500 | 0.581600 |
34000 | 0.577200 |
34500 | 0.591800 |
35000 | 0.583300 |
35500 | 0.587200 |
36000 | 0.585600 |
36500 | 0.594800 |
37000 | 0.590100 |
37500 | 0.586100 |
38000 | 0.561300 |
38500 | 0.547800 |
39000 | 0.553100 |
39500 | 0.537800 |
40000 | 0.537500 |
40500 | 0.556200 |
41000 | 0.560600 |
41500 | 0.539700 |
42000 | 0.544400 |
42500 | 0.546700 |
43000 | 0.553900 |
43500 | 0.551000 |
44000 | 0.561800 |
44500 | 0.510100 |
45000 | 0.524100 |
45500 | 0.507600 |
46000 | 0.501900 |
46500 | 0.524800 |
47000 | 0.511500 |
47500 | 0.513600 |
48000 | 0.534700 |
48500 | 0.528200 |
49000 | 0.520600 |
49500 | 0.524000 |
50000 | 0.525700 |
50500 | 0.496100 |
51000 | 0.469900 |
51500 | 0.480900 |
52000 | 0.490600 |
52500 | 0.492200 |
53000 | 0.502600 |
53500 | 0.506700 |
54000 | 0.502300 |
54500 | 0.497300 |
55000 | 0.481100 |
55500 | 0.492800 |
56000 | 0.482800 |
56500 | 0.479000 |
57000 | 0.464500 |
57500 | 0.466000 |
58000 | 0.457900 |
58500 | 0.476200 |
59000 | 0.453400 |
59500 | 0.452000 |
60000 | 0.478000 |
60500 | 0.471200 |
61000 | 0.460300 |
61500 | 0.456100 |
62000 | 0.460700 |
IOPub message rate exceeded. The notebook server will temporarily stop sending output to the client in order to avoid crashing it...
It stopped around 62000; so decided to see how far I could get between 4:30pm and 6:30pm to post. I’m hoping if I clean outputs where they are I can train more (model still in memory it appears, shutting down might stop continuation, perhaps).
Step 6: Test The Model¶
from transformers import PreTrainedTokenizerFast, GPT2LMHeadModel, GPT2TokenizerFast, GPT2Tokenizer
def load_model(model_path):
model = GPT2LMHeadModel.from_pretrained(model_path)
return model
def load_tokenizer(tokenizer_path):
tokenizer = GPT2Tokenizer.from_pretrained(tokenizer_path)
return tokenizer
model1_path = "./model"
max_length = 512
model = load_model(model1_path)
tokenizer = load_tokenizer(model1_path)
def generate_text(sequence):
ids = tokenizer.encode(f'{sequence}', return_tensors='pt')
final_outputs = model.generate(
ids,
do_sample=True,
max_length=max_length,
pad_token_id=model.config.eos_token_id,
top_k=50,
top_p=0.95,
)
print(tokenizer.decode(final_outputs[0], skip_special_tokens=True))
def Query(question1):
generate_text(model1_path)
6.1: What’s new in Godot 4.3 compared to previous versions?¶
generate_text('What’s new in Godot 4.3 compared to previous versions?')
What’s new in Godot 4.3 compared to previous versions? It is still in the current version. I've added the "New" tab. Does it offer any compatibility between PS4 and the current version? It's not compatible. The new version for MacOS will provide the same game but there is no way to play it on any other computer, I don't want to play on PlayStation 4! Are you planning on having this feature before this update so that you don't miss out? Yes! Please consider upgrading as you are not necessarily experiencing the same issues and don't have the same content as before. What does the difference between Godot 4.3 and previous versions look like? The older version has a different design. Do you have any feedback on how Godot 4.3 will be different from your previous titles? Thanks for your feedback. How about other issues/issues related to the game and other games in Godot? Please check out the Godot 4.3 Wiki for more information. How much should one pay for the Godot 4.3 version? There are a lot, with many options including the monthly pay (for now I have just one). You can buy the game at the store, or download the game to your computer via Steam and get it before the next release. Godot 4.3 will use PlayStation 4's latest patch 1.23 which is part of the Playstation 4 game update. You will have to be in the middle of the world to receive the patch. I have any information on Godot 4.3? The update for Godot 4.3 will be released in April with PS4.
6.2: Can you explain the changes in the rendering pipeline introduced in Godot 4.3?¶
generate_text('Can you explain the changes in the rendering pipeline introduced in Godot 4.3?')
Can you explain the changes in the rendering pipeline introduced in Godot 4.3? And how much more dynamic is the current rendering pipeline compared to Godot 4.0? Dawn of Creation: The only changes to the current rendering pipeline that you can actually expect to see as of Godot 4.4 are the changes in the scripting language in the next version of the game. It's the only language I have yet to see, but for now it's very similar to Godot and has been in development for more than a year. I have no idea how they might have seen it. I think they're more of a bug and a feature than anything else. It doesn't look very good in your editor though, do you think. Dawn of Creation: We started using a slightly different scripting language, Godot, which is very much in a more technical perspective. I didn't see it for a while, so I stopped playing with the godot thing. Then I started playing it really fast, and it just stopped me a couple of times. I started playing more slowly but I still felt that Godot was much more dynamic than a vanilla language. For me it was always really cool to have a tool like Godot that was just as fast as possible. Godot makes sure that this is something that you have to do that you will want to make sure your game doesn't go wrong, especially at the game beginning. Dawn of Creation: I see the current engine looks fairly identical. Dawn of Creation: That's not a big change. I don't know if that's what it looks like to me, but Godot is similar and has a slightly better performance on certain platforms. When you play games on any kind of new platform, you have to keep upgrading your code. The game is designed with very few lines of code and it will probably run for many, many hours or even days of use, but it will be playable on any platform and it will look nice on. The godot thing, although I wouldn't say it's a new thing, is definitely a more stable scripting language. And we have all been using the same language since our creation. The scripting language is very mature and it's so very different from any other scripting language that we have. Dawn of Creation: So the gods that live in a fantasy world look different to our current engine, just like the gods on other worlds that use the engine?
6.3: How do you implement a custom shader in Godot 4.3?¶
generate_text('How do you implement a custom shader in Godot 4.3?')
How do you implement a custom shader in Godot 4.3? First of all, I wanted to start by defining the implementation for the custom shader which is a single-file file. With this in mind I've taken a very simple and intuitive look at the shader definition, added a few additional parameters to the default shader (e.g., a line of code), made sure that the code was as clean as possible and so on. In the examples below you'll see a simple example of what this would look like: You can see that we've created a custom shader, as well as adding a couple of functions that will be responsible for executing the shader. All of these will be called if there is one. The function that executes the shader is called asynchronously. The example below does all this for us. The code will return an object (in this case an object that looks like this): public static void main(String[] args) { // ... Game.setInitialState (true); } This code starts with the normal initialization code which returns an object using the provided state code. In this case the object is nothing more than a list of objects. The result is that all of the methods will call to get the actual state. This also enables you to add a simple method in your custom shader and return the object. The "state code" is always a single line of code where we pass a state to the method. In the example above we could pass one line of code which would be the current state and another line which would be the state before the method would call. Now the "time" section of the example comes in, and we will just have to make the object the proper time to pass to our method. This code looks like this: public void main(String[] args) { // ... } We actually set the following parameters to the method when we pass the object. private static void main(String[] args) { // ... } The "time" section is then a variable that can be changed to a value of 8 to store the current time. This would be useful for getting us some of the data to go to later if needed. The rest of our code is just a simple wrapper for your custom shader that will do the rest. Here's a quick look at the rest of our example code. You'll notice that we use two different method calls. We actually
6.4: What are the key differences between GDScript and C# in Godot 4.3?¶
generate_text('What are the key differences between GDScript and C# in Godot 4.3?')
What are the key differences between GDScript and C# in Godot 4.3? The first thing is that GDScript uses C# instead of C#. As you can see, I am not saying that you should always use a different C# compiler to the one that you use for GDScript. I am simply saying that with the following C# syntax (you should use C# 3.3.1-3.3.10.11, which is still in its early stages): C# 3.3.1-3.3.10.11 " void createCursor(void **n) { int num = n; if (num == 2) { // no new cursor created if (n < 0) { // a new one created. return; } // else // a new one created. num++; } } // // } Another thing that could be confusing is that we often want to use a number in our C# code, so it is often better to use a different C# syntax to it. One example where you may want to consider using C# syntax is in the following code: void * newCursor() { for (int j = 0; j < num; j++) { NewCursor(); NewCursor(); return 0; } } This makes sense but is confusing to many people who just know how C# works. With that in mind, I decided to see how we could use C# syntax in the C# 4.3 version of Godot 4.3 by using different C# syntax than in GDScript. We created a new cursor and created a new array using the following syntax: // Initialize the current array object. int fm, ui = new Cursor(); // Initialize the current array object. void rt, ui = new Cursor(); // Set up our index with a pointer to the new array object. void ctx, int f0, rt, ui; int nb, rb, ui; for (int n = 0; n < nb; n++) { for (int n = 0; n < nb; n++) { rt[n+1].x += nb; ctx[n+1].y += nb; // Convert the new indices into arrays for (int i = 0; i < num; i++) { rt[i].x += nb; r
6.5: How would you optimize a game for performance in Godot 4.3?¶
generate_text('How would you optimize a game for performance in Godot 4.3?')
How would you optimize a game for performance in Godot 4.3? I think our game is very easy to optimize and it is very simple to implement. I am sure the next step is to implement a complete system with more than a single layer of optimization and testing. How much do you believe that Godot 4.3 makes the game more interesting? I would say that we achieved a level of creativity which will become one of the central themes of the upcoming game. If we can have a level of sophistication with Godot, then we can easily make an entire game about Godot 4. What do you think of the new game? That is an interesting question, the game is a lot smarter than many people thought. I think our world is getting smarter, so we should see more of this as more and more games with more of the same design and complexity. What are some of the other improvements to the game? I believe there is a more complicated puzzle in this game than in other games with different mechanics, but it is a lot harder. This is just the beginning. I think in many ways, Godot 4.3 is a good example of what you can do with Godot, for example by providing more options for players in the different ways in which they want to do it. The game is also an example of how to make Godot interesting in games made with different kinds of game engines. You have mentioned that you are playing with the same concept in the last few months. I am also surprised to hear from some of the players that you did not use a game engine like 3DMark. How did the development of Godot differ from in your own mind as a developer? I think we were very close to the goal which is to have a completely new Godot game. But you do not need a game engine like Doom, Unreal Engine, DirectX 10, or Fizio. All of the components you need are the same. It is a very interesting idea, as you can see with the game engine and the game engine you have in the old game engine that people may not have a choice, but just because they need a little bit of complexity, they cannot do it. I think that Godot 4.3 will make your life much more interesting when you have your own set of skills. Do you think this will change the way you approach design? Do you think it will be less like this game or
6.6: Can you describe the process of creating a custom node in Godot 4.3?¶
generate_text('Can you describe the process of creating a custom node in Godot 4.3?')
Can you describe the process of creating a custom node in Godot 4.3? A: Before Godot was released, there was no way to create any custom node on the website, so I spent hours developing a custom module, and then Godot got really good at that – I did the custom node on its own. We created a custom module for Godot 4 and it was very useful: it provided a full-featured application, which I didn't need, but you had to use a node server, which allowed you to create your own node without any external dependencies (like web hosting). It was easy enough to do, but there were a lot of side-effects. However Godot 4.1 has a ton of new features, so we added another new feature – a default module to download modules in the app's database, which you can use to browse the content. And after making a change that added a default module to download modules, the database was loaded from the server and started downloading them at runtime. If your local database is not up to date, or you don't have it, or you find the module you want to download, or you find someone that you don't want to download, Godot would pick up the request, which is basically how you'd find your module. We had some great code, and we really like the experience that it had. Q: Can you tell me the process of creating the "Lorem ipsum" in Godot? A: You can use the same code for all types of modules, but if you use only one type of module, you will only see it on the pages that you're interested in. When people ask, "Which type of module should I use for a function?" I say, "That's the kind that we're looking for," because we want to make sure that the functions we use are accessible at runtime in Godot, so that developers can find them quickly in a new project. That makes it easier for us to understand which modules we are targeting. It's very flexible, because we can start with different types of modules, and then move on. There's always a way for people to find modules they're looking for. Q: The way you write code has changed, and I was hoping for a faster build experience? A: Yes, we've had more tools and tools for different kinds of modules, and we
6.7: What are the new features in the animation system of Godot 4.3?¶
generate_text('What are the new features in the animation system of Godot 4.3?')
What are the new features in the animation system of Godot 4.3? As soon as you check Godot 4.3 out there is no need for any additional tutorial. If you follow the guide in the video, it will work in a few days. And the tutorial can be downloaded here. In addition to the graphical feature set we've done, we have also added many new functions, such as: Ability to share with others Ability to create other animated characters Ability to import and export as many animated characters as you can get The Animation system is an important one because it means that everything that we do, like animation, can be added to a game. It is easy to add and remove as many functions as you want, from the controls we put on to the movement of the characters. This video demonstrates how we have taken a lot of concepts of the engine from Godot and put it into Godot 4.3. If you want to see more information about how Godot 4.3 works, read the Godot 4.3 video. A more detailed description of the game is on the website that you can find here. What's different about Godot 4.3 so far? When you first see the new Godot, you will see that it feels rather familiar. The system is really simple. All the functions are in one place, but they have very different uses. The biggest change here is that many functions are added, some on special occasion, and others can only be done with the help of other players and cannot be used directly from a specific location. Many functions have been changed, but there are many good improvements. Now we are able to bring all these functions to Godot 4 and have the same experience even without having to worry about them. The basic animation system was originally a simple one, like Godot 3 before. We have now implemented it in more realistic and interactive ways. Now it is possible to add animation effects to Godot 4, so if you see a character move through a level, or if you see something you think is crazy. We also now have a new feature that gives you the choice which animations to make with. The best thing is that you can share this functionality directly into Godot, just send one request. The best part is that if you use something, the first request will always be answered. If you send multiple requests, God
6.8: How do you handle input events in Godot 4.3?¶
generate_text('How do you handle input events in Godot 4.3?')
How do you handle input events in Godot 4.3? You might have to have some kind of API for the output of these events; so let me provide an example here. Let's say you're getting all the input events from a page: // This is the main event here // let events = { type: "input", name: "input" }; let text = event.target: event.text; var name = event.target[2]; console.log(text); When you run this in a browser, the response will look like this: Input event = { type: "input" } But instead of writing a single string for input events, you can write multiple events each with their own type and name. <input type='text' name='input' data-name= "input" type='text' name='text'/> Note that the type of these events is not affected by the HTML. But in fact, if you want to write a single event name like this (input for name input event event) or type name (input for text event event) or type name (input for name text event event) but just write a single string for input event events (input for name text), you probably want to add a single event that does not actually have to do anything with the output event type. To keep these events separate from other input events, we use a set of helper methods that allow you to put them together: let trigger = trigger.get("eventType"); // let eventTypes = [ "type", "name" ] // if eventTypes.isEqualTo("input").type == name.toLowerCase() { trigger.addEventListener("eventType", eventTypes); } else { trigger.addEventListener("eventType", eventTypes); } } The set of helper methods are very similar to methods you're probably familiar with. To add a handler for eventType.toLowerCase(name), you simply add an event and trigger is called. If you pass an event name (input or text, but not both), you can use a number of handler methods such as: let eventType = eventType.get( "eventType" ); // This is what this Event eventType.addEventListener("eventType", eventTypes); // This also adds an event for this event to lowerCase eventType.addEventListener
6.9: What are the best practices for using the new navigation system in Godot 4.3?¶
generate_text('What are the best practices for using the new navigation system in Godot 4.3?')
What are the best practices for using the new navigation system in Godot 4.3? First I want to start off by explaining what it's really like to have a real-time view of all these things. The first thing you see in Godot 4.3 is the nav bar, which will be shown next to your location on the screen. You'll also be able to see which of your icons were hit by this game. (The icon on the center of the bar is a light green bar, which has a green and blue outline) You'll then be able to scroll down to that icon to learn the game. As you scroll down you'll be able to change things, such as whether or not the icons will remain centered on the left side of the screen (in this case this is true for icons with the same icon), if certain icons are being hit more recently, and how frequently they have been hit (like with the health bars above). If you have a specific icon hitting recently, and the icon is getting hit frequently, you'll need to use your scroll wheel to sort through all this info before you actually see your icon (which is probably hard to find, but I'm sure it is there) or if you have a specific icon getting hit a long time ago (like I do with the health bars above). Once you see the first icon on the screen, scroll down a little bit and check the icon has been moved to the bottom of the screen. This is where the game might see things that would otherwise remain on the bottom of the screen. They won't, and they won't appear on the next screen, which would mean that Godot 4.3 just doesn't actually read everything you're viewing (but rather just knows what icons are hit and whether or not they are), and it doesn't really do that much when you scroll down all this info up or down (like in the screenshot above). But then, it comes back to the rest of your screen, where Godot 4.3 actually reads information on the screen, so there is no real question about what to do with it if it is not being used or if someone on the game is really messing with the game. This can be useful if there are new icons being added or there are new gameplay changes being made, but it also could get you stuck on the same place and time without having to use every single one of Godot's key controls. Godot 4.3 is an
6.10: Can you walk me through setting up a multiplayer game in Godot 4.3?¶
generate_text('Can you walk me through setting up a multiplayer game in Godot 4.3?')
Can you walk me through setting up a multiplayer game in Godot 4.3? If the answer is yes, you're on the right path for one. It's a long story but I'm sure we can work on it someday. What's the main difference between Godot and BK2? What makes godot different than BK2? What are the differences between them that matter? For me, the biggest difference is the way in which I approach the game and that's really something that I wanted to try out and try out in Godot 4.3. I'm not going to spoil anything for you, but I'm going to give a couple of specific examples of how you could use the same settings and gameplay elements to build a multiplayer game and it definitely works for me. BK2 is a multiplayer game with online co-op. How do you decide which modes are the best for online co-op gameplay? How do you decide which modes are the best for multiplayer? First and foremost I wanted to make this game as good for both game play and community support as I can make it and that's what we've done so far. From our community perspective we've been working hard on our own strategy and strategy guides that we're releasing and going through to create this game. For now, we're very focused on making sure the community feels that Godot's game is the best it can be. Godot 4.3 has been a great release for us and is a game that we really want you to experience. Are you excited about BK2's multiplayer and community-supported design? We think that's what's so great about it for both game play and community support. We're working very hard to get this game to the community that we want to be. That's a big part of why we've taken the time to make BK2. We're very excited to support Godot, our community, and our friends at BK2 as well. We've always loved the community we've created for us, we've always wanted to bring this one to all of us but with this game having so many new and fun features that we're excited to share with you all I can't wait to try out Godot! What's the status of our second Kickstarter campaign? For backers, this campaign is over. We still plan to deliver the game on time for your first game purchase and then all of the backer rewards over
6.11: How can I use C# to create a procedurally generated 3D chunk in a node in Godot 4.3 on its own?¶
generate_text('How can I use C# to create a procedurally generated 3D chunk in a node in Godot 4.3 on its own?')
How can I use C# to create a procedurally generated 3D chunk in a node in Godot 4.3 on its own? You can use the following methods for creating a procedurally generated chunk for godot 4.3, which you should use to do these same things with this script: Node creation with a few lines of code. Node editing with "x", to change the image used for the text node. Script execution. The following is a short list of the script steps I followed in the script. If you encounter any bugs or if you have any questions, please email me at joshua@guitarysoftware.com or write to me at joshua@guitarysoftware.com. Note: The following script code assumes that you have installed "C# 4.3.4" and "Godot 4.3.0". You can use a console command to create a chunk that will never be included in Godot 4.3. The first command that you invoke will create a chunk that will never be included in godot 4.3. To create a chunk in a command-line tool that I'm using, you can run: (myScript) $game = $game->newBlock(); $game->init(); This will create a new file that will point to the original game and load it into memory for the current game in the current time window. A chunk with no content will still be created, but the program will know which to search for and will use the block to find it. For example, if you have to search in the order of the pieces: Block Name: Number of nodes: Start: Start node Length: Number of items in inventory: Start: End node ID: Value for search: Starting items 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 The following code is a quick way to create and configure the "Nodes" chunk in Godot 4.3. When you're finished
6.12: How can I make nodes used as chunks, similar to minecraft, to store data in Godot 4.3 so that I can create a synchronous multiplayer world that can be hosted by 1 player, and have a second player connect?¶
generate_text('How can I make nodes used as chunks, similar to minecraft, to store data in Godot 4.3 so that I can create a synchronous multiplayer world that can be hosted by 1 player, and have a second player connect?')
How can I make nodes used as chunks, similar to minecraft, to store data in Godot 4.3 so that I can create a synchronous multiplayer world that can be hosted by 1 player, and have a second player connect? There are a lot of different ways you can do it. There is a bunch of tutorials on using the Unity library in the game, so I won't go into detail, but you have to use a simple method. Here is how we would use it: 1) Load the Unity library and use this (note that this should be done using "loadAllIn") 2) Use this (this is the simplest way I have ever seen the game and I can't imagine it requires any more) 3) You can use "loadAllIn" as a URL 4) You can use the "getAllInURL() method or simply create a new one for each node" command In the above example, you have been able to use these two methods, "createAndOpenAndOpenBy" and "initAndOpenBy" so that the world could be created automatically. As a general rule of thumb, there are already some "simple" methods for creating/uploading nodes. 4) The next step would be to create a player to connect with and share their data (the data will be stored on the server as soon as someone joins the server). So I already mentioned the "addConnection() method". This would also be able to do some synchronous stuff (such as the player's current node in the world) and then to provide a player with some sort of connection so that he could share his data with anyone else, without needing an external "proxy" or server. This means that using this method would be easier for the first person or both. 5) So it's a single step process. But you just need to add your server's IP address and your connection. 6) Finally, you have a player to connect to. That brings us to the point. How To Create A World You need to connect to the server and create a new map to create a multiplayer world. If you are using the multiplayer world, you should run "network create_world()" and choose a player and see if the world works for him, then connect to the server. Then connect to the player's server and create a new world.
6.13: In Godot 4.3, using C#, can you create 2D snake from scratch?¶
generate_text('In Godot 4.3, using C#, can you create 2D snake from scratch?')
In Godot 4.3, using C#, can you create 2D snake from scratch? The game was only released in 2005 to a limited number of backers and it still hasn't had the chance to receive a second copy. There has been numerous rumors around the world of an Rovio remake and a remake. However, if you're new to Rovio then be sure to check out this short video of the game, which is about the story of the Rovio 2D Snake. What do you think of the latest updates to Rovio? Tell us in the comments below! [via GameFAQs, Kotaku]
Review (Personal):¶
Note: I need to sort out tokens; only thought of it after starting training v1
- The training only got to steps around 62k / 100k and at 0.460700 training loss I’m undecided on if this was a smart plan with GPT2, it’s highly hallucinating. Will experiment further and see where it gets to.
I believe this first training step, which crashed at around 62% complete, is along the correct lines. Now to work out how to train it further.
Step 7: Upload to HuggingFace¶
!pip install -q huggingface_hub --break-system-packages
from huggingface_hub import HfApi
from huggingface_hub import create_repo
import os
# Define your model path and repository name
model_path = "model/"
repo_name = "edg3/godot-4.3-gpt2"
my_token = '<your-token-here>'
if True: # first time true, else repo exists make false
create_repo(repo_name, token=my_token)
# List all directories inside the model path
folders = [f for f in os.listdir(model_path) if os.path.isdir(os.path.join(model_path, f))]
skip_check = False
# Print the list of folders
if folders and not skip_check:
print("Folders inside 'model/':")
for folder in folders:
print(folder)
else:
# Initialize the API
api = HfApi()
# Upload the model
api.upload_folder(
folder_path=model_path,
repo_id=repo_name,
commit_message="Initial model upload",
token=my_token
)
model.safetensors: 0%| | 0.00/498M [00:00<?, ?B/s]
So as you can tell from the experiment, so far, I have an interesting idea that could lead to an interesting game development GPT2 for Godot 4.3. I’ll likely do more training soon, when I work out the smaller kinks in the idea, and possibly move it to a more versatile GPT model.