Git Product home page Git Product logo

summerfestival's Introduction

SummerFestival

Source code for game tutorial written by capucat

Includes: game files, assets, tutorial related files

Documentation

Game

How To's:

Install dependencies via: npm install

Build typescript and open web page via npm run start then connect to localhost:8080 from a web browser.

Controls:

SPACE: jump

SHIFT(mid-air): dash

Left/Right/Up/Down Arrows: movement

Licensing

Art Assets

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.
Art by Bianca Guerrero (capucat)

Music

"copycat" by syncopika is licensed under CC-BY 3.0
"Snowland Town" by Matthew Pablo is licensed under CC-BY 3.0
http://www.matthewpablo.com
"Jump2" by LloydEvans09 is licensed under CC-BY 3.0

Other Assets

Unless specified, all other assets are licensed under CC0

summerfestival's People

Contributors

capucat avatar carolhmj avatar docedub avatar drigax avatar polygonalsun avatar raananw avatar sebavan 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

summerfestival's Issues

White screen after startup in chrome canary 96

Hello,

I want to try out the WebGPU support and therefore, cloned the master-branch, npm install, npm run start and opened localhost:8080 in Chrome Canary version 96.0.4660.4 (with chrome://flags/#enable-unsafe-webgpu enabled). But I only get a white screen and some errors when inspecting it:

  1. Failed to load resource: the server responded with a status of 404 (Not Found)
  2. logger.js:86 BJS - [17:39:28]: Can not create WebGPU Device and/or context.
    Logger._ErrorEnabled @ logger.js:86
  3. logger.js:86 BJS - [17:39:28]: TypeError: Cannot read properties of undefined (reading 'slice')
    Logger._ErrorEnabled @ logger.js:86
  4. uniformBuffer.js:47 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'trackUbosInFrame')
    at new UniformBuffer (webpack:///./node_modules/@babylonjs/core/Materials/uniformBuffer.js?:47)
    at Scene._createUbo (webpack:///./node_modules/@babylonjs/core/scene.js?:1432)
    at new Scene (webpack:///./node_modules/@babylonjs/core/scene.js?:682)
    at App.eval (webpack:///./src/app.ts?:43)
    at Generator.next ()
    at fulfilled (webpack:///./src/app.ts?:5)

The Ocean Demo playground example https://playground.babylonjs.com/#YX6IB8#27 does work though.

What am I doing wrong? Can you please help?

Thank you.

How where you able to use github pages with you game?

Hello

This is more of a question.
I have a project following this tutorial: https://doc.babylonjs.com/guidedLearning/createAGame which is based on your project.
I want to be able to open the project using github.io - github pages, as same as you did on your page:
image

I can play my scene locally with localhost, and I've tried to play my scene with github pages, but this is what I get:
https://ecoeditor.github.io/ParticleSystem_Level2/

My question is how did you manage to host your game on github pages, even though you're index.html file is in the public directory?
I've renamed my "public" directory to 'docs" and in the settings I chose "Master/docs", but its still not working.

Thank you.

TS2552: Cannot find name ‘AdvancedDynamicTexture’. Did you mean ‘EditAdvancedDynamicTexture’

Hello all
Im following the great tutorial on [the site]
(https://doc.babylonjs.com/guidedLearning/createAGame/stateMachine)
also looking on the source code

And it gives me error :

untime modules 27.3 KiB 12 modules
./src/app.ts 2.17 KiB [built] [code generated] [1 error]

ERROR in C:\dev\my\js\babylon\proj1\src\app.ts
./src/app.ts 70:24-46
[tsl] ERROR in C:\dev\my\js\babylon\proj1\src\app.ts(70,25)
      TS2552: Cannot find name 'AdvancedDynamicTexture'. Did you mean 'EditAdvancedDynamicTexture'?
ts-loader-default_e3b0c44298fc1c14

The code :

import "@babylonjs/core/Debug/debugLayer";
import "@babylonjs/inspector";
import "@babylonjs/loaders/glTF";
 
import { Engine, Scene, ArcRotateCamera, Vector3, HemisphericLight, Mesh, MeshBuilder, Color4, FreeCamera } from "@babylonjs/core";
import { AdvancedDynamicTextureTreeItemComponent } from "@babylonjs/inspector/components/sceneExplorer/entities/gui/advancedDynamicTextureTreeItemComponent";
import { EditAdvancedDynamicTexture } from "@babylonjs/inspector";

enum State { START=0,GAME=1,LOSE=2,CUTSCENE=3}

class App {

    private _scene: Scene;
    private _canvas: HTMLCanvasElement;
    private _engine: Engine;

    private _state: number = 0;

    constructor() {
        console.log("constructor!");
        var canvas = this._createCanvas();
       

        this._engine = new Engine(canvas,true);
        this._scene = new Scene(this._engine);

        var camera: ArcRotateCamera = new ArcRotateCamera("Camera",Math.PI/2,Math.PI/2,2,Vector3.Zero(),this._scene);
        camera.attachControl(canvas,true);
        var light1:HemisphericLight = new HemisphericLight("light1",new Vector3(1,1,0),this._scene);
        var sphare:Mesh = MeshBuilder.CreateSphere("sphere",{ diameter:1},this._scene);

        window.addEventListener("keydown",(ev) => {
            console.log("keydown"); 
            if(ev.key == 'i') {
                console.log("Press !!");
                if(this._scene.debugLayer.isVisible()){
                    this._scene.debugLayer.hide();
                } else {
                    this._scene.debugLayer.show();
                }
            } 
        });


        this._engine.runRenderLoop(()=>{
            this._scene.render();
        });


    }

    private _createCanvas() : HTMLCanvasElement {
        this._canvas = document.createElement("canvas");
        this._canvas.style.width = "100%";
        this._canvas.style.height = "100%";
        this._canvas.id = "gameCanvas";
        document.body.appendChild(this._canvas);
        return this._canvas;
        
    }

    private _goToStart() {
        this._engine.displayLoadingUI();
        this._scene.detachControl();
        let scene = new Scene(this._engine);
        scene.clearColor = new Color4(0,0,0,1);
        let camera = new FreeCamera("camera1",new Vector3(0,0,0),scene);
        camera.setTarget(Vector3.Zero());

        const guiMenu = AdvancedDynamicTexture.CreateFullscreenUI("UI");



    }

}

new App();

Obviously, this code is not updated. What is the replacement for it? I also don't see any changes in the documentation of Babylon

npm run build doesn't copy assets from publics into dist folder

we should probably add something along the lines of:

const CopyWebpackPlugin = require('copy-webpack-plugin');
...
...
plugins: [
        new CopyWebpackPlugin({ //uncomment for production build.
            patterns: [
                { from: 'public' }
            ]
        }),
        ...
    ],

to our webpack.config.js to allow for building -> installation.

I ran into a similar issue with https://github.com/Drigax/RooftopRampage_Source/blob/master/webpack.config.js where including this into our webpack configuration now breaks local webserver functionality, as the files are not where the webserver expects them I assume.

Also JS?

This repository and the explanation on BabylonJS (https://doc.babylonjs.com/how_to/page1) is great!
I've one problem though because I haven't learned to use TypeScript (yet). Is it possible to convert the code from .ts to .js?

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.