• Content Count

  • Joined

  • Last visited

  1. I've been working on a 4x game for mobile and desktop using phaser - Increstellar It's a little strategy game that's built on the basis of approachability, borrowing heavily from the incremental genre to maintain a sense of progression and direction while trying to avoid the problems related to being unable to play a whole match in a single sitting and getting lost on resuming play midgame - it plays nicely on mobile and tablets and it's a nice coffee breaker if you're into that sort of things. There's everything you'd expect from a 4x: build facilities to improve your economy, tend to your colonies, research and build better ships and conquer different aliens to gain sectors and find artifacts. There are also some aspects that are proper of incrementals: there are multiple galaxies to conquer, each providing more resources and artifacts than the previous one, but having stronger enemies as well. The artifacts can be used to improve your empire, and those improvements become effective only trough a reset, so finding the right balance between expansion and contraction is the key to rapid advancement trough the systems. In the future I'm planning to expand the strategic aspect of it: introduce the ability to customize ship loadouts, add stations defending special sectors, more weapons type and, if I can find a way to generate interesting events, more political bickering between colonies. Devlog and other info: https://losboccacc.itch.io/increstellar/devlog What you guys think? I'm interested in hearing opinions on the basic game loop and even on balance or other improvements you might think of while playing.
  2. nvm figured out that rendertexture works on canvas too and has a getImage method that gives back an html element
  3. I've built an html5 game with an action are built with phaser. I'm generating sprites on the fly composing randomly various elements. For some of the icons in the html game interface I wanted to use those same sprites, but can't find how to export a sprite with children into a data url or something that I can put into an Img/background-url is there a way to get the raw pixels out of a sprite and it's children tree as laid out on the phaser canvas?
  4. nice! I do miss the ability of going straight, and of course the yeti. press F to pay speed to the yeti.
  5. found out the issue, needed to add game.politicalOL.blendMode = PIXI.blendModes.ADD; to the child but I don't understand why NORMAL does a SCREEN, beside, ADD seems correct but what I wanted was the kind of layer mixing paint programs call 'default', this one will saturate color instead of masking it with the topmost.
  6. I'm writing a game and since the map will be quite big, I'm running the game logic in a GLSL shader. the pipeline works, I see stuff getting updated etc, my only problem is when I try to create a political overlay of the calculated results. In the map (attached screen) the yellow area is colonized. the problem is, no matter what alpha I return in my fragment, it's this almost but not quite solid yellow. filter is super simple; if colonized (blue channel of the texture) then emit that player color (fixed yellow for now to simplify): vec4 oc = texture2D(uSampler, vTextureCoord); vec4 c = vec4(0.); //b channel holds colony value if (oc.b> 0. ) { c = vec4(1.,1.,0.,0.); c.a=0.1; } gl_FragColor = c; I tried whatever value for c.a, but it's always the same result. the filter is not applied to the galaxy map itself tho: it's another sprite, built on the render texture I use to hold the data, added as child: game.colonize= new Phaser.Filter(game,undefined, game.cache.getShader('colonize')); //game logic game.colonize.setResolution(2048,2048); game.mapper= new Phaser.Filter(game,undefined, game.cache.getShader('mapper')); //color yellow colonized area, the one above game.mapper.setResolution(2048,2048); game.politicalRT = game.make.renderTexture(2048,2048); game.politicalRT.render(game.make.sprite(0, 0, 'mas')); //mas hold the mass density of the galaxy game.politicalSP = game.make.sprite(0, 0, game.politicalRT); //sp is redrawn on the render texture every update game.politicalOL = game.make.sprite(0, 0, game.politicalRT); game.politicalSP.filters = [game.colonize ]; game.politicalOL.filters = [game.mapper ]; game.galaxymap.inputEnabled = true; game.galaxymap.input.enableDrag(false); game.galaxymap.addChild(game.politicalOL); //politicalOL is that yellow blob that doesn't appear properly transparent the mapper should picture a light, transparent yellow, but it isn't working. is there some magic in blending child filtered sprites?