Jump to content
Sign in to follow this  
casp0or

XayaJS | LibGame-Interface in NodeJS + Electron | "xaya/paper/scissors" 0.0.2 game download

Recommended Posts

Posted (edited)

New version 0.0.2 is now online

Quote

Regards

 
OLD MESSAGE:
 
Hey,
 
I just finished my Xaya-LibGame-Interface, written with NodeJS and Electron. I want to release this on Github, as an easy entry to xaya games, soon after I wrote a little tutorial/doc for it.
 
My first example is a fully working "stone/paper/scissors" game where you can currently play against my server. PvP is coming next release, must debug the lobby system...
   
Just install/extract the game and try to win. 😉 I´m using the cookie file from AppData so no need for an rpc-user or password anymore, but I implemented is as a fallback.
 
-----------------------------------------------------------------------------------------------------------------
 
This game is my first example of how to build an app/game on the xaya-network with javascript.
Quote

Features:

ZMQ connectivity - block attach/detach messages
Bitcoin-Core - "multiwallet" support for sending RPC requests | Reads ".cookie" file to connect from AppData/Roaming/xaya
Electron-DB - Database in JSON format wrapper for database support
Bootstrap v4 
jQuery 3.4.1

 

Backend TO Frontend connection:
Can save "attached" blocks to the electron-db
Can save "pending" blocks to the electron-db
Can delete "detached" blocks from the electron-db

 

Can send "name_update" via RPC to the player´s xaya electron/qt

 

can poll "game_sendupdates" from a preset block
(once initialized polls only from last known block)
(can be used as fallback for daemon not sending game moves)

 

Can fetch "name_list" from the player´s xaya electron/qt

 

To-Do:
Player VS Friend
Player VS Player
Check inserted username against name lsit to verify the move can be send
Build new system for the case that not the latest block is detached
Build a "last played games" list
Build a "your last played games" list
 

Here are some screenshots again:

tiktakto_frontend.thumb.PNG.27ca42ca4d51a3c82198085aea5d4593.PNGtiktakto_frontend_move.thumb.PNG.08ea4d45b83d0bbaa23682f21b0c101a.PNGtiktakto_frontend_pve.thumb.PNG.fb10c49b2c428c552b41ac0ec3aa5536.PNG

Regards
casp0or

Edited by casp0or
  • Like 3
  • Thanks 1

Share this post


Link to post
Share on other sites
Posted (edited)

hmm one second I fix this ... did not test them 😅

Edited by casp0or

Share this post


Link to post
Share on other sites

the zip version at least doesn't get the  .cookie automatically it seems. or if it does the login/password doesn't disappear from the screen.

i used a fixed rpc/user pass and it logs in and says server connected and local xaya connected.

but, it doesn't send a move to xayad even if i use the username with p/ or without the p/

any ideas?

also is it checking/using the game.dat wallet?

Share this post


Link to post
Share on other sites
Posted (edited)
14 hours ago, snailbrain said:

the zip version at least doesn't get the  .cookie automatically it seems.

yes I used an older wallet ... v0.2 is on the way... there was a bug I did not see because of my older wallet version

Edited by casp0or

Share this post


Link to post
Share on other sites
22 hours ago, snailbrain said:

also is it checking/using the game.dat wallet?

Yes I´m using the game.dat wallet 👍

Share this post


Link to post
Share on other sites
26 minutes ago, snailbrain said:

do you put p/ or without?

Enter your username without the p/ and it should work

I try it tomorrow on my work pc ... maybe I can see the error there

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

Your use of this site is governed by our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.