Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by alantangyl

I just created a plug-in to enable multiplayer possibilities using PHP and Ajax.

Here is a non-impacjs example:

http://www.alangames.com/chat/

I posted the code in point of impact and waiting for review

1 decade ago by Graphikos

Approved. Thanks for the contribution!

http://pointofimpactjs.com/plugins/view/8/comet-php-chat

1 decade ago by SpaceHorse

I checked today. It works but i found a bug.
If i type text fast it types wrong.
For example i type "yx". and between 2 frames the engine figured out that i pressed for example 2 keys "X" and "Y".
and then there's a part of code which makes the message:
                    for ( var i = 48; i <= 90; i++ ){
                      var j = String.fromCharCode(i);
                      if( ig.input.pressed(j) ) {
                        this.message += j;
                      }
                    }

it defines that i pressed 2 buttons in the same time and put chars with low indexes first and with higher indexes after. and i have something like "xy" instead of "yx" only because the index of "x" is lower than "y". and also it's because the engine can't recognize which button was pressed first . as a result it's difficult to type messages.

Does any one know how to fix it? I mean how can i recognize inside the engine which buttons i pressed first and which second. The proper sequence of pressings ??

I probably have to map some events when the button is pressed but maybe there is some functionality already ?

1 decade ago by SpaceHorse

I fixed it. and what i realized that i can't inject ig.Input.keydown function in main.js because it's already mapped earlier. So, i had to rewrite input.js which is not good. If anyone know how to inject keydown function into ig.Input class right way, please write here.
Page 1 of 1
« first « previous next › last »