Jump to content

Search the Community

Showing results for tags 'custom'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • 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


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





  1. I have this idea for creating a character customization system. The system would be implemented as follows. 1) Organize a base template sprite sheet with character components arranged in a composition for future compositing. Example: Lets assume a full body template for a characters design is 125 by 125 consisting of head, body, and leg components. The head component of the character would use 25 pixels and would be isolated on separate parts of the sprite sheet that occupies the respective pixels while the rest of the 100/125 pixels are blank. The same would be done for the body and leg components. 2) Bind the components together via some sort of linked list or maybe even graph based implementation. I'm still learning about graphs and am thinking they're best for this system given compositing more complex sprite sheets will involve layers. Any advised implementations or any kind of information on graphs associated with player creation systems is highly appreciated. I think this is a great opportunity to practice graphs. 3) Next there will be an interface that allows the player to choose the color and textures of each of these components. The player will confirm and submit their design when finished. Now that the player has submitted their design, I'm a bit puzzled about the next step and have a few ideas on composing the data. 4a) Use Phaser api to turn the data into bitmaps? I don't know much about this implementation yet since I'm still learning how to utilize bitmaps and how Phaser handles bitmaps 4b) Composite the items on a canvas and store it in a uri using the canvas to url method. I also lack experience with api but I definitely can see how it would work. 5) Ideally I'll save the data to a database and retrieve them via player credentials. I'm not sure if I'm over complicating things or not so any feedback would be appreciated. I use Phaser but any html5 based idea or solution should be fine.
  2. Hi, I am an edu. musician and freelance composer. I have composed music for games, as well as trailer, film & tv prod. in a varity of styles, (Orchestral, Electronic, Acoustic, Jazz, Chiptune, Sound Design ...) Indie-friendly rates, reliable & professionel, high quality work. https://soundcloud.com/nice-noise-on/sets/playlist https://soundcloud.com/nice-noise-on/sets/sound-design If you are low on budget. I also have non-exclusive tracks in various styles. Contact me for more infos. I also can help out with Sound Design and/or can direct you to great colleagues of mine. Here a few direct links: Orchestral: https://soundcloud.com/nice-noise-on/lento https://soundcloud.com/nice-noise-on/atg_demo https://soundcloud.com/nice-noise-on/endgame https://soundcloud.com/nice-noise-on/the-journey-begins https://soundcloud.com/nice-noise-on/yag_id1 https://soundcloud.com/nice-noise-on/bta https://soundcloud.com/nice-noise-on/we-shall-rise-again https://soundcloud.com/nice-noise-on/pirates https://soundcloud.com/nice-noise-on/through-the-mystical-forest Ambient/Soundscape: https://soundcloud.com/nice-noise-on/city-beneath-the-ice https://soundcloud.com/nice-noise-on/ikalla-demo https://soundcloud.com/nice-noise-on/gathering_data https://soundcloud.com/nice-noise-on/tbp-12 Electro /Chiptune: https://soundcloud.com/nice-noise-on/world-map https://soundcloud.com/nice-noise-on/lighthouse https://soundcloud.com/nice-noise-on/elswidemo https://soundcloud.com/nice-noise-on/driver https://soundcloud.com/nice-noise-on/noga-suub2 https://soundcloud.com/nice-noise-on/street-lethal-actionjr-game https://soundcloud.com/nice-noise-on/chiptune Other: https://soundcloud.com/nice-noise-on/mut_demo https://soundcloud.com/nice-noise-on/ees-12 https://soundcloud.com/nice-noise-on/hts_tot https://soundcloud.com/nice-noise-on/living-puppets https://soundcloud.com/nice-noise-on/cartoon-animation https://soundcloud.com/nice-noise-on/leaves-dream-pop-shoegaze-instrumental https://soundcloud.com/nice-noise-on/ti-r13-1 Looking forward hearing from you :) Cheers
  3. Hi, I want to use a font that I have installed locally on my computer in the game. Can someone help? Thank you.
  4. I'm developing a game that will have grid based maps - levels and the player will be moving through it one block per keystroke. I'll be using the keyboard as input just for the start, I'll add others later on. Every level is generated from a double array filled with 1 & 0. So I want to do here is for example: if I press W the player will move one block forward. if I press Q the player will rotate anticlockwise by 45 degrees.
  5. Hi all, I am recently developing a game which needs a physics bounds like a rounder rectangle. I looked through the docs but find no way to achieve that. Help me, thank you all~
  6. I'm using a custom material which is pretty similar to the ground material used in WorldMonger demo. The problem is that I don't get a shadows on it. Well it's not a big surprise, because I'm overriding the _effect property of the base material. The question is how can I get both my effect with a base material effect without copy-pasting the code from base material. I mean how can I get shadows while using additional effects?
  7. I am new to Babylon and I have some knowledge about unity shaders but I am not sure how can I create shaders for Babylon, can any one suggest me any tool or any link which can help me to design or create some beautiful Shaders for Babylon. as BabylonJs Object's material, as we have shader forge available for unity, can any one suggest me a tool for WebGL shader create tool? that will be your good help for me, I am getting frustrated and need extream help from Babylonjs Community.
  8. Hey Folks! For my custom Shader I want to use the object's normals in view space. Therefor I need the gl_NormalMatrix. I know how to construct it (inverted and transposed MVMatrix) but I don't want to construct it manually for each object. I found this thread [SOLVED] - Shader Programs Attributes And Uniforms, but there was no hint on how the gl_NormalMatrix is called in babylon. I also searched the babylon git-repository, but could not find where the shader attributes and such are declared. Can anyone please point me in the right direction? Thank you for your time -Mainequin
  9. Hi everyone, I have now been stuck with a problem for a while and figured I would ask here to see if anyone knew how to fix it. I have a scene where you can dynamically add your own images to it, that will than be transformed into a material with the images as the diffusetexture. The transforming happens by using the raw image data to create the texture with the function: BABYLON.Texture.LoadFromDataString - it looks something like this: material = new BABYLON.StandardMaterial("imageMaterial", scene); var imgTexture = new BABYLON.Texture.LoadFromDataString("data:" + Math.random(), RAW IMG DATA, scene); material.diffuseTexture = imgTexture; This all works fine, the problem that I am having is that I want to be able to save the scene and load it again later. But it seems the the SceneSerializer doesn't save the texture/material information (the raw image data), so that when I load the scene I get the error: Materials: Name: groundMaterial babylon.custom.js:5 Uncaught TypeError: Cannot read property 'width' of null at E (babylon.custom.js:5) at n.createTexture (babylon.custom.js:5) at new i (babylon.custom.js:11) at babylon.custom.js:11 at Function.t.Parse (babylon.custom.js:2) at Function.i.Parse (babylon.custom.js:11) at Function.t.Parse (babylon.custom.js:2) at Function.r.Parse (babylon.custom.js:17) at Function.t.Parse (babylon.custom.js:14) at Object.load (babylon.custom.js:28) Looking at the saved serialized scene, I can also see that it is not saving the raw image data, so I have customized the serialize() function to find and save the data when the scene is saved, then the idea was to unpack it when it loads somehow. But I still can't stop the above error from happening. Is there anyone that knows a good way to do this or a fix to how I'm trying to do it? In short: I am trying to save and load a scenes that have material/texture that I created from my own images. But the loader and saver, doesn't seem to recognize/save the custom material properly. Thank you!
  10. Dear Babylon JS community, we as a company have decided, that we want to use Babylon JS for a larger project. For this we have specific requirements for what the shaders have to be able to do. I will first state the problem I am trying to solve and then give the context, for possible alternative solutions. PROBLEMS: For our more complex shader computations we want to integrate shadows from at least one shadow-generator in a custom shader. For reasons of confidentiality I can not submit our current project code, that is why I created this test playground: http://www.babylonjs-playground.com/#VZKI0U We want to get the influence of all shadows on a fragment as a float value in the shader for further computations. For this we encountered the following problems: - Mapping to shadow-map coordinates seems to be wrong - using functions like computeShadow() from #include<shadowsFragmentFunctions> yields not-declared-error - computeShadow() yields always 1.0 as a result COURSE OF EVENTS: We started playing around with the standart material and shadow generators and quickly got them to work. we wrote a small utility function for setting up the shadow generators, which you can find at the top of the linked playground code. After this we played around with uploading textures into our custom shaders and were able to create the desired effects. We looked into uploading the shadow-map and the shadow-generator parameters into the shader, which was sucessful. You can find the uploads at line 113-115 of the linked playground code. Since we do not want to write the mapping to shadow map coordinates ourselves, we looked if there is already existing code, which we found in the shadowsVertex.fx, shadowsFragment.fx and shadowsFragmentFunctions.fx files. While trying to get the mapping right, we encountered the aformentioned problems. We were not able to get correct results regarding the shadow-uv-coordinates, shaderincludes like the above mentioned #include<shadowsFragmentFunctions> yields a "computeShadow() has not been declared" error when used in the code after the statement and what code we currently copied from these files seems to always yield 1.0 as a result for the sha- dow intensity. We are turning to you now, because we are at a point where we cannot find the errors in our approach/code anymore. We are required to use Babylon JS version 2.5 in our project. Although it didn't seem to make a difference for the shader code we looked through I wanted to mention it. CONTEXT: Our scene is basically shadeless, with multiple materials per object, distributed via a mask. Therefor we combine a precomputed light texture (for individual objects) with a diffuse texture and multiple material textures blended via a mask texture. Since we require no lighting computation we just want the shadow values to get some visual depth in the scene. Therefor the standart material seems to be not sufficient for our purposes, hence the reliance on a custom shader. I saw code that created a custom material with the standart shaders and then re- placed parts of the vertex and fragment code via a function. We would be ready to do this kind of code insertion, if it yields correct shadow information. Sadly I cannot find the example project for this anymore, so if you could provide a link to a simmiliar source it would be much appreciated. Thank you sincerely for your time and help With best regards from the green heart of Germany The Mainequin Team
  11. Hi there, I want to extend Phaser.Weapon so I can create my own custom weapons. I know that you extend groups by using Weapon.SingleBullet = function (game) { Phaser.Group.call(this, game, game.world, 'Single Bullet', false, true, Phaser.Physics.ARCADE); return this; }; Weapon.SingleBullet.prototype = Object.create(Phaser.Group.prototype); Weapon.SingleBullet.prototype.constructor = Weapon.SingleBullet; But what about the weapons group? Are there any examples out there for this? EDIT: I used Weapon.SingleBullet.prototype = Object.create(Phaser.Weapon.prototype); and it seems to work. However, when I try to fire my bullet I get the following error Cannot read property 'getFirstExists' of null at Pistol.Phaser.Weapon.fire (phaser.js:101053)
  12. So I'm currently following @rich 's Shoot-em-up tutorial from over here https://phaser.io/tutorials/coding-tips-007. Please have a look at the source code if you haven't already. From what I understand he create's a weapon array that holds all the weapon types (each of which are an object inside a Weapon object). Now my question is How do I access the current weapon bullets in game.physics.arcade.collide? I've used game.physics.arcade.collide(this.weapon[this.currentWeapon], this.enemies) and this works fine, the bullets and the enemy collide well. BUT what if I want to kill that bullet? How would I pass the specific bullet that collided with the enemy into a function? This is what I've tried: game.physics.arcade.collide(this.weapon[this.currentWeapon], this.enemies, function(bullet, enemy) { bullet.kill(); }, null, this); However the above code doesn't work. Bullet is undefined. What do I do?
  13. I know that I need to use .buttonMode = true and .defaultCursor = "inherit", but I want to change the cursor to an image (like in CSS). defaultCursor = "url(http://www.image.com/jpeg.png)" doesn't seem to be working. How can i achieve this?
  14. hi, I would make a custom function to have tween more simple. I would have readable params in the function because i have a lot of value. i could do : function transition (obj,xbegin,ybegin,easing,delay,time....) //but it become difficult to read transition(player,100,100,Phaser.Easing.Linear.None,100,2000,...) but it become difficult to read. I put below a short example of what i would do : function transition(xbegin=x_begin) { console.log(x_begin) } transition(xbegin=100)//but that don't work because xbegin is undefined here the jsfiddle : https://jsfiddle.net/u2jac54g/ Thanks.
  15. Hello, I ask this with some caution, obviously, since Mesh instances are fairly rich with "property" content as it stands. I'd like to add a couple of custom properties to help some client application code determine whether a mesh is "selectable" or not. I wonder how to go about doing this and keep a sane boundary between the rich existing properties and the application properties. First if it's even possible, in the face of operations like "clone", etc. As a strategy, for instance, I see naming conventions such as "CamelCase" or "camelCase", with or without leading "_underScores", and things of this nature, to provide some semblance of separation between so-called "public" and "private" concerns, as far as one can do so with JavaScript, at any rate. One thought is that I might run with a "__doubleUnderScore" to keep things further separate, but I wondered if there were commonly adopted strategies among the community for such as requirement. Thank you! Regards, Michael Powell
  16. Hey, thanks for taking a look. I´m offering highly professional sounding music with a unique touch for your project. If you are interested, then please check out my work here: Soundcloud.com Get in touch via nice-noise(at)web.de Cheers, Mo
  17. Hi, I'm trying to customize the camera inputs, but camera.inputs property is undefined. I am using the ArcRotateCamera, nothing custom. http://doc.babylonjs.com/tutorials/Customizing_Camera_Inputs Anyone had this issue before? Suggestions? Cheers
  18. Hello! I'm having a hell of a time trying to create different bullet types in my game (and this problem extends to different weapon types, enemy types, etc.). I know how to extend Sprite, and I have done so to make a base bullet class. However, I can't seem to figure out how to extend that class to make bullets that behave differently. For example: I have a weapon of type Pistol that will shoot bullets of type BulletPistol, and a weapon of RocketLauncher that will shoot bullets of type BulletRocket. The form is like a typical bullet, while the latter will start moving slowly, then accelerate. My thinking is that for the base Bullet class, I can put in all of the default behavior. For BulletPistol, and any other weapons that use this behavior, I merely pass in the sprite I want to use. For BulletRocket, I will need to override the update function (at least) to change how the rocket moves. Here is the code in my Bullet.js file: var Bullet = function(game, key) { console.log("Bullet.prototype"); Phaser.Sprite.call(this, game, 0, 0, key); this.texture.baseTexture.scaleMode = PIXI.scaleModes.NEAREST; this.anchor.set(0.5); this.checkWorldBounds = true; this.outOfBoundsKill = true; this.exists = false; this.tracking = false; this.scaleSpeed = 0; }; Bullet.prototype = Object.create(Phaser.Sprite.prototype); Bullet.prototype.constructor = Bullet; Bullet.prototype.fire = function(x, y, angle, speed, gx, gy) { gx = gx || 0; gy = gy || 0; this.reset(x, y); this.scale.set(1); this.game.physics.arcade.velocityFromAngle(angle, speed, this.body.velocity); this.angle = angle; }; Bullet.prototype.update = function() { console.log("Bullet.prototype.update"); if (this.tracking) { this.rotation = Math.atan2(this.body.velocity.y, this.body.velocity.x); } if (this.scaleSpeed > 0) { this.scale.x += this.scaleSpeed; this.scale.y += this.scaleSpeed; } }; //////////////////////////////////////////////////////////// // PISTOL //////////////////////////////////////////////////////////// var BulletPistol = function(game) { console.log("Bullet.Pistol.prototype"); Bullet.call(game, 'img_BulletPistol'); }; BulletPistol.prototype = Object.create(Bullet.prototype); BulletPistol.prototype.constructor = BulletPistol; BulletPistol.prototype.fire = function(x, y, angle, speed, gx, gy) { // }; BulletPistol.prototype.update = function() { console.log("Bullet.Pistol.prototype.update"); }; Here are the error messages and console logs I get when I load my game: I'm not sure what I'm doing wrong, exactly. I went through 11 pages on this forum and several more on Google, but the closest things I could find to what I'm attempting were written in other languages. Any insight on how to extend an extended class is greatly appreciated!
  19. Hi All, Anybody in here already create game using phaserjs and embeed to moodle ? i have some problem to do that, if anyone have success, please give me advise. Thank You, P
  20. Hello! I have been playing around with babylons animation features and I am curious if it is possible to connect a BABYLON.Animation to a custom material / a ShaderMaterial? Thanks!
  21. For the last 2 full days I am trying to make a function to draw a custom shape mesh and I can't do it. I am trying to fill it with triangles (as I understand it is done), but my math skills and logic are not good for this. Plus the function I made doesn't fill it correctly and loads the browser (and RAM) very much to the point that it crushes the browser for low memory (after long time usage ~ 1 hour ). It is driving me crazy, and I saw that is on the road-map, but I desperately need it for the current project I am working at, this being the only thing that is stopping me to advance. PS: I do not intent (for now) to use curved lines in the custom shapes.
  22. Hello, I'd like to customize my player by giving the ability to pick different avatars/colors/etc from predefined list. I've already checked phaser examples, and wiki on the github. Would you recommend some examples with the similar behaviour, please?
  23. Hi, I would like to know if it is possible to create more properties for a sprite. For example, I'm creating a multiplayer game that is based on GPS, so I would like to assign a latitude and longitude to a sprite. So I would like to do it like this: sprite.latitude = value; sprite.longitude = value; Is this possible out of the box, or do I have to modify the phaser.js to achieve this? Thanks in advance, Kevin
  24. Hi! I would like to show a custom loading bar at the beginning of my game. Is this possible in panda.js? How?
  • Create New...