• Content Count

  • Joined

  • Last visited

  1. Thanks for the answer. Well, it's OK, now... I discovered that there is another file that is overwriting the prefab file behaviour... I am following a tutorial in a book... so it's not completely my fault... Thanks again.
  2. Hello, I am doing a simple Platformer game with Phaser, for learning purposes. I have a sprite that is 2 columns x 2 rows (see attached image), with the upper-left image being the "idle" status. And I put this code in my player prefab file: this.animations.add("idle", [0]); this.animations.add("jump", [1]); this.landAnimation = this.animations.add("land", [0]); this.animations.add("run", [1,2,3]); The problem is that my "idle" status is going to repeat frames 1,2,3 instead, again and again, as if the character is moving, and the other statuses are all [0] (what I wanted for "idle"). The result is always the same, whatever numbers I put into the arrays. I am a bit stuck, and cannot figure out where the problem is... Any help or ideas should be greatly appreciated. Thanks.
  3. Hi! I remember, some time ago, maybe a year or two, seeing on Amazon a book (an actual printed book) that was a glossary of Video Game terms or terminology, some sort of dictionary for developers....... Publisher was probably an academic publisher, like CRC Press or so. (Not Createspace or self published books nor kindle and similar) Anyone has bought/seen it, or can kindly help me in locating in on Amazon again? Common search words aren't working in locating that book again for me. Thanks
  4. I would keep the Phaser name. It's well established, and it's a more appealing name in my opinion. It's an English noun, "a device that alters a sound signal by phasing it", so I don't think it's a problem with anyone using a noun for the name of a library. That would be like calling it "runner" and having someone complain since it's trademarked. Highly unlikely. This said, I don't think that it is a problem with the Star Trek authors if a free JavaScript library is named the same as something they did. That would be like Python having to rename to something much less cool because of Monthy Python. I don't think that the Monthy Python authors ever complained with a famous programming language being named Python. In any case, you could always change the name if and when actually forced to, which is, I repeat, very unlikely. Lazer does not mean anything in itself, while Phaser is evocative, (a phase is a transition) and it reminds me of sci-fi and games, at least more than Lazer. Naming it Lazer would be like saying: ok, this is no longer Phaser, and furthermore, the Phaser legacy, or background, is no more needed. Furthermore, major changes will happen to "Lazer" too in the future, so a new name would be needed again, following the "big changes = new name" logic. But, I repeat, for me the main reason I'd keep the old name is that Phaser is much cooler.
  5. There is an excellent little book about Pixi.js by Rex Van Der Spuy published by Apress.
  6. Thank you for the link, but what I need for the time being is some sort of primer on how to teach the computer the rules of chess, and how to make it play... just getting an idea of the "big picture", so that I can go into details later. Of course I can try it myself, from zero, using my brain, without any tutorial, but a "getting started" sort of tutorial would be very useful...
  7. I would like to find a good tutorial for a Javascript chess engine. I mean, one where you play against the AI, not the chess board in which two human players can log in and play together (although the latter is of some interest to me, too). I know that a chess engine can quickly become a very complicated matter, but what do you think that the best tutorials are on the web to start learning how to write one? This, limited to HTML5 / Javascript.
  8. Update: I just achieved some sort of animation with the following code: In the loadHandler() function: setInterval (updateAnimation, 300);In the playGame() function: findWaitTime = function (){ waitTime = Math.ceil(Math.random() * 6);}updateAnimation = function (){ findWaitTime(); if (waitTime >3) { mosquito.state = mosquito.FLYINGRIGHT; } else { mosquito.state = mosquito.FLYINGRIGHT1; }}This is a random animation, of course, I am sure that it can be improved and that there are better and more elegant solutions...
  9. Here is the link... the "game" is intended as a working exercise for the time being, and it's some sort of improvement to the "Hedgehog Apocalypse" platform game from chapter 11 of Rex Van Der Spuy's excellent book "Foundation Game Design with HTML5 & Javascript". There are 5 levels. To end each level, first of all, you have 60 seconds to "defuse" the bomb (a reasonably long amount of time...) just collide with it. Then you have to jump on the three hedgehogs (if they hit you while you are not jumping on them, you are lost... like in the 1985 Mario game). You "embrace" the dog (just collide with it), and "smash" the mosquito (collide with it), and then reach the door on the upper right, and you're done. So, as stated before, I would like to implement some sort of simple but regular animation of the mosquito, I have tried different methods but am still uncertain on what is best. I'd rather not work with "Date", the entire game is "Date-independent". On another note, I see that sometimes, after the collision with the girl, the dog "re-appears" for a small fraction of a second after the heart, and it's a bit strange since its the same function that there is for the collision with other sprites (they don't re-appear...) Let me know what you think, any comment and suggestion is most welcome, thanks. Here's the link: http://www.retroinvaders.net/laurasworld/src/laurasTriviaLevels.html PS You move with left and right arrow keys, and jump with spacebar... PPS For some reason the link has a final %C2% to the original link i put... please remove it.
  10. At this point I'll publish it on my website as soon as I have time, rather than doing a jsfiddle since there are too many resources to upload... including sounds, etc. there is just one mosquito for the time being, so I don't think that the problem is the mosquito itself, I'd rather say that I am making bad use of setTimeout and setInterval... and how they interact. I'll try the method you suggested, but I'd rather not work with Date, it's something that I didn't use in this game... there should be a good "Date-independent" solution. The whole game is "Date-independent"... Thank you for your answer. Back soon with the whole thing online.
  11. Hello, I am working on a simple animation of a sprite in a little game, a mosquito that is changing state while flying towards right. These states correspond to two different images in my tile sheet. So far I have been doing this, but the animation is very irregular: for (var i = 0; i < mosquitos.length; i++){ var mosquito = mosquitos[i]; setInterval (updateAnimation, 500); mosquito.update(); //rest of code non-relevant to animation here...and then, later: function updateAnimation () { next(); function next() { mosquito.state = mosquito.FLYINGRIGHT1; setTimeout (previous, 500); function previous() { mosquito.state = mosquito.FLYINGRIGHT; } } }The two states are of course FLYINGRIGHT and FLYINGRIGHT1... problem is that mosquito starts animating very quickly and very irregularly. I would like it to change state, i.e. every half of a second. I tried with different time periods but it is always the same effect. I can produce a jsfiddle of the whole thing, if what I am missing is not so obvious. Thank you for any help and insights.
  12. raenset

    Learning Pixi.js

    Thank you both for the links.
  13. raenset

    Learning Pixi.js

    Greetings, isn't there anything similar to a beginner's guide (online or in print) for learning Pixi.js? I see lots of examples in the Pixi site, but it's very difficult, especially for someone who cannot call himself, by any stretch of imagination, an advanced coder, to get a picture of the whole thing from multiple separate mini tutorials, or from the code of the samples.
  14. That's what I was thinking, to concentrate on coding and game coding without any library or game engine, for some reasonable time. Most geeks are aggressive by nature, anyway...no worries...
  15. All other considerations about my understanding and knowledge apart, and assumed that this is the right way to go, what to put insead of "characterCurrenTileX" to make this code work? I mean, is there a more down to earth way to express this concept, so that the JavaScript will understand it?