dzuqe / npc Goto Github PK
View Code? Open in Web Editor NEWsimple npc game interactions using a stateful contract and atomic transfers
License: MIT License
simple npc game interactions using a stateful contract and atomic transfers
License: MIT License
First, thank you immensely for the excellent tutorial on Algorand.org, as a web3 (EVM) game developer learning Algorand, it's educational and fun.
I wanted to give a heads up that the tutorial, Simple NPC game interactions using a stateful contract and atomic transfers, has a number of minor mistakes, which are fixed in this repo's code, but haven't been applied to the article yet.
Missing definition of is_creator
(line 10) of contract.py
Bytes("damage")
should be Bytes("injure")
on Line 40 of contract.py
Makefile references to $(ALGO_(DATA)
and $(ALGO__DATA)
(should be $(ALGO_DATA))
Makefiles also require tabs, not spaces (This may not be fixable in the article, depending on their CMS)
goal node start -d $(ALGO_PVTNET_DATA)
is a useful command to add after the private node install. (I'm a complete AlgoN00b!)
creatorAddress
and differentAddress
needing some figuring out. goal account new
was useful for creating the differentAddress
.
It may be helpful to give commands to create and fund a second account:
goal account new
goal account list
goal clerk send -a 200000 -f $CREATOR_ACCOUNT -t $NEW_ACCOUNT
I hope this helps! Thanks again!
I created the test net and started it.
checked the status using goal status
and make status
All looks good.
The
wallet gets created under
~/algorand/algo-builder/infrastructure/node_data/Primary
Not PrimaryNode
like the example says
But when i deploy i get the following error
โ npc make deploy
goal app create --creator IFM4HAAKD3Z7GAOKWQ4SZILY6AMOKHDSW6RWR4MS7MPIC25F4V2E2XDBDE \
--approval-prog ./build/george_interact.teal \
--clear-prog ./build/clear_state.teal \
--local-byteslices 0 \
--local-ints 0 \
--global-byteslices 1 \
--global-ints 1 -d "~/algorand/algo-builder/infrastructure/node_data"
No wallets found. Create a new wallet with `goal wallet new [wallet name]`
The wallets exist under the Primary
Directory
which i tried adding to the path and it complained about not finding algod.
Since this is a beginer example this needs to be fixed and made easy to implement.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.