Jump to content

Qix Clone


astropanic
 Share

Recommended Posts

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

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

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

  • 3 years later...

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

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...