• Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by Antriel

  1. It's badly worded. They mean to convey that if(!file.contains("index.html") || !file.contains("manifest.json")) throw "Bad zip file"; That is: you are missing manifest.json. No idea why they started requiring it though. Doesn't have too much sense for html5 games, although I guess certain parts do.
  2. Then they should change the wording in the terms. They state conditions to be paid and those conditions need to stay valid to keep getting paid. As they are written now, if I upload to another portal afterwards, I am no longer entitled for compensation. Whatever the FAQ says, the terms are deciding. True, but they do reserve 30 days to do so and only if the game wasn't exclusive with them. Also only if the game wasn't provided exclusively, which isn't specifically defined as to what it means. One could argue that if it was uploaded to their portal first, it was provided exclusively. So they have means to not take down the game. Although this wouldn't really fly, as they are only given revocable rights to publish the game.
  3. The catch is that to pay you they require exclusivity. If you read the terms, to be paid revenue share your game can't be published on other web portals. Which is quite a catch if you ask me.
  4. In my multiplayer game, I simply use both RAF and setTimeout to handle logic timestep (which is entirely decoupled from rendering). So each start of Phaser's update I check whether I can step (and update logic + send inputs), and then render. And I also have setTimeout loop that does the same, except it doesn't render.
  5. Visual editor might come later, I'm finding things out as I go. Not sure it would be more clear with big stories though, maybe just easier to build and see how it connects, but the details itself would probably be of same difficulty.
  6. Never heard of ink language, looking at it, it does seem to have very similar concepts. I kind of went into it without doing any research (on purpose). Right now it's only a simple parser and compiler. The syntax looks like this: You are sitting in a local pub, thinking about what you just heard. "I repeat," says scared-looking peasant, "will you save our princess?" [choice] Yes => [goto yes] I will think about it => "Please sir knight! We are desperate!" [id choice] [choice] Yes => [goto yes] No => [goto no] No => [goto no] [id no] [if please=0] "Please!" [set please 1] [goto choice] [if please=1] "Pleasee!" [set please 2] [goto choice] [if please=2] "Pleaseee!" [goto choice] [id yes] "That's wonderful! Praise you good knight. The dragon isn't even that big..." It's supposed to be text first, with not too big emphasis on whitespace, although it does use tabs/offset to handle choice options and substories. Plan is to gradually improve this, right now I'm adding syntax highlighting, then error checking, etc. This gets compiled down to: [..., {"next":5,"type":0,"text":"You are sitting in a local pub, thinking about what you just heard."}, {"next":6,"type":0,"text":"\"I repeat,\" says scared-looking peasant, \"will you save our princess?\""}, {"type":1,"choices":[{"choice":"Yes","node":17}, {"choice":"I will think about it","node":7}, {"choice":"No","node":9}]}, {"next":8,"type":0,"text":"\"Please sir knight! We are desperate!\""}, {"type":1,"choices":[{"choice":"Yes","node":17}, {"choice":"No","node":9}]}, {"type":2,"condition":{"op":1,"left":{"op":5,"left":"please"},"right":{"op":0,"left":0}},"yes":10,"no":12}, {"next":11,"type":0,"text":"\"Please!\""}, {"next":8,"type":3,"id":"please","val":{"op":0,"left":1}}, {"type":2,"condition":{"op":1,"left":{"op":5,"left":"please"},"right":{"op":0,"left":1}},"yes":13,"no":15}, {"next":14,"type":0,"text":"\"Pleasee!\""}, {"next":8,"type":3,"id":"please","val":{"op":0,"left":2}}, {"type":2,"condition":{"op":1,"left":{"op":5,"left":"please"},"right":{"op":0,"left":2}},"yes":16,"no":17}, {"next":8,"type":0,"text":"\"Pleaseee!\""}, {"next":18,"type":0,"text":"\"That's wonderful! Praise you good knight. The dragon isn't even that big...\""}, ...]
  7. As soon as something is typed `Dynamic`, I can do whatever and Haxe won't complain (but won't autocomplete nor do any error checks). So if I got my `var scene:Dynamic`, I can do `scene.add.image(...)` without issues. For creating objects in the first place, I either make dummy empty extern class that `implements Dynamic` (so I can make an instance and it acts as if it was Dynamic) or I do something like `var game = untyped __js__("new Phaser.Game()")` It's not optimal as I said before, but given how little I actually access Phaser's API it's doable. If there would be a major interest in Haxe externs for Phaser 3, I could look into porting the typescript definitions code I wrote into making Haxe externs too. But I can't justify it just for me and I can't afford such work financially right now anyway. There's but I'm not sure how good they are, and they don't have comments.
  8. Thanks It was meant to be a very short game to test my engine, so I tried to make it a bit silly. Glad I hit the target.
  9. Hah Just to be safe: it's a reference to Stanley's Parable. Actually none. It's a bit cumbersome with all the untyped code, but so far it hasn't slowed me down more than making good externs would. I always planned on doing them, but didn't get around it so far. The code I wrote for the TS definitions would be a good entry point though.
  10. A short interactive story. Get equipment, go fight a dragon, talk with a princess. Epic adventure. Created using Phaser 3 and Haxe, with custom (and for now very simple) "narration engine story" language for writing the actual story in and compiling down to data the game uses to handle the interactions. Play the game here: You can put the game on your portal using this url. The game is also available for licensing.
  11. A small skill based game with infinite upgrades. Made in a week using Haxe and Phaser 3. Play the game here: You can put the game on your portal using this url. The game is also available for licensing.
  12. That sounds like a memory leak of some kind. I assume you are removing a lot of game objects and adding new ones. Can you check if `this.children.list.length` keeps increasing or not? If yes, how are you destroying children? Try to make a small reproducible demo if possible.
  13. Take into consideration that the source picture size doesn't really matter. It gets decoded and is stored uncompressed on the GPU. The GPU can also pad it to be power of 2 size if it wasn't, wasting even more space. There are some compressed formats, but I don't think Phaser uses that (plus I think it would need to be supplied in that format in the first place). A few hundred KB png can easily be 16 MB on the GPU.
  14. If I was making a multiplayer game with physics, I would either used standalone one (for something complex like full rigid body), or custom written simple one. Using something integrated like Arcade would bring pointless overhead. That said, if you are so inclined, it probably wouldn't be too much work to decouple Arcade code from Phaser and use that standalone. That's one of the main benefits of using open source libraries.
  15. Antriel

    Render Depth

    `setDepth(depth)` (or `depth = ...`) can't be simpler, if you just searched for either z index or depth you would find it immediately sorting/Depth Sorting.js sorting/z index.js
  16. Yeah. Yep. It's more about staying in sync with server. In my games I run prediction in the same rate as server runs its updates. Clocks drift could eventually mean the client would be too far behind/forward of the server and mess it up. Just be careful of indirect comparisons, like assuming n-th update from server corresponds to n-th update of client.
  17. Phaser 3 smoothes the delta time, which could cause the issues you are seeing. You would want to either change phaser's timestep or calculate the dt yourself. Also keep in mind that computers use crystals for tracking time and they don't exactly have high precision. With clock drift of around 20ppm, your time which can mean around 16ms difference between server and client within 7.5 minutes. Not much, but something for long plays, it can start showing.
  18. I heard setting `preserveDrawingBuffer` to true can help in webgl for older devices. Not sure if that applies to cordova, but worth a try. For phaser you can set it in the game config `{ render: { preserveDrawingBuffer: true } }`.
  19. I started using VSCode for everything, though I mostly use Haxe. The text based game I'm doing when I have spare time, I'm planning on doing custom extension for displaying the story source (written in my custom format) in separate pane as html with better visualization. Similar to what VSCode already does for markdown. From what I saw, VSCode is very extensible.
  20. I'm just gonna add to all this that if you use TileSprite, it would cause this kind of issue too due to aforementioned pixel bleeding. And that's regardless of where the sprite is on the atlas, rather it depends on how the TileSprite cuts it out (as it actually creates a new texture).
  21. Basically it depends on how far you want to go and it's also game specific. Personally I fill the whole screen and depending on what the game is either display more of the world or just scale it, or shift things around. UI is always positioned relatively so it scales, game objects might or might not be (usually not, but again, depends on the game).
  22. ECS is all about being data driven and decoupling logic. Whether the game is turn-based or real-time shouldn't matter too much. In your case you can have an AI system that is triggered only when the entity has its turn. It does its thing and changes the relevant components, which are then used by rendering system to display the action. Event queues, state machines... are all concepts that can work with ECS. When you think about it ECS is a form of state machine itself (systems are transitions, components the states, entity is basically just a group of components, so a state). You can implement anything on top of that. What helps me when designing these things is to think about what data represents the basic unit of functionality I want to achieve (i.e. define a component). How that data can change, when, and why (data flow, i.e. systems). What other data might be needed (coupling, i.e. other components a system might need to do its job). When you have a solid image of this, you can usually start with pretty solid design and iterate on it as you realize more things. Also keep in mind you don't necessary have to run your systems every frame. You can have a system that is only triggered when the enemy executes its turn. In the end all that systems are is a data transformation, a state transition.
  23. I would expect the hand-made ones to be much much worse. Best way? When you spot a mistake, fix the JSDoc! If the JSDoc fix doesn't suffice, make an issue on the generator git repo, or even better fix it and make a pull request.
  24. In a multiplayer game you would want to make your own syncing solution as Phaser smooths out the delta time.