Jump to content

Search the Community

Showing results for tags 'basic'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 6 results

  1. Good afternoon my name is Gary a pleasure, I am new and decided to raise babylon on the recommendation of a friend. I can do the basic example of the site (version js), but now I try to do it using the version typescript, but doing so I get the following error: src/ts-reference/babylon.2.5.d.ts(2,11): error TS2300: Duplicate identifier 'InstancingAttributeInfo'. src/ts-reference/babylon.2.5.d.ts(29,11): error TS2300: Duplicate identifier 'EngineCapabilities'. src/ts-reference/babylon.2.5.d.ts(71,11): error TS2300: Duplicate identifier 'Engine'. src/ts-reference/babylon.2.5.d.ts(1145,11): error TS2300: Duplicate identifier 'Node'. src/ts-reference/babylon.2.5.d.ts(1254,11): error TS2300: Duplicate identifier 'PointerEventTypes'. src/ts-reference/babylon.2.5.d.ts(1270,11): error TS2300: Duplicate identifier 'PointerInfoBase'. src/ts-reference/babylon.2.5.d.ts(1279,11): error TS2300: Duplicate identifier 'PointerInfoPre'. src/ts-reference/babylon.2.5.d.ts(1288,11): error TS2300: Duplicate identifier 'PointerInfo'. src/ts-reference/babylon.2.5.d.ts(1295,11): error TS2300: Duplicate identifier 'RenderingGroupInfo'. src/ts-reference/babylon.2.5.d.ts(1337,11): error TS2300: Duplicate identifier 'Scene'. src/ts-reference/babylon.2.5.d.ts(2083,11): error TS2300: Duplicate identifier 'Action'. src/ts-reference/babylon.2.5.d.ts(2115,11): error TS2300: Duplicate identifier 'ActionEvent'. src/ts-reference/babylon.2.5.d.ts(2156,11): error TS2300: Duplicate identifier 'ActionManager'. src/ts-reference/babylon.2.5.d.ts(2257,11): error TS2300: Duplicate identifier 'Condition'. src/ts-reference/babylon.2.5.d.ts(2268,11): error TS2300: Duplicate identifier 'ValueCondition'. src/ts-reference/babylon.2.5.d.ts(2289,11): error TS2300: Duplicate identifier 'PredicateCondition'. src/ts-reference/babylon.2.5.d.ts(2295,11): error TS2300: Duplicate identifier 'StateCondition'. src/ts-reference/babylon.2.5.d.ts(2306,11): error TS2300: Duplicate identifier 'SwitchBooleanAction'. src/ts-reference/babylon.2.5.d.ts(2316,11): error TS2300: Duplicate identifier 'SetStateAction'. src/ts-reference/babylon.2.5.d.ts(2323,11): error TS2300: Duplicate identifier 'SetValueAction'. src/ts-reference/babylon.2.5.d.ts(2334,11): error TS2300: Duplicate identifier 'IncrementValueAction'. src/ts-reference/babylon.2.5.d.ts(2345,11): error TS2300: Duplicate identifier 'PlayAnimationAction'. src/ts-reference/babylon.2.5.d.ts(2355,11): error TS2300: Duplicate identifier 'StopAnimationAction'. src/ts-reference/babylon.2.5.d.ts(2362,11): error TS2300: Duplicate identifier 'DoNothingAction'. src/ts-reference/babylon.2.5.d.ts(2367,11): error TS2300: Duplicate identifier 'CombineAction'. src/ts-reference/babylon.2.5.d.ts(2374,11): error TS2300: Duplicate identifier 'ExecuteCodeAction'. src/ts-reference/babylon.2.5.d.ts(2379,11): error TS2300: Duplicate identifier 'SetParentAction'. ... src/ts/babylon.ts(7962,15): error TS2417: Class static side 'typeof Box' incorrectly extends base class static side 'typeof _Primitive'. Types of property 'Parse' are incompatible. Type '(parsedBox: any, scene: Scene) => Box' is not assignable to type '(parsedVertexData: any, scene: Scene, rootUrl: string) => Geometry'. Type 'Box' is not assignable to type 'Geometry'. Types have separate declarations of a private property '_scene'. src/ts/babylon.ts(8073,11): error TS2300: Duplicate identifier 'GroundMesh'. ... src/ts-reference/babylon.2.5.d.ts(16940,11): error TS2300: Duplicate identifier 'DefaultRenderingPipeline'. src/ts-reference/babylon.2.5.d.ts(16995,11): error TS2300: Duplicate identifier 'LensRenderingPipeline'. src/ts-reference/babylon.2.5.d.ts(17086,11): error TS2300: Duplicate identifier 'SSAO2RenderingPipeline'. src/ts-reference/babylon.2.5.d.ts(17197,11): error TS2300: Duplicate identifier 'SSAORenderingPipeline'. Looking in this same forum I found that someone said that the solution was to update according to this version: https://github.com/BabylonJS/Babylon.js/blob/master/dist/preview release/babylon.d.ts but it does not work: my code: game.ts file /// <reference path = "../ts-reference/babylon.2.5.d.ts" /> class Game { private _canvas: HTMLCanvasElement; private _engine: BABYLON.Engine; private _scene: BABYLON.Scene; private _camera: BABYLON.FreeCamera; private _light: BABYLON.Light; constructor(canvasElement : string) { // Create canvas and engine this._canvas = <HTMLCanvasElement> document.getElementById(canvasElement); this._engine = new BABYLON.Engine(this._canvas, true); } createScene() : void { // create a basic BJS Scene object this._scene = new BABYLON.Scene(this._engine); // create a FreeCamera, and set its position to (x:0, y:5, z:-10) this._camera = new BABYLON.FreeCamera('camera1', new BABYLON.Vector3(0, 5,-10), this._scene); // target the camera to scene origin this._camera.setTarget(BABYLON.Vector3.Zero()); // attach the camera to the canvas this._camera.attachControl(this._canvas, false); // create a basic light, aiming 0,1,0 - meaning, to the sky this._light = new BABYLON.HemisphericLight('light1', new BABYLON.Vector3(0,1,0), this._scene); // create a built-in "sphere" shape; with 16 segments and diameter of 2 let sphere = BABYLON.MeshBuilder.CreateSphere('sphere1', {segments: 16, diameter: 2}, this._scene); // move the sphere upward 1/2 of its height sphere.position.y = 1; // create a built-in "ground" shape let ground = BABYLON.MeshBuilder.CreateGround('ground1', {width: 6, height: 6, subdivisions: 2}, this._scene); } animate() : void { // run the render loop this._engine.runRenderLoop(() => { this._scene.render(); }); // the canvas/window resize event handler window.addEventListener('resize', () => { this._engine.resize(); }); } } window.addEventListener('DOMContentLoaded', () => { // Create the game using the 'renderCanvas' let game = new Game('renderCanvas'); // Create the scene game.createScene(); // start animation game.animate(); }); index.pug doctype html html head title= title meta(name='viewport', content='width=device-width, initial-scale=1.0', charset="utf-8") style include ../css/style.css script include ../js/babylon.2.5.max.js include ../js/bGUI.js include ../js/hand.min.1.3.8.js include ../js/cannon.js include ../js/game.js body h1= message div#GUI canvas#renderCanvas
  2. I've been updating my base projects in-line with ECMA2015 standard. There is a lot of good stuff I really enjoy in this. I think the use of classes really makes code more easy on the eyes and easier to manager. I've created a base project using the Basic Game example tutorial using some of the new stuff. BasicPhaserGameECMA2015 I've not setup the menu or gameover states, but that should be simple enough. Hope you guys get some use out of it.
  3. I know something seems to be wrong here. I"m using the simpliest example, the one in the beginning docs, the full HTML given there. I am running static. I've managed to get the HTML to load statically (i.e. no localserver, no webserver, just off the desktop) and have the generated babylon.js file in the same directory as the index.html page. I know it's loading and finding the .js file. It fails in the same place whether I use my custom generated babylon js file or if I point the page to the same babylon.js file that the playground uses. the error from the inspector is: Uncaught TypeError: scene.render is not a function I am running in Chrome, but I have no issues with running Playground in Chrome. Also the HTML does the same thing in IE (though it's debugger picks up no errors, just won't run beyond creating the canvas). Error reported from Chrome: BJS - [17:31:37]: Babylon.js engine (v3.1-alpha) launched index.html:79 Uncaught TypeError: scene.render is not a function at index.html:79 at r._renderLoop (babylon.js:4) It points at the line in index.html (at scene.render) engine.runRenderLoop(function () { // Register a render loop to repeatedly render the scene scene.render(); }); Attaching the index.html file. Any ideas? I don't want to have to deal with localserver. And am working on a way to load OBJ files (that's how I got here. I wanted to see if I could get the objloader to work from the desktop, since I cannot get it to work in the Playground via file chooser. I can only get .babylon files to load successfully in that case.) If you're curious about that, see: https://www.babylonjs-playground.com/#6N13NV#7 So I thought I would try a different tack. After all, I should be able to load .js files locally (static HTML), including the objloader extension. But I didn't anticipate that I would have problems with getting babylon.js to work in that situation. It seems it must be something simple, after all this is just the beginner sample that the docs list. Nothing fancy. But after a number of hours of searching forums and experimenting, I'm out of ideas. Thanks! index.html
  4. Greetings! I see quite often around these parts and in further fields, that there are constantly people who are just starting out asking how to add networked multiplayer functionality to their HTML5 games. I was one of them, and I hated the near absence of practical explanations that were written in concise, plain-English, yet still detailed, of how to get started. So, I made a simple game example/template using Socket.io and Phaser, and documented the hell out of it. Almost everything gets a few lines of comments to explain what is doing what, and I haven't assumed any prior knowledge, aside from core JavaScript and being able to set up NodeJS and how to view the game in a browser. The main focal point is using Socket.io, as the game framework can be easily interchanged to one of your preference. Hopefully this will save a few hours and headaches for people who don't have a clue what they are doing. https://github.com/Arcanorum/basic-networked-multiplayer-game
  5. Hi I am new in this 3d field and I am looking for a right tools to build my dream game. I have read and seen some demos that use Babylon.js and I want to make sure that with Babylon.js I can make this game, so I want to ask all experts here, because I want to start right with the tools. I want to build a MMORPG game. Players can create their characters which is male or female. The players also can set the body size of their characters such as height, muscle, arm and etc and these settings will be used to calculate the characters strength, agility and power, for example big guys have high power and small guys have high agility. I want to know that with Babylon.js can I do all these things or do I have to use Blender or other libs to make a change of hero's size and setting. Thank you in advance Peace.
×
×
  • Create New...