TL;DR
- Steam Cloud Saves will be added
- Humble Bundle backers list
Steam Cloud Saves
For the Advanced Features "Online Save feature", it will be provided through Steam Cloud Saves and available to everybody. When I announced an Online Save feature, back in 2015, I did not know about Steam Cloud Saves. I can read it exists since 2008, so I guess it's my mistake not knowing about that. Currently, the Steam Cloud Save is not active, and the game saves its database in your AppData directory. You can easily find your save by launching the game and look in the Options, there is a button to open the directory where the save is. I edited the Advanced Feature page product on Steam to remove mention of the Online Save feature, and I will implement Steam Cloud Saves with their developer tool.
Mini crowdfunding
When the Early Access was launched in 2017, people could prebuy the game on the website, like a mini-crowdfunding. There were various tiers (early bird, get your name in the game, etc), which can be bought with a Humble Bundle plugin window integrated in the website.
Every people who get the game at this time will be contacted and get special rewards, like having his name in the credits.
Humble Bundle info
As I need to get all emails from backers through Humble Bundle, I was reluctant to do so, as I got some problems with lag, but it was already 6 or 7 years ago... everything is running fine today. For every product, I display all sales with a starting date of 2011 (far before anything was available) to be sure that all orders will be displayed, and I click on the "send csv to my email button". Hopefully, I gave every product an unique name like "reward15" for the $15 reward. Still, I rename the csv by adding an intelligible name like "Alpha" or "Alpha-Early Bird".
Why not use Humble Bundle crowdfunding tool?
Humble Bundle has a crowdfunding tool to send an access to a download page, but you need to provide the email adresses. So you still need to download yourself the emails of a product, then upload those emails in the crowdfunding tool of this product. Besides, I need to send an online form to ask people for their name in the credits, and I cannot do it with a simple download list.
Test product removal
Looks like there is no way to remove a product, so my test products are still there.
Game Executables and DRM Free
All game executables are from 2018, so I hide them. I will upload an up-to-date DRM Free version, likely on my mediafire account, and give the link through the email I will send to backers. I need to have as few as possible ways to give access to the game, as managing multiple platforms is a hassle.
Data check
I double check I have all csv files from Humble Bundle. My goal is to mix all data files together to have only one data source to work. I open every file in Excel, and add a column "category" with a name like "15-alpha". This is a way to display the price of the reward and remember what it corresponds to, but also a way to sort all info by alphabetical order. To gather data, I was thinking about using something smart like Excel Power Query, but a few minutes of copy-paste were more effective.
The creation date is completely useless. I ckecked original data to be sure, but the csv data sent by Humble Bundle are really those numbers. They correspond to the "minutes, seconds, and tens of seconds" when the order was created, instead of the full date (year, month, day, hour, minute, etc). I filled a bug report to Humble Bundle.
Hello,
I just extracted csv data for all my products, and the "created" column, instead of containing the full date "year, month, day, hour, minute, second", it only contains "minute, second and tens of seconds".
2017-12-01 7:34:10.5
becomes
34:10.5
Here are the steps to reproduce the bug:
- I go on a sales product page like [REDACTED]
- I choose a very old starting date to be sure everything is displayed (like 2011)
- I click the button "export csv to my email"
- I receive the email
- I download the csv
- I open the csv in a notepad tool (like Notepad++)
- I can see that only part of the date is in the "created" colmumn
I think datetime should be displayed as
YYYY-MM-DD HH:mm:ss.S
year-month-day hour(24h):minute:second.tens of seconds
Could you please fix this issue (or transfer this message to the technical team), and come back to me?
Thanks in advance.
Looks like Steam replace text by emoji in code formatting, which is either a bug or a very bad design choice. I won't fill a bug report because I cannot display a bug report.
Who gets what?
Contrary to what I was thinking, the data does not represent people who buy a product, it represents people who has an access to a product. If someone pays $14 for the alpha early bird, and has access to the $15 alpha, he is listed two times. But with only one payment. There are also a few people who either bought the game several times (thanks), or there are other ways to understand the data. I play it safe and group everything together for each people. As the crowdfunding displayed publicly the number of backers and the total money raised, I will give here the final numbers: There are 235 backers who raised $3537! Thank to everyone of you! Rewards are incremental, so every backer will receive all rewards corresponding to the lower tiers. Supporter - 55 backers
Alpha - 132 backers
Advanced features - 40 backers
Name a nanomachine - 8 backers
I really liked designing those reward panels, using Inkscape.
Next step
I intend to work next on the google forms and the email. I will work on the dark ending cutscene. I have a good idea.
[ 2024-02-10 10:47:10 CET ] [ Original post ]
TL;DR
- remove popup ad
- update the website
- sounds added
- smoother camera zoom
- better dark cubes percentage
- ending cutscenes status
Remove popup ad to join community
I removed the ad to join the Steam community, which was launched after the cutscene for completing a chapter.
Back in the day, it was an ad to vote for the game on Greenlight. Now that I look at it, I see that some icons are not clear (like already done), and that there is no way to actually say "no" or "don't bother me again". On the plus side, removing this ad was really easy. The game relies on a "playing phases" system, where every part of the game is a phase: editing a solution, playing the solution, displaying the galaxy map, etc. And all transitions between two phases are managed with a specific function, which allows to add custom code for this transition only. The main purpose was to avoid a nightmare of "if" tests to activate specific code. Almost all transitions are as simple as that:
public void from_phase_cutscene_to_phase_galaxy_map ()
{
end_phase_cutscene ();
begin_phase_galaxy_map ();
// display_ad ();
}
Thanks to that, any logic specific to a unique combination of two phases is entirely managed in a specific function.
The code file containing all those transitions is more than 900 lines of code. That's a lot, but thanks to that, I never got any confusion going from one phase to another.
Humble Bundle
As I removed Humble Bundle buy options from the website, the money threshold cannot be attained to transfer the funds, and so I asked them to transfer everything. I also asked them to give me the full list of all buyers, but they did not do anything. So I will have to manually get those data from the website. It's clumbersome, as I need to go through all time periods for all buying options, and it crashes when there is too many data for a period. But I will do it anyway.
Clean directories
I tried to clean some directories by removing unused files. I immediately found out that some of those files were used (of course, that's why I avoided cleaning until then). Keeping directories for a long time "in case they could be useful" was a bad idea, at the time of adding those features, I should have kept only the files I identified as useful. Strangely, Unity continued to modify a lot of library files, even when everything was almost back to normal. I had to quit Unity and revert absolutely all modifications for the library frenzy to stop. Then I could do the small modifications I wanted. That's how I managed to remove two files. I guess small victories are victories too.
Chapter 10 dark cubes
In the completion cube scene (accessible by clicking on the central cube on the galaxy map), there were missing dark cubes for chapter 10. Those dark cubes are now correctly displayed. As chapter 10 is special (it's the chapter where you have to create buildings), I did not find a way to create dark solutions. So to still have dark cubes there, every chapter fully completed as dark unlocks 1 dark cube for chapter 10. It also simplifies the game completion percentage, as it is now calculated on a base 100 for dark cubes, rather than on a base 90 (because of 9 chapters with 10 dark cubes and the final chapter with no dark cubes).
Cutscene zoom
I can easily launch cutscenes from the starting menu by pressing a number key with the letter "g" or "d" (for "Gold" and "Dark" cutscenes). Rewatching all cutscenes, I saw some mistakes I made, such as a camera zoom badly calculated which changes its speed during the cutscene. As I am using an orthographic camera, zoom is done by changing a property called orthographic size, and I made a very simple calculation: I compute the difference between the two zoom sizes (such as "10 zoom" to "100 zoom" gives a difference of "+90 zoom"), then I divide this difference by the duration of the cutscene (such as 10 seconds), to increase the zoom size. It means that the camera gains +9 zoom per second, from "10 zoom" to "19 zoom" during the first second, until "92 zoom" to "100 zoom" during the last second. Sadly, this process creates a change in speed: going to 10 to 19 is a 90% increase (the camera zoom change is super fast), but going from 91 to 100 is a ~10% increase (the camera zoom change is super slow). Back in the day, I was too bad at math to do anything better. But now, I'm a bit better at math, so I realized that there should be a way to find a unique percentage to go from the first zoom to the last zoom. Thanks to my work in finance (I spent a year working in a bank as a developer), I know that you can use a power of a percentage (here symbol "**") by a duration, to obtain something like this:
10 zoom * (percentage ** 10 seconds) = 100 zoom
I found a first approximation of the percentage (1.259) by doing lot of tests by hand on Google, launching a Google search each time. Then I told myself I could find an online calculator. But I did not succeed to find one which could use power as well as Google, so I was quickly back to Google.
Then to find this percentage (1.259) with a real calculation, I used an inverse power :
percentage = 10 zoom ** (1 / 10 seconds) = 1.25892541179
Here is some data to show the difference in behavior between the two approaches.
Sound design
I took inspiration from meditation sounds (bowls, stones), and added some sounds in the game. There are now sounds for when the cube is moving, clicking on buttons and a few other stuff. I used Audacity to keep things simple.
Ending cutscenes
One of the last thing to do to complete the development of the game are the ending cutscenes. I intend to do 3 of them (gold, dark and gold+dark). They will be used as a conclusion for each way: following the rules, disobeying the rules, and joining what you learn by both following the rules and disobeying the rules. Back in the day, I was using several helping tools, such as plastic cubes, or the ingame editor, but they were more intended for designing levels. I was also using Google SketchUp for 3D design, and I see that it can now be used online for free (and it is now owned by a company named Trimble who purchased it from Google). So I used Trimble SketchUp to design some contraptions for the ending cutscenes.
Currently, the ending gold cutscenes is entirely done.
Copyright date
I edited the copyright date. 2024 is the date of the release! I intend to spend more time on the project to finish the development.
[ 2024-02-03 11:51:17 CET ] [ Original post ]
TL;DR
- update the offline cache for level results
- update the website
- new payment by Valve
- a special thank for DevBlog readers
Level Results offline cache
In case the server is not reachable, there is an offline cache of the levels results inside the game.
The offline cache is really old, as it dates from 2016 October 4th. I replaced it with a recent version. To generate the cache, I had to call an online function on the server, from Unity editor. It was rather complicated, as the game needed to load real data ingame before using the editor menu to call the server. Hopefully, Postman makes the whole process easier, as I can use it to call the server in post mode, with binary files (containing the requested level and version list) attached to the body. I can even use the "Save Response" button to directly save the server's data to the cache file.
With this new cached file, offline results are far much better! Note: it looks like Steam cannot host this gif (maybe because it is too wide, with its 1610 x 1101 px size?), so I am using imgur.com with an img tag.
Trying to switch to a https website
I never set up https on the website, thinking it was not necessary. But I see that some browsers are using https by default (at least with autocomplete), so I simply thought that I will set it fastly and be done with that. As usual, a simple action like this makes me fall into a rabbit hole of nerve-wracking configuration hell.
- I want to set up https
- I go on OVH (the web hosting solution)
- OVH tells me I "added multisite hosting within the last two hours"
- I did not change anything at this point, so I guess I can ignore that
- I see I need to activate SSL
- I find how to activate SSL on a tutorial
- OVH cannot activate SSL and does not explain why
- I find that it could be caused by the multisite option (to manage the website with and without "www")
- OVH cannot activate SSL on any multisite part and does not say why
- I kind of remember I added an entry in the DNS zone (the equivalent of Windows register for a web hosting), could it be that?
- I read all the DNS entries
- I spent a few time reading more information on https
- I see that switching from http to https can break some content, such as links to files
Website modification
For the website, one of the things which bothers me now is that I have no source control (a way to save different version of the code). Any modification can break the site with no easy way to rollback. At this point of the development (10 years in), I don't want to create a new process, so I intend to just go the old way "comment the old code". I am using FileZilla as a FTP software to access files on the server. FileZilla has a very distasteful update policy, as it reminds you to download the last update every time you launch the software, and force download the last executable in your download directory. You cannot disable the reminder or the automatic download, and they almost insult you when you complain on the forum. I have to say that I don't care about FileZilla updates, as I only need the most simple options (and I have been only needing basic FTP options during my 19 years of occasional web development). I spent some time a few months ago to hack FileZilla to disable automatic reminders (yes, that's a thing), but it looks like the developers found a way to remove the hack (yes, that's a thing). Yes, I could update FileZilla, but there is a new version like every month, so everytime I launch FileZilla (every few months), it goes back to the initial situation with the forced reminder and the forced download. Hopefully, I can use Notepad++ "Npp FTP" plugin, which allows me to access files on the server easily. This is my way to go to edit fastly some file code. On the server, I see a lot of old versions of the main index file, with names such as "index-old.html", "index-old2.html" or even "2016_05_18-index.html". I create a save copy of index.php that I name "2023_07_15-index.php" (the last modification date). I get the modification date on FileZilla (then I close FileZilla), and I create the copy on Notepad++ by opening the file to create a local copy, then I rename the online file with the save name, then I modify the local file and I save it (it is uploaded with the default name). After all of this, I update the website by removing the mini-crowdunfing parts (I added a FAQ entry to explain people willstill receive their special rewards such as their name in the credits). I put the removed parts of the website in sub php files, in order to keep them. I also update the bottom copyright, to change the 2018 into 2023. It's nice to be back!
New payment by Valve
I had the pleasure to receive a new payment by Valve! As there are taxes for money transfer between US and France, I put a maximum threshold (at the time) of $1,000 to limit the amount of transfers. The last payment from Valve was more than 2 years ago (February 2021). After chacking the financial data, it looks like announcing the resuming of the development trigerred a few more sales and helped reach the threshold. Thanks to new players!
A special thank for DevBlog readers
There are around 20-30 readers of those DevBlog updates, who give around 5-8 likes. Thank to you, it matters to me, and it motivates me to work more on the game!
Back with my computer
I just spent 2 weeks on holidays, without my computer. Lot of sun, sand and water, but hopefully I am back in my home, with my computer.
I am using WhatsApp on Windows to easily send a few pictures from my phone to my computer. I am also using it the other way around to send a screenshot from my computer to my phone, this is better than taking a picture with my camera!
[ 2023-08-02 21:17:49 CET ] [ Original post ]
TL;DR
- new release date is first half of 2024
- the server still records data
- people are still playing the game
Player stats
Part of my real life job consists to work on data, mainly to create automated reports. So here are a few reports to see the health of the game's data.
On the last 12 months, there is an average of 14.17 different players every month! As those are stats from the server, it also includes stats from pirates. But as pirates often use the default name saved in the hacked game, it shoud not impact the total stats too much. This being said, I have no way to clearly distinguish Steam players from pirates. And Steam does not provide stats from players at all. I know there are websites recording Steam games activity, but they seem to look only at certain time intervals, and the game's numbers are too small and sporadic to be recorded this way. No matter what, I'm glad people are still playing God is a Cube!
Players have found 6604 distinct solutions over the years! As there is a finite number of solutions, players should find all the most common solutions over time. It's true that the number of players influences the number of solutions found, so I displayed both distinct solutions and monthly active players :
I think that over time, a bigger amount of players does not necessarily create a bigger amount of solutions found (we can see that around 2021 and 2022 the number of solutions does not become really bigger). I can generate stats for all levels, to see if there are still completed. Here is an example with the first level, to see how many times it is finished per month:
And here is a gif showing all levels of the game to see how many times they are finished per month, from start to finish:
Some new chapters have been inserted later (50 levels) 2018, hence the left part of the chart not having any data sometimes. To generate this gif, I am using ScreenToGif, here with the capture frequency set to "user interaction". I can just go through the pictures in the directory by pressing the right arrow key, and it records one frame per input. It's not 100% perfect, as sometimes the recorded frame is taken a few milliseconds too soon. Next time I should try to set the capture frequency to "manual". And then, I can set a progress bar to help identify the part of the animation (and so the approximate level of the game) I am showing.
New release date
After a discussion by Booyah, I edited the store description to put a release date for the first half of 2024. It gives me one year maximum to finish the game. Roughly:
- September: take contact with a few professionals to get advice
- January: beginning to work on the release
- + a few months of delay
Data extraction procedure
I convert the server database from MySQL to SQLite, following the procedure I detailed in a previous DevBlog. Once I have .sqlite file with all data, I can get stats thanks to sqlite3_analyzer.exe, available in the SQLite3 zip download.
From one the first set of data, I get some info I can clean. Lot of data are from saves and development.
So I want to keep only real data. For this, I am using a data science tool called notebooks, and available in C# (the programming language used to make games on Unity) through the Visual Studio Code extension Polyglot Notebooks. I'm using the nuget package "Microsoft.Data.Sqlite" to access SQLite data.
#!csharp
#r "nuget: Microsoft.Data.Sqlite, 7.0.9"
#!csharp
using System.IO;
using Microsoft.Data.Sqlite;
#!csharp
// variable
string database_original_filepath = @"data_output\03-importSQLite\2023_07_08-godisacuvqube.sqlite";
string clean_folderpath = @"data_output\04-clean";
string database_clean_filepath = Path.Join(clean_folderpath, @"godisacuvqube-clean.sqlite");
string sqlite_filepath = @"C:\Program Files\SQLite\sqlite3.exe";
#!csharp
// environment
Directory.CreateDirectory(clean_folderpath);
#!csharp
File.Copy(database_original_filepath, database_clean_filepath);
#!csharp
public void ExecuteSql(string databasePath, string sqlCommand)
{
using (var connection = new SqliteConnection($"Data Source={databasePath}"))
{
connection.Open();
using (var command = connection.CreateCommand())
{
command.CommandText = sqlCommand;
command.ExecuteNonQuery();
}
}
}
public void sql(string sqlCommand)
{
ExecuteSql(database_clean_filepath, sqlCommand);
}
#!csharp
public IEnumerable ExecuteQuery(string databasePath, string sqlCommand)
{
using (var connection = new SqliteConnection($"Data Source={databasePath}"))
{
connection.Open();
using (var command = connection.CreateCommand())
{
command.CommandText = sqlCommand;
using (var reader = command.ExecuteReader())
{
while (reader.Read())
{
dynamic row = new ExpandoObject();
var rowDict = (IDictionary)row;
for (int i = 0; i < reader.FieldCount; i++)
{
string columnName = reader.GetName(i);
object columnValue = reader.GetValue(i);
rowDict[columnName] = columnValue;
}
yield return row;
}
}
}
}
}
public IEnumerable ExecuteQuery(string sqlCommand)
{
foreach(var x in ExecuteQuery(database_filepath, sqlCommand))
{
yield return x;
}
}
With the non query "drop table" I get rid of unnecessary data, and with the non query "VACUUM" I reduce the final size of the database.
#!csharp
string query = """
DROP TABLE IF EXISTS `LEVEL_RESULTS-ORIG`;
DROP TABLE IF EXISTS `LEVEL_RESULTS-V00-05_14_03`;
DROP TABLE IF EXISTS `LEVEL_RESULTS_DEV-ORIG`;
DROP TABLE IF EXISTS `LEVEL_FEEDBACKS-V00-05_14_03`;
DROP TABLE IF EXISTS `LEVEL_RESULTS-V00_05_13_00A`;
DROP TABLE IF EXISTS `LEVEL_SOLUTIONS-V00_05_13_00A`;
DROP TABLE IF EXISTS `LEVEL_FEEDBACKS-V00_05_13_00A`;
DROP TABLE IF EXISTS `LEVEL_SOLUTIONS-V00_05_00_11A`;
DROP TABLE IF EXISTS `LEVEL_RESULTS-V00_05_00_11A`;
DROP TABLE IF EXISTS `LEVEL_SOLUTIONS-ORIG`;
DROP TABLE IF EXISTS `LEVEL_SOLUTIONS-V00-05_14_03`;
DROP TABLE IF EXISTS `LEVEL_SOLUTIONS_DEV-ORIG`;
DROP TABLE IF EXISTS `LEVEL_SOLUTIONS_DEV_OLD`;
DROP TABLE IF EXISTS `LEVEL_FEEDBACKS-V00_05_00_11A`;
DROP TABLE IF EXISTS `LEVEL_RESULTS_DEV`;
DROP TABLE IF EXISTS `LEVEL_RESULTS_DEV_OLD`;
DROP TABLE IF EXISTS `CONNECTIONS_DEV`;
DROP TABLE IF EXISTS `LEVEL_FEEDBACKS_DEV`;
DROP TABLE IF EXISTS `LEVEL_SOLUTIONS_DEV`;
DROP TABLE IF EXISTS `CARDS_DEV`;
""";
sql(query);
#!csharp
sql("VACUUM");
Now the database is 57% smaller! This is the final file I am using to do all the stats I need.[ 2023-07-16 10:35:18 CET ] [ Original post ]
TL;DR
- Started to create new small features
- Making on a TODO list
- Removing sensitive info from the GitHub online source save
- Downloading data from the server to verify it
First small new feature: music slider
For a first new feature, I'm starting really small. As I worked recently on the Options, I added a small thing I always wanted for the game: a real time music volume slider. So we can hear in real time the volume of the music when changing it in the options.
TODO list
I am making a TODO list for everything to do for the game. I want it to stay really simple, and to be manageable line by line, so I can easily put higher the things I want to do first. I selected a few action words:
- add: a new feature
- remove: something to remove from the project (including cleaning)
- change: modify an existing aspect
- fix: correct a bug
I intend to publish the TODO list (or a simplified version) later, with a percentage estimate of the completion of the rest of the game.
GitHub: removing a file from history
When cleaning the folders of the project, I realize that there is a file with information I absolutely do not want uploaded anywhere on the internet. Sadly, all the project files are saved in GitHub, and a copy of them will stay online even if I delete them. Because this is the very purpose of a git history, to always save the whole history of all files. So I am forced to rewrite the whole git history, to remove all mentions of this file and its content. I use BFG Repo Cleaner and I follow the procedure.
git clone --mirror https://github.com/marckruzik/giac
java -jar bfg.jar --delete-files "myfile.txt" giac.git
cd giac
git reflog expire --expire=now --all && git gc --prune=now --aggressive
git push
The file deletion command cannot target a precise file path, only the file name. Hopefully, the file I have to delete has a unique name.
And after all of this, the history rewrite works!
On the bad size, rewriting the git history implies to reupload the whole git history. Even compressed, that's still 500 Mb of data. Here, the big textures are once again a problem.
Besides, the upload speed is slow, around 0.8 Mbps (Mega bits per second). Please note the lower "b", it's "bits", not "bytes", so it is 0.8 MB per second. To transfer 500 MB, it takes around 1 hour 20 minutes, and needs to avoid all internet connection problems (and if it happens, do the whole upload again). Commits usually take only a few seconds, as there is usually only a few Kb of code file changed. So I hope this very slow commit process won't create too much problems in the future.
Server Data
Data on the server seems to be fine. It looks like the game continued to record data over the years. One moment I thought there was a bug with incorrect data. But it happened because I forget that when developing the game, there is a special "developer" settings, which connects the game to a developer version of the database. And this version of the database is out of date. So I set up a copy of the most recent data, and now everything is fine in my development version. I use Postman to simulate the game's requests to the server. It simplifies the process a lot. But I still need to confirm that the game's data on the server is ok.
Database download
To download the database, years ago, I was using the PhpMyAdmin online interface. Or Php scripts. I wanted to just download the last automatic save from the cloud (I am using OVH). Sadly, the database contains blob data (binary data), as all level solutions are saved in binary to take as few place as possible in the database.
It works very well to take less size, but it makes everything else more complicated (like export and import). So, back to PhpMyAdmin, I do an export of the whole database with the necessary option "hexadecimal notation":
- UTF-8 (by default)
- compression: zipped (the download size goes from 50 Mb to 7 Mb)
- Dump binary columns in hexadecimal notation (by default)
The database dump is in MySQL format. But the game database uses the SQLite format, and it needs a conversion. Years ago, I made a simple Ruby script to convert MySQL to SQLite, by removing non working stuff, and replacing a few words and characters. Now I want to do it correctly by using a good tool, and I see that this is a complex process, usually involving bash scripts (with the .sh extension), running on CygWin or WSL (Windows Subsystem for Linux). CygWin and WSL are complete environment taking easily from 800 Mb to several Gb of data, just to run the most simple script. This is the kind of situation where I realize the amount of shortcuts I took to develop God is a Cube. No, making my own database conversion script, and correcting problems as they come, this is not the way to go. I should have taken the time to actually document myself seriously on all this stuff to do it correctly, rather than just trying to "make it work as fast as possible". I was feeling a great pride to be able to do this kind of stuff so fast, but I did not learn any real knowledge this way. I found a simpler solution, MySQL2SQLiteWin, which just needs an Awk executable (a programming language specialized in dealing with data formatting in text files), a SQLite executable, and a simple bash script. Sadly, running on my database dump throws a lot of errors "hex literal too big", as, I suppose, the hexadecimal are too big for the script. I looked rapidly, some of my hexadecimal data can be more than 6,400 characters. But I also see that short hexadecimal values (like 47 characters) can throw the same error. After some research, I see that the script think my hexadecimal data is a number, but it is in fact a text. I realize this hexadecimal situation is managed by my old "fast and stupid" script. So I convert the hexadecimal numbers into hexadecimal text (in Notepad++, Find 0x(01[0-9][0-9a-fA-F]+) and Replace with X'$1'). Now the errors "hex literal too big" are gone! I think that my use of binary blobs for data storing is an edge case, and that using a script for that will fail. A custom solution, fast and as simple as possible will give far better results. So it looks like the old way "fast and stupid" script is once again the way to go. This time, I'm writing the script in C#.
using System.Text.RegularExpressions;
string content = File.ReadAllText("godisacube_db.mysql");
// Remove engine
content = Regex.Replace(content, @"ENGINE=MyISAM DEFAULT CHARSET=utf8", "");
// Remove comments
content = Regex.Replace(content, @"^/*!\d+ .**/;", "", RegexOptions.Multiline);
// Remove other MySQL commands
content = Regex.Replace(content, @"^SET .", "", RegexOptions.Multiline);
content = Regex.Replace(content, @"^START .", "", RegexOptions.Multiline);
content = Regex.Replace(content, @"^USE .", "", RegexOptions.Multiline);
content = Regex.Replace(content, @"^CREATE DATABASE .", "", RegexOptions.Multiline);
content = Regex.Replace(content, @"^COMMIT;", "", RegexOptions.Multiline);
// Remove several-lines MySQL commands
content = Regex.Replace(content, @"(?:\r?\n|^)\sALTER TABLE .?;", "", RegexOptions.Singleline);
// Remove unsigned
content = Regex.Replace(content, @") UNSIGNED", ")");
// Change hexadecimal value into text
content = Regex.Replace(content, @"0x(01[0-9][0-9a-fA-F]+)", "X'$1'");
// Replace single quote bt two single quotes for escaping
content = Regex.Replace(content, @"\'", "''");
File.WriteAllText("mod.sql", content);
To execute this script, I am using csi.exe. I found it easily on my computer thanks to Everything, but I think a Windows search can locate it as well.
"C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\csi.exe" script.csx
Then I launch the SQLite import to create a SQLite database.
sqlite3 output.sqlite ".read mod.sql"
If the SQLite commands were more complex, I could create a SQLite script.
.read "mod.sql"
.exit
And launch this SQLite script with a Windows command.
sqlite3 output.sqlite < script.txt
Next time
Next time, I will start to work on the data exploration, and create charts to better visualize data from various info of the game.
[ 2023-07-09 19:47:11 CET ] [ Original post ]
I'm writing down a few notes about my process. I think it is interesting for players, and it could help other developers. Maybe I will make it into a series of article! Also, it will be precious to be able to come back here in a few years, just to find a tool url or info I will have written down.
Code Editor
I started the project in 2012 with the tools available back then. I spent years using the code editor MonoDevelop, before switching to Visual Studio 2010. The code editor attaches itself to Unity, and can easily debug the game. The thing is, it's now rather difficult to install Visual Studio 2010 with the Unity Tools from back then. And I don't think it's possible to connect Visual Studio 2022 to Unity 4 from 2012. So I have to switch back to MonoDevelop, the one built in Unity 4. I tried to setup MonoDevelop with a dark theme (black screen and white text), but it looks like themes changed since 2012. I don't want to use a more recent version of MonoDevelop as it could mess up with the game, and I don't want to bother trying to download a dark theme from 13 years ago. So I just created a new dark theme, by copy pasting some values from my Visual Studio 2022. I also set up the font to Lucidas, which gives a nice result on screen (thicker than the default font). As the resolution is now higher on computer, and MonoDevelop is old, the text is sized up by Windows and becomes blurry. Blurry text can be avoided by using High DPI options (right click on MonoDevelop.exe -> Properties -> High DPI Settings -> check "High DPI scaling override", with scaling performed by "Application"). The total setup took around one hour, but now it's working like a charm.
Git
Git is a versioning source system, a system to save code and easily compare changes between different versions of the code. It's a must have to rollback to a previous version of the project (by example before a bug). Git is one of the most common tool in the whole IT industry, used by almost all developers in the world. To give an idea, the web front GitHub, which uses Git, has been bought 7,5 billion dollars by Microsoft in 2018. But I started making video games in 2004, before the invention of Git in 2005. So even in 2012, when starting to work on God is a Cube, using Git was not part of my workflow. Now I can say that using Git is a necessity, and it will be a huge improvement on the way I am working on the project. Even if Git is made to work on code (to change a few characters) and somewhat counter productive on anything binary (such as pictures) as it saves almost the whole file everytime, creating a lot of bloat. So I remember why I wanted to get rid of unnecessary files, especially large ones. Here, I need to save a copy of the whole source on GitHub (code and textures), and there are a lot of files: around 4,200 files for 1 Gb. I needed a .gitignore file (to skip easily all temporary files created by Unity) and I found one from 2012. It says that you can ignore Unity's Library folder, but if I do so, the whole project is then messed up, with missing references. That's why I will stay safe and keep those 1,900 files in the Library folder. I made a lot of tries to see which auto-generated files I could safely ignore (csproj, unityproj, pidb) when saving source, which make things far much better. I already saved a lot of them, but hopefully I can remove them from the git save (with the command "git rm --cached
GitHub
Still, uploading 1 Gb on GitHub on a private repository, with a limited speed of 100 Kb per second, it is slow. I had to upload by batches of around 50 Mb, by creating a new directory, and put there the directories to upload / commit on GitHub. SpaceSniffer helped to identify the directories which are easier to upload first. Then I had to compare this directory to a copy of the original, because after all those manipulations, I had to be sure there was no mistake. I used WinMerge to compare both directories and detect any difference. I made some mistakes, such as puting a file in the wrong directory, forcing me to copy again the whole directory, then taking files from the wrong version of the source code... Hopefully, Git allows to easily fix this kind of problem, as it detects any file change.
First bug fix
After all this work to create a setup, it's time to correct a bug! I see that the checkboxes can be displayed at the wrong posiiton when scrolling is involved:
A few lines of code later, it is fixed:
Then I just have to commit / save the new version of the code. By the way, I am using a simple git GitHub Desktop, as I just commit my code on a main branch. If it was more complex, I would be using Sourcetree. Just fixing this small bug is the proof that my working process is now ready. I'm really glad to start working on God is a Cube again. And finally fixing problems!
Convert Markdown to Steam's markup
I don't want to write news using Steam's markup, because there are a lot of tags. So I prefer to write in Markdown, a popular and light markup format (used in GitHub and alot of palces). To do the conversion, at first, I was using https://markdowntohtml.com to do a Markdown to Html conversion, then using Steam's Html import, but it was slow. Now I'm using Steamdown to convert Markdown to Steam's markup directly. The interface is a bit bad (especially compared to MarkdownToHtml), so I intend to find a better solution.
Emojis
I found an online list of common emojis anybody can use on Steam: https://steamcommunity.com/sharedfiles/filedetails/?id=929573621 I intend to put a few of them to make my news better looking. To display a list of emojis, I could also use the shortcut "Windows + ." (or "Windows + ;" on the french keyboard), but I prefer to look at emojis like they will appear on Steam.
[ 2023-07-04 17:43:21 CET ] [ Original post ]
I intend to write regularly on my work on God is a Cube. Those will be small news. I think it's better to have too much news than too few. Here is the TL;DR:
- Dropping Mac support (keeing Windows and Linux support)
- Can still create working builds (Windows, and Linux I guess)
- Money lost on the game
- Still counting on wishlists
- Next: will correct bugs
The unnecessary files
After thinking about it, I realize that having too much unnecessary files is not a problem. Yes, it's cumbersome to look at some folders, but it's not blocking anything.I should focus on making sure that all necessary files are still there.The best test to be sure everything is in order is to create a new build of the game. To do:
- [strike]remove unnecessary files[/strike]
- focus on the build
The build
The whole build process is still working! I can create new executables, and they are running fine. I just have to change a few lines of configuration and set a few options, and everything is generated automatically.There are 3 platforms (Windows, Linux, Mac) and 3 modes (normal, advanced, demo), which is 9 different executables, with small variations. Back in the day, it was already impossible to keep all the steps in mind (and the slightest doubt forced me to redo everything), so I'm glad I put so much work into the automatic build process so it can be almost 100% automated.
Dropping Mac support
I know that a lot of things changed on Mac, including the droping of 32-bits executables. I don't think Unity 4 (from 2012) can export something working on nowadays Mac. So, sadly, I intend to drop Mac support. I will make a public announcement, remove Mac version from the Steam store, and I will refund anybody who bought a Mac version and willing to get a refund. This will be managed as case-by-case basis. Linux support will continue, as the process was simple: I export a Linux build and Linux users tell me if it's working. I always had very good feedback from Linux users, and it helped a lot, for the Linux version, as well as the game in general.If, for any reason, the Linux support is not as good as intended (maybe Linux distributions changed a lot and the game is not as compatible as before?), I will precise it in the store description. To do:
- remove Mac support from Steam
- make an announcement about dropping support for the Mac version
The wishlists
There are still 6,000 wishlists! The number droped a few hundreds per year, but still.I hope that once the game is finished and released, some of those wishlists will actually buy the game.
The sales
As Steam does not want developers to share sales numbers, I won't give too much details. I will say that in 2021 and 2022, I sold less than 100 units per year, and this year (2023), I sold less than 20 units. This is a very low number of units.But counting all sales from the beginning of the project, on Steam and other platforms, I sold more than 1,700 units. But even with those sales, I still lost at least $10,000 on the project, and at least $10,000 more on accountant fares (because I created a company, and chose to pay an accountant to fill in my taxes).Loosing money on your indie game is a common topic, still, it hurts. At least, I now have a high paying job (outside the game industry), so I am in a better situation than most of other indie game creators. Besides, I am not resuming development of God is a Cube for the money, it's more that I want to finish this project and to actually deliver it to people still wanting to play it.
Next actions
I already found a few bugs by testing the game again. I intend to correct them. It should be a good way to start again working on the code.
[ 2023-07-02 16:38:05 CET ] [ Original post ]
Introduction
I intend to resume development on God is a Cube, and to actually finish it. The game is still "99% finished", with a lot of small things to make it better. It's true that there is a lot of unattended business. Questions I did not want to ask myself and things I did not want to see. That's why I did not want to take the risk to open the project, or even to start making another game. But I realized that my real life efforts to improve my life have paid of. My life is stable, I have a good job enough to start working again on a video game project without the risk of devoting again my whole life to it. Besides, I became a C# expert, working on high performance software for top banking and oil companies. All the things that were drawing me back on God is a Cube now feel far much easier. Not that I became smarter, it's just that I clearly did not know how to work properly on a 50,000 lines of code project. Now that I have worked on code bases between 600,000 and 3,5 millions lines of code software, God is a Cube seems to be far much easier. So I can work again on God is a Cube, as a hobby. I intend to spend 5 to 10 hours every week on it. That's all for the main stuff! You can still read the rest of the news to get an idea what I am working on right now.
The choice of the last version
The last save of the original code dates from 2018-12-16. In 2019, I spent a few months working on at least 2 variants:
- a Unity 2018 version
- a mix between God is a Cube and another project (Matrix), to use the voxel rendering
The corresponding Unity version
I started working on God is a Cube in December 2012, and set my choice on a Unity version from the time, Unity v4.0.1. I kept this version during all development, as any update can break something somewhere. Tech stacks are fragile, especially video game tech stacks. I heard about studios who "freeze everything", they disable all softwares updates (even Windows updates) for up to 4 years. Hopefully, as I am a cautious man, I kept an original of the setup software, along with an offline way to run it. Long story short, it took me only around 30 minutes to install my Unity version from 2012 and to launch the project.
What struck me the most on the title screen is the "alpha" on the title. Yes, the game is still on alpha, after all those years, despite being 99% finished. There is also the copyright at the bottom. 2018, since the last time I updated the game. And 2012, when I started working on the game. More than 10 years ago. It feels like I put a whole part of my life in a box, closed it, and did not dare to open it for half a decade. On a more practical note, the game seems to be running fine. I can play a few levels. No warning, no problems. I'm glad everything seems to be fine right from the box. The game was developped on a Windows XP from 2006, I was not sure it would work in 2023. I'm glad that I did not trust any shady plugin and always tried to rely on the most basic version of any third party source. The fact the game was made to be as compatible as possible to Linux and Windows version certainly helped.
The concerns
The unnecessary files
There are a lot of unecessary files in the project, usually textures, some of them over 20 Mb. In less than a minute, I found so many strange things, including prototypes, and even some 3D files I used for tests dating from 2000. I never removed anything, by fear it could be used somewhere, but it's worse than that. Action:
- Find a way to know if resource files are used in a Unity project (from 2012)
- Deep clean all folders
The third party code
I remember adding the complete source code of a SQLite implementation, around 75,000 lines of code. It helped a lot to have a better compatibility with non-Windows version. But now I'm telling myself that adding so much code is a bad idea, especially directly in a sub folder of the Unity project. Sadly, I did not have much of a choice, as Unity forces to put the C# code in the project itself, and there was no symbolic links on Windows XP to put all that in another folder. Action:
- Identify third party code
- Separate third party code from the rest
The online
What about the online part of the game? At the end of each level, there is a comparison with all the players scores. In case the server no longer works, there is a copy of the scores in the game's files, but it was not updated for years. Hopefully, I blocked then removed the forum, as it was running on the same database than the game, and could be filled by spam bots until the whole database is full and locked. Action:
- check if the online scores still work
- check if the server still records player solutions
- check how complete is the offline copy, compared to the online version
The build pipeline
The game executables are automatically created thanks to several scripts. I remember writing them in Ruby. I did not really work with Ruby since 2009. I made some scripts, though. I also made a new version of my localization software for RPG Maker called DreaMaker, to make it work on Windows 10 (in 2021), but I wrote as few Ruby as possible. I could rewrite those scripts in C# script (thanks to Polyglot Notebooks), but I think the ruby version should be fine. Action:
- check the Ruby pipeline scripts
The Linux and Mac versions
I was very proud to support Linux (and Mac). But I am not a Linux user, so I was not even able to test the game on a Linux configuration. I still think the Linux community is a good fit for the game, as there are a lot Action:
- check the amount of Linux and Mac version sold, for all life time and during recent years
- see if other programming games are making a Linux version
The site
The site still has a lot of info about the crowdfunding, and offers to buy the game thanks to an Humble plugin. My accountant told me there was no sales on Humble for a year, so I should disable all of that. Action:
- make a new, simple web page
- remove the Humble plugin to buy the game
The crowdfunding rewards
I promised several (simple) things to early buyers of God is a Cube, such as adding their names in the credits or in the game. I'm glad my job as a crowdunfing expert made me avoid any kind of physical reward. Action:
- work on an online form for the different backer tiers
The sales
I am getting an email every month from Valve telling me there is not enough money from sales for them to send me something. I have no idea if the game is still selling units. Action:
- check the last years sales stats of the game
The wishlists
There was around 7,000 wishlists. Though, I remember numbers were getting smaller. Action:
- check the evolution of the number of wishlists
The reviews
The game has only around 10 reviews, with only 50% positive. I think the game could reach 70% positive reviews. Action:
- work on the Steam page to have a better description of the content of the game
- ask for advice about how to describe the game
A first conclusion
There is a lot of concerns, even non-programming ones. A few years ago, it was terrifying for me. But now, I see it as an escaping from all those serious real life concerns I have, when I work everyday on code far much bigger than my old video game. Adressing real life issues with code, by making software for a living, has changed my perception of what is important or what should make feel afraid. I learn so many ways to solve problems on the long term, the pain is now to realize I did not know all of this when I was working on God is a Cube, and I was doing things the hard way. I think part of my soul is in this game, and I need to reclaim it by finishing this development. It should also be a veery good exercize, to see how much I have improved since I quit the video game industry.
[ 2023-06-20 20:54:04 CET ] [ Original post ]
God is a Cube was presented at the press event Pop Culture Days in Paris, where only journalists and influencers were allowed.
This is me, Marc Kruzik. I'm making the game.
There I met tens of journalists, blogers and influencers interested to write about the game.
Every journalist got a lot of goodies
Of course those articles will be available in french publications, and that's a first very big step. Thanks to all those who tested God is a Cube!
If you are interested to know more about this event, here is a full presentation of all geek products presented (in french):
https://www.youtube.com/watch?v=g3B5x75G1CY&t=1015s
Meet indie video game developers
If you are in Paris and want to meet indie developers and play their games, just send me an email and I will give you some invitation. The developers will be glad to show you what they created! My email: contact (at) godisacube (dot) com
[ 2018-10-11 13:17:27 CET ] [ Original post ]
- God is a Cube: Programming Robot Cubes-Linux [672.17 M]
Key features
- 100 levels with open ended solutions
- 10 chapters with their own difficulty curve - if you are stuck, just start another chapter and discover something new!
- secret solutions for every level and a whole secret campaign
- 20 creative mini cutscenes and several big cutscenes to show you the world
- a complete level editor, with image cards to share your levels
- OS: almost all configs
- Processor: 2.0 GHzMemory: 2 GB RAM
- Memory: 2 GB RAM
- Graphics: a 2008 graphics card should be fine (256 Mb RAM)
- Storage: 600 MB available spaceAdditional Notes: I ported the game to Linux 3 years before launch. and tested it with thousands of users. so it should run fine on almost all configs. I hope you will like this programming game!
[ 6132 ]
[ 2625 ]