Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles

ct.js

Create cool 2D games with a free game editor! · By Cosmo Myzrail Gorynych

Bug thread Sticky

A topic by Cosmo Myzrail Gorynych created Jul 30, 2018 Views: 209 Replies: 25
Viewing posts 1 to 9
Developer

If you face a bug, please post about it here,

  • telling when and after which actions you got the bug so I can reproduce it on my side;
  • posting a screenshot (if possible);
  • telling whether the bug happens in a new, clean project;
  • telling which version of ct.js you have and on which platform.

You can find the version number on the app's starting screen, at the bottom of the screen.

v0.3.0 -  cannot set frame rate in the spritesheet. It keeps reset it back to 10.

Developer(+1)

Hello there,

I fixed it on my side, but the next release will be at nearest on the next week.
Still, this panel:

is just a preview and doesn't affect the actual project. The real animation speed is set by code. You can write this line of code to the 'On Create' tab to set an animation speed for a specific type:

this.imgspd = 15 / ct.speed;

Here '15' is a desired number of frames per second. This field and others may be also found in the docs > ct.types > Copies' parameters.

Thanks. I will check that.

Also when I check the 'Compress HTML & JS' in the export options, when I run the project it will throw an error, I don't remember I think its 'punc((...'  something.

Developer(+1)

Good memory! Still better make a screenshot next time ;)

The current JS compressor is indeed old and doesn't support ES6 (shame on UglifyJS) that is quite widely used in ct.js. Anyway I plan to replace it with Google Closure Compiler while adding a packing-to-executables feature. Maybe I'll release GCC integration as a hotfix this week.

there is an alternative to uglify which support/build basically for ES6, its terser.  Link => https://github.com/fabiosantoscode/terser

Developer

Thanks, will give it a shot! I didn't know about terser. It looks like a small, almost dependency-free solution.

Aaaand it turned out that google-closure-compiler-js has been deprecated/merged into google-closure-compiler just 2 days ago, and after trying to get bundle size of google-closure-compiler on https://bundlephobia.com/ the service went offline, so I think the size of it is really a killer 😳

Yeah. For me bundlephobia gives me a BuildError. 

https://babeljs.io/

Might be a good alternative

If I'm not wrong babel is just transpiler/compiler, we have to use other packages for minify/bundling process like webpack, rollup or parcel.

Developer

After thinking about it I removed terser and added google-closure-compiler-js again. It has been packing ct.js itself for a long time, so I think it is quite production-ready. (There is a LOT of JavaScript in ct.js, including 3rd-party libraries.)

My games and ct.js demos also turned out to be fully working if compiled to ES5 and compressed with its tool. It will come out this week, I think. There is still some work with internal game debugger and packing awaiting.

v0.3.0

I can not delet in any project a room, I tested it on two projects, and after pressing the delete button, the room is still there


Developer

Thanks for reporting! I fixed it; the fix will come with a nearest release.

(1 edit)

v 0.3.0

Strokes in shadows


Developer (1 edit) (+1)

This is an expected behaviour and a part of HTMLCanvas specs. Shadows apply to everything, including strokes or images.

If you need to, say, disable shadow after drawing a filled shape, you can write this:

ct.styles.set('interface');
ct.draw.rectangle(10, 10, 50, 50, false);
ct.x.shadowColor = 'transparent';
ct.draw.rectangle(10, 10, 50, 50, true);
ct.styles.reset();
(1 edit)

v 0.3.0 backgrounds dont work

im tryng to put  a png image in background, but dont work.

Developer

Seems that I'll need to release a hotfix earlier than I thought .-. Some tiny things got broken after introducing git-friendly projects, but are invisible in existing projects.
This one is fixed, await release

v 0.3.0 "delete" instead "confirm" in depth editor.

v 0.3.0 delete graphics don't work

Obs: after importing a new image, the image that should have been deleted is overwritten by the imported image.


Developer(+1)

Technically it is just UI not refresing =) Fixed; the release will come in about an hour, I guess

Goodjob! The mini Jam started, and i want use the ctjs to makes some Fun game :D

Developer

Wow :) Good luck! And the hotfix is live and is available on itch.io atm

Hi, is it possible to save a project in a specified directory? I'm getting an error on my macbook because it is trying to save in a read-only file system. I'll try to post the full error message here later:

Error: EROFS: read-only file system, mkdir

'/private/var/folders/*series of characters/numbers/T/AppTranslocation/*series of characters/numbers/ctjs.app/Contents/Versions/* series of numbers*/njws Helper.app/Contents/MacOS/projects/tst1/img'

Developer

Um, have you installed ct.js in your system in some way? I haven't faced handling such apps on macs before and thought that the app will be just extracted to some folder. And could use some more information to help mitigate this problem in future versions of ct.

And yes, you can copy your project to any directory and open it with a Browse button on the starting screen. As a workaround, here is an empty ct.js project: https://www.dropbox.com/s/clcq0d541t8xa1l/EMPTY.zip?dl=0

I just discovered this gem of a game engine and immediately fell in love with it. The workflow is very fluent and easy to grasp. Kudos to you. :)

Found a few issues :

1) Space Shooter Tutorial:

The degrees for left and right are swapped in the Space Shooter tutorial (see the "Tip" section with the coordinate system circle). It should be 0° for right and 180° for left. https://docs.ctjs.rocks/tut-making-shooter.html#moving-hostiles-and-asteroids

2) Room editor Tileset:

If you create a room and click on "Find a tileset", you get stuck in the search window with no way back to the room editor if you haven't yet created any tilesets. A back button is missing. (ct-linux64-next.zip (alpha channel))

3) ct.js license:

I am not a lawyer but I think the current license prevents games from being released under viral open source licenses like the GPL. Since the game logic gets included into the same file as the engine itself. A game released under GPL would automatically change the license of ct.js to GPL too, which infringes your license. Having the game code in a separate JavaScript file would solve this issue I think.

By the way, have you thought about releasing ct.js under an Open Source license? I see that you want to give the users the freedom to release their games under any license they want and also protect the work you put into the game engine and IDE against third parties who would use it to make money. But there are Open Source licenses out there which prevent just that while giving the users the freedom to release their games under any license they choose. Furthermore other developers could help you with the development of the game engine and IDE. What do you think?

Developer

1st and 2nd: Thanks for reporting, I fixed it and these changes will come in a nearest update.

3rd, the license: I'm not a lawyer either ¯\_(ツ)_/¯ So creating a license is a way of trial and error for me.

But it is meant that the engine files combined with yours ones are licensed under your own terms:

I will think about how to make this section more clear and readable. Actually, there are four entities: ct.IDE, the Software, the ct.js library (the engine), Your Content and user-made modules (aka catmods). ct.IDE is immutable, the ct.js lib is ok to edit, and your content and user-generated modules should be licensed by their makers.

3rd again, the OSS: the main reason that it is not open-source is that everyone wants money ✨ and I would like to monetize ct.js in some way, but also in a non-restricting (for users) one. I understand that FOSS can be monetized, too, by rewards, pledges, Patreon, donations and stuff, but this all is new to me and I'm unsure on how to do it properly. So it is not actually about licensing, as I can make my own license if I need, or just go with GPL-3.

I will make it FOSS when I will think I'm ready, but not now. Maybe it will be OSS some day, maybe it will never ever be. If you have such experience and have a story to tell, you can speed up this process.