Commit Graph

95 Commits

Author SHA1 Message Date
tobspr 291614cb3c Support for building wegame specific version 2021-05-25 21:29:44 +02:00
tobspr 56214defaf Support for building on non-steam platforms 2021-05-25 13:12:38 +02:00
tobspr 0f5ec8b62a Fix gulpfile tasks 2021-05-25 09:42:30 +02:00
tobspr b3d1204d9c Wegame version & DLC Translation in Chinese 2021-05-25 09:19:57 +02:00
tobspr 931c8a5821
Puzzle DLC (#1172)
* Puzzle mode (#1135)

* Add mode button to main menu

* [WIP] Add mode menu. Add factory-based gameMode creation

* Add savefile migration, serialize, deserialize

* Add hidden HUD elements, zone, and zoom, boundary constraints

* Clean up lint issues

* Add building, HUD exclusion, building exclusion, and refactor

- [WIP] Add ConstantProducer building that combines ConstantSignal
and ItemProducer functionality. Currently using temp assets.
- Add pre-placement check to the zone
- Use Rectangles for zone and boundary
- Simplify zone drawing
- Account for exclusion in savegame data
- [WIP] Add puzzle play and edit buttons in puzzle mode menu

* [WIP] Add building, component, and systems for producing and
accepting user-specified items and checking goal criteria

* Add ingame puzzle mode UI elements

- Add minimal menus in puzzle mode for back, next navigation
- Add lower menu for changing zone dimenensions

Co-authored-by: Greg Considine <gconsidine@users.noreply.github.com>

* Performance optimizations (#1154)

* 1.3.1 preparations

* Minor fixes, update translations

* Fix achievements not working

* Lots of belt optimizations, ~15% performance boost

* Puzzle mode, part 1

* Puzzle mode, part 2

* Fix missing import

* Puzzle mode, part 3

* Fix typo

* Puzzle mode, part 4

* Puzzle Mode fixes: Correct zone restrictions and more (#1155)

* Hide Puzzle Editor Controls in regular game mode, fix typo

* Disallow shrinking zone if there are buildings

* Fix multi-tile buildings for shrinking

* Puzzle mode, Refactor hud

* Puzzle mode

* Fixed typo in latest puzzle commit (#1156)

* Allow completing puzzles

* Puzzle mode, almost done

* Bump version to 1.4.0

* Fixes

* [puzzle] Prevent pipette cheats (miners, emitters) (#1158)

* Puzzle mode, almost done

* Allow clearing belts with 'B'

* Multiple users for the puzzle dlc

* Bump api key

* Minor adjustments

* Update

* Minor fixes

* Fix throughput

* Fix belts

* Minor puzzle adjustments

* New difficulty

* Minor puzzle improvements

* Fix belt path

* Update translations

* Added a button to return to the menu after a puzzle is completed (#1170)

* added another button to return to the menu

* improved menu return

* fixed continue button to not go back to menu

* [Puzzle] Added ability to lock buildings in the puzzle editor! (#1164)

* initial test

* tried to get it to work

* added icon

* added test exclusion

* reverted css

* completed flow for building locking

* added lock option

* finalized look and changed locked building to same sprite

* removed unused art

* added clearing every goal acceptor on lock to prevent creating impossible puzzles

* heavily improved validation and prevented autocompletion

* validation only checks every 100 ticks to improve performance

* validation only checks every 100 ticks to improve performance

* removed clearing goal acceptors as it isn't needed because of validation

* Add soundtrack, puzzle dlc fixes

Co-authored-by: Greg Considine <gconsidine@users.noreply.github.com>
Co-authored-by: dengr1065 <dengr1065@gmail.com>
Co-authored-by: Sense101 <67970865+Sense101@users.noreply.github.com>
2021-05-23 16:32:05 +02:00
Tobias Springer 5a3da57f10 Fix missing dependencies, autoformat 2021-03-14 09:52:15 +01:00
tobspr 4bc918dedd Add finish, italian, romania, ukrainian, minor adjustments 2021-03-12 12:42:16 +01:00
Tobias Springer 226149a40f Prepare the achievements update 2021-03-10 09:29:20 +01:00
Greg Considine 26b842494f
Achievements (#1087)
* [WIP] Add boilerplate for achievement implementation

* Add config.local.template.js and rm cached copy of config.local.js

* [WIP] Implement painting, cutting, rotating achievements (to log only)

* [WIP] Refactor achievements, jsdoc fixes, add npm script

- Refactor achievements to make use of Signals
- Move implemented achievement interfaces to appropriate
platform folders (SteamAchievements in currently in use
in browser wrapper for testing)
- Fix invalid jsdocs
- Add dev-standalone script to package.json scripts

* Add steam/greenworks IPC calls and optional private-artifact dependency

* Include private artifacts in standalone builds

* Uncomment appid include

* [WIP] Add steam overlay fix, add hash to artifact dependency

* Update electron, greenworks. Add task to add local config if not present

* Add more achievements, refactor achievement code

* Add receiver flexibility and more achievements
- Add check to see if necessary to create achievement and add receiver
- Add remove receiver functionality when achievement is unlocked

* Add achievements and accommodations for switching states
- Fix startup code to avoid clobbering achievements on state switch
- Add a few more achievements

* Add achievements, ids. Update names, keys for consistency

* Add play time achievements

* [WIP] Add more achievements

* Add more achievements. Add bulk achievement check signal

* [WIP] Add achievements. Start savefile migration

* Add achievements. Add savefile migration

* Remove superfluous achievement stat

* Update lock files, fix merge conflict
2021-03-10 07:33:39 +01:00
Tobias Springer afdce2268e Minor path fixes 2021-03-09 11:44:12 +01:00
Tobias Springer 1ee03d7398 Adjustments to support chinese versions 2021-03-09 10:07:19 +01:00
dengr1065 b51c0fdbd4
Replace gulp-sass with gulp-dart-sass (#1036) 2020-12-25 22:57:57 +01:00
tobspr aa2b64eae5 Fix items overlapping sometimes, fix constant signal being editable 2020-12-09 10:41:49 +01:00
Polarbub f92a04f1df
Fix Dependency errors (#996) 2020-12-07 18:48:22 +01:00
Polarbub 91cb53b6ce
Fix Dependency errors (#869)
* Add files via upload

* Fixed Dependence error

* Fixed Dependence errors

* Add files via upload

* Add files via upload
2020-10-31 12:07:25 +01:00
tobspr 8260edb373 Get rid of some todos / fixmes 2020-10-08 19:47:27 +02:00
tobspr 816fd37b55 Fix build 2020-10-06 17:25:58 +02:00
tobspr 9217ee252d MInor adjustments to atlas padding 2020-10-04 09:30:31 +02:00
dengr1065 a02438a70a
LibGDX Texture Packing (finally!) (#755)
* Format tsconfig, remove atlas files

* Add helpers for texture packing

* Rest of the texture packing...

* Update gitignores

* Update readme
2020-10-04 09:21:37 +02:00
dengr1065 56ca6b40c5
Remove git lfs install from gulpfile (#731) 2020-10-01 10:20:47 +02:00
tobspr f984733783 Add store page to translations 2020-09-29 20:40:55 +02:00
tobspr c4d709b8e4 Add steampipe files and upgrade electron 2020-09-29 19:07:48 +02:00
tobspr c32133f460 Get rid of remaining gitattributes 2020-09-28 14:31:57 +02:00
tobspr 507121b886 Load css async 2020-09-28 12:24:52 +02:00
LeopoldTal b9b8592a07
Build, sign, notarise, & upload on OS X (#687)
* sign & notarise darwin package

* upload bundle as github release

* allow unsigned build and full build with release

* deref darwin bundle symlinks only when building on win32

Windows [mangles symlinks](https://github.com/electron/electron-packager/issues/71). Currently we work around this by placing several copies of the frameworks in OS X app bundles (see 1e5aa3867d). However:

- This is invalid: the framework toplevel must [only contain symlinks](https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/FrameworkAnatomy.html). `codesign` [refuses to sign](https://stackoverflow.com/questions/25969946/osx-10-9-5-code-signing-v2-signing-a-framework-with-bundle-format-is-ambiguou) this invalid structure.

- It seriously bloats the bundle.

Since there's no fix for the Windows misbehaviour, keep the workaround, but only when cross-building on win32 for darwin; and log a warning.
2020-09-27 23:14:43 +02:00
tobspr d4dd30857e Further pre-release adjustments 2020-09-24 16:12:05 +02:00
tobspr c54ec9fd2a Restructure buildings 2020-09-24 12:53:40 +02:00
tobspr e040a47195 Update regular layer building descriptions, update artwork 2020-09-23 15:20:12 +02:00
tobspr 1f12e755a9 Load css resources async, improve building descriptions 2020-09-23 11:14:35 +02:00
LeopoldTal ff2274f671
fix size overflow when building sounds (#676)
Building the standalone with V8 v8 (Node v14) fails at step `sounds.musicHQ`, either by running out of memory or with the error "Invalid string length". Building with V8 v7 (Node v12) succeeds.

This is because `gulp-cache` builds a 994-MB string when [stringifying file contents](https://github.com/jgable/gulp-cache/blob/master/src/task-proxy.js#L262) to cache them. V8 v8 [limits string length to around 537 MB](https://github.com/v8/v8/blob/master/src/objects/string.h#L384), and thus cannot represent this string. (V8 v7 allows around 1074 MB, which is why the build passes on Node v12.)

But [`theme-full.mp3`](https://github.com/tobspr/shapez.io/blob/master/res_raw/sounds/music/theme-full.mp3) is only 79 MB: how did we get 1250% overhead?

Unlike plaintext files, binary files are read as buffers, but [by default](https://github.com/jgable/gulp-cache/blob/master/src/index.js#L46) `gulp-cache` stringifies them naively, producing the extremely inefficient representation:

````
[
  {
    "cwd": "/Users/tobspr/shapez.io/gulp",
    "base": "/Users/tobspr/shapez.io/res_raw/sounds/music",
    "contents": {
      "type": "Buffer",
      "data": [
        73,
        68,
        51,
        4,
        0,
        0,
…etc.
````

Fortunately, `gulp-cache` [can read base64-encoded cache files](https://github.com/jgable/gulp-cache/blob/master/src/index.js#L26).

Instead of using the default file transform function, **pass a `value` option to base64-encode the file contents**. This results in only 33% overhead on cache file size (106 MB for the largest file).

This has multiple benefits:

- Fixes the build failure
- Requires less memory (from 6 GB down to < 1 GB on my machine)
- When cache files are found, the `sounds.musicHQ` is much faster (from ~30 s down to ~4 s on my machine)
- Smaller cache files on disk
2020-09-21 08:37:50 +02:00
tobspr ecbf9d7e78 Revert worker loader change 2020-08-10 19:54:11 +02:00
Bjorn Stromberg 997fabd52c
Remove more unused dependencies (#527)
* Remove more unused dependencies

* Remove gulp-jsbeautifier
2020-08-07 09:16:23 +02:00
Bjorn Stromberg d2f9fd6ec8
Improve types for web workers (#502)
* Improve types for web workers

* Move worker-loader config inline

* Remove trailing spaces in translations
2020-07-27 17:06:12 +02:00
Bjorn Stromberg 3bae1c8ec3
Remove sloc, it appears to be unused. (#503) 2020-07-27 11:07:25 +02:00
Bjorn Stromberg 3af36c5948 - Update webpack from v4.31.0 to v4.43.0
- Update webpack-stream from v5.1.0 to v5.2.1
- Remove webpack-stream from shapez.io
2020-07-21 21:41:13 +09:00
Bjorn Stromberg fa53a5d2e1 Update browser-sync from v2.24.6 to v2.26.10 2020-07-21 10:34:29 +09:00
tobspr 0d74af92a7 Further mac os fixes 2020-07-06 15:29:17 +02:00
tobspr 1e5aa3867d Allow building mac on windows, closes #355 2020-07-06 15:08:17 +02:00
tobspr 6c6ad6af22 Update standalone build script 2020-07-06 08:14:44 +02:00
tobspr 83d635269c Add alpha build functionality 2020-07-05 12:54:43 +02:00
tobspr 722c8ef836 Start to rework the graphics for the wires layer, make wires cooler than belts 2020-06-30 12:38:20 +02:00
tobspr 17123fd7b9 Further work on the energy generator 2020-06-28 11:44:30 +02:00
tobspr 757b79b69e Update gulpfile 2020-06-27 10:54:21 +02:00
tobspr 30abb9c088 Update gulfile 2020-06-27 10:53:13 +02:00
tobspr 2e266f5f21 Get rid of 'builtins' file since its useless and causes performance issues 2020-06-27 10:51:52 +02:00
tobspr de94c6ea82 Add 'copy key' button to shape viewer 2020-06-24 21:03:46 +02:00
tobspr b3de1f9207 Re-enable analytics 2020-06-24 17:59:43 +02:00
tobspr a8b37792e4 Allow configuring autosave interval 2020-06-22 12:09:02 +02:00
tobspr 5e83c4642b Reduce sound volume 2020-06-21 22:56:38 +02:00
tobspr 2c0f0f2152 Fix standalone build 2020-06-17 15:10:14 +02:00