• Content Count

  • Joined

  • Last visited

  • Days Won


8Observer8 last won the day on March 12 2019

8Observer8 had the most liked content!

About 8Observer8

  • Rank
    Advanced Member
  • Birthday 03/16/1987

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Interests
    WebGL 1.0, TypeScript, Blender

Recent Profile Visitors

3512 profile views
  1. I rewrote a simple example from the Matter.js Getting Started tutorial to TypeScript. You can run it on Playground. Source code and instruction how to build: https://github.com/8Observer8/getting-started-matterjs-ts
  2. Show a minimum example of your server and client scripts.
  3. 8Observer8

    Game loop advice

    This article is nice: http://buildnewgames.com/real-time-multiplayer/
  4. If you want to know about professional way you can read this book: Build your own 2D Game Engine and Create Great Web Games Using HTML5, JavaScript, and WebGL https://www.apress.com/gp/book/9781484209530
  5. You can read about a game loop here: 2D breakout game using pure JavaScript https://developer.mozilla.org/en-US/docs/Games/Tutorials/2D_Breakout_game_pure_JavaScript
  6. "indices" array contains indices of vertices. If you use UNSIGNED_SHORT you can 216 numbers. Max index will be 65535. But if you use UNSIGNED_INT the max index will be (232 - 1)= 4294967295. Read the documentation mage about drawElements() parameters: https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/drawElements
  7. You can draw circles using Math and pure WebGL 1.0. Create circles in one VBO for performance. Read this book: WebGL Programming Guide If you need a lot of vertices you can use Uint32Array for indices: gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint32Array(indices), gl.STATIC_DRAW); But you need to call this code in your Init() method: private Init(): void { let uints_for_indices = gl.getExtension("OES_element_index_uint"); if (uints_for_indices === null) { console.log("OES_element_index_uint is not available."); return; } } This extension allows for vertex buffer array indicies to be 32-bit unsigned integers.
  8. 8Observer8

    Game loop advice

    Hi, guys! What do you think about my movement: https://next.plnkr.co/edit/Bgf18uHzIkrRw9oW?preview
  9. Packtpub broke links like this: https://www.packtpub.com/code_download/15622
  10. I read in this article Real Time Multiplayer in HTML5 that we should to create a fixed physics loop on server and on a client. Server should have high frequency loop for physics and low frequency loop for sending messages to clients. I upload the example from the article on the free Heroku hosting https://battle-world.herokuapp.com/?debug You can run it in two browser windows. Free hosting has limits. If no one runs the application 30 minutes the server will sleep until someone wake up it. To wake up server you need to wait 10-15 seconds.
  11. It is cool but it is very heavy for my laptop: Asus K53SV; 8 GB RAM, i3 2.2 GHertz (2 cores); Intel HD Graphics 3000; Nvidia Geforce GT 540M (1 GB); Windows 10 I tried to run it using Geforce. I run FireFox using Geforce. I see a slide show after 20 seconds and my laptop is very noisily. This is my simple example how to use Radio Buttons with Babylon.js https://8observer8.github.io/babylonjs/radio-button/
  12. I use TS only for myself to create web applications in pure WebGL and Babylon.js for freelance tasks. And I use TS to study how to create my own 2D / 3D game engines with multiplayer using Node.js / socket.io / MySQL with hosting on free Heroku. I am writing my website in TS and Node.js / Express / Handlebars https://ivan8observer8.herokuapp.com/ I want to make websites and web applications with interactive 3D graphics for customers. I study Phaser/TS and Babylon.js/TS for creating simple games for fun. I do not want to write libraries for JS-programmers.
  13. If you try to compile this code on local computer by TSC compiler when you run this command: tsc -p tsconfig.debug.json let output = new Output(); you will get this error: But JS-files will be generated and you will be able to run it. It is the very important that you can see error in the console when you run the command for compilation: tsc -p tsconfig.debug.json