• Content count

  • Joined

  • Last visited

1 Follower

About Jimaginary

  • Rank
  1. Extended object function troubles

    Your problem is that "dummy.body" is null when you are trying to access the property "static". You are a valiant warrior for attempting to use prototype's in an OOP fashion. I would recommend just using regular classes with Es6 or TypeScript. Or you could use some component pattern from a framework like Angular or React.
  2. Room Walkers!

    Hey guys, sorry about giving you a link to a broken app! I was finally able to get it hosted with HTTPS and secure websockets (was pretty frustrating though!). I also had to get a domain name for the ssl certificate so I bought this cheap one: gameof.ninja. lol Now when you type in your name and click play you should be able to control a little ninja. Use arrow keys to move, space to slash your sword, and hold shift to strafe. You should be able to walk around and attack other players in the room. For some reason I seems that the server crashes and restarts when a dead player refreshes the page, but I just wanted to get it out there and see what people think. I imagined this being similar to http://agar.io/ where the game begins with a popup asking you for your name and then drops you into the world where you play until you die and are then brought back to the initial popup. In terms of making the game look nicer I want to make the map nicer export out the images better (for example, the character is being scaled down to 1/4 size which is why it looks really pixelated). For making it more fun I want to add a long ranged attack (a key) and a defensive shield move (s key or d key). I'm also considering allowing the user to choose between different types of ninjas on the initial popup page (eg. fighter ninja, archer ninja, mage ninja...). These different ninja types would have different starting stats and possible their own special move in addition to a basic attack and basic long-range attack. I'm also thinking about having an in-game shop where you can power up your character until you die, but I don't want some people too be too OP and run around killing everyone (although that would be pretty funny, wouldn't it?). Anyway, give it a try and let me know what you think. https://gameof.ninja
  3. Phaserjs Object Layer

    Use game.add(sprite); to add it to the screen.
  4. Effiency of reusing game objects

    I agree with mattystyles. It depends on how many platforms you are using and how you would use them. I doubt you would see performance problems if you just use .destroy() to kill a platform, but I do remember watching a flash game tutorial from Lee brimelow about object pooling so yes, that is a thing. Also, I wouldn't really have an array called "destroyedPlatforms" because your destroyed platforms would go back into a pool to be used on the screen again. Instead, I would have one array named "platformPool" and one named "platformsInGame" or something like that.
  5. How can add a label over sprite?

    Hi, just to clarify - is there really no way to add text to a sprite? It always had to be added to the game over? I'm creating a game where the labels are over the characters' heads, but the characters are moving so every time I move the character I have to also move it's corresponding text field. It just seems more verbose and computationally expensive than adding text as a child of a sprite.
  6. Callback when animation complete?

    nice! But suppose a sprite had multiple animations added to it. Is there a way in the onComplete callback function to know which animation it was that just completed?
  7. Simple Question: How to Change size of an image

    scaleTo works, but I'm using "this.cat.scale.setTo(.05, .05);" which REALLY makes the image pixelated and not good looking. How can I have nice, crip graphics but still kep them small? I'm using texturepacker, but I don't think I can change the size of the images in there... Do I need to shrink the images in spriter and/or illustrator? I bought this spritesheet, but I'm having trouble adding it into my game and having it look good. :/
  8. The problem of the sprite key

    I am having the same problem. It says "Texture with key 'TEXTRUE_NAME' not found."
  9. Room Walkers!

    Hmm it looks like the place I was hosting the client uses secure https and is blocking the websocket connection. Let me try to set it up with SSL websocket, and I'll let you know when to try again. thanks.
  10. Hi, I'm trying to build a top-down 2d game. You can find the code for it here: https://github.com/JimTheMan/Room-Walkers Here is a screenshot of the game using "this.scale.scaleMode = Phaser.ScaleManager.NO_SCALE ;" The game works, but there are a few issues I'm having: 1) The "viewport" always shows an area of 10 x 10 tiles. As the player moves the camera follows him and he appears to be moving around the map. However, the viewport is always 10 x x10. Is there a way to change this, for example, to where the viewport always showed an area of 20x20 tiles? 2) When I use "NO_SCALE" mode everything looks super tiny, but when I use any scale mode (such as SHOW_ALL) the text looks blurry and is completely unreadable... How can I have graphics that are large enough to see while still keeping nice, crisp fonts? thanks.
  11. Room Walkers!

    Hi everyone, I just finished this little project that I call Room Walkers. You can play it here: https://room-walkers.firebaseapp.com/ In the top-left corner enter a name and click "Play!". Then a character will appear which you can control with arrow keys. When other players join you can see them and they can see you as well. There is no attacking or messaging in this game, just walking around. I used basic JavaScript Phaser with NodeJS "ws" library on the backend. Let me know what you guys think. woot.
  12. Cool! Just an update. I've created a public github repository for the project here: https://github.com/JimTheMan/Breakout-with-Friends-Battle-Adventure-Phaser-Game I got a free server from c9.io, but I'm still not exactly sure how to run it -_-. Lol I also think we should have some type of chat program that we can all be in the same room and chat together. I don't think you can do private group chat on this forum's website. On a random side note, I made this website today for an engineering friend trying to start a solar business: http://surepowerhouses.paperplane.io/
  13. 4 Ways to Make Money With HTML5 Games

    You are forgetting banner advertisements, or even better, video ads.
  14. Looking For Teammate !

    Still looking for a JS programmer?
  15. HTML 5 developer needed

    Looks like a cool game.