Leaderboard


Popular Content

Showing content with the highest reputation since 01/09/19 in all areas

  1. 6 points
    Hi @Kevin Trepanier, From a FGL-Flash-era comparison the big changes are HTML5's shift towards revenue-split, syndication, multi-platform, multi-player. A good Publishing Partner (who can bring high volume traffic and share revenues fairly) is good to have but might take time (and a small catalog of games) to find? Sponsors. The "Auction" exclusive-upfront-fee licenses are rare (or rather the level of risk for a small team to build a game of sufficient scope to gain exclusive interest is hard to justify upfront). The "Gameshop" style non-exclusive upfront-fee licenses do exist, however the number of active sponsors in the market are few so overall revenue is limited (in comparison to slower but longer revenue-split). There are links on this forum to such sponsor portals, although it's a changing list with high churn so your own research will be necessary. Virality. As always, it's possible but improbable! But more contagious these days is the speed and quantity of rip-offs and clones. Any big-idea must be protected with (or leverage) a server-side strategy. Of course everybody's mileage will vary, most will quietly stall whereas a few successes are very real and highly deserved (and often humble!). I hope that's a fair and helpful overview.
  2. 5 points
    mentuat

    Y8 Destroys Your Games (and websites)

    Complaining about a bunch of IP infringing 'Mario' games being removed from a distribution network? Ballsy move bringing attention to that!
  3. 4 points
    -AAG-

    AAG batch of games #4

    Another year another batch of games. This was a slow year and the year of the sequel too. Joe Lost 2 Joe is lost again! Please help him. ABCya exclusive. Playable only on desktop unless you have a mobile account. PLAY Light On 2 The exclusive sequel to Light On only on ABCya.com! Playable only on desktop unless you have a mobile account. PLAY Bridge Hopper Hop from bridge to bridge to eat all the carrots or Bunny will cry ABCya exclusive. Playable only on desktop unless you have a mobile account. PLAY Money Land 2 Back to Money Land! In this strange new area your gravity will flip every time you stump a critter. ABCya exclusive. Playable only on desktop unless you have a mobile account. PLAY Jon Lightning Jon can move too fast for his own good. Help him. A port/adaptation of one of my old windows games under the Alexitron banner. PLAY Boxed 2 More Boxed fun. Now with metal boxes, moving walls, and holes! PLAY Lost Joe The none-exclusive edition of the Joe Lost games by popular demand. PLAY That was 2018 for me. Hope you guys had a good year as well. You can check out the rest of my catalog at www.gamesaag.com. I am thinking of removing the freebies section altogether. A question for fellow developers: I was thinking about making a mobile app with a compilation of some of my games and then continue to add to it as I make more. Anyone tried something similar? Simple puzzle games seems to be what I do best but I don't mind to experiment. I was thinking about 1080p resolution and hi-res graphics though I really like the style that I have been developing, maybe I'll try to reproduce it with 3d pixels instead. Thoughts? For GameMaker: Studio users: Tried to get into Studio 2 and just couldn't. That new user interface is an abomination and the node based events, I just don't get it. I hope they make a classic shell in the future for old farts who have been using GM for over 10 years. Hard to adapt now.
  4. 3 points
    dimanux

    Relic Runway

    RELIC RUNWAY Are you ready for crazy adventures? Run as far as you can, collect coins, upgrade useful bonuses, pick up parts of ancient relics, unlock amazing characters, and compete with your friends to be the best relic runner! LINK: https://gemioli.com/relicrunway/ MAIN FEATURES: Beautiful and dangerous Inka Ruins 10 brave heroes to unlock A lot of ancient relics to discover on your way Play with your Facebook friends And it's free for embedding on your website <iframe src="https://gemioli.com/relicrunway/" name="Relic Runway" width="640" height="480" frameborder="0" scrolling="no" allowfullscreen="true"></iframe> Please contact us at contact@gemioli.com if you have any questions, suggestions, etc.
  5. 3 points
    I have completed writing my free JavaScript course (begun in 2011). It is in two main parts. The first is aimed at complete beginners to introduce the whole idea of programming. It shows how to get some simple examples working and introduces some HTML5 as needed to make a platform for running the examples. It covers some general programming concepts such as writing requirements and testing against them. Part 2 is a more systematic exposition of the language, up to some of the more recent capabilities such as local storage and image processing. It is available at https://www.grelf.net/jscourse/index.html That link is to a contents page so that those who already know some of it can jump in to any particular topic of interest.
  6. 3 points
    b10b

    Everything to create fb instant game

    I'll have a stab at these as I like to snapshot my view on things periodically ... Yes and yes. Pixi has a very decent power to size ratio and solid compatibility (v4.8 may be wisest in 2019?). For a competent developer capable of spinning their own game structure Pixi is ideal for a lightweight browser game. Coming in at less than 5MB total for your IG is wisest. Red tape aside, it's possible but improbable to make money releasing a single game. Primary monetisation choice with FB IG is in-game ads (which are a low value transaction for a developer and an intrusion to the player). In-game purchases have more value but will require significant retention first. Or consider indirect value generation such as consultancy services, brand building, learning for the next game? FB IG is inherently multiplayer (async). Within the SDK are context (group) leaderboards, notifications, packet sharing (challenges). That being said the vast majority of initial plays will be in solo mode, so a compelling single player experience is necessary for retention. Get creative for the crossover! For more advanced multiplayer use a custom backend. Having some separation / abstraction from the Facebook SDK might be wise in case other markets are a better fit for your game? For Multiplayer specifically? Yes there's a TicTacToe example that covers the basics of a client-server model. My advice is play some of the popular titles, understand what the FB IG audience seem to be attracted to and how other developers are leveraging the SDK to create retention and monetisation - warning, some of it can be ugly. Iterative development is going to be crucial, however you'll likely only be promoted once - so use it wisely, and use each territory to run a split test. Or build several games and apply the learning from one to the next etc. If you haven't built dozens of games already, FB IG probably isn't for you yet? Imo there are better platforms that can help evolve game development skills and player retention mechanics. Instead see FB IG as a specific audience with a specific style of game - developing a game precisely for that might work out very well (FB has a HUGE potential audience after all). Imo Messenger games should be about decorating a conversation, in the same way filters decorate a photo. So quick, contextual, personalised, fun, indisposable. That's not necessarily a standard casual game, so changing some assumptions and expectations may be wise. Just my advice, your mileage might vary!
  7. 3 points
    Greetings everyone! Check out our FREE asset packs at: rottingpixels.itch.io You can also follow us on social media and support us over Patreon! patreon.com/RottingPixels twitter.com/PixelsRotting rotting-pixels.tumblr.com facebook.com/Rotting-Pixels Cheers!
  8. 3 points
    enpu

    bugfix for Panda2 p2 plugin

    Yeah i'm still here! Just been a bit busy lately, but i am working on Panda 2!
  9. 3 points
    Hello, My goal is to update a small part of a texture the fastest way possible with WebGL2, preferably using Pixi.js v5 (RC 3 is out). Am I right that a RenderTexture is going to re-upload the whole texture whenever there is a change? (this would not be good for a big texture, hence why I am looking for another method) I'm a complete noob when it comes to OpenGL, but I've googled a bit and figured that I can use gl.texSubImage2D() to upload just the part of the texture that I need to change. I didn't find a way to get the WebGLTexture object of a PIXI.Texture, so to be able to use that command I did something like this (not the complete code): renderer.addSystem(PIXI.systems.TextureSystem) renderer.TextureSystem.contextChange() // needed to do this loader.load(main) // and could not use gl.texSubImage2D() on tex before the loader called main function main() { let tex = resources['test'].texture let imgData = new Uint8Array(32*32*4) renderer.TextureSystem.bind(tex) renderer.gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, 32, 32, gl.RGBA, gl.UNSIGNED_BYTE, imgData) renderer.TextureSystem.unbind(tex) } But I wish that I had the WebGLTexture available so I could avoid messing around with PIXI.systems.TextureSystem, because I don't really know much about it or when and how it should be used. I also want to read the previous data and change it, I figured it can be done with: gl.readPixels(0, 0, 32, 32, gl.RGBA, gl.UNSIGNED_BYTE, imgData) But that needs the frameBuffer to be binded first... Hence I tried to also use the PIXI.systems.FramebufferSystem, lol: renderer.framebufferSystem.bind(fb) //fb = new PIXI.Framebuffer(tex.width, tex.height).addColorTexture(0,tex) gl.readPixels(0, 0, 32, 32, gl.RGBA, gl.UNSIGNED_BYTE, imgData) But it was not that easy, I didn't even find a way to unbind it. But I guess it is not supposed to be used for my little problem...? Maybe there should be some Pixi.js functions to do this? Maybe something similar to this: texture.getPixels(x, y, width, height, ArrayBuffer) texture.setPixels(x, y, width, height, ArrayBuffer) I'm new here btw, this is my first post I don't have much Pixi.js experience yet, but I really like it.
  10. 3 points
    No bans are happening here (yet). @5neia_opo2@google-mail.ooo, try to understand the frustration people are experiencing. A new user came to the forum and in nearly every post they made trashed the project they were asking about. A lot of people here put in a lot of time and effort to not only to develop the project, but answer questions here as well. I was definitely frustrated reading your responses as someone who has put 6+ years of their life into this project. @botmaster did a poor job of handling that situation, but has apologized and I'm sure will do better in the future, as will you as well. Let's all be adults about this, acknowledge we did something wrong, and move on. @5neia_opo2@google-mail.ooo you are free to ask any question you need help with, but I definitely recommend reading through some tutorials, the examples, and checking the API docs before asking questions. It will often lead to you finding the answer yourself, and there will be less fatigue for the people answering here on the forum. I'd also recommend you approach things you don't understand, or decisions you disagree with, with a more open mind. Try to learn and grow the new library, not all libraries are alike and different problem spaces call for different solutions. Having a bad attitude is a good way to earn ill-will in the community and you may no longer get the help you expect if you are ungracious about it. When you find inconsistencies, or things you think should work differently, then change it! Pixi.js is an open source library built by the community. Everyone gets a chance to make the library better by contributing to it. The best way to get problems you have fixed, are to fix them yourself.
  11. 3 points
    obiot

    melonJS 6.4.0

    Hello, shortly after the Chinese new year, here is a new release of melonJS, High-Level Changes : New documentation format, including a better, more modern, layout and search feature. http://melonjs.github.io/melonJS/docs/index.html Support for Multiple Texture Packer Textures Added Colour Tint support for Renderable (WebGL mode only for now) Bunch of small fix and improvements on Renderable, Animations, Isometric rendering, and System renderers See here for a more detailed changelog, there is no API change this time (just some internal re-factoring), so you can safely upgrade without breaking your game Have fun guys, and let us know what you think about the new documentation ! (it certainly can be further tweaked/improved) --- the melonJS team
  12. 3 points
    I had some similar problems with this yesterday so I wrote up the workflow I found to work step by step. Hope this helps anyone else who finds this thread in the future. https://www.adammarcwilliams.co.uk/creating-bitmap-text-pixi/
  13. 3 points
    enpu

    Bezier curve support added

    Panda Engine 2.12.0 now supports bezier curves with new Curve class. Here is interactive example, where you can see bezier curve in action: https://www.panda2.io/examples#curve-handles You can modify the curve by moving the start and end points as well as the two control points. Here is also example on how to use Curve together with Tween: https://www.panda2.io/examples#curve-tween Documentation of Curve class: https://www.panda2.io/docs/api/Curve
  14. 2 points
    Extra info, what does mipmapping do: it scales down 2 times, then again 2 times, and obtains several "mip-levels" . then it samples the texture from levels depending on scale. Scale is determined through comparing "What coordinates of texture were asked in neighbour pixel shader". If we upload FAKE mipmap levels, we can see result like this: https://github.com/Busyrev/mipExploration , here we have curved space and its scaled in the center => mipmap is automatically switched there to next level (red), then next one (green) and so on. Manually scaling the texture and choosing sprite texture based on downscale also works! You have to use whatever you udnerstand and whatever is better for your case. Yes, it might be strange if you come from Web that now , in WebGL, you have to manage many other parameters: texture filtering, antialias, blendmodes, premultiplied alpha, gamma sRGB. Usually its managed automatically by browser, but that automatic managing can affect performance, and in WebGL world its significant, its all about performance. I'll have a talk in russian conference HolyJS about those things, I hope to translate it afterwards and use in other places too. I know that many people are smart enough to make their algorithms fast, but that kind of problems stop them just because they dont know specifics of WebGL switches and how big control they actually have, what responsobilities it raises.
  15. 2 points
    rje

    Viewing number of draw calls webgl

    https://spector.babylonjs.com/
  16. 2 points
    Hmm, moving server broke this feature, but I've enabled it again (along with SSL, which also broke for some reason). So now, you can upload things again.
  17. 2 points
    decrease the quality parameter -> less texture2D calls -> works on mobiles. I have better glowFilter, to be published soon
  18. 2 points
    PIXIEDUST CATBOX

    Relic Runway

    This is an impressive game, and fun to play. Good job.
  19. 2 points
    Hello! My name is Brian and I'm the Developer Community Manager with Legends of Learning. Legends of Learning is a EdGame platform looking for HTML5, Unity or Construct 2 developers to build 500 short (5-25 minute) Math games. Payout ranges from $1000 - $50000 per game depending on performance. To date, $4 Million has been paid and 1000+ games have been built. Sprint open now with slots on first come - first serve basis. Average of $4000 per game. Creative control left entirely to the developer! To learn more about the company and opportunity and to submit your information, navigate here: https://www.legendsoflearning.com/interested-game-developer/
  20. 2 points
    Welcome to the forums! Congratulations with hitting a problem that is not possible to solve through docs in your first question on this forums. However, PixiJS is not a black box, it has sources: https://github.com/pixijs/pixi.js/blob/dev/packages/mesh/src/Mesh.js#L275 OK, either you override _renderDefault, either make "update" function that'll pass calculated alpha to uniform. https://www.pixiplayground.com/#/edit/dCSAWarvEMdFqWip1BcuO const shader = PIXI.Shader.from(` precision mediump float; attribute vec2 aVertexPosition; uniform mat3 translationMatrix, projectionMatrix; void main() { gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); } `,` precision mediump float; uniform float alpha; void main() { gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0) * alpha; }`); shader.update = function() { shader.uniforms.alpha = shader.alpha; } btw, that code in _renderDefault is low-level pixi over webgl, you can add hack more stuff if you override it
  21. 2 points
    One thing you may want to try and do is some more research regarding tile map engines. There are probably some GitHub repos for some. This way you can better learn how others are doing it. I have built tile map and scrollers a while back. The engine core itself was very different, since the engine was C++/OpenGL and specialized to handle it. Whereas in your case, you're using an existing engine and its methods to draw. If you are still truly destroying/creating 500 sprites per frame, you should rewrite your algo now. You definitely want to have a sprite pool you render from. Think of the problem as paging in 1-2 rows or columns. For most cases, those are your deltas. Take the simplified case of moving in the X axis. In this case, as you move to the right, for example, you will eventually hit the point where you will need to page in a column to the right. You can achieve this by simply grabbing the leftmost column and rebinding the texture (no destruction or creation) and updating positioning. Note at this moment I'm ignoring z order. The trick here is your overall tile area needs to be larger than your viewport so one doesn't see either side pop in or out. Now much overdraw will be dependent on individual tile size and the max speed you need to scroll through your map. Your "worse case" will be 2 dimension movement where it triggers both row and column swapping. However if you think about the problem more. You are no longer modifying 500 sprites. Rather in your case, about 150 sprites. Note in your code, you do far more than 500 sprites, you're doing 1250 sprites, but for consistency I'll use 500 as the high end number. This means that for the 350 other sprites, they should be "correct" and don't need adjustment. Now you have to address z order. You could opt to re-build z-order each round. The problem area really are when you need to insert versus append/push, since depending on implementation, that will move memory (unless it's a linked list ... I have't looked at the code). If it is a linked list, then it should be relatively cheap, but based on Ivan's comment, it sounds like it is not. One partial "cheat" you could do for draw order too is to have layer containers in your master container, and use that for your z. Note you'll still need to sort that. The other thing is clever art usage can minimize how much sorting is needed. A thing to look out for is how non-world objects interact. So, for example, if characters can look like they are "behind"/occluded by tiles, you need to have a method to control that draw order. In short: - Look for other tile engines and see if you can find some code to study. You want approach, engine type doesn't matter so much. You need to understand the basics of that type of engine more. - Don't destroy/create per frame. Reuse. In general this is a good rule. If you find yourself creating and destroying objects a lot during normal runtime, you should scrutinize your technique. This is not to say you never can do it. I do have some games where I actually create and destroy on the fly but it is for a handful of objects on a custom C++ engine. - Embrace object management. This is the unfortunate responsibility of the game dev. Sure you want to try and avoid it when possible, but world management ... in particular ones which incorporate a lot of animating visuals need to be managed.
  22. 2 points
    vornay

    Why did the forums move?

    When I go to the Discourse site, I just see a list of messages. It doesn't look anything like this site. I guess I will have to make a fake username, and join, if that is where everyone is going. I can never fool these sites. Later some site will ask me "Vornay, do you know someone named <insert my real name>???", and I'm like, "No man, never heard of them." I guess if Phaser doesn't want to run a message board, that is the real issue. Having to moderate it probably distracts from working on Phaser. That is too bad. Social media is pretty toxic nowadays, with everyone apparently being either a Communist or a Nazi. If you get called a Nazi, these larger platforms will simply ban you. If one bans you, the others may ban you too. Your investment in their platform gets nullified. That is why I don't use Unity, Unreal, or other non-free engines. That is why I don't want to be dependent on the App Store or Play Store. That is why I don't work in Swift in anymore. One person gets a wild hair up their butt, and you lose everything. You find out your castle was built on their land, and you never really had a castle. That is why I wont use those forums. They are the opposite of free.
  23. 2 points
    PunyGames

    Why did the forums move?

    I am not sure on Discourse policy of sharing data with 3rd party, but you can't really escape tracking. Most websites use Google Analytics. Your best bet is probably using Firefox with disabled tracking, using throwaway email for each service, (+ KeePass so you do not have to remember) and VPN.
  24. 2 points
    utkayd

    Need some help with a Free Drawing App

    Worked like a charm! You are a lifesaver, Ivan, thanks a lot.
  25. 2 points
    Velith

    SpineBoy Mouse Track

    Hi, It should be something like that : // 0. Listen which Pixi mouse event that you want (here PointerDown) stage.onPointerDown = (pixiEvent) => { // 1. Get the bone/constraint that you want to move using mouse const target = mySpineObject.skeleton.findBone("target"); // 2. Modify it's coordinate with the mouse event of pixi target.data.x = pixiEvent.data.global.x; target.data.y = pixiEvent.data.global.y; } Not test..
  26. 2 points
    Hello, and welcome to the forums! I like drawing apps and i helped with several before. Basically, you want a textured brush, right? Graphics.beginTextureFill might help with that, you just have to clear() and drawCircle(x, y, r) every time you draw a brush. Usually I use multiple brushes (whole stroke!), and render() a container that has them - its more efficient per frame. There are other tricks, like, how to make transparent (alpha=0.5) brush and not override brushes in the same stroke. As for your original question - you have to wait some time before someone reponses, because my telepathic abilities aren't enough. My post was written without preparation, i didnt even look at your demo yet. Precise answer takes time to prepare.
  27. 2 points
    Igor Georgiev

    Load all assets in a folder

    How about a script like this: var fs = require("fs"); var list = fs.readdirSync("game/static/assets/audio"); var dynamicAssets = "{\n \"paths\":\n ["; for (var i = 0; i < list.length; i++) { dynamicAssets += "\n \"/assets/audio/" + list[i] + "\","; } dynamicAssets = dynamicAssets.substr(0, dynamicAssets.length - 1) + "\n ]\n}"; fs.open('build/dynamicAssets.json', 'wx', (err, fd) => { if (err) { if (err.code === 'EEXIST') { console.log('dynamicAssets.json already exists'); return; } throw err; } fs.write(fd, dynamicAssets); }); and then you load them like this: let bootLoader = new PIXI.loaders.Loader(); bootLoader.add('dynamicAssets', 'dynamicAssets.json?version=' + version) let dynamicAssetPaths = this.app.bootLoader.resources.dynamicAssets.data.paths; for (let assetIdx=0; assetIdx < dynamicAssetPaths.length; assetIdx++) { let assetPath = dynamicAssetPaths[assetIdx]; let regExp = /([^\/\\&\?]+\.\w{3,4})/g; let assetName = regExp.exec(assetPath)[1]; PIXI.loader.add(assetName, "." + assetPath + "?version=" + version, {loadType:"XHR", xhrType:"blob"}); }
  28. 2 points
    Dumadu

    Bouncy Jump (3d)

    My new game in html5 done in Playcanvas engine For game licenses contact: arif@dumadu.com https://playcanv.as/p/0OdQ0ldY/
  29. 2 points
    I wasn't aware that you guys had done this in 5.1.1. So I enabled PIXI.SCALE_MODES.LINEAR and went back to the default DisplacementFilter and ... it worked perfectly. The new shader code I was so happy about is completely unnecessary (on desktops at least - maybe I'll still use it if I want to be ambitious about mobile support). Oh well, at least I learned a lot the past few days. Don't worry about missing my issue, I'm sure I'll manage to wear you down with a million other questions in the next few months. In fact, I already have a tricky one in mind - I'll start a new thread right away.
  30. 2 points
    First try ... Double check Chrome is really using WebGL. Spine mesh deformation can be quite intensive for Canvas and could easily account for these FPS variations (if WebGL isn't working).
  31. 2 points
    hi, Have you set up the code in Mainscene correctly? It should look something like this: add world this.world = new game.Physics({ gravity: [0, 1], }); //add eventhandler collision this.world.on("beginContact",function(event){ if(typeof event.bodyA.collide !== 'undefined'){ event.bodyA.collide(event.bodyB); } if(typeof event.bodyB.collide !== 'undefined'){ event.bodyB.collide(event.bodyA); } });
  32. 2 points
    cafelatte

    Pixi.Mesh gl_FragColor Alpha Channel

    Hi, I've tried to change the Alpha Channel on gl_FragColor on a Mesh, but it doesn't show a result as I expect. For example, on the pixijs.io example ( https://pixijs.io/examples/#/mesh/triangle-color.js ) void main() { gl_FragColor = vec4(vColor, 1.0); } If we changed the line into void main() { gl_FragColor = vec4(vColor, 0.5); } It doesn't show any difference. Is there any workaround/settings I need to adjust to use the alpha channel correctly? Thanks.
  33. 2 points
    Rezoner

    SpriteStack - 3D Pixelart Editor

    Ahoy there. I have just released a standalone version of my voxel editor where you draw models layer by layer like a 2d image. It features very neat spritesheet exporter with my handcrafted retro renderer made in WebGL. Please take a look at https://spritestack.io/ to get more info. I am also glad to anwser any questions.
  34. 2 points
    Thank you for your answers! I was thinking about creating a custom tools, but I figure this should be a fairly common issue so there had to be a solution out there I didn't know about that PS to Spine exporter, that looks really promising! I'll take a look at it! Thanks!
  35. 2 points
    ivan.popelyshev

    Making GUI in 2019 with Pixi

    Do the right side with react, field with pixi. problem solved. The biggest collection of pixi ui elements is https://github.com/pixijs/pixi-ui/ but its not documented nor is it moved to v5 and typescript yet. Text input: https://github.com/Mwni/PIXI.TextInput SDF fonts: https://github.com/PixelsCommander/pixi-sdf-text , https://github.com/avgjs/pixi-richtext We are working on moving all plugins to v5 and we are making new tutorials. I hope in half of year we'll have complete set of stuff for games, but right now its not the case, so go for React to save time.
  36. 2 points
    I wrote an article on this. Thoughts welcome! https://medium.com/@michelfariarj/scale-a-pixi-js-game-to-fit-the-screen-1a32f8730e9c
  37. 2 points
    its not an edge case, sometimes just one resource can fail, depends on what server or service do you use. If its a problem for your users, make a fallback, for example you can start downloading everything again
  38. 2 points
    You are lucky! We are working on examples for playable ads. Unfortunately, they are not available yet. Wait a month or two. Also "no one ever posted their code for the issue" is MY phrase, that's how I explain people why is feature X not available. Someone asks help, I provide a few snippets, they make their app and do not share the result. Then second person asks the same thing. Then third. On 10-th attempt we have a hero who makes an article or repository and shares it with community!
  39. 2 points
    Exca

    creating a animated soft color

    You can do that with vertex shader by giving each vertice a color and then gpu interpolates between those points. Or you can do the calculation in fragment shader to get more refined look. Here's an example how it could be done with fragment shader https://www.shadertoy.com/view/tls3zS For info on how the color palette is done read this article http://www.iquilezles.org/www/articles/palettes/palettes.htm
  40. 2 points
    b10b

    ctx.clearRect() not working with Image.

    @James432213 hi, many issues here, all solvable. 1) The function named "canvas" rename this and avoid some confusion, call it "init" or similar 2) doKeyDown function has parameter "e" but references "event" in the switch - be consistent. 3) the functions doKeyDown, updateCanvas, drawPlayer are scoped "above" the "init" function, so they can have no easy reference to the "canvas" variable defined within "init". Notice also the name collision of "canvas" if we ignore step 1. Easy fix is to move these function declarations inside the "init" function. 4) There's nothing wrong with ctx.clearRect Some basics in how to debug your code will be beneficial, in particular the developer console (F12) is great, and using "console.log" can send helpful messages there from your code. Use that as a start towards watching the flow of your code when it runs, and where things are not actually working as might be expected on a first draft of code. This will lead to more advanced debugging techniques and more elaborate (and working) code.
  41. 2 points
    ivan.popelyshev

    Pixi js editor

    There are solutions but nothing is easy. There's pixi-svg https://github.com/bigtimebuddy/pixi-svg that can take info from svg. There's also Tiled editor and https://github.com/eXponenta/pixi-tiled that allows to take polygons and sprites from it, but I dont remember if it has export to graphics, but hey, you can add it! Currently I work on solution to open SWF files so people would create graphics in Adobe Animate. I think that you can do something for your case, I saw that teams who made games on pixi with their own engine always did their own editors. I do not know why there is no Graphics, I never needed it and I guess people hold their stuff and dont release it I think that https://twitter.com/Pix2d is going to add support to pixi soon.
  42. 2 points
    there is no public property available but you could use the following private property timer._pause working example: var timer = game.Timer.add(1000, function() { sprite.remove(); }); if(timer._pause){ console.log("paused") } else{ console.log("Not paused") }
  43. 2 points
    jonforum

    Fading trail

    What about create you gradient in other canvas. https://www.w3schools.com/graphics/canvas_gradients.asp var c = document.getElementById("myCanvas"); var ctx = c.getContext("2d"); // Create gradient var grd = ctx.createLinearGradient(0, 0, 200, 0); grd.addColorStop(0, "red"); grd.addColorStop(1, "white"); // Fill with gradient ctx.fillStyle = grd; ctx.fillRect(10, 10, 150, 80); and than, create `generate` a texture from this canvas context ? Am sure it can work ... but at the expense of performance. I do not remember which one, but there is a rpgmaker plugin that used this process with pixijs.
  44. 2 points
    I've got a situation my physics simulation is running at high framerate (60fps), but some devices my app runs on cannot run the graphics (PIXI) at 60fps without causing the physics simulation to stutter and jump, causing undesired artifacts. So, in pursuit of performance, I shoved the physics simulator (in my case, matter.js) into a web worker, but then still found that some devices couldn't handle updates at 60fps in the main thread. So I started setting an interval to apply updates from the simulation to PIXI at a fixed rate - 30 fps to start. However, sometimes even on some devices that was unsustainable. So, the question came down to - what FPS *should* my app run at? And when I say "run", I'm talking about changing the position of PIXI objects base on updates from the physics simulation, not about changing the speed of the PIXI's ticker. Since the speed at which I could apply updates from the physics simulation and still achieve sustainable render speeds without lagging varied from device to device, I decided the best way to decide on the FPS to run at would be ... let the app itself decide at run time. So instead of coding a fixed FPS, or giving the user a slider to adjust, I let my app measure and adjust it's FPS based on what it measures as sustainable while it's running. Enter my solution for my app, FpsAutoTuner: https://gist.github.com/josiahbryan/c4716f7c9f051d7c084b1536bc8240a0 - contributed here to the community in case it may help someone else solve a similar problem. It's framework-agnostic, no external dependencies, written as an ES6 class, but could easily be rewritten as a ES5 if you wanted. FpsAutoTuner works by measuring the FPS (which you tell it by calling `countFrame()`) and then every so often (at `tuningInteval`ms), it compares that measured FPS to the `fpsTarget`. When the measured FPS goes below `fpsTarget` less `tuningMargin`, the `fpsTarget` will be decreased by `tuningRate` and the `callback` will be execute with the new `fpsTarget`. Likewise, when the measured FPS exceeds `fpsTarget` less `tuningMargin`, then `fpsTarget` will be increased by `tuningRate` and `callback` will be called with the new target. Example usage: // Somewhere at the top of your file import { FpsAutoTuner } from './FpsAutoTuner'; // Then later in your code, probably in your constructor of your game object this.fpsAutoTuner = new FpsAutoTuner({ fsTarget: 30 callback: fps => this.setFpsTarget(fps) }); This assumes that you have a function called `setFpsTarget()` on your class, probably that does something like this: // This is just an example method, on your own class... setFpsTarget(fps) { clearInterval(this._fpsTid); this._fpsTid = setInterval(this._render, 1000 / fps); } Then later in the rendering portion of your code: // inside the render loop of your code, call: this.fpsAutoTuner.countFrame(); That's it! Your app will now automatically adjust it's FPS as needed when it detects lower/higher frame rates available. (FpsAutoTuner automatically starts it's auto-tuning timer in it's constructor.) There are plenty of options you can pass to FpsAutoTuner to tweak it - they are all documented at the top of the gist. Specifically of interest, you can set `tuningInterval` (default 5000ms) to change how often it measures/changes the FPS. This all has just been a humble attempt to give back to the community. Use and enjoy. Contributions/changes/suggestions to the gist are welcome! Download FpsAutoTuner from GitHub here.
  45. 2 points
    TheBoneJarmer

    Project MWX - multiplayer RPG

    Before I even read your post, I looked at the screen and I was like "Tibia!!! ". Nice to see you used it as an inspiration. Played it for a very very long time as a teenager and played it recently too to see what changed. I do have one question though concerning NodeJS. I'm currently developing a multiplayer top down shooter from which I also use Tibia as my inspiration (understand the excitement now? ). But I replaced NodeJS after several failed stress tests with a multi threaded websocket server I have written in C#. The reason? NodeJS is single-threaded, meaning only one request can be processed at a time. For a small amount of players this don't matter that much, but if you got like 1000 clients sending requests all at the same time, the entire game could lag as hell. But if the server is multi-threaded, each request that comes in will be handled on a different thread so the main thread wont be blocking. In case of a multiplayer-game, this could speed up the process big time. So here is my question: How will you deal with that issue? Because I'm always in for a new multiplayer game and since I'm creating one myself, I know how hard it is. So I always have respect for those who dare to pull the mmo-scalibur out of the big rock. And since I know the pitfalls all too well, I'm curious how others deal with them.
  46. 2 points
    Play Link: http://superbrawl.herokuapp.com/ SuperBrawl is a project that I've been working on during my spare time for quite a while. It is a real-time online multiplayer brawler based on Glitchbuster (even though the code base has evolved quite a bit to allow for multiplayer). There are currently two game modes included: Deathmatch: win the round by shooting anything that moves. 20 points for every hit, and 100 points for every frag. King of the Hill: points are only awarded to whoever is wearing the crown. You need to find the crown and keep it on your head. But be careful, all the other players will focus on stealing it from you. At the end of a round, a player will win and the best action of will be played. Of course, the game features several weapons that will help you dominate your opponents: The shotgun is your default weapon. It deals very little damage and requires accuracy. It can however be useful when your opponent is low on health The plasma gun fires plasma bullets straight at a high rate. It can be used to spray and prevent an enemy from moving The grenade launcher fires grenades that explode as soon as they come in contact with another player The machine gun fires three bullet bursts, allowing for quick sprays The rocket launcher obviously fires rockets that deal a lot of damage when used wisely The flamethrower is useful for setting things on fire for a few seconds. It is a great defensive weapon A shield is also available for pickup, allowing you to take 3 additional hits. You can play the game at http://superbrawl.herokuapp.com/ (the server is hosted in America, so if you're located in Europe, you may experience a bit of lag) If the server is empty, you can add/remove bots from the pause menu (press ESC) Any feedback is welcome. The game is still a work in progress that I really enjoy developing, so I'm always happy to include more weapons, tweak the difficulty, improve the bots AI, add game modes, add more public servers, fix bugs... anything! You can find gameplay videos on my Twitter feed here, here , here or here (I'm not sure how to include videos in a post, so these will have to do for now) Now on the technical side, there are also quite a few things that are pretty cool: Public brawl: the brawl is always running on the central server, meaning you can join it and invite your friends, or wait for anyone to join, or even add bots while waiting Self-hosted WebRTC game rooms: if the central server is too laggy for you, you can always host a game on your laptop and let people join (assuming they can establish a WebRTC session with you) Bots: no friends to play with? Just add a few bots to any game room! The AI is smart enough to make informed decisions (attack a player with less health or a bad weapon, retreat and get health or a shield, pick up a weapon before attacking, focus on the crown...) Death cams: when you get fragged by another player, the action will be replayed to you can see how things went wrong (press ENTER to skip) Ingame chat: if you feel like bragging about your latest frag, press Y and type a message for the chat Procedurally-generated maps: every time a round starts, a new map is generated by the server, so you can't just learn a map by heart Ingame video chat: turned off by default, if two players have the setting turned on, their webcam will be Mobile friendly: the game has mobile-specific controls, so if your phone can handle HTML5, you should be able to join the brawl The game relies on socket.io for client-to-server communication, unless you're hosting a game room over WebRTC, in which case socket.io is only used for signaling. Other libraries I'm using are browserify, Howler.js, PIXI.js, Mustache.js, chance.js and probably many others that I've forgottten I also intend on writing a series of articles about the things I've learnt while developing this game. Topics should include architecture, networking, synchronization, WebRTC, AI. Let me know if you think you'd be interested in such articles.
  47. 2 points
    alex_h

    Deperately needs a work

    Just a tip, if you make yourself sound desperate then you open yourself up to a stronger chance of exploitation. Employers may well offer you less money because they know you are likely to still accept.
  48. 2 points
    bestgames

    Monetising HTML5 games

    @totor Yes, exactly! Gamedistribution is not a reliable company! Their monthly revenue is millions euro .. and do not want to pay developers, this is stupid! Gamedistribution is Turkish based company. GD owner https://www.linkedin.com/in/eerturk/ and in 2017-2018 was acquired by Orange Games. https://tunnl.com/#team They earn millions euros and they don't want pay a few hundred bucks?? Their business model is based on 33% revenue share with fixed rate = this mean when you will have more, more games as publisher and your games will serve more ads impressions Gamedistribution will earn more money than you. This is classic PONZI scheme where they get 68% Adsence earnings - throught DoubleClick actually Google AdManager. Now their company has investment fund called "Azerion" https://www.azerion.com/, you can understand why they don't want pay or pay after half year. (https://www.zonebourse.com/ADUX-23160243/actualite/AdUX-a-leve-1-5-million-d-euros-Azerion-a-22-4-27642661/) They just need over €10M - €50M on investments and developers / publishers are for them only "money makers". Some example: Gross revenue €100 = Adsence give them €68, They take €38 as fee and your revenue will be €30 (their system "optimization" system Tunnl calculated your revenue 2x smaller than your real/actual revenue from Google Adx ads) = if it pays you at all HAHAHA @GameDistribution Support, after they have €68 and you nothing... With more, more ads impressions their system Tunnl started calculated smaller and smaller revenue, 2x smaller, 3x smaller (on 1,000,000 impressions you will earn almost the same revenue as on 4,000,000 impressions, but they get many more money)
  49. 2 points
    Hi @Dilshad Roshan Please post your question here: https://forum.babylonjs.com/
  50. 2 points
    Thanks @NoxBrutalis I was focusing to much on the .createMultiple() method. Simply creating the coins in a loop and then adding them to the group worked for me this.gameitems = this.physics.add.group(); for (var i = 0; i < 20; i++) { var x = Phaser.Math.RND.between(0, 800); var y = Phaser.Math.RND.between(0, 600); var newobj = this.gameitems.create(x, y, 'sprites', 'coin1'); } Btw is there a way to get the width and height values (800 and 600) from the current scene or game instead of using hardcoded numbers for the RND function?