Giter Club home page Giter Club logo

superpowers-game's Introduction

Superpowers Game

Build Status

Make 2D and 3D games in live collaboration with Superpowers using TypeScript. Powered by Three.js under the hood!

How to install

Superpowers Game is currently bundled with Superpowers so there is no need to install it manually.

See Building Superpowers for information on building from sources.

superpowers-game's People

Contributors

abclivefr avatar agilejoshua avatar anatagawa avatar bilou84 avatar elisee avatar felladrin avatar florentpoujol avatar getterac7 avatar hashalon avatar ikalou avatar marcosecchi avatar mathieuloutre avatar mattdiener avatar na-sa-do avatar nitpum avatar ralmn avatar rtauziac avatar shadowtzu avatar w84miracle avatar wend1go avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

superpowers-game's Issues

sprite: Store texture into next-power-of-two sized canvas

Since r73, Three.js automatically resizes textures to the nearest power of two (which might be smaller) in some cases. This means we might loose pixel data: if a sprite is 70x130, it will be resized to 64x128! This is due to WebGL 1.x limitations that will go away with WebGL 2, but we can't just sit and wait for it to happen.

To counteract that, we probably want to create a canvas with next-power-of-two width and height (not nearest, next, so 70x130 would import into a 128x256 canvas) and draw the original texture unscaled into it so that it is not distorted on import. And we'd need to adapt texture coordinates accordingly.

Not entirely sure whether we should try to make this completely transparent for the user (do the change behind the scenes but hide it), or just always resize and enforce PoT textures for sprites. ... There are implications about animations and frames though.

Also of note: at the moment, we allow using any kind of formats for sprites (GIF, JPG, PNG). If we end up editing the source file on import, we could always generate a PNG and return that on download. Which probably makes more sense anyway?

scene: Improve editor load time

When loading the scene editor, a lot of scripts from every plugin is loaded here.

There are currently fetched in series when they could be loaded in parallel.
I already did this kind of change in the settings plugin. See this commit for reference.

One important point to note. SupClient.activePluginPath must be set just before the componentEditors scripts are executed, so that each of them has their proper path for loading i18n files and stuff like that. It should be possible to achieve this when loading the scripts in parallel by listening for the "beforescriptexecute" event for each of the scripts and doing it when it is triggered.

Allow multiple tilesets in a single tilemap

For example I have a tileset with all the characters, another with the font, and another with the background elements, and I would like to be able to use elements from all of these tilesets in a single tilemap. Let me know what you think ! ๐Ÿ˜„

itch.io embed - cross-domain iframe can't access localstorage

Cross-domain iframe can't access localstorage. This is may be more of an itch.io problem than superpowers-game. Your best solution may be to defensively wrap localstorage with a try-catch.

domain is http://sparklinlabs.itch.io/fat-kevin
iframe is http://commondatastorage.googleapis.com/itchio/html/93556/LastFinalKevin/player/index.html

results in error:

Uncaught SecurityError: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.

on Google Chrome version 47.0.2526.106 (64-bit)

image

image

sprite, font & co: Prevent scrolling too far

The bounding box of the sprite / font / map should be computed and we should prevent scrolling past the preview. It should be possible to get it completely off screen, but no farther than that.

typescript: Allow customizing asset properties

Let's use the SupCore.system.registerPlugin (or maybe SupClient.registerPlugin?) to expose a mapping between asset classes and asset types to the behavior editor. Then we can use it to allow customizing behavior properties of those classes.

CubicModelEditor RenderView freezes when using Stretch

Upon opening a Cubic Model in the Editor and then selecting a Node and trying to use the Stretch Transform, the Viewport of the Editor just freezes. Only closing and reopening the Asset solves the problem.

Console is throwing the following exception:

Uncaught TypeError: Cannot read property 'update' of undefined
THREE.TransformControls.domElement.update @ components.js:964
THREE.TransformControls.domElement.setMode @ components.js:907
TransformHandle.setMode @ components.js:1330
onTransformModeClick @ index.js:19482
components.js:964 Uncaught TypeError: Cannot read property 'update' of undefined
THREE.TransformControls.domElement.update @ components.js:964
TransformHandle.update @ components.js:13244
.Actor.update @ SupEngine.js:36602
(anonymous function) @ SupEngine.js:369328
.GameInstance.update @ SupEngine.js:369328
.GameInstance.tick @ SupEngine.js:36900
tick @ index.js:18419

Sup.Actor.rotateLocalEulerAngles should use instrinsic rotations

It looks like our current implementation of Sup.Actor.rotateLocalEulerAngles uses extrinsic rotations, which basically means: it's wrong. We should use yaw pitch roll (so intrinsic rotations).

There might be other related bugs and we should do a thorough test, but that's the main one we encountered. Also, we should clean up our Sup.Actor class to use THREE.js's .rotation and .quaternion were appropriate, rather than going through the quaternion each time.

cannon: Add more options to Cannon Body component editor

It would be nice if we could control precisely how a cannon collider should be created in the scene editor.
For example i wish to be able to set the group and the mask of a cannon body and being able to select the number of segment created for a cylinder (8 segments is enough for a grenade where as 32 would be better for wheels)

Allow opening documentation for the current editor or tool with F1

The documentation plugin provides a generic mechanism for plugins to register one or more Markdown documentation pages.

It would be nice to be able to call up the related documentation page for the current editor or tool by pressing F1 (or later, clicking some button).

osx crash on export, "'NSImageCacheException', reason: 'Cannot lock focus on image <NSImage 0x7fa665a658c0 Size={0, 0} Reps=( )>, because it is size zero.'"

On OSX 10.11.2

using the standalone client

  • I create a project with the 2d platformer template
  • I hit export and go to an empty directory and click open
    bang crash

salient-lookin error line here:
'NSImageCacheException', reason: 'Cannot lock focus on image <NSImage 0x7fa665a658c0 Size={0, 0} Reps=(
)>, because it is size zero.'

full crashlog here:
crashlog.txt

typescript: Generate a live-updated typed asset tree

This will make renaming and reparenting assets much less risky since errors will automatically be reported in the editor if an asset no longer exists. Also, the returned asset will have the correct type right away (no need for Sup.get("Some Asset", Sup.SomeAssetType)).

Something like that:

    Sup.entries["World Map"]["Mushroom"].asset
    Sup.entries["World Map"]["Mushroom"].loadAsset(() => {});
    Sup.entries["World Map"]["Mushroom"].cloneFromStorage((newAsset) => {
      // ...
    });

Can't input characters in input fields in the player

Since a few versions back, you can't anymore input characters (letters, signs, numbers) in HTML input fields in the player.

Happens for any kind of inputs fields as well as for textareas.
Happens in the browser (Chrome) and the app.
All other kind of inputs works : enter, backscape, delete, tab keys, mouse clicks...
You can also copy/paste character from/to the field.

It works in the "web" system, so that's why I post this as an issue for supGame.

scene: Improve selection raycasting

When clicking multiple times, the editor should cycle through the various raycast candidates so that objects behind the first one can be selected too.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.