• Content count

  • Joined

  • Last visited

  • Days Won


Everything posted by AzraelTycka

  1. AzraelTycka

    [phaser] Chains

    Oh, now I see what was meant by help. There should be an animation, blocks assembling together to form two arrows (left and right side) and back to menu button on the bottom. I'll have to think about it more if it's that easy to miss. I tried to bring it out with with(ish) background with opacity behind the "Back to Menu" button.
  2. AzraelTycka

    [phaser] Chains

    Hello, This is my little game I recently made in phaser. Link to the game is It's a casual logic game with three modes to play and varying difficulties hopefully satisfying more casual players as well as someone who is looking for a bit of a challenge. Graphics are quite simple but I think it suits it pretty well. Some pictures of the game. So far I've tested the game in chrome and firefox and everything worked just fine. It doesn't have any mobile support yet. I would appreciate any comment you can give me. Thank you very much :-).
  3. AzraelTycka

    [phaser] Chains

    Sorry for quite a late reply. I was hospitalised until just recently. When you open "How to play" there are arrows on sides, if you click on them all parts of the game are explained to you. If by help menu you mean "MENU" button then that's it for playing the game and you have to start all over again (select mode, difficulty, ..., start new game). If you meant "PAUSE" button then it says any click returns you to the game. Because I was getting hospitalised I didn't add a feature to return from menu back to game. It's there to make sure that you can start a new game if you want. But good catch now when I'm getting back on my feet, when I get some spare time, I'll adjust it. Thank you.
  4. AzraelTycka

    Good Ways to Fight Distractions?

    Lately, it really helps me to make a list of things I need to do - I write even small things that I need to work on. I number them and when I work on one of these I just remove it from the list, it's surprisingly helpful although it doesn't change a thing overall. I type it the same way I would explain it to a five years kid so it looks ridiculous how simply written it is but oh god it saves so much time even if I'm not in a mood it's really easy to have some short term goals set up and finish them. Apart from that I take frequent walks outside just to get some blood flowing, so I leave for an hour every day to just get out and walk. It really refreshes me.
  5. AzraelTycka

    [Phaser][WIP]Dice Puzzle Game

    I see, that's my fault, though yesterday I could have sworn that I tried it but it works now so I must have picked only four instead of five. Sorry to bother you :-).
  6. AzraelTycka

    [Phaser][WIP]Dice Puzzle Game

    Hello, I actually have a trouble with it. At least I hope I got the rules right. Rulebook says I can remove three of a kind (three same dice), but when I select three 5s, 1s or 6s (and probably other numbers too) nothing happens.
  7. Hello, I'd like to ask you guys about your experience and for some advice. I'm looking for some hosting which would allow me to run node.js app on the server side and allowed me to use websockets. I'm doing some screening know and I'd love to have some info from you guys to see what works for you the best? It would be nice if the hosting also supported php + mysql, I'm not necessarily looking for a free hosting, I'll be moving a company website there as well because I'm not too happy with my current provider considering what I pay for it and what i get back from them. Thank you for your advices.
  8. AzraelTycka

    Any suggestions about node + websocket hosting?

    Thank you a lot guys, I'll check everything the moment I get off work. @symof: Yeh renting a server is certainly an option I'm currently considering. Right now I don't have any needs for large space or high bandwith with the stuff I currently have but I'm preparing an app which should be released after winter I expect quite a high number of connections. So currently I was just thinking about some chepaer hosting for now and then if a need arises moving to a server solution.
  9. AzraelTycka

    simplify this horse

    @Milton Exactly, the fish is just too much, there has to be a line, use common sense... ;-0
  10. AzraelTycka

    [WIP] Next.Land - property tycoon browser game

    - Ohh I was just googling around for a bit before and it seemed there is an API for google earth and there is even an official way to get to the models as well. Well, it was just a thought I don't know exact details but from the rules on google site(s) it seemed to be possible. But if it's not possible then let's pretend I didn't mention it at all ;-). - By selection I meant which cities are available. I checked my country and there was one city though I was kinda expecting a capital so I was just curious if there were some variables which decide which cities are open from your side. But now I understand :-). - Btw you said you are processing 1+ TB of data can I ask where do these data come from? I've always been curious about these things but never got into it because it seemed like a lot of work - well more importantly a lot of time.
  11. AzraelTycka

    [WIP] Next.Land - property tycoon browser game

    Hello, just my little bit here. 1/ Potential - yes I guess, haven't played yet that much just played around a little. I'm intending to come back to it later. 2/ I'd prefer something more than just casual but no need for some real hardcore gaming too. 3/ I wonder if they can even offer enoughperformance to support the title? 4/ For me a big thing would be if you used actuall 3d models (for example extrated from google earth or similar product). Right now it doesn't feel attracting enough (understand different from many other tycoon games), just kinda have a hard time having any personal feelings when playing with it. I don't know about local rules for kickstarter but I remember seeing a post or two with it in the past so try asking admin/mods if you can actually post a link here. Just a question, how do you pick which cities you can select? Btw it's nice if I didn't make it clear above :-).
  12. AzraelTycka

    Phaser cannot draw a line when moving too fast

    Just to advance the idea above, when I got some time on my hands now :-). You can probably save each point into an array when mouse moves and then draw that as lines with some approximations (some curve fitting would be probably fine here, there are some things like quadratic curve and so on in canvas, aren't there?). That way it will hopefully smooth out and removes the stuttering. I'd love to see how you tackle this problem so could you post here some example (working not just code ;-)) when you get it working the way you want?
  13. AzraelTycka

    Phaser cannot draw a line when moving too fast

    Hello, I don't know the general way for this but can't you just store positions and fill them in (start/end positions and fill in between) or better use canvas lineTo or Phaser's line? EDIT: Wonder if that helps with fast mouse movements though.
  14. AzraelTycka

    Timer and Array question (SOLVED)

    @Ninjadoodle I think it's fine I'm jsut idiot who should have asked before answering ;-). It's just that because you put last two lines outside of your for loop, you will never get any blinks because: monsters = [..] // it's length is 10, last index is 9 for loop { // something done here } // you call this.monsters[i].blinkTimer after for loop ended which leaves i at 10, but your monsters array has max index 9, so next two lines result in error in javascript this.monsters[i].blinkTimer And even if you had one more monster which you didn't loop through before, it would still be the only monster which would be blinking because you never initiated other monsters to blink in the first place (never called blink function on them). Well, @Fatalist already answered your question before so you can ignore my rumble anyway ;-). Btw you can store timer in vars, so you can get back to them later. Also for repetition there is a loop timer which does - obviously - calls the event the same way as you are trying. You can also check it in the examples here. I haven't tried it but the docs don't note delay (or tick?) as a readonly property, so you can probably just change it when the event is fired (but don't quote me on that, I haven't tried it but it should be simple to try so check it for yourself). Otherwise you can just call your game variable inside your blink function directly, something like should work - depends on your structure.
  15. AzraelTycka

    Incremental Game - Creating Loop Function

    Hello, I'm not sure if I get it correctly. But in Phaser there are timed events which you can use, just specify time after some function is supposed to be called, the function and it's context and the framework takes care of it for you. An example of timed event is for example here in phaser examples and here. Also check the docs directly to see all settings and options you have. Hope this was what you were looking for. Apart from that you can just store time differences between update calls until you get the time value you desire but that's probably how phaser timer works anyway (well similarly) I just wanted to point it out to you for your JS experience.
  16. AzraelTycka

    Timer and Array question (SOLVED)

    Sorry, I'm an idiot, I didn't see that you already bind this in events through the two lines below the loop - I actually thought that you put there to show which part was giving you trouble considering they are exactly same as the ones in the blink function. This variably is binded ok as a phaser game (I guess?). But inside your blink function there is no variable i, so this.monsters doesn't exist so you can't call any properties/funcitons on it. You change, yourFunction, this) into, yourFunction, this.monsters) outside your blink function and not use it inside, just call the animation inside nothing else as'blink');. After your post I have a question, are you sure you want the last two lines in for (i = 0; i < 10; i++) { this.monsters[i].blink = function() { this.monsters[i]'blink'); this.monsters[i].blinkTimer = this.rnd.realInRange(2, 6); * this.monsters[i].blinkTimer, this.monsters[i].blink, this); } } this.monsters[i].blinkTimer = this.rnd.realInRange(2, 6); * this.monsters[i].blinkTimer, this.monsters[i].blink, this); be outside the loop? Unless you hid some code from us then you should be having troubles with variable i, because last two lines are called only once and with variable i = 10 which is outside your array (I guess?). Or did I miss anything else?
  17. AzraelTycka

    Timer and Array question (SOLVED)

    Also when you call this.rnd.realInRange(2, 6) (and inside blink function, this keyword is not your phaser game so there isn't any rnd, well unless I missed something?
  18. AzraelTycka

    Paragon War - Browser Quest on Steroids

    Nice game. But I have a concern about the safety. I don't think one city guard is enough to guard the queen! ;-)
  19. Love it, no idea what is going on around me :-).
  20. AzraelTycka

    Override default key behavior with JS/Phaser

    Yeah that's basically addKeyCapture is basically event.preventDefault() while remove keyCapture is .. well removing it. But id doesn't remove the listener, it just either prevents or sets up the default behaviour. Basically: addKeyCapture ..... listener with event.preventDefault removeKeyCapture ..... listnere without event.preventDefault Here you can find the line in phaser, check it out to see that it's only about preventDefault(). Check comments in this example. You can also check the docs. It says the same thing.
  21. AzraelTycka

    Override default key behavior with JS/Phaser

    I think you need addKeyCapture and not removeKeyCapture. To prevent default behaviour. Example that works from my game: create: function() { this.cursor = this.input.keyboard.createCursorKeys(); this.spaceBar = this.input.keyboard.addKey(Phaser.Keyboard.SPACEBAR); this.input.keyboard.addKeyCapture([Phaser.Keyboard.UP, Phaser.Keyboard.DOWN, Phaser.Keyboard.LEFT, Phaser.Keyboard.RIGHT, Phaser.Keyboard.SPACEBAR]); } When I need to access my keys I use: this.cursor for cursor keys (up, down, left, right) and this.spaceBar for spacebar.
  22. AzraelTycka

    Override default key behavior with JS/Phaser

    I don't understand what you are trying to do? If it's just spacebar to do something then did you even check any phaser examples on this matter (for example - if you add keycapture to arrows in this example it still works the same)? One more example closer to your second post. And docs of course.
  23. AzraelTycka

    Switching states - error [REMOVE PLEASE]

    Ok, I tried to redownload (again) phaser and replace the file and it started working. I don't know why because it's the same version I was using before. Can I please ask the moderator to delete this post? Thank you very much.
  24. Hello, I'm having a problem when switching states with Phaser. I have one menu state and one game state. In menu there are different options and different sub-menu options. Something like this: menu: MenuOption1 - click calls function menu1Submenu() which creates sub menu which is overlayed over part of the Menu MenuOption2 MenuOption3 I set groups and images inside menu1Submenu function this way: this.menu1SubmenuGroup1 = this.menu1SubmenuGroup1 ||; because you can go back and fort however you want I don't want to create a new group for submenu content everytime - when I already created one before. So I just change renderable to false/true instead and change inputEnabled to false/true depending whether the submenu is active or not. One of the options in submenu is to start the game (thus changing states occurs). I first remove all events I set on all elements of my groups which I created then destroy them and the destroy group as well, to make sure everything is clean I set all the groups to undefined. Then I change state: this.start.state('game'); In the game I have a button which leads back to menu, that buttons simply does: this.start.state('menu'); When I get back to menu animations start, everything seems ok but the moment I click on MenuOption1 to open submenu nothing happens or more precisely when I comment destroying, removing events and setting all groups to undefined I get errors: phaser.js:40129 Uncaught TypeError: Cannot read property 'events' of nullPhaser.InputHandler.start @ phaser.js:40129Phaser.Component.InputEnabled.inputEnabled.set @ phaser.js:45418(anonymous function) @ menu.js:1323Phaser.Timer.update @ phaser.js:65567Phaser.Time.update @ phaser.js:64890Phaser.Game.update @ phaser.js:35146Phaser.RequestAnimationFrame.updateRAF @ phaser.js:60028_onLoop @ phaser.js:60012 83 phaser.js:40273 Uncaught TypeError: Cannot read property 'scale' of null When I set my groups as: this.menu1SubmenuGroup1 =; Everything works ok, but even when I destroy groups and all their content and set the property to undefined it brings this error. Could someone advise me how to remove the stuff properly in this case? I want to keep the groups but don't want to have them declared before because that just adds more content which is needed most of the time (imagine that you don't always open settings, and so on so there is no need to create them all the time), and I also don't want to stick only to this.menu1SubmenuGroup1 =; because this way everytime anyone clicks on any option adds more groups to phaser object (correct?), so a few times clicking back and forth can give dozens of groups which all link to same object (?) or at least polute the memory (I suppose I could always destroy groups set undefined when going through menu but that doesn't seems as a nice effective way). I'm not sharing the entire code because it's too long and I managed to reduce the problem to lines mentioned above. Thank you very much I really appreciate any advice. PS: I used latest stable Phaser version 2.4.7.
  25. Hello, I'm finishing my game with Phaser and I got into implementing a pause and restarting the game when it's game over. I'd like to ask you more experienced phaser developers if the way I currently implementted is fine or if there are any drawbacks? I'm not sure if I'm not touching something I shouldn't have, so far the pause and restart do the thing perfectly but well inviting an unseen bug this way coul be also possible so I'd like to make sure. First of all I should have said that I wanted to implement pause, unpause and restart purely with phaser functionality without going to eventlistener outside the game (well it's the same thing but I expect that phaser has some shims and is ready for unexpected cases so I don't need to take care of them first). So I pause/unpause game with = true/false, when the game is over I do = true; after displaying a small window with score and text "Press space to continue". So I keep vision of the game stage in background when the game is over (I don't move to other state) and only if the space bar is pressed I restart main game state. Because I used game.paused which disables update function and all other things I went with which has a check for game.paused && game.gameover to make sure that althought it is called on every key press it doesn't progress to do anything until the game is really over. So I'd like to ask if this part with keyboard.onDownCallback is fine, I set it manually but I'm not sure if it's not some generic thing which phaser uses for something else? Code: var style = {font: '28px Times New Roman', fill: '#ffffff'}; this.pauseText = - 10, Math.floor(this.topBarHeight / 2), 'PAUSE', style); this.pauseText.inputEnabled = true;, this);, this); = this.onKeyDown.bind(this); pause: function() { if (! { this.pauseScreen.renderable = true; = true; } }, unpause: function() { if ( { this.pauseScreen.renderable = false; = false; } }, onKeyDown: function() { if ( && !this.gameover) { this.unpause(); } else if ( && this.gameover) { if (this.spaceBar.isDown) { = false; this.state.start('game'); } } }, gameOver: function() { this.gameover = true; this.updateGameOverScreen(); this.gameOverBMD.addToWorld(Math.floor( / 2 - this.goW / 2), Math.floor( / 2 - this.goH / 2)); = true; return true; } Thank you, I think it's not a problem but I'd like to make sure with you.