Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Again, I would definitely not recommend to go this way. This solution might break with future versions of Pixelbox.

If you can explain why you want to build from command line, I might be able to advise a better solution or add a new feature to Pixelbox.

(1 edit)

Thanks for the instructions, even if they are not recommended.

There are several reasons I want to build from the commandline:

  1. I am using Typescript, and when I am iterating I run the Typescript compiler from the commandline, and then use the ‘Run’ menu item in Pixelbox. It is slightly annoying to have two steps to see my code changes, instead of one step. If I can build from the commandline, I can have a shell script do both things.

  2. Using either the ‘Run’ menu or built-in web server is very slow. When I use the built-in web server, index.js takes 19 seconds to load. When I am using nginx running locally with an already built index.js, it loads instantly. I don’t know why this is so slow, but I am guessing building on the commandline will be faster than what Pixelbox is doing.

  3. Touchscreen events as implemented in pointerEvents are broken. I wanted to see if I can fix them by modifying the Pixelbox core source code. It’s not clear to me how I can use my own modified version of Pixelbox core from within the Pixelbox UI. I figured this would be easy to do if I am building from the commandline.

FYI, I am developing on a Chromebook, using the Linux version of Pixelbox. I wonder if this has anything to do with why generating index.js happens so slowly.

Thanks for your response

  1. TypeScript is a language that I want to support in the future. Unfortunately I have almost no experience with TypeScript, so it might take some time before I can get something working
  2. 19 seconds sounds like a lot of time indeed. Do you have the "Add ES6 polyfills" option checked in Project > Settings > Components? I noticed this made the build process much slower. Babel transpiling also add quite some time to the build. If your TypeScript compiler generate ES5 JavaScript, try to change the scripting language option from "ES6" to "ES5" in Project > Settings > General and see if this improve the build time.
  3. I suggest to copy the nodes_module/pixelbox/pointerEvents/index.js file into your project, and require this file directly. This way you'll avoid loosing your changes if you make modifications. PointerEvent module is not yet mature. If you managed to find the problem please consider opening an issue and/or doing a pull request to the pixelbox repository ;)

If you still consider building from command line, then generating the __PROJECT_DATA__ object will probably be the biggest struggle. It might be possible to expose the function that is doing this, and make it available to custom scripts.

(+1)

Pull request for fixing touch support in pointerEvents opened here: https://github.com/cstoquer/pixelbox/pull/17

Thanks!