Odk

Members
  • Content count

    24
  • Joined

  • Last visited

About Odk

  • Rank
    Member

Contact Methods

  • Website URL
    https://justdoit.tech

Profile Information

  • Gender
    Male
  • Location
    GdaƄsk

Recent Profile Visitors

514 profile views
  1. multiplayer online card game

    You didn't specified with what part you need help. If you are new to gamedev then I would recommend in making it offline first. Adding online multiplayer will be simplest part in your case (low traffic turn based game), just use https://socket.io/. It will be more than enough.
  2. Gopherjs and Phaser

    Hi, I've recently started to experiment with Gopherjs ( https://github.com/gopherjs/gopherjs/ ) for Phaser games. Idea was to write backend and frontend in same lang (I use go on backends I create for clients). Managed to recreate http://phaser.io/examples/v2/games/starstruck example in go without much trouble, but now I'm creating game template with states and can't properly add multiple states. When I console log the game.state.states object I see all my states, but it always starts last one no mater which key I use in game.state.start(). Anyone here with experience in Phaser and Gopherjs?
  3. Works nice, good job. You should think about making it more dynamic. Now when some tile fall on large enough group after removing tiles beneath it, there will be no reaction. I would also add some power ups (like remove all tails with specific color).
  4. I'm not sure if this is suitable for games. PB doesn't have any cpu/gpu intensive content on their site. It's just a list of links. If you do the same in your game then frame rate will suffer and no one will play your game.
  5. rotating sprite in direction of drag

    You can update car rotation only if button is pressed. To smooth the rotation I would calculate angle between objects ( http://phaser.io/docs/2.6.2/Phaser.Math.html#angleBetweenPoints ) and slowly correct it toward 0 if it's bigger than some small value. I would never target 0 value as it will make car vibrating. Pseudo code would look something like this: if buttonPressed { if angleBetween(car, pointer) > 0.2 { car.rotation += (or -=) 0.1 } } You need to experiment wit the values and check if this works for you.
  6. Phaser Blank White Screen

    You loaded the image but didn't displayed it. game.load just loads image. It doesn't show it.
  7. How much have you made in 2017?

    How many games you release during this time and how much time you are putting in every title? From my side: I'm doing gamedev after normal daily job and managed to get ~3000$ from contract work, but didn't released any game that I own in this time. For 2018 I've already started with removing jobs that doesn't scale well (require my constant attention). This should give me some free time and hopefully I'll start releasing some games this year. If not I've already booked ~10000$ in contract work and have some options for more. Not bad side income in eastern Europe.
  8. Not sure what would be your use case? When you publish your game "url" will be remote http server. In theory you could write a method that will send HTTP POST or PUT request to server and then server will write (if you program it to do so) the content to file. But once your game will have more than one player it will probably lead to data corruption. Better say what you want to achieve and then maybe someone will be able to point you toward proper solution.
  9. [WIP] Increstellar - conquer the galaxies

    Hi, I'm playing for almost 1h and I can say that it's quite nice. One thing for now is that there is no visual relation between ship level and fleet strength/performace. I don't get what ship upgrades give.
  10. How to attach text on enemies

    Because you do: this.zombieHealthText=this.game.add.text .... So you are assigning new text object to same game object in each iteration. In result you have reference to just one text object. It should be zombie.zombieHealthText=this.game.add.text .... Then you will create text object for each zombie separately.
  11. How to attach text on enemies

    As you already have zombies as group then I would add something like this (writing from top of my head) in your update function: this.zombies.forEachAlive(function(zombie) { zombie.zombieHealthText.x = zombie.x; zombie.zombieHealthText.y = zombie.y; }, this); Then it will update text object position in each frame. It's fairly simple operation so shouldn't be a performance issue on any device.
  12. As JS is very async lang you need to stop thinking like in other languages. Normally in most of languages you expect that in most cases line below gets executed after line above. In JS everything needs to be non blocking as it would freeze whole browser. So almost every call is async and next function doesn't wait for previous to return. It was a problem for log time but then promises arrived. Check this page: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise and everything should be clear. TL;DR: Return answer from database as Promise. I think that this.avatar should be a promise to avatar object and not actual result. Then you will be able to wait for it later. EDIT: Other option is to start with generic avatar same for every player and replace image once its loaded using a callback. If your generic avatar would be blank image of same size as real avatar then it will display white square at the beginning and replace it with real image soon after.
  13. Nice idea, but IMHO ball is too fast and there is no friction. It's impossible to run to ball once it was hit. I would experiment with reducing ball speed over time. So after touch it will be like kick and it will slow down to full stop after some distance.
  14. Destroy does not remove prototype

    Is there any reason that you want to destroy fish object? Normally to reduce cost of spawning new object you create group of fish objects, set them all to dead state. When you need to spawn new fish just call: https://photonstorm.github.io/phaser-ce/Phaser.Group.html#getFirstDead set x,y coordinates, etc and make fish alive again. With this way you will only need as many fish objects as maximum you want on screen at once. Creating new sprite cost resources, try to avoid it if possible.
  15. Create start menu in Phaser.

    Hi, Just create separate state for it and put there start button. In on click function change state to your "normal" game state. Like this: http://phaser.io/examples/v2/buttons/action-on-click but change state on click. There are no special methods for creating start menus.