-
-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.3.0 project cannot be opened in 4.0.2 #507
Comments
Hey there 👋 I marked this issue as stale as it hadn't brought much attention for quite a while. |
This is likely due to changes in the See, for instance, here and here which contains expressions such as @CosmoMyzrailGorynych could you fix this or advise? We won't be able to continue to use ct.js if we can't import our 3.x project. |
Could you take a look at your project migration scripts? You're calling I see two problems here:
Consider this patch: --- a/src/js/projectMigrationScripts/4.0.0-next-3.js
+++ b/src/js/projectMigrationScripts/4.0.0-next-3.js
@@ -47,15 +47,15 @@ window.migrationProcess.push({
delete sound[oldKey];
}
- const newSound = createAsset();
- delete newSound.name;
- delete newSound.uid;
- newSound.preload = preload;
+ async.push(createAsset(sound.name).then((newSound => {
+ delete newSound.name;
+ delete newSound.uid;
+ newSound.preload = preload;
- Object.assign(sound, newSound);
+ Object.assign(sound, newSound);
- async.push(addSoundFile(sound, oldFile)
- .then(() => fs.remove(oldFile)));
+ return addSoundFile(sound, oldFile).then(() => fs.remove(oldFile));
+ })));
}
}
if (async.length > 0) { Alternatively, you could make |
Yes, precisely for when the IDE needs to prompt the user for a name, plus for other async tasks like copying or converting files. The common resources API requires all asset types' modules to expose a specific interface, so all asset creations tasks are awaited. |
@godmar I've pushed a fix to the |
I'm testing this now; meanwhile, another error pops up for the --- a/src/js/projectMigrationScripts/4.0.0-next-1.js
+++ b/src/js/projectMigrationScripts/4.0.0-next-1.js
@@ -12,6 +12,7 @@ window.migrationProcess.push({
}
delete project.libs.fittoscreen;
delete project.libs.touch;
+ delete project.libs.mouse;
delete project.libs['sound.howler'];
delete project.libs['sound.basic'];
|
For my test game, the sound conversion aspect now appears to work, but the game itself does not. I'll show you on Discord. PS: this issue turned out to be fixed as advised by disabling Vulkan and restarting ct.js |
More observations. After commit 1de688d the game can now be imported, but there's a semantic change that causes the existing code to fail when it comes to using the sounds API. Sounds that were marked as "background music" ( This is a breaking change - the 3.x games worked fine when these methods were called on sounds that hadn't been loaded. I believe that perhaps the semantics of these |
Describe the bug
Hi,
I have customized the base template project with my son, initially on 3.2.0, then updated to 3.3.0 with no difficulty.
Today I updated to 4.0.2 but I can't open the project in this version, getting
TypeError: Cannot get properties of undefined (reading 'length')
and I simply stay on the start screen then.To Reproduce
Steps to reproduce the behavior:
Expected behavior
Project will be opened. It will be possible to start the game and hear sounds when jumping etc.
System information report
Ct.js v4.0.2 😽 (packaged)
NW.JS v0.72.0
Chromium v109.0.5414.87
Node.js v19.3.0
Pixi.js v7.3.2
WebGPU UNAVAILABLE
WebGL available
WebGL vendor Google Inc. (NVIDIA)
WebGL renderer ANGLE (NVIDIA, NVIDIA GeForce RTX 3060 Ti Direct3D11 vs_5_0 ps_5_0, D3D11)
OS win32 x64 // Windows_NT 10.0.22631
Screenshots (recommended)
Example project (strongly recommended)
Bertas First Game.zip
The text was updated successfully, but these errors were encountered: