astropanic Posted May 25, 2014 Share Posted May 25, 2014 Hi all, Does anybody have an idea how to implement a Qix clone ? http://en.wikipedia.org/wiki/Qix using Phaser ? Played this as 6 year old kid. This is one of the game genres I haven't found yet implemented in this framework. Any suggestions ? For the younger audience : https://www.youtube.com/watch?v=fyEzhntx9dY Greetings,Wojciech Link to comment Share on other sites More sharing options...
ggolemg Posted May 27, 2014 Share Posted May 27, 2014 Haven't seen it, but I slapped together the jix (javascript qix: https://github.com/ofeldt/jix ) into a working jsfiddle and CDN'ed the jquery for it. @ ~300 lines, and by the looks of it, rather simple code, I think it wouldn't be that hard to implement QIX in phaser. But the github/jsfiddle link I've given isn't complete either, maybe 20% of what I would consider a useable example. It does not contain any sort of area fill/cut off, the 'bad guy', polygon combination, etc, so take it for what you will: a start. Link to comment Share on other sites More sharing options...
astropanic Posted May 28, 2014 Author Share Posted May 28, 2014 Hmm, I don't get it what that has to do with my question. Of course the above code is simple, it is so trivial, you can even cross your own tail ( by the way, you forked my repo), the main problem in the game itself is the path detection between filled areas / the crossing detection etc, simply said the transition between the different player states. My biggest problem so far is how to represent the board with all data (player - head, player - tail, fuses, polygons, paths and so on). Link to comment Share on other sites More sharing options...
PickPacket Posted August 14, 2017 Share Posted August 14, 2017 I'd say that Ggolemg's fiddle is a good place to start. Be sure to maintain an array of tail-segments. Next, I'd also use this segment-intersection function to check for collision between the Qix-segments and the player-tail segments: https://github.com/pgkelley4/line-segments-intersect/blob/master/js/line-segments-intersect.js Add a function to generate sparks, and you're almost home... Link to comment Share on other sites More sharing options...
Recommended Posts